/* ============================================================
   revamp.css — styles for the revamped pages & components.
   Loaded AFTER home.css; reuses its design tokens (:root vars).
   Also defines the "dawn" light theme (html.light) that Samantha
   can switch via [[theme:...]] — the site defaults to night mode.
   ============================================================ */

/* ---------- Dawn (light) theme: flip the token palette ---------- */
html.light {
    --night-950: #f4f1e8;
    --night-900: #efe9dc;
    --night-850: #f8f4ea;
    --night-800: #efe6d2;
    --night-700: #e3d9c2;
    --text-high: #14213d;
    --text-mid: #33415e;
    --text-low: #5a6a8c;
    --glass: rgba(11, 27, 51, 0.06);
    --card-bg: rgba(255, 255, 255, 0.86);
    --card-border: rgba(11, 27, 51, 0.14);
    --shadow-lg: 0 30px 60px rgba(31, 42, 68, 0.16);
    --shadow-md: 0 16px 32px rgba(31, 42, 68, 0.12);
}
html.light body { color: var(--text-high); }
html.light .starfield { opacity: 0.25; filter: invert(0.85); }
html.light .hero-gradient { opacity: 0.35; }
html.light img[alt="My Home Tuition logo"] { filter: none; }

/* ---------- Season / urgency banner (site-wide, dismissible) ---------- */
/* CRITICAL: the slot ships with [hidden] until season.js fills it, and the ✕
   re-sets [hidden] — but an author `display:flex` overrides the UA's
   [hidden]{display:none} (cascade origin), which made the ✕ look dead AND
   painted an empty strip before hydration. This rule restores [hidden]'s
   meaning for the banner, whatever else says display. */
.season-banner[hidden] { display: none !important; }
.season-banner {
    position: relative;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 46px 10px 16px;
    background:
        linear-gradient(90deg, rgba(241, 65, 162, 0.22), rgba(246, 163, 60, 0.18) 45%, rgba(59, 141, 255, 0.22));
    border-bottom: 1px solid var(--card-border);
    color: var(--text-high);
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: center;
    animation: season-in 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.05);
}
@keyframes season-in {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .season-banner { animation: none; } }
.season-banner strong { color: var(--gold-400); font-weight: 700; }
.season-banner .sn { color: var(--gold-400); font-weight: 700; font-size: 1.02em; }
/* The link is the banner's whole point — make it a real CTA, not a footnote. */
.season-banner a {
    display: inline-block;
    margin-left: 6px;
    padding: 4px 14px;
    border-radius: 999px;
    background-image: linear-gradient(120deg, var(--pink-500), var(--orange-500));
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(241, 65, 162, 0.35);
    transition: filter var(--transition-fast), transform var(--transition-fast);
}
.season-banner a:hover { filter: brightness(1.12); transform: translateY(-1px); }
.season-banner .season-dismiss {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-low);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    padding: 10px 12px; /* honest tap target */
    border-radius: 10px;
}
.season-banner .season-dismiss:hover { color: var(--text-high); background: var(--glass); }
@media (max-width: 640px) {
    .season-banner { font-size: 0.8rem; padding: 9px 40px 9px 12px; }
    .season-banner a { margin-top: 4px; }
}
.season-countdown-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--glass);
    color: var(--text-mid);
    font-size: 0.85rem;
}
.season-countdown-chip b { color: var(--gold-400); font-weight: 700; }

/* ---------- Sub-page hero ---------- */
.page-hero {
    position: relative;
    padding: 140px 0 56px;
    overflow: hidden;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero .eyebrow { margin-bottom: 12px; }
.page-hero h1 {
    font-family: "Fraunces", serif;
    font-size: clamp(2rem, 4.4vw, 3.2rem);
    line-height: 1.12;
    margin: 0 0 16px;
    max-width: 21ch;
}
.page-hero .lede {
    max-width: 62ch;
    color: var(--text-mid);
    font-size: 1.05rem;
    line-height: 1.7;
}
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    font-size: 0.8rem;
    color: var(--text-low);
}
.breadcrumbs a { color: var(--text-low); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text-high); }
.breadcrumbs span[aria-hidden] { opacity: 0.5; }

