/* ==========================================================================
   Steadbrook Roofing design tokens
   Source of truth for colour, type, radius, spacing and effects.

   Two themes share one set of token names:
     - NAVY (default, :root)  header, heroes, trust band, CTA panels, footer
     - LIGHT (.sb-light)      every content section between them
   Components only ever reference the token, so a card or heading restyles
   itself by where it sits on the page. See site.css for which wrappers carry
   which theme.
   ========================================================================== */

:root, .sb-dark, .sb-panel, main > .sb-section.sb-dark, main > .sb-cta-section.sb-dark, main > .sb-blocks.sb-dark {
  /* ---- Ground and surfaces (brand navy family, darkest to lightest) ---- */
  --sb-bg-deep: #0E1B38;        /* footer */
  --sb-bg: #142446;             /* page canvas, heroes */
  --sb-band: #112040;           /* trust band, standards strip */
  --sb-surface: #1B2D55;        /* large cards, glance panel */
  --sb-surface-2: #1F3360;      /* standard cards, review cards, chips */
  --sb-surface-3: #24396A;      /* form inputs */
  --sb-glass: rgba(20, 36, 70, 0.72);        /* pill eyebrow, framed photo ring */
  --sb-glass-strong: rgba(14, 27, 56, 0.84); /* form panel inside CTA */
  --sb-photo-bg: #1B2D55;       /* behind photos while they load */
  --sb-stripe-a: #1B2D55;       /* placeholder stripes (until real photos arrive) */
  --sb-stripe-b: #182850;
  --sb-confirm: #FFD27A;        /* [CONFIRM] placeholder text */
  --sb-confirm-bg: transparent;

  /* ---- Brand navy family (deep panels and blooms) ---- */
  --sb-navy: #1D2F57;           /* Steadbrook brand navy */
  --sb-navy-panel: #22386B;     /* CTA panel radial start */
  --sb-navy-card: #1F3360;      /* highlighted region card, video panel */
  --sb-navy-tint: #22386B;      /* repairs bento card radial start */

  /* ---- Signal accent: bright sky blue ---- */
  --sb-accent: #38BDF8;         /* fills: buttons, pills, icons on navy */
  --sb-accent-ink: #38BDF8;     /* accent used AS TEXT (two-tone headings, labels) */
  --sb-accent-icon: #38BDF8;    /* accent used for line icons and ticks */
  --sb-accent-soft: rgba(56, 189, 248, 0.38);  /* glows, accent borders */
  --sb-accent-faint: rgba(56, 189, 248, 0.14); /* selected chip fill, tints */
  --sb-accent-hover: #7DD3FC;   /* link hover */
  --sb-on-accent: #0B1730;      /* text on accent buttons (white fails contrast) */
  --sb-gold: #FFB224;           /* review stars only */
  --sb-live: #3FD18A;           /* status dot */

  /* ---- Text (all pass 4.5:1 on --sb-bg unless noted) ---- */
  --sb-text: #FFFFFF;           /* headings, primary text */
  --sb-text-2: #DCE4F2;         /* nav links, chip text, secondary links */
  --sb-text-body: #C3CEE3;      /* paragraph copy */
  --sb-text-eyebrow: #B8C4DC;   /* eyebrow labels, form labels */
  --sb-text-caption: #9AA9C7;   /* captions, meta */
  --sb-text-muted-head: var(--sb-accent-ink);      /* second half of two-tone headings */
  --sb-text-muted-head-cta: var(--sb-accent-hover); /* same, on the CTA panel */
  --sb-text-legal: #8E9DBB;     /* footer legal small print */
  --sb-divider-glyph: #4D5F8A;  /* slash separators in the proof row (decorative) */

  /* ---- Hairlines ---- */
  --sb-line-faint: rgba(255, 255, 255, 0.08);
  --sb-line: rgba(255, 255, 255, 0.12);      /* default card border */
  --sb-line-nav: rgba(255, 255, 255, 0.10);  /* header / footer / band borders */
  --sb-line-mid: rgba(255, 255, 255, 0.14);  /* framed photos, pill eyebrow, chips */
  --sb-line-strong: rgba(255, 255, 255, 0.18);
  --sb-line-input: rgba(255, 255, 255, 0.20);
  --sb-line-button: rgba(255, 255, 255, 0.28); /* secondary (ghost) button */

  /* ---- Effects ---- */
  --sb-shadow: 0 24px 60px rgba(5, 12, 30, 0.45);
  --sb-shadow-sm: 0 8px 24px rgba(5, 12, 30, 0.30);
  --sb-glow-dot: 0 0 12px var(--sb-accent-soft);
  --sb-glow-btn: 0 10px 32px var(--sb-accent-soft);
  --sb-bloom-blur: 50px;
  /* Slate courses: staggered tiles drawn once, repeated behind navy bands */
  --sb-slate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.045)' stroke-width='1'%3E%3Cpath d='M0 0.5H160M0 40.5H160'/%3E%3Cpath d='M80.5 0V40M0.5 40V80M159.5 40V80'/%3E%3C/g%3E%3C/svg%3E");
  --sb-slate-size: 160px 80px;
}

