:root {
  --brand-navy: #0f172a;
  --brand-blue: #2563eb;
  --brand-blue-light: #eff6ff;
  --brand-teal: #0d9488;
  --brand-teal-light: #f0fdfa;
  --brand-green: #16a34a;
  --brand-purple: #7c3aed;
  --brand-purple-light: #f5f3ff;
  --brand-orange: #ea580c;
  --brand-orange-light: #fff7ed;
  --brand-rose: #e11d48;
  --bg-light: #f8fafc;
  --bg-card: #ffffff;
  --text-body: #334155;
  --text-heading: #0f172a;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --border-light: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius: 10px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --container: 1140px;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-body); background: #fff; line-height: 1.6; -webkit-font-smoothing: antialiased; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-weight: 600; font-size: .9rem; padding: 12px 28px; border-radius: var(--radius); border: none; cursor: pointer; transition: all .2s; text-decoration: none; line-height: 1.3; }
.btn-primary { background: var(--brand-blue); color: #fff; box-shadow: 0 2px 8px rgba(37,99,235,.3); }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,99,235,.35); text-decoration: none; }
.btn-secondary { background: #fff; color: var(--brand-blue); border: 2px solid var(--brand-blue); }
.btn-secondary:hover { background: var(--brand-blue-light); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border-light); }
.btn-ghost:hover { border-color: var(--brand-blue); color: var(--brand-blue); text-decoration: none; }
.btn-lg { font-size: 1rem; padding: 16px 36px; border-radius: 12px; }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Header */
.site-header { padding: 16px 0; border-bottom: 1px solid var(--border-light); background: #fff; position: sticky; top: 0; z-index: 100; }
.site-header-inner { display: flex; align-items: center; justify-content: space-between; }
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-blue); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: .85rem; }
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--brand-navy); }
.site-nav { display: flex; align-items: center; gap: 8px; }
.nav-link { font-family: var(--font-display); font-size: .88rem; font-weight: 600; color: var(--text-muted); padding: 8px 16px; border-radius: var(--radius); transition: all .15s; text-decoration: none; }
.nav-link:hover { color: var(--brand-blue); background: var(--brand-blue-light); text-decoration: none; }
.nav-link-primary { background: var(--brand-blue); color: #fff !important; }
.nav-link-primary:hover { background: #1d4ed8; }

/* Locale Switcher */
.locale-switcher { display: flex; align-items: center; gap: 2px; margin-left: 8px; padding-left: 8px; border-left: 1px solid var(--border-light); }
.locale-switcher-link { font-family: var(--font-display); font-size: .72rem; font-weight: 700; color: var(--text-faint); padding: 4px 7px; border-radius: 6px; text-decoration: none; letter-spacing: .04em; transition: all .15s; }
.locale-switcher-link:hover { color: var(--brand-blue); background: var(--brand-blue-light); text-decoration: none; }
.locale-switcher-link.is-active { color: var(--brand-blue); background: var(--brand-blue-light); }

/* Hero */
.hero-section { padding: 80px 0 60px; background: linear-gradient(180deg, var(--brand-blue-light) 0%, #fff 100%); }
.hero-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border-light); border-radius: 100px; padding: 6px 16px; font-size: .8rem; font-weight: 600; color: var(--brand-blue); margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.hero-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-green); }
.hero-title { font-family: var(--font-display); font-size: 3rem; font-weight: 800; color: var(--brand-navy); line-height: 1.15; margin-bottom: 16px; letter-spacing: -.02em; }
.hero-title span { background: linear-gradient(135deg, var(--brand-blue), var(--brand-teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 32px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; justify-content: center; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }

/* Tools Grid */
.tools-section { padding: 80px 0; }
.section-label { font-family: var(--font-display); font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-blue); margin-bottom: 12px; }
.section-title { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--brand-navy); margin-bottom: 12px; line-height: 1.2; }
.section-subtitle { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 48px; line-height: 1.5; max-width: 600px; }
.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tool-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-sm); transition: all .25s; position: relative; overflow: hidden; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.tool-card:nth-child(1)::before { background: var(--brand-blue); }
.tool-card:nth-child(2)::before { background: var(--brand-teal); }
.tool-card:nth-child(3)::before { background: var(--brand-purple); }
.tool-card:nth-child(4)::before { background: var(--brand-orange); }
.tool-card:nth-child(5)::before { background: var(--brand-rose); }
.tool-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 20px; }
.tool-card:nth-child(1) .tool-icon { background: var(--brand-blue-light); color: var(--brand-blue); }
.tool-card:nth-child(2) .tool-icon { background: var(--brand-teal-light); color: var(--brand-teal); }
.tool-card:nth-child(3) .tool-icon { background: var(--brand-purple-light); color: var(--brand-purple); }
.tool-card:nth-child(4) .tool-icon { background: var(--brand-orange-light); color: var(--brand-orange); }
.tool-card:nth-child(5) .tool-icon { background: #fef2f2; color: var(--brand-rose); }
.tool-card h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; color: var(--brand-navy); margin-bottom: 8px; }
.tool-card .tool-tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 3px 10px; border-radius: 100px; margin-bottom: 12px; }
.tool-card:nth-child(1) .tool-tag { background: var(--brand-blue-light); color: var(--brand-blue); }
.tool-card:nth-child(2) .tool-tag { background: var(--brand-teal-light); color: var(--brand-teal); }
.tool-card:nth-child(3) .tool-tag { background: var(--brand-purple-light); color: var(--brand-purple); }
.tool-card:nth-child(4) .tool-tag { background: var(--brand-orange-light); color: var(--brand-orange); }
.tool-card:nth-child(5) .tool-tag { background: #fef2f2; color: var(--brand-rose); }
.tool-card p { font-size: .88rem; color: var(--text-muted); line-height: 1.55; }
.tool-example { background: var(--bg-light); border-radius: var(--radius); padding: 14px 16px; margin-top: 16px; font-size: .82rem; color: var(--text-body); font-family: 'DM Sans', monospace; }
.tool-example strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-bottom: 6px; }
.tool-stat { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; color: var(--brand-green); margin-top: 12px; }