/* ---------- Generic content blocks ---------- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.info-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-md);
}
.info-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.info-card p { margin: 0; color: var(--text-mid); font-size: 0.92rem; line-height: 1.65; }
.info-card .big { font-size: 1.9rem; font-family: "Fraunces", serif; color: var(--gold-400); display: block; margin-bottom: 6px; }

.chip-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-cloud .area-chip {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--card-border);
    background: var(--glass);
    color: var(--text-mid);
    font-size: 0.85rem;
}

.check-columns {
    columns: 2;
    column-gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.check-columns li {
    break-inside: avoid;
    padding: 6px 0 6px 26px;
    position: relative;
    color: var(--text-mid);
    line-height: 1.6;
}
.check-columns li::before {
    content: "★";
    position: absolute;
    left: 0;
    color: var(--gold-400);
    font-size: 0.8rem;
    top: 9px;
}
@media (max-width: 640px) { .check-columns { columns: 1; } }

/* ---------- Locations ---------- */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 22px;
}
.city-card {
    display: block;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 26px;
    text-decoration: none;
    color: var(--text-high);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.city-card:hover { transform: translateY(-4px); border-color: rgba(243, 204, 118, 0.5); }
.city-card h3 { margin: 0 0 6px; font-family: "Fraunces", serif; font-size: 1.3rem; }
.city-card .city-state { color: var(--text-low); font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; }
.city-card p { color: var(--text-mid); font-size: 0.9rem; line-height: 1.6; margin: 10px 0 14px; }
.city-card .city-areas { color: var(--text-low); font-size: 0.8rem; line-height: 1.6; }
.city-card .city-link { display: inline-block; margin-top: 14px; color: var(--gold-400); font-weight: 600; font-size: 0.9rem; }

/* ---------- Forms (full enquiry + tutor application) ---------- */
.form-shell {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: clamp(22px, 4vw, 40px);
    box-shadow: var(--shadow-lg);
}
.form-shell .field-grid { margin-bottom: 4px; }
.form-shell label > span { display: block; margin-bottom: 6px; color: var(--text-mid); font-size: 0.85rem; }
.form-shell input[type="text"],
.form-shell input[type="tel"],
.form-shell input[type="email"],
.form-shell select,
.form-shell textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-high);
    font: inherit;
    outline: none;
    transition: border-color var(--transition-fast);
}
html.light .form-shell input[type="text"],
html.light .form-shell input[type="tel"],
html.light .form-shell input[type="email"],
html.light .form-shell select,
html.light .form-shell textarea { background: rgba(11, 27, 51, 0.04); }
.form-shell input:focus, .form-shell select:focus, .form-shell textarea:focus { border-color: var(--gold-400); }
.form-shell textarea { min-height: 110px; resize: vertical; }
.form-shell select option { color: #14213d; background: #fff; }
.form-note { font-size: 0.8rem; color: var(--text-low); margin-top: 10px; line-height: 1.5; }
.form-status { margin-top: 14px; font-size: 0.9rem; line-height: 1.6; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: var(--green-500); }
.form-status.err { color: #ff8484; }
.field-error { border-color: #ff8484 !important; }
.hp-field { position: absolute !important; left: -9999px !important; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Trust strip ---------- */
.trust-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 34px;
}
.trust-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--glass);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
}
.trust-item .t-icon { font-size: 1.3rem; line-height: 1; margin-top: 2px; }
.trust-item h4 { margin: 0 0 4px; font-size: 0.92rem; }
.trust-item p { margin: 0; font-size: 0.8rem; color: var(--text-mid); line-height: 1.55; }

/* ---------- Steps (vertical, e.g. become-a-tutor) ---------- */
.step-list { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step-list li {
    counter-increment: step;
    position: relative;
    padding: 0 0 26px 58px;
}
.step-list li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(243, 204, 118, 0.5);
    color: var(--gold-400);
    font-size: 0.8rem;
    font-weight: 700;
}
.step-list li:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 20px;
    top: 44px;
    bottom: 4px;
    width: 1px;
    background: linear-gradient(var(--card-border), transparent);
}
.step-list h3 { margin: 6px 0 6px; font-size: 1.05rem; }
.step-list p { margin: 0; color: var(--text-mid); font-size: 0.92rem; line-height: 1.65; }

