/* Home page v2: warmer, more inviting. Builds on style.css tokens. */
:root {
  --sun: #f59e0b;
  --sun-2: #fbbf24;
  --on-sun: #1a1203;
  --c-blue: #2563eb;  --c-blue-soft: #e0eaff;
  --c-rose: #be185d;  --c-rose-soft: #fde4ef;
  --c-green: #15803d; --c-green-soft: #dcf5e4;
  --c-amber: #b45309; --c-amber-soft: #fdefd6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --c-blue: #8ab4ff;  --c-blue-soft: #16264a;
    --c-rose: #f48fbe;  --c-rose-soft: #3a1729;
    --c-green: #6ad08f; --c-green-soft: #12301f;
    --c-amber: #f6c26b; --c-amber-soft: #3a2a10;
  }
}

/* ---------- Hero ---------- */
.hero-v2 { padding: 64px 0 0; }
.hero-v2::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(700px 420px at 78% 30%, rgba(255, 201, 77, .20), transparent 65%),
    radial-gradient(600px 400px at 0% 100%, rgba(155, 28, 28, .28), transparent 60%);
}
.hero-v2-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-bottom: 72px; }
@media (max-width: 960px) { .hero-v2-grid { grid-template-columns: 1fr; gap: 36px; padding-bottom: 56px; } }

