/* ── Shared site styles (homepage-level pages) ──────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Legacy tokens (kept for compatibility) */
  --white:       #ffffff;
  --light:       #f7f7f7;
  --border:      #e0e0e0;
  --text:        #1c1c1c;
  --muted:       #5a6278;
  --accent:      #0057D9;
  --accent-dark: #004ab8;
  --navy:        #111111;
  --radius:      12px;
  --max-w:       1200px;
  --transition:  0.25s ease;

  /* Semantic surface tokens */
  --bg-page:          #ffffff;
  --bg-surface:       #f8f9fb;
  --bg-surface-alt:   #f5f7ff;
  --bg-card:          #ffffff;

  /* Semantic text tokens */
  --text-heading:     #0d1878;
  --text-body:        #1c1c1c;
  --text-muted:       #5a6278;
  --text-subtle:      #888ea8;

  /* Semantic border tokens */
  --border-card:      #e8eaf0;
  --border-subtle:    #e0e0e0;

  /* Chip / tag tokens */
  --chip-bg:          #f0f3ff;
  --chip-text:        #0d1878;

  /* Form tokens */
  --input-bg:         #f7f7f7;
  --input-text:       #1c1c1c;
  --input-border:     #e0e0e0;
  --input-focus-bg:   #ffffff;

  /* Status tokens */
  --status-success-bg:     #f0fdf4;
  --status-success-border: #bbf7d0;
  --status-success-text:   #15803d;
  --status-error-bg:       #fef2f2;
  --status-error-border:   #fecaca;
  --status-error-text:     #dc2626;
}

/* ── Dark mode token overrides ───────────────────────────── */
/* WCAG AA compliant: all text ≥ 4.5:1 contrast on dark bg   */
html.fn-dark {
  /* Remap legacy tokens */
  --light:       #1e2235;
  --border:      rgba(255,255,255,0.10);
  --text:        #c8ccd8;   /* 8:1 on #0f1117 */
  --muted:       #9aa0b4;   /* 7.5:1 */
  --accent:      #6b9fff;   /* 7.8:1 */
  --accent-dark: #5585ee;

  /* Remap semantic tokens */
  --bg-page:          #0f1117;
  --bg-surface:       #161926;
  --bg-surface-alt:   #161926;
  --bg-card:          #1e2235;

  --text-heading:     #dde1f5;  /* 16.5:1 */
  --text-body:        #c8ccd8;  /* 8:1 */
  --text-muted:       #9aa0b4;  /* 7.5:1 */
  --text-subtle:      #7c839a;  /* 5.1:1 */

  --border-card:      rgba(255,255,255,0.10);
  --border-subtle:    rgba(255,255,255,0.08);

  --chip-bg:          #252b42;
  --chip-text:        #b0b8d0;  /* 6.5:1 */

  --input-bg:         #1e2235;
  --input-text:       #c8ccd8;
  --input-border:     rgba(255,255,255,0.12);
  --input-focus-bg:   #252b42;

  --status-success-bg:     rgba(74, 222, 128, 0.10);
  --status-success-border: rgba(74, 222, 128, 0.25);
  --status-success-text:   #4ade80;  /* 11.4:1 */
  --status-error-bg:       rgba(248, 113, 113, 0.10);
  --status-error-border:   rgba(248, 113, 113, 0.25);
  --status-error-text:     #f87171;  /* 7.1:1 */
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-page);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.2;
  font-weight: 700;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 5vw;
}

section { padding: 80px 0; }
section:last-of-type { padding-bottom: 100px; }

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  color: var(--text-heading);
  margin-bottom: 48px;
}

/* ── Header / Nav ─────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease, border-color 0.3s ease;
}
html.fn-dark header {
  background: rgba(15,17,23,0.92);
  border-bottom-color: rgba(255,255,255,0.08);
}

nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 5vw;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-home {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}
.nav-home:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

/* ── Page hero band ───────────────────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 64px 0 56px;
}
.page-hero .section-label { margin-bottom: 12px; }
.page-hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  background: #000;
  color: rgba(255,255,255,0.55);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.footer-contact { font-size: 13px; text-align: right; line-height: 1.7; }
footer a { color: rgba(255,255,255,0.55); }
footer a:hover { color: #fff; }

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 900px) {
  section { padding: 56px 0; }
  .page-hero { padding: 48px 0 40px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-page);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 16px 5vw; font-size: 15px; }
  .nav-toggle { display: block; }
}

@media (max-width: 600px) {
  section { padding: 40px 0; }
  section:last-of-type { padding-bottom: 80px; }
  .page-hero { padding: 36px 0 30px; }
  .page-hero h1 { font-size: clamp(26px, 8vw, 40px); }
  .section-title { font-size: clamp(22px, 6vw, 32px); margin-bottom: 32px; }
  .container { padding: 0 20px; }

  footer { padding: 24px 0; }
  .footer-inner { padding: 0 4vw; }
  .footer-contact { font-size: 12px; }
}