/* How It Works */
.how-section { padding: 80px 0; background: var(--bg-light); }
.how-section .section-title, .how-section .section-label { text-align: center; }
.how-section .section-subtitle { text-align: center; margin-left: auto; margin-right: auto; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
.step-card { text-align: center; padding: 32px 24px; }
.step-number { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-blue); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.step-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--brand-navy); margin-bottom: 8px; }
.step-card p { font-size: .88rem; color: var(--text-muted); line-height: 1.55; }

/* CTA Band */
.cta-section { padding: 80px 0; background: var(--brand-navy); text-align: center; }
.cta-section .section-title { color: #fff; }
.cta-section .section-subtitle { color: rgba(255,255,255,.6); margin-left: auto; margin-right: auto; text-align: center; }
.cta-actions { display: flex; justify-content: center; gap: 16px; margin-top: 32px; }
.cta-section .btn-primary { background: #fff; color: var(--brand-blue); }
.cta-section .btn-primary:hover { background: var(--brand-blue-light); }

/* Auth Forms */
.landing-auth-section { padding: 64px 0 80px; }
.landing-auth-card { background: #fff; border: 1px solid var(--border-light); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); padding: 40px; max-width: 560px; margin: 0 auto; }
.landing-auth-card-wide { max-width: 720px; }
.landing-auth-card h1 { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--brand-navy); margin-bottom: 8px; line-height: 1.3; }
.landing-auth-card .auth-subtitle { font-size: .92rem; color: var(--text-muted); margin-bottom: 24px; line-height: 1.5; }
.landing-auth-card .form-group { margin-bottom: 16px; }
.landing-auth-card .form-group label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-body); margin-bottom: 5px; }
.landing-auth-card .form-control { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border-light); border-radius: var(--radius); font-size: .88rem; font-family: var(--font-body); color: var(--text-body); background: #fff; transition: border-color .15s; }
.landing-auth-card .form-control:focus { outline: none; border-color: var(--brand-blue); }
.landing-auth-card select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.landing-auth-card .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.landing-auth-card .form-help { font-size: .78rem; color: var(--text-faint); margin-top: 4px; }
.landing-auth-card .checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: .85rem; color: var(--text-body); margin: 16px 0; cursor: pointer; }
.landing-auth-card .checkbox-row input { margin-top: 3px; }
.landing-auth-card .auth-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.landing-auth-card .auth-footer { margin-top: 20px; font-size: .85rem; color: var(--text-muted); text-align: center; }
.landing-auth-card .auth-divider { text-align: center; color: var(--text-faint); font-size: .78rem; margin: 16px 0; position: relative; }
.landing-auth-card .auth-divider::before, .landing-auth-card .auth-divider::after { content: ""; position: absolute; top: 50%; width: 40%; height: 1px; background: var(--border-light); }
.landing-auth-card .auth-divider::before { left: 0; }
.landing-auth-card .auth-divider::after { right: 0; }

/* School fields toggle */
.school-fields { display: none; }
.school-fields.is-visible { display: block; }

/* Footer */
.site-footer { background: var(--brand-navy); padding: 40px 24px; color: rgba(255,255,255,.5); border-top: 3px solid; border-image: linear-gradient(90deg, var(--brand-blue), var(--brand-teal), var(--brand-purple)) 1; }
.site-footer-inner { max-width: var(--container); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.site-footer-brand { font-family: var(--font-display); font-weight: 700; color: #fff; font-size: .95rem; }
.site-footer-brand small { display: block; font-weight: 400; color: rgba(255,255,255,.4); font-size: .78rem; margin-top: 2px; font-style: italic; }
.site-footer-links { display: flex; gap: 24px; font-size: .82rem; }
.site-footer-links a { color: rgba(255,255,255,.55); text-decoration: none; }
.site-footer-links a:hover { color: #fff; text-decoration: underline; }
.site-footer-copy { font-size: .75rem; width: 100%; text-align: center; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 16px; }

/* Flash Messages */
.landing-flash-stack { padding: 12px 0; }
.landing-alert { padding: 14px 20px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 8px; }
.landing-alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.landing-alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.landing-alert-info { background: var(--brand-blue-light); color: var(--brand-blue); border: 1px solid rgba(37,99,235,.12); }
.landing-alert strong { display: inline; margin-right: 6px; }

/* Responsive */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2.4rem; }
}
@media (max-width: 768px) {
  .tools-grid, .steps-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; }
  .site-nav { gap: 4px; }
  .nav-link { padding: 8px 12px; font-size: .82rem; }
  .site-footer-inner { flex-direction: column; text-align: center; }
  .site-footer-links { justify-content: center; flex-wrap: wrap; }
  .landing-auth-card .form-grid { grid-template-columns: 1fr; }
  .cta-actions { flex-direction: column; align-items: center; }
}
