:root {
  --color-primary: #404040;
  --color-secondary: #003fbd;
  --color-accent: #0891b2;
  --color-background: #ffffff;
  --color-surface: #f1f5f9;
  --color-text: #0f172a;
  --color-muted-text: #64748b;
  --color-border: #cbd5e1;
  --color-success: #047857;
  --color-warning: #b45309;
  --color-danger: #b91c1c;
  --font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
  --font-body: 'Open Sans', system-ui, -apple-system, sans-serif;
  --font-size-base: 16px;
  --line-height: 1.6;
  --weight-heading: 600;
  --weight-body: 400;
  --font-size-h1: 31.25px;
  --font-size-h2: 25.00px;
  --font-size-h3: 20.00px;
  --font-size-h4: 16.00px;
  --radius-button: 3px;
  --radius-surface: 3px;
  --button-padding: 10px 20px;
  --button-font-size: 16px;
  --weight-button: 600;
  --content-width: 1140px;
  --page-gutter: 20px;
  --sp-none: 0;
  --sp-xs: 8px;
  --sp-sm: 16px;
  --sp-md: 32px;
  --sp-lg: 64px;
  --sp-xl: 96px;
  --sp-2xl: 144px;
  --section-rhythm: 64px;
}

* { box-sizing: border-box; }

img, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

iframe, table { max-width: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  font-weight: var(--weight-body);
  color: var(--color-text);
  background: var(--color-background);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: 1.2;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: var(--font-size-h4); }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

a { color: var(--color-primary); }

.btn {
  display: inline-block;
  padding: var(--button-padding);
  font-size: var(--button-font-size);
  font-weight: var(--weight-button);
  border-radius: var(--radius-button);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
}