/* ---------- Learning Hub / article prose ---------- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-decoration: none;
    color: var(--text-high);
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.article-card:hover { transform: translateY(-4px); border-color: rgba(243, 204, 118, 0.5); }
.article-card h3 { margin: 0 0 8px; font-size: 1.08rem; line-height: 1.4; }
.article-card p { margin: 0 0 16px; color: var(--text-mid); font-size: 0.88rem; line-height: 1.6; flex: 1; }
.article-card .resource-tag { align-self: flex-start; }

.prose { max-width: 720px; margin: 0 auto; }
.prose > * { margin: 0 0 1.15em; }
.prose h2 { font-family: "Fraunces", serif; font-size: 1.5rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.5em; }
.prose p, .prose li { color: var(--text-mid); line-height: 1.8; font-size: 1rem; }
.prose strong { color: var(--text-high); }
.prose a { color: var(--gold-400); }
.prose ul, .prose ol { padding-left: 24px; }
.prose blockquote {
    border-left: 3px solid var(--gold-400);
    margin: 1.4em 0;
    padding: 4px 0 4px 18px;
    color: var(--text-mid);
    font-style: italic;
}
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--card-border); padding: 10px 14px; text-align: left; color: var(--text-mid); }
.prose th { color: var(--text-high); background: var(--glass); }
.article-meta { color: var(--text-low); font-size: 0.8rem; margin-bottom: 28px; }

/* ---------- Footer extensions ---------- */
.site-footer .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .site-footer .footer-grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp floating button (left side; Samantha owns the right) ---------- */
.wa-float {
    position: fixed;
    left: 22px;
    bottom: 22px;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.4);
    transition: transform var(--transition-fast);
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }
@media (max-width: 640px) { .wa-float { left: 14px; bottom: 14px; width: 48px; height: 48px; } }

/* ---------- Small utilities ---------- */
.section-tight { padding: 56px 0; }
.mt-0 { margin-top: 0 !important; }
.center { text-align: center; }

/* ---------- DAWN THEME v2 — full section repaint ----------
   home.css paints body + every big section with hardcoded NIGHT gradients
   that ignore the html.light token flip (that's why "light mode" used to
   only darken the text). Each night gradient gets a daylight twin here.
   The 404/500 space scene stays cosmic on purpose — you're lost in space
   in both themes. */
