/* Altar Technologies Institute: "Crosswalk at night" design.
   Black, white and signal yellow, like street markings, with dark
   cinematic bands, soft cards and gentle, one-time motion.
   All text/background pairs meet WCAG 2.2 AA; most meet AAA.
   Every animation is finite (under 5 seconds) and only runs when the
   visitor has not asked for reduced motion. */

@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("../fonts/atkinson-hyperlegible-latin-700-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --ink: #0E0E10;          /* text, dark bands */
  --ink-2: #18181B;        /* raised dark surface */
  --paper: #FFFFFF;
  --signal: #FFD400;       /* crosswalk yellow: fills, accents, text on dark only */
  --signal-deep: #E6BF00;  /* hover on yellow */
  --link: #1F5FBF;         /* 6.1:1 on white */
  --muted: #4A4A4A;        /* 8.9:1 on white */
  --on-dark: #FFFFFF;
  --on-dark-muted: #D4D4D8; /* 13:1 on --ink */
  --danger: #B3261E;
  --success: #1E6B34;

  --bg: #FAFAF7;           /* warm page */
  --surface: #FFFFFF;      /* cards */
  --panel: #F2F1EC;        /* quiet bands */
  --text: var(--ink);
  --line: var(--ink);      /* strong lines and control borders */
  --border: #D6D5CE;       /* soft card edges (decorative) */
  --shadow: 0 1px 2px rgb(14 14 16 / 6%), 0 8px 24px -12px rgb(14 14 16 / 18%);
  --shadow-lg: 0 2px 4px rgb(14 14 16 / 6%), 0 24px 48px -20px rgb(14 14 16 / 30%);
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink), 0 0 0 9px var(--signal);

  --font: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 999px;         /* buttons */
  --radius-card: 22px;
  --max: 74rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E0E10;
    --surface: #18181B;
    --panel: #141416;
    --text: #FFFFFF;
    --muted: #CFCFCF;
    --link: #8DB8FF;
    --line: #FFFFFF;
    --border: #34343A;
    --danger: #FF8A80;
    --success: #7DDB96;
    --shadow: 0 1px 2px rgb(0 0 0 / 40%), 0 8px 24px -12px rgb(0 0 0 / 70%);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 40%), 0 24px 48px -20px rgb(0 0 0 / 80%);
    --focus: 0 0 0 3px #0E0E10, 0 0 0 6px #FFFFFF, 0 0 0 9px var(--signal);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 65ch; text-wrap: pretty; }
a { color: var(--link); text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.15em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
main:focus { outline: none; }
::selection { background: var(--signal); color: var(--ink); }
.small { font-size: 0.95rem; color: var(--muted); }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Dark bands: hero and page headers */
.on-dark { color: var(--on-dark); }
.on-dark a:not(.btn) { color: var(--signal); }
.on-dark p { color: var(--on-dark-muted); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--on-dark); }
.on-dark .eyebrow { color: var(--signal); }

/* Skip link */
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--signal); color: var(--ink); font-weight: 700;
  padding: 0.75rem 1rem; border: 3px solid var(--ink); border-radius: 12px;
}
.skip-link:focus { top: 1rem; }