/* ---- Light theme: content sections ----
   Applied to every content wrapper between the navy header/hero and the navy
   footer. Add .sb-light to opt anything else in; .sb-dark opts back out. */
.sb-light, main > .sb-section, main > .sb-cta-section, main > .sb-blocks, .sb-dark .sb-light {
  --sb-bg-deep: #E9EEF6;
  --sb-bg: #F4F6FA;
  --sb-band: #E9EEF6;
  --sb-surface: #FFFFFF;
  --sb-surface-2: #FFFFFF;
  --sb-surface-3: #FFFFFF;
  --sb-glass: rgba(255, 255, 255, 0.82);
  --sb-glass-strong: rgba(255, 255, 255, 0.94);
  --sb-photo-bg: #DCE3EE;
  --sb-stripe-a: #E3E8F0;
  --sb-stripe-b: #DCE3EE;
  --sb-confirm: #8A4B00;
  --sb-confirm-bg: #FFF1C2;

  --sb-navy-panel: #22386B;
  --sb-navy-card: #E6F5FD;      /* highlighted card: pale sky tint */
  --sb-navy-tint: #E6F5FD;

  --sb-accent-ink: #0369A1;     /* sky-700: 5.9:1 on white */
  --sb-accent-icon: #0284C7;    /* sky-600: 4:1 on white, fine for icons */
  --sb-accent-hover: #0369A1;
  --sb-accent-faint: rgba(56, 189, 248, 0.16);

  --sb-text: #0F1B37;
  --sb-text-2: #2B3A5C;
  --sb-text-body: #4A5872;
  --sb-text-eyebrow: #4A5872;
  --sb-text-caption: #5E6C87;   /* 4.9:1 on the light canvas */
  --sb-text-legal: #5E6C87;
  --sb-divider-glyph: #B6C0D3;
  --sb-gold: #F59E0B;           /* deeper amber so stars hold up on white */

  --sb-line-faint: rgba(15, 27, 55, 0.06);
  --sb-line: rgba(15, 27, 55, 0.10);
  --sb-line-nav: rgba(15, 27, 55, 0.10);
  --sb-line-mid: rgba(15, 27, 55, 0.14);
  --sb-line-strong: rgba(15, 27, 55, 0.18);
  --sb-line-input: rgba(15, 27, 55, 0.22);
  --sb-line-button: rgba(15, 27, 55, 0.30);

  --sb-shadow: 0 18px 50px rgba(15, 27, 55, 0.10);
  --sb-shadow-sm: 0 6px 20px rgba(15, 27, 55, 0.08);
  --sb-glow-dot: none;
  --sb-glow-btn: 0 10px 28px rgba(56, 189, 248, 0.35);
  --sb-slate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cg fill='none' stroke='rgba(15,27,55,0.05)' stroke-width='1'%3E%3Cpath d='M0 0.5H160M0 40.5H160'/%3E%3Cpath d='M80.5 0V40M0.5 40V80M159.5 40V80'/%3E%3C/g%3E%3C/svg%3E");
}