.btn, .btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-secondary {
  background: var(--color-secondary);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.site-header {
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}

.site-header .container { display: flex; align-items: center; gap: 24px; }

.site-header nav { display: flex; gap: 16px; }

.site-header.nav-left nav { margin-right: auto; }

.site-header.nav-right nav { margin-left: auto; }

.site-header.nav-center nav { margin: 0 auto; }

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.site-header .site-logo {
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.site-title {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  font-size: calc(var(--font-size-base) * 1.15);
  color: var(--color-text);
}

.site-header .header-cta { margin-left: auto; }

.header-centered .site-header .container { flex-direction: column; gap: 10px; }

.header-centered .site-header nav { margin: 0; }

.header-centered .site-header .header-cta { margin-left: 0; }

.header-minimal .site-header { border-bottom: 0; }

.header-minimal .site-header nav { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  color: var(--color-muted-text);
  padding: 40px 0;
  font-size: 14px;
}

.site-footer a { color: var(--color-muted-text); }

.site-footer .footer-grid { display: grid; gap: 28px; }

.footer-simple .footer-grid { grid-template-columns: 1fr; text-align: center; }

.footer-compact .footer-grid { grid-template-columns: 1fr; }

.footer-compact .footer-nav { display: none; }

.footer-columns .footer-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.footer-corporate .footer-grid { grid-template-columns: 2fr 1fr 1fr; }

.site-footer .footer-social { display: flex; gap: 14px; flex-wrap: wrap; }

.site-footer .site-logo {
  max-height: 40px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.site-footer .footer-about { display: grid; gap: 12px; align-content: start; }

.site-footer .footer-description {
  margin: 0;
  line-height: var(--line-height);
  color: var(--color-muted-text);
}

.site-footer .footer-contact {
  font-style: normal;
  display: grid;
  gap: 6px;
  line-height: var(--line-height);
}

.site-footer .footer-copyright {
  margin: 28px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted-text);
}

.footer-simple .footer-copyright, .footer-compact .footer-copyright { text-align: center; }

@media (max-width: 1024px) {
  .footer-corporate .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .footer-corporate .footer-grid, .footer-columns .footer-grid { grid-template-columns: 1fr; }
  .site-header .container { flex-direction: column; gap: 10px; }
  .site-header .header-cta { margin-left: 0; }
  .site-footer .footer-copyright { text-align: center; }
}


/* --- Block rhythm ------------------------------------------------------- */
section.block { padding: var(--section-rhythm) 0; }

.sp-top-none { padding-top: var(--sp-none); }
.sp-top-xs { padding-top: var(--sp-xs); }
.sp-top-sm { padding-top: var(--sp-sm); }
.sp-top-md { padding-top: var(--sp-md); }
.sp-top-lg { padding-top: var(--sp-lg); }
.sp-top-xl { padding-top: var(--sp-xl); }
.sp-top-2xl { padding-top: var(--sp-2xl); }

.sp-bottom-none { padding-bottom: var(--sp-none); }
.sp-bottom-xs { padding-bottom: var(--sp-xs); }
.sp-bottom-sm { padding-bottom: var(--sp-sm); }
.sp-bottom-md { padding-bottom: var(--sp-md); }
.sp-bottom-lg { padding-bottom: var(--sp-lg); }
.sp-bottom-xl { padding-bottom: var(--sp-xl); }
.sp-bottom-2xl { padding-bottom: var(--sp-2xl); }

.block.align-left { text-align: left; }
.block.align-center { text-align: center; }
.block.align-right { text-align: right; }

/* A background image is set as an inline declaration by the renderer; these
   make it behave rather than tile. */
.block[style*="background-image"] {
    background-size: cover;
    background-position: center;
}

/* --- Layout blocks ------------------------------------------------------ */
/* A container carries the padding for the group, so the blocks inside it do
   not each add their own on top. */
.block-container > .container > .block { padding-top: 0; padding-bottom: 0; }
.block-container.preset-narrow > .container { max-width: 760px; }
.block-container.preset-full > .container { max-width: none; padding: 0; }

.block-row { display: grid; gap: 32px; }
.block-column { min-width: 0; }

/* Column counts.

   One set of rules serves the row block and the gallery grid, so "three across"
   means the same thing wherever it is asked for. */
.cols-desktop-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.cols-desktop-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-desktop-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-desktop-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-desktop-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols-desktop-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.hide-desktop { display: none; }

/* --- Hero --------------------------------------------------------------- */
.block-hero { background: var(--color-surface); text-align: left; }
.block-hero.align-center { text-align: center; }
.block-hero.align-right { text-align: right; }
.block-hero h1 { margin: 0 0 12px; }
.block-hero.preset-minimal { background: transparent; }
.block-hero.preset-overlay { position: relative; color: #fff; }
.block-hero.preset-overlay h1, .block-hero.preset-overlay p { position: relative; }

/* --- Rich text ---------------------------------------------------------- */
.block-rich-text.preset-narrow .container { max-width: 680px; }
.block-rich-text.preset-wide .container { max-width: 1320px; }

/* --- Pictures ----------------------------------------------------------- */
/* The retired image type. Kept because pages written before the current
   schema still carry it, and a customer does not lose a picture because a
   schema moved on. */
.legacy-image { margin: 0; }
.legacy-image figcaption { color: var(--color-muted-text); font-size: 14px; margin-top: 8px; }

.block-image-text .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.block-image-text.image-right .grid > figure { order: 2; }
.block-image-text .grid > figure { margin: 0; min-width: 0; }
.block-image-text.preset-card .grid > div {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-surface);
    padding: 20px;
}
.block-image-text.preset-wide-image .grid { grid-template-columns: 2fr 1fr; }

/* --- Gallery ------------------------------------------------------------ */
.gallery-grid { display: grid; gap: 16px; }
.gallery-grid figure { margin: 0; min-width: 0; }
.block-gallery.preset-wide .container { max-width: 1440px; }

/* --- Call to action ----------------------------------------------------- */
.block-cta { background: var(--color-accent); color: #fff; }
.block-cta a { color: #fff; }
.block-cta.preset-boxed .container > * { max-width: 720px; margin-inline: auto; }

/* --- Cards -------------------------------------------------------------- */
.card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-surface);
    padding: 20px;
}

/* --- Repeating entries --------------------------------------------------- */
/* One grid serves features, statistics and testimonials. The entry count per
   device comes from the block's responsive settings; without one it fits as
   many as will comfortably sit side by side. */
.item-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.block-features.preset-boxed .block-feature-item,
.block-stats.preset-boxed .block-stat-item,
.block-testimonials.preset-boxed .block-testimonial-item {
    background: var(--color-surface);
    border-radius: var(--radius-surface);
    padding: 20px;
}

.block-features.preset-bordered .block-feature-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-surface);
    padding: 20px;
}

.block-feature-item h3 { margin: 0 0 8px; font-size: 18px; }
.block-lead { color: var(--color-muted-text); margin-top: 0; }

.stat-value { font-size: 36px; font-weight: 700; line-height: 1.1; color: var(--color-primary); }
.stat-label { font-weight: 500; margin-top: 4px; }
.block-stat-item small { color: var(--color-muted-text); }

