﻿/* Landing page design (index.php only). Professional public-service look for the one page
   every prospective user — PWDs included — meets first.
   Constraints honored: system fonts only (no CDN/webfonts, offline ethos), WCAG-minded
   contrast (body/brand pairs >= 4.5:1), 44px+ touch targets, visible focus, reduced-motion
   respected everywhere. */

:root {
    --brand-600: #1f6fd4;   /* primary action blue (same hue the dashboards use) */
    --brand-700: #17549f;
    --brand-800: #123f78;
    --navy-900: #0e2a4d;    /* hero / footer ground */
    --navy-950: #0a1f3a;
    --gold-400: #f4b942;    /* warm accent — used decoratively, never as sole signal */
    --paper: #f6f8fb;       /* page ground */
    --card: #ffffff;
    --ink: #172335;
    --ink-soft: #46536a;
    --line: #d9e1ec;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(14, 42, 77, 0.06), 0 2px 8px rgba(14, 42, 77, 0.06);
    --shadow-md: 0 2px 6px rgba(14, 42, 77, 0.08), 0 10px 28px rgba(14, 42, 77, 0.12);
}

/* ---- page frame (override base.css's narrow column: landing is full-bleed) ---- */
html { scroll-padding-top: 84px; }   /* anchored nav lands below the sticky header (landing only) */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body.landing {
    max-width: none;
    padding: 0;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

.landing .wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.75rem;
}

.landing section { margin: 0; }
.landing h1, .landing h2, .landing h3 { line-height: 1.2; margin-top: 0; }

