/* ===== Design Tokens ===== */
:root {
  --primary: #2563EB;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff4ff;
  --text: #0f172a;
  --text-muted: #475569;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, .12);
  --radius: 16px;
  --radius-sm: 10px;
  --max: 1120px;
  --nav-h: 68px;
}

[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --primary-soft: #1e293b;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --bg: #0b1120;
  --surface: #111a2e;
  --surface-alt: #0f1830;
  --border: #1e293b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .45);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, .55);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== Navbar ===== */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.navbar.scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }

.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; }
.logo-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 800; font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}

.nav-menu { list-style: none; display: flex; align-items: center; gap: 28px; }
.nav-menu a { color: var(--text-muted); font-weight: 500; font-size: .95rem; transition: color .2s ease; }
.nav-menu a:hover { color: var(--primary); }

.theme-toggle {
  display: grid; place-items: center;
  width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer; transition: all .2s ease;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .25); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37, 99, 235, .32); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(70px, 12vw, 130px) 0 clamp(60px, 9vw, 110px);
  background:
    radial-gradient(60% 55% at 50% 0%, var(--primary-soft) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg));
}
.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; }
.eyebrow {
  display: inline-block; font-weight: 600; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.75rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 800;
  margin-bottom: 20px;
}
.hero-desc { font-size: clamp(1.05rem, 2.5vw, 1.28rem); color: var(--text-muted); max-width: 620px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: clamp(60px, 9vw, 100px) 0; }
.section-alt { background: var(--surface-alt); }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.02em; font-weight: 800; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-sub { color: var(--text-muted); margin-top: 12px; font-size: 1.05rem; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--text-muted); text-align: center; margin-top: 22px; }
#about h2 { text-align: center; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-cards, .legal-cards { }
.legal-cards { grid-template-columns: repeat(2, 1fr); max-width: 820px; margin: 0 auto; }

.card {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 10px; letter-spacing: -.01em; }
.card p { color: var(--text-muted); font-size: .98rem; }
.card a { color: var(--primary); font-weight: 600; }
.card a:hover { text-decoration: underline; }

.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary); margin-bottom: 20px;
}

.card-link { display: block; padding-right: 52px; }
.card-arrow {
  position: absolute; top: 32px; right: 28px; color: var(--primary);
  font-size: 1.3rem; transition: transform .25s ease;
}
.card-link:hover .card-arrow { transform: translateX(5px); }

/* ===== Footer ===== */
.footer { background: var(--surface-alt); border-top: 1px solid var(--border); padding: 44px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-muted); font-size: .95rem; transition: color .2s ease; }
.footer-links a:hover { color: var(--primary); }
.footer-copy { color: var(--text-muted); font-size: .9rem; }

/* ===== Legal Pages ===== */
.legal-page { padding: clamp(50px, 8vw, 90px) 0; }
.legal-page .container { max-width: 820px; }
.legal-page h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: -.02em; margin-bottom: 8px; }
.legal-page .updated { color: var(--text-muted); font-size: .92rem; margin-bottom: 40px; }
.legal-page h2 { font-size: 1.35rem; margin: 36px 0 12px; letter-spacing: -.01em; }
.legal-page p, .legal-page li { color: var(--text-muted); margin-bottom: 12px; }
.legal-page ul { padding-left: 22px; margin-bottom: 12px; }
.legal-page a { color: var(--primary); font-weight: 500; }
.legal-page a:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 600; margin-bottom: 30px; }
.back-link:hover { text-decoration: underline; }

/* ===== Fade-in Animations ===== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px; box-shadow: var(--shadow-md);
    transform: translateY(-120%); transition: transform .3s ease; visibility: hidden;
  }
  .nav-menu.open { transform: translateY(0); visibility: visible; }
  .nav-menu li { width: 100%; }
  .nav-menu a { display: block; padding: 12px 4px; width: 100%; font-size: 1.05rem; }
  .theme-toggle { margin-top: 8px; }
  .cards, .legal-cards { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .btn { width: 100%; }
  .hero-cta { flex-direction: column; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition: none !important; }
}