.hero-pill {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  padding: 8px 16px; border-radius: 999px; font-size: .9rem; font-weight: 700; color: #f8e7c0;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun-2); box-shadow: 0 0 0 4px rgba(251, 191, 36, .25); }
.hero-v2 h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.02; margin-bottom: 14px; }
.h1-accent {
  background: linear-gradient(90deg, #ffd27a, #f59e0b 60%, #fb923c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-tagline { font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); color: #fff; margin: 0 0 14px; }
.hero-tagline em { color: #ffd27a; font-style: italic; }
.hero-v2 .lead { font-size: 1.15rem; max-width: 560px; }
.btn-sun { background: linear-gradient(180deg, var(--sun-2), var(--sun)); color: var(--on-sun); box-shadow: 0 8px 24px rgba(245, 158, 11, .35); }
.btn-sun:hover { background: linear-gradient(180deg, #fcd34d, var(--sun-2)); transform: translateY(-1px); }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; color: #c9d4e3; }
.hero-facts li { display: flex; align-items: baseline; gap: 6px; }
.hero-facts li + li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .35); margin-right: 18px; align-self: center; }
.hero-facts b { color: #fff; font-family: var(--serif); font-size: 1.35rem; }

.hero-art { position: relative; }
.school-art { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .35)); border-radius: 28px; }
.school-art .flag { transform-origin: 38px 100px; animation: wave 4s ease-in-out infinite; }
.school-art .sun { animation: glow 5s ease-in-out infinite; transform-origin: 420px 78px; }
.school-art .birds { animation: drift 9s ease-in-out infinite; }
@keyframes wave { 0%, 100% { transform: skewY(0deg); } 50% { transform: skewY(-3deg); } }
@keyframes glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
@media (prefers-reduced-motion: reduce) { .school-art .flag, .school-art .sun, .school-art .birds { animation: none; } }

/* Today card overlaps the bottom of the illustration */
.hero-v2 .today-card {
  position: relative; margin: -22px 20px 0; z-index: 2;
  background: rgba(10, 28, 51, .82); border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .35);
}
@media (max-width: 560px) { .hero-v2 .today-card { margin: -16px 8px 0; } }
.today-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.today-clock { margin: 0; font-weight: 700; color: #ffd27a; font-variant-numeric: tabular-nums; }
.today-clock abbr { font-size: .75rem; color: #c9d4e3; text-decoration: none; margin-left: 2px; }
.today-status.open { background: rgba(74, 222, 128, .12); }
.today-status.soon { background: rgba(251, 191, 36, .12); }
.today-status.closed { background: rgba(248, 113, 113, .12); }
.dot.soon { background: #fbbf24; box-shadow: 0 0 0 4px rgba(251, 191, 36, .2); }
.dot.closed { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, .2); }
.dot.open { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, .08); } }
@media (prefers-reduced-motion: reduce) { .dot.open { animation: none; } }
.today-note { margin: 8px 2px 0; color: #c9d4e3; font-size: .95rem; }
.today-note:empty { display: none; }

.hero-wave { position: relative; z-index: 1; height: 56px; margin-top: -1px; }
.hero-wave svg { width: 100%; height: 100%; display: block; }

/* ---------- Numbers ---------- */
section.numbers { padding: 8px 0 24px; }
.stats-v2 { margin-top: 0; background: transparent; border: 0; box-shadow: none; gap: 16px; overflow: visible; }
.stats-v2 .stat { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 22px; }
.stats-v2 .stat b { font-size: 2.6rem; }
.stats-v2 .s1 .stat-ico { background: var(--c-blue-soft); color: var(--c-blue); }
.stats-v2 .s2 .stat-ico { background: var(--c-rose-soft); color: var(--c-rose); }
.stats-v2 .s3 .stat-ico { background: var(--c-green-soft); color: var(--c-green); }
.stats-v2 .s4 .stat-ico { background: var(--c-amber-soft); color: var(--c-amber); }
.stats-v2 .stat-ico { width: 52px; height: 52px; border-radius: 16px; }

/* ---------- Section heads ---------- */
.section-head.center { justify-content: center; text-align: center; }
.section-head.center > div { margin-inline: auto; }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature {
  position: relative; padding: 28px 24px 26px; border-radius: 20px; background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.feature::after { content: ''; position: absolute; inset: auto -40px -40px auto; width: 120px; height: 120px; border-radius: 50%; background: var(--fs); opacity: .6; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 16px 32px rgba(15, 23, 42, .10); }
.feature h3 { margin: 16px 0 6px; font-size: 1.35rem; }
.feature p { margin: 0; color: var(--fg-3); position: relative; z-index: 1; }
.feature-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--fs); color: var(--fc); }
.f1 { --fs: var(--c-rose-soft); --fc: var(--c-rose); }
.f2 { --fs: var(--c-blue-soft); --fc: var(--c-blue); }
.f3 { --fs: var(--c-amber-soft); --fc: var(--c-amber); }
.f4 { --fs: var(--c-green-soft); --fc: var(--c-green); }

/* ---------- Class cards ---------- */
.class-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1100px) { .class-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .class-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .class-cards { grid-template-columns: 1fr; } }
.class-card a {
  position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; overflow: hidden;
  padding: 22px 20px 18px; border-radius: 20px; text-decoration: none; color: #fff;
  background: linear-gradient(160deg, var(--cc1), var(--cc2));
  box-shadow: 0 10px 24px -10px var(--cc2);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.class-card a:hover { transform: translateY(-4px); box-shadow: 0 18px 32px -12px var(--cc2); }
.class-card a:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--accent); }
.cc-1 { --cc1: #1d4ed8; --cc2: #1e3a8a; }
.cc-2 { --cc1: #be185d; --cc2: #831843; }
.cc-3 { --cc1: #0f766e; --cc2: #134e4a; }
.cc-4 { --cc1: #b45309; --cc2: #7c2d12; }
.cc-5 { --cc1: #6d28d9; --cc2: #3b0764; }
.cc-roman {
  position: absolute; right: 8px; bottom: -14px; font-family: var(--serif); font-weight: 800;
  font-size: 5.5rem; line-height: 1; color: rgba(255, 255, 255, .10); pointer-events: none;
}
.cc-label { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; }
.cc-total { color: rgba(255, 255, 255, .85); }
.cc-total b { font-size: 1.6rem; color: #fff; font-family: var(--serif); margin-right: 2px; }
.class-card .bar { background: rgba(255, 255, 255, .2); height: 8px; margin: 6px 0 2px; min-width: 0; }
.class-card .bar .b { background: #fff; }
.class-card .bar .g { background: #fbcfe8; }
.cc-split, .cc-teacher { font-size: .88rem; color: rgba(255, 255, 255, .85); }
.cc-teacher b { color: #fff; }
.cc-go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #fde68a; }

/* ---------- Message ---------- */
.msg-section { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent-soft) 60%, transparent) 30%, transparent); }

/* ---------- Explore cards ---------- */
.link-card { border-top: 4px solid var(--lc); }
.link-card .stat-ico { background: var(--ls); color: var(--lc); }
.lc-1 { --lc: var(--c-blue); --ls: var(--c-blue-soft); }
.lc-2 { --lc: var(--c-rose); --ls: var(--c-rose-soft); }
.lc-3 { --lc: var(--c-amber); --ls: var(--c-amber-soft); }

/* ---------- Visit band ---------- */
.visit-band {
  position: relative; overflow: hidden; border-radius: 28px; padding: 44px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; color: #fff;
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(255, 201, 77, .22), transparent 60%),
    linear-gradient(160deg, var(--primary), #0a1c33);
}
.visit-band::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px;
  background:
    radial-gradient(circle at 50% 50%, var(--gold) 0 1.8px, transparent 2.2px) 0 0 / 14px 8px,
    linear-gradient(90deg, #8f1d17 0 50%, #13294b 50% 100%) 0 0 / 28px 8px;
}
@media (max-width: 900px) { .visit-band { grid-template-columns: 1fr; padding: 28px 22px 36px; } }
.visit-band h2 { color: #fff; }
.visit-band .eyebrow { color: var(--gold-on-dark); }
.visit-copy p { color: #c9d4e3; max-width: 46ch; }
.visit-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.visit-actions .btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.info-grid-v2 { grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .info-grid-v2 { grid-template-columns: 1fr; } }
.info-grid-v2 .info:nth-child(1), .info-grid-v2 .info:nth-child(4) { grid-column: 1 / -1; }
.info-grid-v2 .info { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); box-shadow: none; color: #fff; }
.info-grid-v2 .info dt { color: #b8c4d6; }
.info-grid-v2 .info-ico { background: rgba(255, 255, 255, .1); color: var(--gold-on-dark); }

/* Staggered entrance for grids (JS adds .reveal; skipped for reduced motion) */
.features.reveal > *, .class-cards.reveal > * { opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .4s ease-out, transform .4s cubic-bezier(.34, 1.4, .64, 1); }
.features.reveal.in > *, .class-cards.reveal.in > * { opacity: 1; transform: none; }
.features.reveal.in > :nth-child(2), .class-cards.reveal.in > :nth-child(2) { transition-delay: .06s; }
.features.reveal.in > :nth-child(3), .class-cards.reveal.in > :nth-child(3) { transition-delay: .12s; }
.features.reveal.in > :nth-child(4), .class-cards.reveal.in > :nth-child(4) { transition-delay: .18s; }
.class-cards.reveal.in > :nth-child(5) { transition-delay: .24s; }
.features.reveal, .class-cards.reveal { opacity: 1; transform: none; }

@media print { .hero-art, .hero-wave, .visit-actions { display: none; } }
@media (max-width: 560px) { .hero-facts li + li::before { display: none; } .hero-facts { gap: 6px 18px; } }
