/* Design tokens */
:root {
  --bg: #F7FAFC;
  --surface: #FFFFFF;
  --text: #0B1324;
  --muted: #5B6474;
  --primary: #00D0B6;
  --primary-contrast: #04121A;
  --accent-navy: #0B1F3A;
  --border: rgba(11, 19, 36, 0.08);
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
  /* East Coast accents */
  --sea: #0077B6;
  --sky: #64C2FF;
  --coral: #FF6B6B;
  --sand: #FCDFA6;
  /* Enterprise additions */
  --surface-2: color-mix(in srgb, var(--surface) 88%, transparent);
  --grid-line: color-mix(in srgb, var(--accent-navy) 6%, transparent);
  --brand-grad-start: var(--sea);
  --brand-grad-end: var(--primary);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; }
}

html[data-theme="dark"] {
  --bg: #0B1324;
  --surface: #0F1B2D;
  --text: #E7EDF5;
  --muted: #A7B0BF;
  --primary: #00D0B6;
  --primary-contrast: #04121A;
  --accent-navy: #0B1F3A;
  --border: rgba(231, 237, 245, 0.12);
  --shadow: 0 4px 18px rgba(0,0,0,0.35);
  /* Enterprise dark variants */
  --surface-2: #0E2437;
  --grid-line: rgba(231, 237, 245, 0.07);
}

/* Base */
* { box-sizing: border-box; }
html { color-scheme: light dark; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { display: block; max-width: 100%; }

h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0.2rem 0 0.6rem; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 0.75rem; }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.25rem); margin: 0 0 0.25rem; }
/* Headings: distinctive but disciplined */
h1, h2, h3 { font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial; letter-spacing: -0.01em; }
h2 { font-weight: 700; }
h3 { font-weight: 600; }
p { margin: 0.4rem 0 1rem; color: var(--muted); }

.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
.section { padding: clamp(2rem, 6vw, 4rem) 0; }

/* Subtle grid background utility */
.bg-grid { position: relative; isolation: isolate; }
.bg-grid::before {
  content: ""; position: absolute; inset: -4rem 0 0 0; z-index: -1;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, var(--grid-line) 22px 23px),
    repeating-linear-gradient(90deg, transparent 0 22px, var(--grid-line) 22px 23px);
  transform: rotate(-1.5deg); opacity: 0.45;
}

/* Mesh glow utility for hero right side */
.mesh { position: absolute; top: 0; right: 0; bottom: 0; left: 50%; filter: blur(36px);
  background:
    radial-gradient(400px 240px at 30% 20%, color-mix(in srgb, var(--sea) 22%, transparent), transparent 60%),
    radial-gradient(420px 260px at 70% 50%, color-mix(in srgb, var(--coral) 20%, transparent), transparent 65%);
  opacity: 0.6; pointer-events: none; }

/* Accessibility */
.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { position: static; width: auto; height: auto; padding: 0.5rem 0.75rem; background: var(--primary); color: var(--primary-contrast); border-radius: 8px; margin: 0.5rem; display: inline-block; }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--primary) 85%, transparent); outline-offset: 2px; border-radius: 10px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.75rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; letter-spacing: 0.2px; color: var(--text); text-decoration: none; font-size: 1.125rem; }
.brand-mark { width: 28px; height: 24px; }
.brand-text { line-height: 1; }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle,
.nav-toggle {
  appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 0.5rem 0.6rem; border-radius: 10px; cursor: pointer; box-shadow: var(--shadow);
}
.nav-toggle { display: inline-flex; flex-direction: column; gap: 3px; }
.nav-toggle .nav-toggle-bar { width: 18px; height: 2px; background: currentColor; border-radius: 2px; }

.primary-nav { display: none; }
.primary-nav ul { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0; }
.primary-nav a { text-decoration: none; color: var(--text); opacity: 0.9; padding: 0.4rem 0.2rem; }
.primary-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .primary-nav { display: block; }
}

/* Mobile nav overlay */
@media (max-width: 767.98px) {
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 64px; 
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; padding: 0.75rem 1rem 1rem; }
  .hide-mobile { display: none; }
}

/* Hero */
.hero {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--sky) 16%, transparent), transparent 40%),
    radial-gradient(900px 300px at 90% -20%, color-mix(in srgb, var(--coral) 18%, transparent), transparent 55%),
    radial-gradient(1200px 380px at 10% -10%, color-mix(in srgb, var(--sea) 18%, transparent), transparent 45%),
    linear-gradient(180deg, color-mix(in srgb, var(--accent-navy) 12%, transparent), transparent 60%);
}
.hero .badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-navy); background: color-mix(in srgb, var(--sky) 22%, transparent); border: 1px solid color-mix(in srgb, var(--sea) 35%, transparent); padding: 0.3rem 0.6rem; border-radius: 999px; }
.hero .badge .badge-icon { color: var(--sea); }
.hero .lead { font-size: clamp(1rem, 2.6vw, 1.25rem); }
.cta-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }

/* Waves */
.wave-divider { line-height: 0; }
.wave-divider .wave { fill: var(--bg); }

/* Trust strip */
.trust-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin-top: 1rem; color: var(--muted); }
.trust-item { display: flex; align-items: center; gap: 0.5rem; }
.trust-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--sea); opacity: 0.7; }

/* Cards and grids */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.card { background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); transition: transform 160ms ease, box-shadow 160ms ease; position: relative; }
.card::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 3px; border-radius: 0 12px 12px 0; background: linear-gradient(180deg, var(--brand-grad-start), var(--brand-grad-end)); opacity: 0.9; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.10); }
.icon { color: var(--primary); margin-bottom: 0.5rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; counter-reset: step; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); position: relative; }
.steps li h3 { margin-top: 0.25rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.6rem 0.9rem; border-radius: 12px; text-decoration: none; font-weight: 600; border: 1px solid transparent; }
.btn-primary { background: linear-gradient(90deg, var(--brand-grad-start), var(--brand-grad-end)); color: var(--primary-contrast); }
.btn-primary:hover { filter: brightness(0.98); }
.btn-secondary { background: transparent; border-color: color-mix(in srgb, var(--coral) 60%, var(--border)); color: var(--coral); }
.btn-secondary:hover { background: color-mix(in srgb, var(--coral) 12%, transparent); }

/* Case study teaser */
.case-teaser { margin-top: 1.25rem; border: 1px solid var(--border); border-radius: 12px; padding: 1rem; background: var(--surface); }
.case-teaser h3 { margin: 0 0 0.25rem; }
.case-teaser p { margin: 0; }

/* Legal */
.legal p { max-width: 70ch; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 0 0 1.25rem; background: color-mix(in srgb, var(--surface) 90%, transparent); }
.site-footer .waterline { line-height: 0; }
.site-footer .waterline .wave { fill: color-mix(in srgb, var(--sea) 10%, var(--surface)); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.icon-lighthouse { width: 18px; height: 18px; color: var(--sea); }
.footer-links { color: var(--muted); }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Motion polish */
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 150ms ease, filter 150ms ease; }
  .btn:hover { transform: translateY(-1px); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