/* Buttons */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0.75rem 1.5rem;
  font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none;
  border: 2px solid var(--ink); border-radius: var(--radius); cursor: pointer;
}
.btn-primary { background: var(--signal); color: var(--ink); box-shadow: 0 6px 18px -8px rgb(255 212 0 / 70%); }
.btn-primary:hover { background: var(--signal-deep); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--panel); }
.on-dark .btn-secondary { color: var(--on-dark); border-color: var(--on-dark); }
.on-dark .btn-secondary:hover { background: rgb(255 255 255 / 10%); }
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: #2A2A2E; }
@media (prefers-color-scheme: dark) {
  .btn-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); }
  .btn-dark:hover { background: #E4E4E7; }
}
.btn-arrow::after { content: "\2192"; display: inline-block; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(250 250 247 / 92%);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) {
  .site-header { background: rgb(250 250 247 / 78%); backdrop-filter: saturate(1.6) blur(14px); }
}
@media (prefers-color-scheme: dark) {
  .site-header { background: rgb(14 14 16 / 92%); }
  @supports (backdrop-filter: blur(1px)) { .site-header { background: rgb(14 14 16 / 78%); } }
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--text); text-decoration: none; font-weight: 700; line-height: 1.1; }
.brand img { border-radius: 10px; }
.brand-name { font-size: 1.05rem; }
.brand-sub { display: block; font-weight: 400; color: var(--muted); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.15rem; }
.site-nav a:not(.btn) {
  position: relative; display: inline-block; padding: 0.6rem 0.8rem; color: var(--text); text-decoration: none; font-weight: 700;
  border-radius: 12px;
}
.site-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.3rem; height: 3px; border-radius: 3px;
  background: var(--line); transform: scaleX(0); transform-origin: left;
}
.site-nav a:not(.btn):hover::after { transform: scaleX(1); }
.site-nav a[aria-current="page"]:not(.btn)::after { background: var(--signal); transform: scaleX(1); height: 4px; }
.nav-donate { margin-left: 0.5rem; }
.menu-toggle {
  display: none; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0.5rem 1.1rem;
  font: inherit; font-weight: 700; color: var(--text); background: transparent;
  border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 20px; height: 3px; border-radius: 2px; background: currentColor; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  /* The collapsed menu needs JavaScript to open, so it only collapses when JS runs
     (layout.html adds the "js" class). Without JS the links stay visible. */
  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .js .site-nav.is-open { display: block; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { flex-basis: 100%; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 0.5rem var(--gutter) 1.25rem; }
  .site-nav a:not(.btn) { display: block; padding: 0.75rem 1rem 0.75rem 1.25rem; }
  .site-nav a:not(.btn)::after { left: 0; right: auto; top: 0.6rem; bottom: 0.6rem; width: 5px; height: auto; transform: scaleY(0); transform-origin: top; }
  .site-nav a:not(.btn):hover::after { transform: scaleY(1); }
  .site-nav a[aria-current="page"]:not(.btn)::after { width: 5px; height: auto; transform: scaleY(1); }
  .nav-donate { margin: 0.75rem 0 0; width: 100%; }
}

/* Crosswalk stripes divider */
.stripes {
  height: 22px;
  background: repeating-linear-gradient(115deg, var(--ink) 0 34px, var(--signal) 34px 68px);
}

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--panel); }
.section-dark {
  background:
    radial-gradient(60rem 30rem at 85% 0%, rgb(255 212 0 / 12%), transparent 60%),
    var(--ink);
  color: var(--on-dark);
}
.section-dark a:not(.btn) { color: var(--signal); }
.section-dark .small, .section-dark .eyebrow { color: var(--on-dark-muted); }
@media (prefers-color-scheme: dark) { .section-dark { border-block: 1px solid var(--border); } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.88rem; margin-bottom: 0.9rem;
}
.eyebrow::before { content: ""; width: 1.75rem; height: 4px; border-radius: 4px; background: var(--signal); flex: none; }
.lead { font-size: clamp(1.2rem, 2.2vw, 1.45rem); max-width: 52ch; }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6.5rem);
  background:
    radial-gradient(42rem 28rem at 78% 30%, rgb(255 212 0 / 16%), transparent 65%),
    radial-gradient(30rem 22rem at 5% 100%, rgb(141 184 255 / 10%), transparent 70%),
    var(--ink);
}
.hero::before {
  /* faint road-grid texture */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.35;
  background-image:
    linear-gradient(rgb(255 255 255 / 5%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 5%) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.hero h1 { max-width: 14ch; }
.hero .lead { max-width: 46ch; }
.hl {
  background: linear-gradient(var(--signal), var(--signal)) no-repeat 0 94% / 100% 0.12em;
  padding-bottom: 0.04em;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-art {
  position: relative; border-radius: 28px; overflow: hidden;
  background: var(--ink-2);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 12%), 0 40px 80px -30px rgb(0 0 0 / 80%), 0 0 120px -40px rgb(255 212 0 / 35%);
}
.hero-art svg { display: block; width: 100%; height: auto; }
.hero-points { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--on-dark-muted); font-size: 1rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-points svg { width: 1.2rem; height: 1.2rem; color: var(--signal); flex: none; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { max-width: 32rem; } }

/* Stat */
.stat { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.stat-number {
  font-size: clamp(3.5rem, 11vw, 7rem); font-weight: 700; line-height: 0.95; letter-spacing: -0.03em;
  color: var(--signal); margin: 0; font-variant-numeric: tabular-nums;
}
@media (max-width: 640px) { .stat { grid-template-columns: 1fr; gap: 0.75rem; } }

/* Cards */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.card {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 1.75rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--signal); transform: scaleX(0.18); transform-origin: left;
}
.card:hover::before { transform: scaleX(1); }
.card h3 { margin-bottom: 0.45rem; }
.card p:last-child { margin-bottom: 0; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.card-icon {
  display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; flex: none;
  background: var(--ink); color: var(--signal); border-radius: 16px;
}
.card > .card-icon { margin-bottom: 1.25rem; }
.card-icon svg { width: 1.6rem; height: 1.6rem; }
@media (prefers-color-scheme: dark) { .card-icon { background: rgb(255 212 0 / 12%); box-shadow: inset 0 0 0 1px rgb(255 212 0 / 35%); } }
.card-num {
  display: inline-block; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.08em;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.card .card-link { margin-top: auto; padding-top: 0.75rem; font-weight: 700; }

/* Two-column text */
.split { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4.5rem); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Lists */
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 2.4rem; margin-bottom: 0.85rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.2em; width: 1.5rem; height: 1.5rem; border-radius: 50%;
  background: var(--signal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E0E10' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 0.95rem no-repeat;
}
.chip-list { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.on-dark .chip-list a {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; padding: 0.55rem 1.1rem;
  border-radius: 999px; font-weight: 700; text-decoration: none;
  color: var(--on-dark); background: rgb(255 255 255 / 8%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 35%);
}
.on-dark .chip-list a::after { content: "\2193"; color: var(--signal); }
.on-dark .chip-list a:hover { background: rgb(255 255 255 / 16%); }
.on-dark .chip-list a:focus-visible { box-shadow: var(--focus); }

/* Callouts */
.notice {
  border: 1px solid var(--border); border-left: 6px solid var(--signal); border-radius: 16px;
  background: var(--surface); padding: 1.25rem 1.5rem; margin: 1.5rem 0; box-shadow: var(--shadow);
}
.notice p:last-child { margin-bottom: 0; }

/* Page header (inner pages) */
.page-header {
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  background:
    radial-gradient(36rem 22rem at 90% 10%, rgb(255 212 0 / 14%), transparent 65%),
    var(--ink);
  color: var(--on-dark);
}
.page-header::after {
  /* crosswalk stripes fading in from the right edge */
  content: ""; position: absolute; z-index: -1; top: -10%; bottom: -10%; right: -6rem; width: min(42rem, 60%);
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / 9%) 0 38px, transparent 38px 76px);
  transform: skewX(-18deg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
  mask-image: linear-gradient(90deg, transparent, #000 60%);
}
.page-header h1 { max-width: 18ch; }
.page-header p { font-size: 1.25rem; }
@media (prefers-color-scheme: dark) { .page-header { border-bottom: 1px solid var(--border); } }

/* People */
.person { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.avatar {
  width: 4.75rem; height: 4.75rem; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(from 210deg, var(--signal), #FFE873, var(--signal));
  color: var(--ink); font-weight: 700; font-size: 1.35rem;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 6px var(--signal);
}
.person .role { color: var(--muted); margin-bottom: 0.5rem; }

/* Forms */
.form-panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3.5vw, 2.25rem); box-shadow: var(--shadow-lg);
}
.ati-form { display: grid; gap: 1.1rem; max-width: 40rem; }
.field { display: grid; gap: 0.35rem; }
.field-row { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
label, legend { font-weight: 700; }
.hint { font-size: 0.95rem; color: var(--muted); margin: 0; }
.req { color: var(--danger); font-weight: 700; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; min-height: 50px; padding: 0.7rem 0.9rem;
  font: inherit; color: var(--ink); background: #FFFFFF;
  border: 2px solid var(--ink); border-radius: 12px;
}
@media (prefers-color-scheme: dark) {
  input[type="text"], input[type="email"], input[type="tel"], select, textarea { border-color: #FFFFFF; }
}
textarea { min-height: 8rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--focus); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-weight: 700; font-size: 0.95rem; margin: 0; }
fieldset { border: 0; padding: 0; margin: 0; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.4rem 0; font-weight: 400; }
.choice input { width: 1.4rem; height: 1.4rem; margin-top: 0.2rem; accent-color: var(--ink); flex: none; }
@media (prefers-color-scheme: dark) { .choice input { accent-color: var(--signal); } }
.form-status { margin: 0; font-weight: 700; }
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.site-footer .ati-form input { border-color: var(--paper); }

/* Footer */
.site-footer {
  background:
    radial-gradient(40rem 20rem at 0% 0%, rgb(255 212 0 / 8%), transparent 70%),
    var(--ink);
  color: var(--on-dark); padding: clamp(3.5rem, 7vw, 5rem) 0 2.5rem;
}
.site-footer a { color: var(--on-dark); text-decoration-color: rgb(255 255 255 / 45%); }
.site-footer a:hover { text-decoration-color: var(--signal); }
.site-footer .small { color: #D9D9D9; }
.site-footer label { color: var(--on-dark); }
.footer-grid { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.1fr); }
.footer-heading { font-size: 1.2rem; color: var(--signal); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.site-footer .form-status.is-success { color: #7DDB96; }
.site-footer .form-status.is-error, .site-footer .field-error { color: #FF8A80; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* News */
.post {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1.25rem; box-shadow: var(--shadow); max-width: 52rem;
}
.post time {
  display: inline-block; margin-bottom: 0.6rem; padding: 0.15rem 0.75rem; border-radius: 999px;
  background: var(--panel); color: var(--muted); font-weight: 700; font-size: 0.95rem;
}

/* ---------- Motion ----------
   Only for visitors who have not asked for reduced motion. Everything
   plays once and finishes in under 5 seconds (WCAG 2.2.2). Content is
   fully visible without JavaScript; .motion is added by site.js. */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .btn { transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease; }
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(0); }
  .btn-arrow::after { transition: transform 200ms var(--ease-out); }
  .btn-arrow:hover::after { transform: translateX(4px); }
  .site-header { transition: box-shadow 200ms ease; }
  .site-nav a:not(.btn)::after { transition: transform 220ms var(--ease-out); }
  .menu-icon, .menu-icon::before, .menu-icon::after { transition: transform 200ms ease, top 200ms ease, background-color 200ms ease; }
  .site-nav.is-open { animation: nav-in 220ms var(--ease-out); }
  .card { transition: transform 260ms var(--ease-out), box-shadow 260ms ease; }
  .card::before { transition: transform 400ms var(--ease-out); }
  .on-dark .chip-list a { transition: background-color 160ms ease; }
  input, select, textarea { transition: border-color 160ms ease; }

  /* Hero text: staggered rise on first load */
  .hero .rise { animation: rise 800ms var(--ease-out) both; }
  .hero .rise:nth-child(2) { animation-delay: 80ms; }
  .hero .rise:nth-child(3) { animation-delay: 160ms; }
  .hero .rise:nth-child(4) { animation-delay: 240ms; }
  .hero .rise:nth-child(5) { animation-delay: 320ms; }
  .hero .hl { animation: underline 900ms var(--ease-out) 600ms both; }
  .page-header .container > * { animation: rise 700ms var(--ease-out) both; }
  .page-header .container > :nth-child(2) { animation-delay: 70ms; }
  .page-header .container > :nth-child(3) { animation-delay: 140ms; }
  .page-header .container > :nth-child(4) { animation-delay: 210ms; }
  .page-header::after { animation: stripes-in 1200ms var(--ease-out) both; }

  /* Hero illustration: one short scene, then it rests */
  .scene-stripe { transform-box: fill-box; transform-origin: left center; animation: draw-x 700ms var(--ease-out) both; }
  .scene-stripe:nth-child(2) { animation-delay: 90ms; }
  .scene-stripe:nth-child(3) { animation-delay: 180ms; }
  .scene-stripe:nth-child(4) { animation-delay: 270ms; }
  .scene-stripe:nth-child(5) { animation-delay: 360ms; }
  .scene-stripe:nth-child(6) { animation-delay: 450ms; }
  .scene-stripe:nth-child(7) { animation-delay: 540ms; }
  .scene-signal { animation: fade-in 600ms ease 300ms both; }
  .scene-walk-light { animation: glow 900ms ease 900ms 2 both; }
  .scene-time { transform-box: fill-box; transform-origin: left center; animation: extend 1600ms var(--ease-out) 1200ms both; }
  .scene-time-label { animation: fade-in 500ms ease 2600ms both; }
  .scene-traveler { animation: travel 3400ms var(--ease-out) 400ms both; }
  .scene-traveler-2 { animation-duration: 3800ms; animation-delay: 200ms; }
  .scene-wheel { transform-box: fill-box; transform-origin: center; animation: roll 3400ms var(--ease-out) 400ms both; }
  .scene-sound { transform-box: fill-box; transform-origin: right center; animation: ping 900ms ease-out 1400ms 3 both; }

  /* Scroll reveal */
  .motion .reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .motion .reveal.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes underline { from { background-size: 0% 0.12em; } to { background-size: 100% 0.12em; } }
@keyframes stripes-in { from { opacity: 0; transform: skewX(-18deg) translateX(6rem); } to { opacity: 1; transform: skewX(-18deg); } }
@keyframes nav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes draw-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
@keyframes extend { from { transform: scaleX(0.45); } to { transform: scaleX(1); } }
@keyframes travel { from { transform: translateX(-150px); } to { transform: translateX(0); } }
@keyframes roll { from { transform: rotate(-300deg); } to { transform: rotate(0deg); } }
@keyframes ping { 0% { opacity: 0; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }

@media (forced-colors: active) {
  .card, .form-panel, .notice, .post { border: 1px solid CanvasText; }
  .eyebrow::before, .card::before { background: CanvasText; }
}

@media print {
  .site-header, .site-footer, .stripes, .skip-link, .hero-art { display: none; }
  .hero, .page-header, .section-dark { background: none; color: #000; }
  .on-dark p, .on-dark h1, .on-dark h2 { color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { font-size: 12pt; }
}
