:root {
  --bg: #f7fafc;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --accent: #38bdf8;

  --gradient-hero:
    radial-gradient(ellipse at 20% 0%, #dbeafe 0%, transparent 55%),
    radial-gradient(ellipse at 80% 0%, #e0f2fe 0%, transparent 60%),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 60%);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 16px -8px rgba(15, 23, 42, 0.12), 0 2px 6px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 24px 48px -24px rgba(15, 23, 42, 0.18);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --container: 1140px;
  --container-narrow: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary); }

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

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

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-50); color: var(--primary-600);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-text { font-size: 16px; }
.brand-text strong { font-weight: 700; }
.brand-accent { color: var(--primary-600); font-weight: 600; }

.primary-nav { display: flex; gap: 6px; align-items: center; }
.nav-link {
  color: var(--text-muted);
  font-size: 14.5px; font-weight: 500;
  padding: 8px 12px; border-radius: var(--radius-pill);
  transition: color .15s ease, background-color .15s ease;
}
.nav-link:hover, .nav-link.is-active { color: var(--primary-600); background: var(--primary-50); }

.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border);
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: 68px;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    padding: 10px 16px 16px; gap: 2px; display: none;
  }
  .primary-nav.is-open { display: flex; }
  .nav-link { padding: 12px 14px; border-radius: var(--radius-sm); }
}

/* Hero */
.hero { position: relative; padding: 96px 0 80px; overflow: hidden; text-align: center; }
.hero-bg { position: absolute; inset: 0; background: var(--gradient-hero); z-index: -1; }
.hero-inner { max-width: 880px; margin: 0 auto; }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary-50); color: var(--primary-600);
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  padding: 6px 12px; border-radius: var(--radius-pill);
  margin: 0 0 24px;
}
.kicker--centered { margin-left: auto; margin-right: auto; }
.kicker-dot { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; }

.hero-h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -0.02em;
  margin: 0 0 22px; color: var(--text);
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px); color: var(--text-muted);
  max-width: 720px; margin: 0 auto 36px;
}
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.hero-disclaimer {
  font-size: 13px; color: var(--text-subtle);
  max-width: 640px; margin: 32px auto 0;
  border-top: 1px solid var(--border); padding-top: 20px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--primary-600); color: #fff; }
.btn--ghost { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { color: var(--primary-600); border-color: var(--primary-100); }

/* Sections */
.section { padding: 80px 0; }
.section--themes { background: #fff; }
.section--learn { background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%); }
.section--blog { background: #fff; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.01em; line-height: 1.15;
  margin: 0 0 14px;
}
.section-lede { color: var(--text-muted); margin: 0; font-size: 17px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 920px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary-100); }
.card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--primary-50); color: var(--primary-600);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-title { font-family: var(--font-serif); font-weight: 600; font-size: 22px; margin: 0 0 10px; }
.card-text { color: var(--text-muted); margin: 0 0 16px; font-size: 15.5px; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; color: var(--primary-600); }
.card-link:hover { gap: 10px; }

.learn-card, .blog-card {
  display: block; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 24px; color: var(--text);
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.learn-card:hover, .blog-card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  border-color: var(--primary-100); color: var(--text);
}
.learn-card h3, .blog-card h3 { font-family: var(--font-serif); font-weight: 600; font-size: 20px; margin: 8px 0 8px; }
.learn-card p, .blog-card p { margin: 0 0 14px; color: var(--text-muted); font-size: 15px; }
.learn-link { font-weight: 600; color: var(--primary-600); font-size: 14px; }
.blog-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--primary-600); background: var(--primary-50);
  padding: 4px 10px; border-radius: var(--radius-pill);
}

/* Inner pages */
.page-hero {
  position: relative; padding: 72px 0 48px;
  background: var(--gradient-hero); border-bottom: 1px solid var(--border);
}
.page-h1 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.1; letter-spacing: -0.015em;
  margin: 0 0 16px; max-width: 820px;
}
.page-intro { font-size: clamp(16px, 1.5vw, 19px); color: var(--text-muted); max-width: 720px; margin: 0; }

.page-body { padding: 64px 0 96px; background: #fff; }
.prose-section { margin: 0 0 40px; }
.prose-section h2 {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -0.01em; line-height: 1.2;
  margin: 0 0 14px;
}
.prose-section p, .prose-section ul, .prose-section ol { color: var(--text-muted); margin: 0 0 14px; font-size: 17px; line-height: 1.7; }
.prose-section ul, .prose-section ol { padding-left: 22px; }
.prose-section li { margin-bottom: 6px; }
.prose-section strong { color: var(--text); font-weight: 600; }

.disclaimer-callout {
  border-left: 3px solid var(--primary);
  background: var(--primary-50); color: var(--primary-600);
  padding: 16px 18px; border-radius: 8px;
  font-weight: 500; font-size: 16px; margin: 0;
}

/* Blog index */
.article-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.article-list__item {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm);
}
.article-list__tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-600); margin: 0 0 8px; }
.article-list__title { font-family: var(--font-serif); font-weight: 600; font-size: 24px; margin: 0 0 8px; }
.article-list__title a { color: var(--text); }
.article-list__title a:hover { color: var(--primary-600); }
.article-list__excerpt { color: var(--text-muted); margin: 0 0 12px; }
.article-list__link { font-weight: 600; color: var(--primary-600); font-size: 14.5px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 36px; }
@media (max-width: 720px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--primary-50); border: 1px solid var(--primary-100); border-radius: var(--radius-lg); padding: 22px; }
.contact-card h2 { font-family: var(--font-serif); font-size: 18px; margin: 0 0 6px; color: var(--primary-600); }
.contact-card p { margin: 0; color: var(--text); }
.contact-card a { color: var(--text); }
.contact-card a:hover { color: var(--primary-600); }

.contact-note {
  border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 22px; background: #fff; margin: 0 0 36px;
}
.contact-note h2 { font-family: var(--font-serif); font-size: 18px; margin: 0 0 8px; }
.contact-note p { color: var(--text-muted); margin: 0 0 8px; }

.contact-form {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow-sm); display: grid; gap: 16px;
}
.contact-form h2 { font-family: var(--font-serif); margin: 0; font-size: 22px; }
.contact-form__hint { margin: -8px 0 0; color: var(--text-subtle); font-size: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--text);
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100);
}
.contact-form button { justify-self: start; }
.contact-form__success { margin: 0; padding: 12px 14px; background: var(--primary-50); color: var(--primary-600); border-radius: 8px; font-weight: 500; }

/* Footer */
.site-footer { background: #0b1220; color: #cbd5e1; padding: 64px 0 28px; margin-top: 0; }
.brand--footer { color: #fff; }
.brand--footer .brand-text { color: #fff; }
.brand--footer .brand-accent { color: #93c5fd; }
.brand--footer .brand-mark { background: rgba(147,197,253,0.12); color: #93c5fd; }

.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-tagline { color: #94a3b8; margin: 14px 0 0; font-size: 14.5px; max-width: 320px; }
.footer-heading { color: #fff; margin: 0 0 12px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-list a { color: #cbd5e1; font-size: 14.5px; }
.footer-list a:hover { color: #fff; }

.footer-address { font-style: normal; color: #cbd5e1; font-size: 14.5px; line-height: 1.7; }
.footer-address a { color: #cbd5e1; }
.footer-address a:hover { color: #fff; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.footer-disclaimer { font-size: 13px; color: #94a3b8; margin: 0; max-width: 720px; }
.footer-copy { font-size: 13px; color: #64748b; margin: 0; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
