/* Math Rangers Academy — shared styles */
:root {
  --navy: #13294b;
  --navy-2: #1d3a66;
  --amber: #f5a524;
  --amber-dark: #c97f06;
  --green: #2f8f5b;
  --ink: #1b2533;
  --muted: #5a6577;
  --line: #e3e7ee;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(19, 41, 75, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { font-family: "Montserrat", "Inter", sans-serif; color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); }
.eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-dark); margin-bottom: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: "Montserrat", sans-serif; font-weight: 600; font-size: 1.25rem; color: var(--navy); }
.brand svg { width: 40px; height: 40px; flex: none; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 700; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--amber-dark); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--navy); margin: 5px 0; border-radius: 2px; }

/* Buttons */
.btn { display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: inherit; transition: transform .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: #ffb63d; }
.btn-outline { border-color: currentColor; color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.nav-links .btn { color: var(--navy); padding: 9px 20px; }

/* Hero */
.hero { background: radial-gradient(circle at 85% 20%, #2a4f86 0, var(--navy) 55%); color: #fff; padding: 88px 0 96px; overflow: hidden; position: relative; }
.hero::after { content: "π  ∑  √  ∞  ÷  ∆  ≈  x²"; position: absolute; right: -40px; bottom: 10px; font-size: 5rem; opacity: .06; white-space: nowrap; font-family: serif; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p.lead { font-size: 1.2rem; color: #d6e0f0; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius); padding: 28px; }
.hero-card h3 { color: #fff; }
.hero-card ul { list-style: none; padding: 0; margin: 0; }
.hero-card li { padding: 10px 0 10px 34px; position: relative; border-bottom: 1px solid rgba(255,255,255,.1); color: #e6edf8; }
.hero-card li:last-child { border-bottom: 0; }
.hero-card li::before { content: "★"; position: absolute; left: 4px; color: var(--amber); }

.page-hero { background: var(--navy); color: #fff; padding: 64px 0; text-align: center; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #d6e0f0; max-width: 640px; margin: 0 auto; font-size: 1.1rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: -48px; position: relative; z-index: 2; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; text-align: center; }
.stat strong { display: block; font-family: "Montserrat", sans-serif; font-size: 2rem; color: var(--navy); }
.stat span { color: var(--muted); font-size: .95rem; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.card p { color: var(--muted); }
.card .icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 1.6rem; background: #fff4de; margin-bottom: 16px; }
.card .meta { font-size: .9rem; font-weight: 700; color: var(--green); margin-bottom: 10px; }
.card ul { padding-left: 20px; color: var(--muted); margin: 0 0 1em; }
.card .btn { margin-top: auto; align-self: flex-start; }
.tag { display: inline-block; background: #e8f1ff; color: var(--navy-2); font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; margin: 0 6px 6px 0; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--amber); color: var(--navy); display: grid; place-items: center; font-weight: 700; font-family: "Montserrat", sans-serif; font-size: 1.2rem; }

/* Testimonials */
.quote { font-size: 1.05rem; }
.quote blockquote { margin: 0 0 16px; color: var(--ink); }
.quote cite { font-style: normal; font-weight: 700; color: var(--navy); }

/* CTA band */
.cta { background: linear-gradient(120deg, var(--amber) 0%, #ffc65c 100%); border-radius: 20px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin: 0 0 6px; }
.cta p { margin: 0; color: var(--navy); }

/* FAQ */
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin-bottom: 12px; }
.faq summary { font-weight: 700; cursor: pointer; color: var(--navy); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--amber-dark); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--muted); }

/* Form */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .95rem; }
.field label .opt { font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid #cfd6e2; border-radius: 10px; font: inherit; color: var(--ink); background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(29,58,102,.15); }
.field textarea { min-height: 120px; resize: vertical; }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.checks label { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.hidden { display: none; }
.info-card { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 32px; }
.info-card h3 { color: #fff; }
.info-card p, .info-card li { color: #d6e0f0; }
.info-card ul { list-style: none; padding: 0; }
.info-card li { margin-bottom: 12px; }
.info-card a { color: var(--amber); }

/* Footer */
.site-footer { background: #0d1d36; color: #aab6c9; padding: 56px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-family: "Montserrat", sans-serif; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #aab6c9; text-decoration: none; }
.site-footer a:hover { color: var(--amber); }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid #22344f; margin-top: 36px; padding-top: 20px; font-size: .9rem; text-align: center; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .contact-grid, .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 70px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 20px 20px; border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 10px 0; }
  .grid-3, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .cta { padding: 32px 24px; }
  .form { padding: 22px; }
}

/* Fixes: keep radios/checkboxes their natural size; remove default figure margin */
.field .checks input { width: auto; padding: 0; margin: 0; accent-color: var(--navy-2); }
figure.card { margin: 0; }
.tags { margin-bottom: 6px; }

/* Class calendar (schedule.html) */
.cal-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-bottom: 32px; font-weight: 700; }
.cal-legend span { display: flex; align-items: center; gap: 8px; }
.sw { width: 26px; height: 26px; border-radius: 6px; display: inline-block; }
.sw.class, .day.class { background: #2fb34a; color: #fff; }
.sw.holiday, .day.holiday { background: #d9141e; color: #fff; }
.sw.off, .day.off { background: #fde0e0; color: #d9141e; }
.calendar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.month { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.month h3 { background: #dceefd; text-align: center; margin: 0; padding: 12px; font-size: 1.4rem; }
.dow, .days { display: grid; grid-template-columns: repeat(7, 1fr); }
.dow span { background: var(--navy); color: #fff; text-align: center; font-weight: 700; font-size: .85rem; padding: 8px 0; }
.day { min-height: 62px; border-right: 1px solid #eef1f5; border-bottom: 1px solid #eef1f5; padding: 6px 4px; text-align: center; font-weight: 700; color: #6b7280; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.day.class, .day.holiday { border-color: rgba(255,255,255,.25); }
.day .num { font-family: "Montserrat", sans-serif; font-size: 1.15rem; }
.day .note { font-size: .62rem; line-height: 1.1; }
.day .flag { background: #ffd83d; color: var(--navy); font-size: .6rem; line-height: 1.1; padding: 2px 3px; border-radius: 4px; }
.cal-notes { margin-top: 28px; background: #dceefd; border-radius: var(--radius); padding: 18px 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; font-weight: 700; color: var(--navy); font-size: 1.05rem; }
.cal-notes span + span::before { content: "•"; margin-right: 28px; margin-left: -14px; }
@media (max-width: 900px) { .calendar { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
@media (max-width: 760px) { .cal-notes { flex-direction: column; text-align: center; } .cal-notes span + span::before { content: none; } }

/* Policies page */
.policy-layout { display: grid; grid-template-columns: 230px 1fr; gap: 40px; align-items: start; }
.policy-toc { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 4px; background: var(--bg-soft); border-radius: var(--radius); padding: 20px; }
.policy-toc h4 { margin: 0 0 8px; font-family: "Montserrat", sans-serif; color: var(--navy); }
.policy-toc a { text-decoration: none; font-weight: 700; color: var(--ink); padding: 5px 0; }
.policy-toc a:hover { color: var(--amber-dark); }
.policy-toc .btn { margin-top: 14px; font-size: .9rem; padding: 10px 16px; }
.policy { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; margin-bottom: 22px; box-shadow: var(--shadow); scroll-margin-top: 90px; }
.policy h2 { font-size: 1.6rem; }
.policy ul { padding-left: 20px; margin: 0; }
.policy li { margin-bottom: 10px; }
.notice { background: #e6f6ec; border: 1px solid #b7e2c5; color: #1d5e3a; border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; font-size: 1.05rem; }
.callout { background: #fff4de; border-left: 5px solid var(--amber); border-radius: 8px; padding: 14px 18px; margin: 12px 0; }
.callout.warn { background: #fdecec; border-left-color: #d9141e; }
.sign-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; margin-top: 24px; }
.sign-lines div { font-size: .9rem; color: var(--muted); }
.sign-lines span { display: block; border-bottom: 1.5px solid var(--ink); height: 34px; margin-bottom: 6px; }
.agree-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.agree-check input { width: auto !important; margin-top: 5px; accent-color: var(--navy-2); }
@media (max-width: 900px) {
  .policy-layout { grid-template-columns: 1fr; }
  .policy-toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
  .policy-toc h4 { width: 100%; }
  .policy { padding: 22px; }
  .sign-lines { grid-template-columns: 1fr; }
}
/* Collapse the menu earlier now that it has more links */
@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 70px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 20px 20px; border-bottom: 1px solid var(--line); display: none; }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; padding: 10px 0; }
}
/* Printing: just the policy text, with signature lines */
@media print {
  .site-header, .site-footer, .policy-toc, .page-hero .eyebrow { display: none !important; }
  .page-hero { background: none; color: #000; padding: 0 0 12px; }
  .page-hero h1, .page-hero p { color: #000; }
  .section { padding: 0; }
  .policy-layout { display: block; }
  .policy { box-shadow: none; border: 0; padding: 0; margin-bottom: 16px; break-inside: avoid-page; }
  body { font-size: 12pt; }
}

/* Professional type tuning (Montserrat headings, Inter body) */
body { font-size: 16.5px; letter-spacing: -0.005em; }
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
h1 { font-weight: 800; }
.brand { font-weight: 700; letter-spacing: -0.01em; }
.eyebrow { letter-spacing: .14em; font-weight: 600; }
.btn { font-weight: 600; }
.nav-links a { font-weight: 600; }