/* ---- official top strip ---- */
.gov-strip {
    background: var(--navy-950);
    color: #b9cbe6;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.gov-strip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.gov-official { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.gov-official svg { width: 15px; height: 15px; flex: none; color: var(--gold-400); }
.gov-loc { white-space: nowrap; color: #8fa5c2; }

/* ---- site header (sticky, condenses on scroll) ---- */
.site-header {
    background: rgba(255,255,255,0.92);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
    transition: box-shadow 240ms ease, background-color 240ms ease;
}
.site-header.is-scrolled {
    background: rgba(255,255,255,0.97);
    box-shadow: 0 6px 24px rgba(14, 42, 77, 0.10);
}
.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: padding 240ms ease;
}
.site-header.is-scrolled .wrap { padding-top: 0.6rem; padding-bottom: 0.6rem; }

/* brand */
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; flex: none; }
.brand-seal {
    width: 44px; height: 44px; flex: none;
    border-radius: 12px;
    background: radial-gradient(circle at 32% 28%, #2f83e8, var(--brand-800));
    display: grid; place-items: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(18, 63, 120, 0.28);
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.brand:hover .brand-seal { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(18, 63, 120, 0.34); }
.brand-seal svg { width: 26px; height: 26px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 800; font-size: 1.06rem; letter-spacing: 0.005em; color: var(--navy-900); }
.brand-sub { font-weight: 500; font-size: 0.75rem; color: var(--ink-soft); }

/* center navigation — flex:1 fills the middle and centers the links; min-width:0 lets it
   shrink instead of pushing the actions off-screen on tighter widths */
.site-nav { display: flex; align-items: center; justify-content: center; gap: 0.4rem; flex: 1 1 auto; min-width: 0; }
.site-nav a {
    position: relative;
    padding: 0.55rem 1rem;
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}
.site-nav a::after {
    content: "";
    position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.32rem; height: 2px;
    background: var(--brand-600); border-radius: 2px;
    transform: scaleX(0); transform-origin: center;
}
.site-nav a:hover { color: var(--brand-700); background: rgba(31,111,212,0.06); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
    .site-nav a::after { transition: transform 200ms ease; }
}

/* right actions */
.header-actions { display: flex; align-items: center; gap: 0.6rem; flex: none; }

/* header buttons (a touch smaller than the hero CTAs) */
.btn.btn-header { min-height: 42px; padding: 0.5em 1.15em; gap: 0.4em; font-size: 0.95rem; }
.btn.btn-header svg { width: 17px; height: 17px; }
/* bordered secondary for the light header bar (Register sits beside the solid Log In) */
.btn.btn-ghost-dark { background: transparent; color: var(--brand-700); border-color: var(--line); }
.btn.btn-ghost-dark:hover { border-color: var(--brand-600); background: rgba(31,111,212,0.06); }

/* responsive: drop the center nav + brand tagline on small screens */
@media (max-width: 860px) {
    .site-nav { display: none; }
    .site-header .wrap { gap: 1rem; }
}
@media (max-width: 620px) {
    .btn.btn-ghost-dark { display: none; }   /* keep only the primary Log In on very small headers */
}
@media (max-width: 520px) {
    .gov-official { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gov-loc { display: none; }
    .brand-sub { display: none; }
}

/* ---- buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    min-height: 48px; padding: 0.7em 1.5em;
    border-radius: 10px; border: 2px solid transparent;
    font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--brand-600); color: #fff; }
.btn-primary:hover { background: var(--brand-700); }
.btn-primary:active { background: var(--brand-800); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.btn-light { background: #fff; color: var(--brand-800); }
.btn-light:hover { background: #e9f1fc; }

/* ---- hero ---- */
.hero {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(47, 131, 232, 0.35), transparent 60%),
        radial-gradient(700px 380px at -10% 110%, rgba(244, 185, 66, 0.18), transparent 55%),
        linear-gradient(150deg, var(--navy-900), #143b6d 55%, var(--brand-700));
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero-wave { display: block; width: 100%; height: 44px; margin-bottom: -1px; }
.hero-wave-path { fill: var(--paper); }
.hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 2.5rem;
    align-items: center;
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
}
.hero-kicker {
    display: inline-block;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    padding: 0.3em 1em;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); font-weight: 800; margin-bottom: 0.9rem; max-width: 22ch; }
.hero h1 em { font-style: normal; color: var(--gold-400); }
.hero-lead { font-size: 1.08rem; color: #dce7f5; max-width: 56ch; margin-bottom: 1.6rem; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.hero-note { font-size: 0.92rem; color: #b9cbe3; max-width: 52ch; }
.hero-note strong { color: #fff; }

.hero-art { display: grid; place-items: center; }
.hero-art svg { width: min(100%, 340px); height: auto; filter: drop-shadow(0 12px 30px rgba(4, 16, 34, 0.45)); }
@media (prefers-reduced-motion: no-preference) {
    .hero-art-svg { transform-origin: 120px 120px; animation: hero-float 5s ease-in-out infinite; }
    .hero-art-ring { transform-origin: 120px 120px; animation: hero-spin 18s linear infinite; }
    .hero-art-ring-slow { animation-duration: 26s; animation-direction: reverse; }
}
@keyframes hero-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes hero-spin { to { transform: rotate(360deg); } }

/* ---- by-the-numbers stat strip ---- */
.stats-strip { background: var(--navy-900); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1.5rem;
    padding-top: 2.1rem;
    padding-bottom: 2.1rem;
    text-align: center;
}
.stat-tile { color: #fff; }
.stat-value {
    display: block;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--gold-400);
    font-variant-numeric: tabular-nums;
}
.stat-label { display: block; font-size: 0.88rem; color: #cdd9ea; margin-top: 0.2rem; }

/* ---- assistance-type band ---- */
.types { background: #fff; border-bottom: 1px solid var(--line); }
.types .wrap { padding-top: 1.6rem; padding-bottom: 1.6rem; }
.types-head { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); text-align: center; margin-bottom: 1rem; }
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.8rem;
}
.type-chip {
    display: flex; align-items: center; gap: 0.7rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    font-weight: 600; font-size: 0.95rem;
}
.type-chip svg { width: 26px; height: 26px; flex: none; color: var(--brand-600); }

/* ---- generic section rhythm ---- */
.section { padding: 3.25rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 62ch; margin: 0 auto 2.2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: 0.5rem; }
.section-head p { color: var(--ink-soft); margin: 0; }

/* ---- how it works ---- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.1rem;
    counter-reset: step;
    list-style: none;
    padding: 0; margin: 0;
}
.steps li {
    counter-increment: step;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.4rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}
.steps li::before {
    content: counter(step);
    display: grid; place-items: center;
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--brand-600);
    color: #fff;
    font-weight: 800; font-size: 1.15rem;
    margin-bottom: 0.85rem;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---- role cards ---- */
.roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.role-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-top: 4px solid var(--brand-600);
    border-radius: var(--radius);
    padding: 1.5rem 1.4rem;
    box-shadow: var(--shadow-sm);
    margin: 0;
}
.role-card:nth-child(2) { border-top-color: var(--gold-400); }
.role-card:nth-child(3) { border-top-color: #1baf7a; }
.role-card .role-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: #eaf2fd;
    color: var(--brand-700);
    display: grid; place-items: center;
    margin-bottom: 0.9rem;
}
.role-card .role-icon svg { width: 26px; height: 26px; }
.role-card figcaption { font-weight: 800; font-size: 1.1rem; margin-bottom: 0.45rem; }
.role-card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ---- commitment band ---- */
.commitment {
    background: linear-gradient(135deg, var(--navy-950), var(--navy-900) 60%, #123c6e);
    color: #fff;
}
.commitment .wrap { padding-top: 3rem; padding-bottom: 3rem; text-align: center; }
.commitment h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); font-weight: 800; max-width: 30ch; margin: 0 auto 0.8rem; }
.commitment h2 em { font-style: normal; color: var(--gold-400); }
.commitment p { color: #c9d8ec; max-width: 66ch; margin: 0 auto 1.6rem; }
.commitment-points {
    display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap;
    list-style: none; padding: 0; margin: 0;
}
.commitment-points li {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    padding: 0.5em 1.1em;
    font-size: 0.92rem; font-weight: 600;
}
.commitment-points svg { width: 18px; height: 18px; color: var(--gold-400); flex: none; }

/* ---- announcements ---- */
.announce-list { max-width: 760px; margin: 0 auto; padding: 0; list-style: none; }
.announce-list li {
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 5px solid var(--brand-600);
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    margin-bottom: 0.9rem;
    box-shadow: var(--shadow-sm);
}
.announce-list h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.announce-list time { font-size: 0.82rem; color: var(--ink-soft); }
.announce-list p { margin: 0.45rem 0 0; color: var(--ink-soft); font-size: 0.96rem; }
.announce-empty { text-align: center; color: var(--ink-soft); }

/* ---- footer ---- */
.site-footer { background: var(--navy-950); color: #b9c9de; font-size: 0.92rem; }
.site-footer .wrap {
    padding-top: 2.2rem; padding-bottom: 2.2rem;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem;
}
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.5rem; }
.site-footer a { color: #dbe7f6; }
.site-footer p { margin: 0 0 0.4rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.14); }
.footer-legal .wrap { display: block; padding-top: 1rem; padding-bottom: 1.2rem; font-size: 0.82rem; color: #8fa5c2; }

/* ---- scroll-reveal ----
   Hidden state only applies once html.js is present (see index.php's inline script) — a page
   that never runs JS, or where it fails, always shows full content by default. */
html.js [data-reveal] { opacity: 0; transform: translateY(16px); }
html.js [data-reveal].is-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
    html.js [data-reveal] { transition: opacity 520ms ease, transform 520ms ease; }
    /* stagger siblings within their own container via nth-child, so a grid/list cascades in
       rather than popping as one block */
    .types-grid [data-reveal]:nth-child(1) { transition-delay: 0ms; }
    .types-grid [data-reveal]:nth-child(2) { transition-delay: 60ms; }
    .types-grid [data-reveal]:nth-child(3) { transition-delay: 120ms; }
    .types-grid [data-reveal]:nth-child(4) { transition-delay: 180ms; }
    .types-grid [data-reveal]:nth-child(5) { transition-delay: 240ms; }
    .steps [data-reveal]:nth-child(1), .roles [data-reveal]:nth-child(1) { transition-delay: 0ms; }
    .steps [data-reveal]:nth-child(2), .roles [data-reveal]:nth-child(2) { transition-delay: 90ms; }
    .steps [data-reveal]:nth-child(3), .roles [data-reveal]:nth-child(3) { transition-delay: 180ms; }
    .steps [data-reveal]:nth-child(4) { transition-delay: 270ms; }
    .commitment-points [data-reveal]:nth-child(1) { transition-delay: 0ms; }
    .commitment-points [data-reveal]:nth-child(2) { transition-delay: 70ms; }
    .commitment-points [data-reveal]:nth-child(3) { transition-delay: 140ms; }
    .commitment-points [data-reveal]:nth-child(4) { transition-delay: 210ms; }
    .stats-grid [data-reveal]:nth-child(2) { transition-delay: 90ms; }
    .stats-grid [data-reveal]:nth-child(3) { transition-delay: 180ms; }
}

/* ---- back to top ---- */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--brand-600);
    color: #fff;
    display: grid; place-items: center;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    z-index: 50;
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--brand-700); }
@media (prefers-reduced-motion: no-preference) {
    .back-to-top { transition: opacity 200ms ease, transform 200ms ease, background-color 160ms ease; }
}

/* ---- focus + motion ---- */
.landing a:focus-visible, .landing button:focus-visible, .landing .btn:focus-visible {
    outline: 3px solid var(--gold-400);
    outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
    .btn, .role-card, .announce-list li, .type-chip { transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease; }
    .role-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
    .type-chip:hover { transform: translateY(-2px); border-color: var(--brand-600); box-shadow: var(--shadow-sm); }
    .type-chip:hover svg { color: var(--brand-700); }
}

/* ---- responsive ---- */
@media (max-width: 840px) {
    .hero .wrap { grid-template-columns: 1fr; padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .hero-art { order: -1; }
    .hero-art svg { width: min(60%, 240px); }
}