:root {
  /* ---- Typography ---- */
  --sb-font-sans: 'Geist', 'Inter', system-ui, sans-serif;
  --sb-font-mono: 'Geist', 'Inter', system-ui, sans-serif; /* labels now use the sans face */

  --sb-fs-h1: clamp(38px, 4.6vw, 64px);          /* home hero (split layout) */
  --sb-fs-h1-inner: clamp(40px, 5.4vw, 72px);    /* services / projects hero */
  --sb-fs-h1-split: clamp(38px, 4.8vw, 64px);    /* about / contact / service / area hero */
  --sb-fs-h2: clamp(32px, 4vw, 50px);            /* section heading */
  --sb-fs-h2-block: clamp(28px, 3.2vw, 40px);    /* heading inside a service block */
  --sb-fs-h2-cta: clamp(30px, 3.8vw, 46px);      /* heading in a CTA band */
  --sb-fs-h3-lg: 26px;
  --sb-fs-h3: 24px;
  --sb-fs-h3-sm: 19px;
  --sb-fs-stat: 52px;
  --sb-fs-stat-sm: 44px;
  --sb-fs-lead: 19px;
  --sb-fs-body: 17px;
  --sb-fs-small: 15px;
  --sb-fs-caption: 14px;
  --sb-fs-label: 13px;
  --sb-fs-eyebrow: 12px;
  --sb-fs-micro: 11px;

  --sb-lh-display: 1.0;
  --sb-lh-heading: 1.06;
  --sb-lh-body: 1.55;

  --sb-ls-h1: -0.03em;
  --sb-ls-h2: -0.025em;
  --sb-ls-h3: -0.015em;
  --sb-ls-eyebrow: 0.12em;
  --sb-ls-mono: 0.08em;

  /* ---- Radii ---- */
  --sb-r-pill: 999px;
  --sb-r-panel: 28px;   /* CTA panel */
  --sb-r-frame: 22px;   /* framed photo outer */
  --sb-r-block: 24px;   /* service blocks, feature card, form panel */
  --sb-r-card-lg: 20px; /* bento cards, region cards */
  --sb-r-card: 18px;    /* stat tiles, review cards, project cards */
  --sb-r-media: 16px;   /* image inside a frame */
  --sb-r-sm: 14px;
  --sb-r-input: 12px;

  /* ---- Layout and spacing ---- */
  --sb-container: 1200px;
  --sb-gutter: clamp(16px, 4vw, 40px);
  --sb-section-y: 72px;
  --sb-hero-top: 72px;
  --sb-cta-bottom: 96px;
  --sb-head-gap: 36px;     /* section header to content */
  --sb-grid-gap: 16px;
  --sb-card-pad: 28px;
  --sb-card-pad-sm: 24px;
  --sb-tap: 44px;          /* minimum touch target */
  --sb-btn-h: 54px;        /* hero / CTA buttons */
  --sb-input-h: 48px;
  --sb-ridge-h: 56px;      /* height of the pitched section dividers */
}
/* Phones: tighter vertical rhythm so the page does not run on */
@media (max-width: 760px) {
  :root {
    --sb-section-y: 60px;
    --sb-head-gap: 32px;
    --sb-cta-bottom: 88px;
    --sb-card-pad: 22px;
    --sb-card-pad-sm: 20px;
  }
}

/* ---- Base ---- */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sb-bg);
  color: var(--sb-text);
  font-family: var(--sb-font-sans);
  font-size: var(--sb-fs-body);
  line-height: var(--sb-lh-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--sb-text); text-decoration: none; }
a:hover { color: var(--sb-accent-hover); }
::selection { background: var(--sb-accent); color: var(--sb-on-accent); }
:focus-visible { outline: 2px solid var(--sb-accent); outline-offset: 3px; border-radius: 6px; }