html.light { color-scheme: light; }
html.light body {
    background: radial-gradient(circle at top, #fdf9ef 0%, #f6efe1 45%, #f0e9da 100%);
}
html.light body::before { opacity: 0.45; }
html.light .site-header.is-scrolled {
    background: rgba(250, 246, 238, 0.88);
    box-shadow: 0 10px 30px rgba(31, 42, 68, 0.1);
}
html.light .requirement-engine {
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.92), rgba(247, 240, 228, 0.96));
}
html.light .wall-of-stars {
    background: radial-gradient(circle at top, rgba(255, 250, 240, 0.95), rgba(243, 234, 219, 0.96));
}
html.light .learning-center {
    background: linear-gradient(180deg, rgba(255, 252, 245, 0.9), rgba(245, 237, 223, 0.96));
}
html.light .dashboards {
    background: radial-gradient(circle at top right, rgba(252, 246, 234, 0.9), rgba(243, 234, 219, 0.96));
}
html.light .onboarding {
    background: linear-gradient(180deg, rgba(253, 248, 238, 0.95), rgba(246, 239, 226, 0.98));
}
html.light .resource-library {
    background: radial-gradient(circle at bottom, rgba(250, 243, 230, 0.92), rgba(243, 234, 219, 0.96));
}
html.light .whatsapp-connect {
    background: radial-gradient(circle at 10% 20%, rgba(252, 246, 234, 0.92), rgba(243, 234, 219, 0.96));
}
html.light .success-stories {
    background: linear-gradient(180deg, rgba(247, 240, 228, 0.96), rgba(252, 246, 236, 0.96));
}
html.light .faq {
    background: radial-gradient(circle at top, rgba(252, 246, 236, 0.92), rgba(246, 239, 226, 0.96));
}
html.light .site-footer { background: #ebe3d1; }

/* ---------- DAWN THEME v3 — contrast pass ----------
   The accent tokens were tuned for the night sky: pale gold #f3cc76 as TEXT
   sits at ~1.5:1 on the cream background — effectively invisible. Dawn gets
   its own accessible accents (bronze/deep green, ≥4.5:1 on cream); night mode
   is untouched because these live under html.light. */
html.light {
    --gold-400: #8a5c04;  /* bronze — eyebrows, links, icons, ratings */
    --gold-500: #744d03;
    --green-500: #157a43;
}
/* The header's base state was hardcoded night glass — dark navy text tokens
   landed on a dark bar until the scroll state kicked in. Paint it dawn. */
html.light .site-header {
    background: rgba(250, 246, 238, 0.78);
    border-bottom-color: rgba(11, 27, 51, 0.1);
}
/* Spots that must STAY golden even at dawn (they sit on dark/lit surfaces). */
html.light .skip-link:focus { background: #f3cc76; }
html.light .error-orbit::after { background: #f3cc76; } /* 404 stays cosmic */
html.light .star-node.is-lit { background: #d99a06; box-shadow: 0 0 14px rgba(217, 154, 6, 0.5); }
/* Pale night-only status colors → readable dawn equivalents. */
html.light .form-status.err { color: #b3261e; }
html.light .field-error { border-color: #b3261e !important; }
html.light .redline-sample { background: rgba(11, 27, 51, 0.05); }
html.light .redline-sample del { color: #b3261e; }
html.light .redline-sample ins { color: #157a43; }
html.light .badge-verified { background: rgba(21, 122, 67, 0.12); }
/* WhatsApp Connect kept hardcoded night-glass inputs + a white-on-white
   preview card — dawn text tokens landed on dark fields (unreadable). */
html.light .whatsapp-form input,
html.light .whatsapp-form select {
    background: rgba(11, 27, 51, 0.04);
    border-color: rgba(11, 27, 51, 0.18);
}
html.light .whatsapp-preview {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(11, 27, 51, 0.12);
}
html.light .preview-item {
    background: rgba(11, 27, 51, 0.05);
    border-color: rgba(11, 27, 51, 0.1);
}
/* Button borders tuned for night glass → give them dawn-visible outlines. */
html.light .btn-outline { border-color: rgba(138, 92, 4, 0.55); }
html.light .btn-outline:hover { border-color: var(--gold-400); }
html.light .btn-ghost { border-color: rgba(11, 27, 51, 0.18); }
/* Banner CTA/keep: gradient pill already white-on-pink (fine); the strip's
   tints read softer on cream, so strengthen its border for definition. */
html.light .season-banner { border-bottom-color: rgba(11, 27, 51, 0.16); }

/* ---------- THEME SWITCH (header) ----------
   Cycles night → dawn → match-device. Which icon shows is driven by
   data-theme-pref on <html> (stamped pre-paint by Base.astro). */
.theme-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: var(--glass);
    color: var(--gold-400);
    cursor: pointer;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.theme-switch:hover,
.theme-switch:focus-visible {
    transform: translateY(-1px) rotate(15deg);
    border-color: var(--gold-400);
}
.theme-switch .ti { width: 17px; height: 17px; fill: currentColor; display: none; }
html[data-theme-pref="dark"] .theme-switch .ti-dark,
html:not([data-theme-pref]) .theme-switch .ti-dark { display: block; }
html[data-theme-pref="light"] .theme-switch .ti-light { display: block; }
html[data-theme-pref="system"] .theme-switch .ti-system { display: block; }
html.light .theme-switch { border-color: rgba(11, 27, 51, 0.22); }
@media (max-width: 480px) {
    .theme-switch { width: 34px; height: 34px; }
}

/* Dawn: the open mobile nav menu was hardcoded night glass — dark links
   on a dark panel. Scoped to the same breakpoint that creates the panel. */
@media (max-width: 820px) {
    html.light .nav-links {
        background: rgba(252, 248, 240, 0.98);
    }
}

/* ---------- SEAMLESS MOBILE (iOS edge-to-edge) ----------
   The viewport meta uses viewport-fit=cover, but only <body> carried the
   night gradient — the <html> element behind it was white, so iOS Safari
   painted white bars behind the status bar / toolbar and on rubber-band
   overscroll. Painting <html> itself makes the page bleed edge to edge. */
html {
    background: #04070f;
}
html.light {
    background: #f0e9da;
}
/* Keep the sticky header's content clear of the notch / status bar. */
.site-header {
    padding-top: env(safe-area-inset-top, 0px);
}
/* And the footer clear of the home-indicator bar. */
.site-footer {
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 0px);
}