.block-testimonial-item { margin: 0; }
.block-testimonial-item blockquote {
    margin: 0 0 12px;
    font-size: 17px;
    line-height: 1.6;
}
.block-testimonial-item figcaption { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.block-testimonial-item figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.cite-name { font-weight: 600; }
.cite-role { color: var(--color-muted-text); font-size: 14px; }

/* --- FAQ ---------------------------------------------------------------- */
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.block-faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-surface);
    padding: 14px 18px;
}
.block-faq-item > summary { cursor: pointer; font-weight: 600; }
.faq-answer { padding-top: 8px; }
.block-faq.preset-boxed .faq-list {
    background: var(--color-surface);
    padding: 16px;
    border-radius: var(--radius-surface);
}

/* --- Map ---------------------------------------------------------------- */
.map-body { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
.map-image { margin: 0; min-width: 0; }
.block-map.preset-wide .map-body { grid-template-columns: 1fr; }
.block-map.preset-boxed .map-details {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-surface);
    padding: 20px;
}
.map-details address { font-style: normal; line-height: 1.7; }

/* --- Forms -------------------------------------------------------------- */
/* Field sizing lives here rather than with the chrome: a form is content, and
   it has to be usable whichever theme is drawing the page. */
form.cms-form label { display: block; margin: 12px 0 4px; font-weight: 500; }
form.cms-form input, form.cms-form textarea, form.cms-form select {
    width: 100%;
    max-width: 100%;
    padding: 9px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-button);
    font: inherit;
}
form.cms-form textarea { min-height: 120px; resize: vertical; }
.block-form.preset-boxed form.cms-form {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-surface);
    padding: 24px;
}
.cms-preview-note { color: var(--color-muted-text); font-size: 13px; }

/* --- Presets that had no rules ------------------------------------------
   These three have been offered in the editor since the schema was written
   and never carried a single declaration in either theme, so choosing one
   changed nothing at all. Structural only, and written for the markup the
   templates already emit rather than asking for new wrappers. */

/* A hero with its picture beside the text. The template renders the figure as
   a sibling of the heading, so the picture leaves the flow and the text wraps
   beside it — which needs no extra element. */
.block-hero.preset-split > .container::after { content: ""; display: table; clear: both; }
.block-hero.preset-split > .container > figure {
    float: right;
    width: 45%;
    margin: 0 0 20px 32px;
}

/* A gallery that packs pictures of unequal height. Columns rather than a grid,
   because a grid row is always as tall as the tallest picture in it. */
.block-gallery.preset-masonry .gallery-grid {
    display: block;
    column-count: 3;
    column-gap: 16px;
}
.block-gallery.preset-masonry .gallery-grid > img {
    display: block;
    width: 100%;
    margin: 0 0 16px;
    break-inside: avoid;
}

/* A call to action that reads as one line rather than a stack. */
.block-cta.preset-banner > .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 24px;
    text-align: center;
}
.block-cta.preset-banner > .container > * { margin: 0; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1024px) {
    .hide-desktop { display: revert; }
    .hide-tablet { display: none; }

    .cols-tablet-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .cols-tablet-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols-tablet-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cols-tablet-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cols-tablet-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .cols-tablet-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

    .block-gallery.preset-masonry .gallery-grid { column-count: 2; }
}

@media (max-width: 720px) {
    .hide-tablet { display: revert; }
    .hide-mobile { display: none; }

    /* Without an explicit mobile choice, a multi-column row stacks. That is
       almost always what was meant, and it is the safe direction to be wrong
       in — a six-column row on a phone is unreadable. */
    .block-row, .gallery-grid { grid-template-columns: minmax(0, 1fr); }

    .cols-mobile-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .cols-mobile-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cols-mobile-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cols-mobile-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cols-mobile-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .cols-mobile-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

    /* The two-up blocks stack. Each was a pair of columns wide enough to
       need the whole screen on a phone. */
    .block-image-text .grid,
    .block-image-text.preset-wide-image .grid { grid-template-columns: 1fr; }
    .map-body { grid-template-columns: 1fr; }

    /* A floated hero picture beside text is unreadable at this width. */
    .block-hero.preset-split > .container > figure {
        float: none;
        width: auto;
        margin: 0 0 20px;
    }
    .block-gallery.preset-masonry .gallery-grid { column-count: 1; }
}
