/* Tehama County Youth Apprenticeship — "Industrial Technician" design system
   Gunmetal steel + safety yellow. Modern industrial UI: spec plates, hazard
   accents, condensed display type, mono technical labels. No build step. */

:root {
  /* Palette */
  --steel-950: #071D33;
  --steel-900: #0B2B46;   /* gunmetal panels */
  --steel-800: #123B63;
  --steel-700: #15477D;
  --steel-500: #46688F;
  --steel-300: #A3B8CC;
  --steel-150: #DBE5EE;
  --bg: #EFF4F8;          /* shop-floor light */
  --white: #ffffff;
  --yellow: #FDC70C;      /* safety yellow */
  --yellow-deep: #8A6A00; /* AA text on white */
  --orange: #F3903F;      /* safety orange */
  --orange-deep: #C24E24; /* AA text on white */
  --ink: #14283C;
  --muted: #4B617A;
  --green: #2e7d32;

  /* Shape & depth — hard edges, machined */
  --radius: 4px;
  --radius-lg: 8px;
  --hard: 4px 4px 0 var(--steel-950);
  --hard-lift: 7px 7px 0 var(--steel-950);
  --shadow: 0 2px 10px rgba(7, 29, 51, .14);
  --maxw: 1100px;

  /* Hazard stripe */
  --hazard: repeating-linear-gradient(-45deg, var(--yellow) 0 14px, var(--steel-950) 14px 28px);

  /* Type */
  --display: "Chakra Petch", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
  --body: "Titillium Web", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 17px;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--orange-deep); }
a:hover { color: var(--steel-950); }

h1, h2, h3, .brand-name {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .015em;
}
h1 em, h2 em {
  font-style: normal; color: var(--orange-deep);
}
.cine-content h1 em, .hero h1 em, .section-navy h2 em { color: var(--yellow); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--steel-950); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

/* Demo banner — hazard stripe edges */
.demo-banner {
  background: var(--yellow); color: var(--steel-950); text-align: center; font-weight: 700;
  font-size: .85rem; padding: .45rem 1rem;
  border-bottom: 6px solid transparent;
  border-image: var(--hazard) 6;
}

/* Header / nav — steel toolbar */
.site-header {
  background: var(--steel-900);
  position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--yellow);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .55rem 1.25rem; max-width: 1320px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; }
.brand img { width: 44px; height: 44px; }
.brand-name { font-weight: 700; font-size: 1.12rem; line-height: 1.15; color: #fff; }
.brand-name small {
  display: block; font-family: var(--mono); font-weight: 500; color: var(--steel-300);
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
}
.nav-toggle {
  display: none; background: none; border: 2px solid var(--yellow); border-radius: var(--radius);
  padding: .35rem .6rem; font-size: 1.1rem; cursor: pointer; color: var(--yellow);
}
.nav-links { display: flex; gap: .15rem; list-style: none; margin: 0 0 0 auto; padding: 0; flex-wrap: nowrap; align-items: center; }
.nav-links a { white-space: nowrap; }
.nav-links a {
  display: block; padding: .45rem .55rem; text-decoration: none; color: var(--steel-300);
  font-family: var(--display); text-transform: uppercase; font-weight: 600;
  font-size: .92rem; letter-spacing: .03em; border-radius: var(--radius);
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover, .nav-links a:focus { color: #fff; border-bottom-color: var(--steel-500); }
.nav-links a[aria-current="page"] { color: var(--yellow); border-bottom-color: var(--yellow); }
.nav-links a.nav-cta {
  background: var(--yellow); color: var(--steel-950); border: 2px solid var(--steel-950);
  margin-left: .5rem; padding: .45rem 1.1rem; box-shadow: 3px 3px 0 rgba(0,0,0,.45);
}
.nav-links a.nav-cta:hover { background: #FFD43D; }

/* Mono spec label (kicker) — [ SEC.01 // LABEL ] */
.kicker {
  display: inline-block; font-family: var(--mono); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel-500);
  border: 1.5px solid var(--steel-300); border-left: 6px solid var(--yellow);
  background: var(--white); padding: .28rem .8rem; margin-bottom: .6rem; border-radius: var(--radius);
}
.section-navy .kicker { background: transparent; color: var(--steel-300); border-color: var(--steel-700); border-left-color: var(--yellow); }

/* Interior page hero — gunmetal with blueprint grid */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--steel-900);
  border-bottom: 6px solid transparent; border-image: var(--hazard) 6;
}
/* faint photo layer (real element so relative URLs resolve against the page) */
.hero .hero-bg {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: grayscale(.85) contrast(1.05); opacity: .16; z-index: 0; pointer-events: none;
}
/* blueprint grid over the photo */
.hero::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background:
    linear-gradient(rgba(255, 176, 0, .05), transparent 40%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.05) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 1px, transparent 1px 36px);
  z-index: 1; pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: center;
  padding: 3.6rem 1.25rem 3.8rem; max-width: var(--maxw); margin: 0 auto;
}
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 3.8rem); line-height: .98; margin: 0 0 1.1rem; font-weight: 700; color: #fff; }
.hero p.lead { font-size: 1.16rem; color: var(--steel-300); max-width: 34rem; }
.hero .eyebrow {
  display: inline-block; font-family: var(--mono); background: var(--yellow); color: var(--steel-950);
  font-weight: 600; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .9rem; border-radius: var(--radius); margin-bottom: 1.2rem;
}

/* Cinematic home hero (parallax) — night shift */
.cine-hero {
  position: relative; min-height: 100svh; overflow: hidden;
  background: linear-gradient(180deg, #0E3050 0%, #0B2B46 55%, #071D33 100%);
  margin: 0; padding-top: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.cine-hero .hero-bg {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: grayscale(.25) brightness(1.1); opacity: .34; z-index: 0; pointer-events: none;
}
.cine-hero::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 42px);
  z-index: 2; pointer-events: none;
}
.cine-layers { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.cine-layers svg, .cine-layers .sun { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; will-change: transform; }
.cine-layers .sun {
  left: auto; right: 12%; bottom: auto; top: 14%;
  width: clamp(80px, 10vw, 130px); height: clamp(80px, 10vw, 130px); border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #ffd877, var(--yellow) 65%);
  box-shadow: 0 0 70px 24px rgba(255, 176, 0, .35);
}
.cine-content { position: relative; z-index: 5; max-width: 900px; padding: 0 1.25rem 13vh; }
.cine-content .eyebrow {
  display: inline-block; font-family: var(--mono); background: var(--yellow); color: var(--steel-950);
  font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  padding: .35rem 1rem; border-radius: var(--radius); margin-bottom: 1.4rem;
}
.cine-content h1 {
  font-size: clamp(3.2rem, 10vw, 7rem); line-height: .92; margin: 0 0 1.2rem;
  font-weight: 700; color: #f4f6f8; letter-spacing: .01em;
}
.cine-content .lead { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--steel-300); max-width: 42rem; margin: 0 auto 1.6rem; }
.cine-content .btn-row { justify-content: center; }
.scroll-cue {
  position: absolute; bottom: 5vh; left: 50%; transform: translateX(-50%); z-index: 5;
  color: var(--steel-500); font-family: var(--mono); font-size: .72rem; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
}
.scroll-cue::after {
  content: ""; display: block; width: 2px; height: 34px; margin: .5rem auto 0;
  background: linear-gradient(180deg, var(--yellow), transparent);
  animation: cueDrop 1.6s ease-in-out infinite;
}
@keyframes cueDrop { 0% { transform: scaleY(0); transform-origin: top; } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Buttons — machine controls */
.btn {
  display: inline-block; padding: .8rem 1.6rem; border-radius: var(--radius);
  font-family: var(--display); text-transform: uppercase; font-weight: 700; letter-spacing: .05em;
  text-decoration: none; cursor: pointer; font-size: 1.05rem;
  border: 2px solid var(--steel-950);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); }
.btn-primary { background: var(--yellow); color: var(--steel-950); box-shadow: var(--hard); }
.btn-primary:hover { background: #FFD43D; color: var(--steel-950); box-shadow: var(--hard-lift); }
.btn-secondary { background: transparent; color: #fff; border-color: var(--steel-300); box-shadow: 4px 4px 0 rgba(0,0,0,.4); }
.btn-secondary:hover { color: var(--yellow); border-color: var(--yellow); }
.btn-outline { background: var(--white); color: var(--steel-950); box-shadow: var(--hard); }
.btn-outline:hover { background: var(--steel-950); color: var(--yellow); box-shadow: var(--hard-lift); }
.btn-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.6rem; }

/* Sections */
section { padding: 3.4rem 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--steel-150); border-bottom: 1px solid var(--steel-150); }
.section-navy { /* dark steel band */
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 36px),
    var(--steel-900);
  color: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--steel-700);
  max-width: calc(var(--maxw) + 4rem); margin: 1.5rem auto; padding: 3.2rem 1rem;
}
.section-navy h2 { color: #fff; }
h2 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.02; color: var(--steel-900); margin: 0 0 .6rem; font-weight: 700; }
h3 { color: var(--steel-900); }
.section-intro { color: var(--muted); max-width: 740px; margin-bottom: 2.2rem; font-size: 1.12rem; }
.section-navy .section-intro { color: var(--steel-300); }

/* Cards — spec plates */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.3rem; }
.card {
  background: var(--white); border: 2px solid var(--steel-900); border-radius: var(--radius);
  padding: 1.5rem; position: relative; box-shadow: var(--hard);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translate(-2px, -2px); box-shadow: var(--hard-lift); }
.card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: var(--yellow);
}
.card:nth-child(4n+2)::before { background: var(--orange); }
.card:nth-child(4n+3)::before { background: var(--steel-500); }
.card:nth-child(4n+4)::before { background: var(--hazard); }
.card h3 { margin-top: .5rem; font-size: 1.35rem; }
.card p { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.card .icon { width: 46px; height: 46px; }

/* Stats — gauge readouts */
.stat-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; text-align: center; }
.stat-band > div {
  padding: 1.2rem .6rem 1rem; border: 1px solid var(--steel-700); border-radius: var(--radius);
  background: rgba(0,0,0,.25);
}
.stat-band .num {
  font-family: var(--display); font-size: clamp(2.6rem, 5vw, 3.8rem); font-weight: 700;
  color: var(--yellow); display: block; line-height: 1;
}
.stat-band .label { color: var(--steel-300); font-size: .9rem; font-family: var(--mono); letter-spacing: .02em; }

/* Timeline */
.timeline { list-style: none; margin: 2rem 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 4px; background: var(--steel-150); }
.timeline li { position: relative; padding: 0 0 1.5rem 2.5rem; }
.timeline li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 16px; height: 16px;
  border-radius: 2px; background: var(--yellow); border: 2.5px solid var(--steel-950);
}
.timeline .when { font-family: var(--mono); font-weight: 600; color: var(--orange-deep); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
.timeline h3 { margin: .15rem 0 .25rem; font-size: 1.25rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .95rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }

/* Tables — data plates */
table { width: 100%; border-collapse: collapse; background: #fff; border: 2px solid var(--steel-900); border-radius: var(--radius); overflow: hidden; }
th {
  background: var(--steel-900); color: var(--yellow); text-align: left; padding: .75rem 1rem;
  font-family: var(--mono); font-weight: 600; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
}
td { padding: .7rem 1rem; border-bottom: 1px solid var(--steel-150); font-size: .95rem; }
tr:last-child td { border-bottom: none; }

/* Forms — control panel */
.form-card {
  background: var(--white); border: 2px solid var(--steel-900); border-radius: var(--radius-lg);
  box-shadow: var(--hard); padding: 2.2rem; max-width: 760px; position: relative;
}
.form-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px; background: var(--hazard); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-family: var(--mono); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .3rem; color: var(--steel-900); }
.req { color: var(--orange-deep); }
input, select, textarea {
  width: 100%; padding: .7rem .9rem; border: 2px solid var(--steel-300); border-radius: var(--radius);
  font-family: var(--body); font-size: 1rem; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(255, 176, 0, .5); border-color: var(--steel-900); }
fieldset { border: 2px solid var(--steel-150); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0; }
legend { font-family: var(--mono); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--steel-900); padding: 0 .5rem; }
.checks label { font-family: var(--body); font-weight: 500; font-size: .95rem; text-transform: none; letter-spacing: 0; display: flex; gap: .55rem; align-items: flex-start; margin-bottom: .45rem; }
.checks input { width: auto; margin-top: .3rem; accent-color: var(--orange); }
.form-note { font-size: .85rem; color: var(--muted); }
.form-status { margin-top: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius); display: none; font-weight: 600; }
.form-status.ok { display: block; background: #e7f6ec; color: var(--green); border: 2px solid var(--green); }
.form-status.err { display: block; background: #fdecea; color: #b3261e; border: 2px solid #b3261e; }

/* Toolkit doc cards */
.doc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; }
.doc-card {
  display: flex; gap: 1rem; background: var(--white); border: 2px solid var(--steel-900);
  border-radius: var(--radius); padding: 1.3rem; align-items: flex-start;
  box-shadow: var(--hard); transition: transform .15s ease, box-shadow .15s ease;
}
.doc-card:hover { transform: translate(-2px, -2px); box-shadow: var(--hard-lift); }
.doc-card .doc-icon { flex: 0 0 46px; }
.doc-card h3 { margin: 0 0 .25rem; font-size: 1.2rem; }
.doc-card p { margin: 0 0 .6rem; color: var(--muted); font-size: .9rem; }
.doc-card .meta { font-family: var(--mono); font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.doc-links { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .92rem; font-weight: 700; }
.tag {
  display: inline-block; font-family: var(--mono); background: var(--steel-900); color: var(--yellow);
  font-size: .68rem; font-weight: 600; padding: .2rem .65rem; border-radius: var(--radius);
  text-transform: uppercase; letter-spacing: .08em;
}

/* News */
.news-item {
  background: var(--white); border: 2px solid var(--steel-900); border-left: 8px solid var(--yellow);
  border-radius: var(--radius); padding: 1.6rem; margin-bottom: 1.25rem; box-shadow: var(--shadow);
}
.news-item:nth-child(odd) { border-left-color: var(--orange); }
.news-item .date { font-family: var(--mono); color: var(--orange-deep); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.news-item h3 { margin: .25rem 0 .5rem; font-size: 1.35rem; }
.news-item p { margin: 0; color: var(--muted); }

/* Media gallery */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.media-grid figure {
  margin: 0; background: var(--white); border: 2px solid var(--steel-900); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.media-grid figure:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); }
.media-grid img, .media-grid svg { display: block; width: 100%; }
.media-grid figcaption { padding: .6rem .9rem; font-family: var(--mono); font-size: .74rem; color: var(--muted); border-top: 1px solid var(--steel-150); }

/* Partner marquee */
.partner-strip { display: flex; overflow: hidden; gap: 0; position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.partner-track { display: flex; gap: 1rem; padding-right: 1rem; flex-shrink: 0; animation: marquee 26s linear infinite; }
.partner-strip:hover .partner-track { animation-play-state: paused; }
.partner-track span {
  white-space: nowrap; background: var(--white); border: 2px solid var(--steel-900);
  border-radius: var(--radius); padding: .5rem 1.3rem; font-family: var(--display);
  text-transform: uppercase; font-weight: 600; color: var(--steel-900); font-size: 1rem;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* Callout — caution plate */
.callout {
  background: var(--white); border: 2px solid var(--steel-900); border-left: 10px solid var(--yellow);
  border-radius: var(--radius); padding: 1.4rem 1.6rem; margin: 1.8rem 0; font-size: 1.05rem;
}
.callout.orange { border-left-color: var(--orange); }
.callout strong { font-family: var(--display); text-transform: uppercase; font-size: 1.12em; color: var(--steel-900); }

/* Journey — scroll-indexed gear */
.journey { height: 300vh; position: relative; padding: 0; }
.journey-pin { position: sticky; top: 78px; height: calc(100svh - 78px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.journey-pin .container { width: 100%; }
.journey-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: center; }
.gear-svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.gear-rotor { transform-box: fill-box; transform-origin: center; will-change: transform; }
/* One station at a time — large display panel that swaps with the gear */
.station-stage { position: relative; }
.stations { list-style: none; margin: 0; padding: 0; position: relative; min-height: 19rem; }
.station {
  position: absolute; left: 0; right: 0; top: 50%;
  display: flex; gap: 1.6rem; align-items: flex-start;
  background: var(--white); border: 2px solid var(--steel-900); border-left: 12px solid var(--yellow);
  border-radius: var(--radius-lg); padding: 2.2rem 2.4rem;
  box-shadow: var(--hard);
  opacity: 0; transform: translateY(calc(-50% + 28px));
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.station .st-num {
  font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 5vw, 4.5rem); line-height: .9;
  color: transparent; -webkit-text-stroke: 2px var(--steel-300); min-width: 4.5rem;
}
.station h3 { margin: 0 0 .5rem; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.station p { margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.6; }
.station.on {
  opacity: 1; transform: translateY(-50%); pointer-events: auto;
}
.station.on .st-num { color: var(--orange-deep); -webkit-text-stroke: 0; }
.station-ticks { display: flex; gap: .6rem; justify-content: center; margin-top: 1rem; }
.station-ticks .tick {
  width: 34px; height: 8px; border-radius: 2px; background: var(--steel-150);
  border: 1px solid var(--steel-300); transition: background .3s ease;
}
.station-ticks .tick.on { background: var(--yellow); border-color: var(--steel-900); }
.station-ticks .tick.done { background: var(--green); border-color: var(--green); }

/* Compact the gear scene on shorter viewports so nothing clips */
@media (max-height: 880px) {
  .journey .section-intro { margin-bottom: 1rem; font-size: 1rem; }
  .journey h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
  .gear-svg { max-width: 330px; }
  .stations { min-height: 16rem; }
  .station { padding: 1.6rem 1.9rem; }
}
@media (max-height: 700px) {
  .journey .section-intro { display: none; }
  .gear-svg { max-width: 270px; }
}

/* Pinned horizontal scene */
.hscroll { height: 340vh; position: relative; padding: 0; }
.hscroll-pin { position: sticky; top: 78px; height: calc(100svh - 78px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.h-head { max-width: var(--maxw); margin: 0 auto 1.6rem; padding: 0 1.25rem; width: 100%; }
.h-track { display: flex; gap: 1.5rem; padding: 0 max(calc((100vw - var(--maxw)) / 2 + 1.25rem), 1.25rem); will-change: transform; }
.hpanel {
  flex: 0 0 min(68vw, 560px); background: var(--white); border: 2px solid var(--steel-900);
  border-radius: var(--radius-lg); box-shadow: var(--hard); padding: 2.4rem 2.6rem; position: relative; overflow: hidden;
}
.hpanel .bignum {
  font-family: var(--display); font-weight: 700; font-size: clamp(4rem, 9vw, 7rem);
  line-height: 1; color: transparent; -webkit-text-stroke: 2px var(--steel-150);
  position: absolute; top: 1rem; right: 1.4rem;
}
.hpanel:nth-child(1) { border-top: 10px solid var(--yellow); }
.hpanel:nth-child(2) { border-top: 10px solid var(--orange); }
.hpanel:nth-child(3) { border-top: 10px solid var(--steel-500); }
.hpanel:nth-child(4) { border-top: 10px solid; border-image: var(--hazard) 10; }
.hpanel h3 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); margin: .6rem 0 .6rem; }
.hpanel p { color: var(--muted); font-size: 1.02rem; margin: 0; }

/* Interactive diagrams */
.diagram-svg { width: 100%; height: auto; display: block; }
.diagram-svg .stage { cursor: pointer; }
.diagram-svg .stage rect.body { transition: stroke-width .15s ease; }
.diagram-svg .stage:hover rect.body, .diagram-svg .stage:focus rect.body { stroke-width: 4; }
.diagram-svg .stage:focus { outline: none; }
.diagram-svg .stage.active rect.body { stroke-width: 5; }
.diagram-svg .bar { cursor: pointer; transition: opacity .15s ease; }
.diagram-svg .bar:hover, .diagram-svg .bar:focus { opacity: .85; outline: none; }

.detail-panel {
  background: var(--white); border: 2px solid var(--steel-900); border-left: 10px solid var(--yellow);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.5rem 1.75rem; margin-top: 1rem; min-height: 7rem;
}
.detail-panel[data-active="2"] { border-left-color: var(--orange); }
.detail-panel[data-active="3"] { border-left-color: var(--steel-500); }
.detail-panel h3 { margin: 0 0 .35rem; font-size: 1.3rem; }
.detail-panel p { margin: 0; color: var(--muted); }
.detail-panel .hint { font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; color: var(--muted); }

/* Stepper */
.stepper { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.6rem 0 0; padding: 0; list-style: none; }
.stepper button {
  font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: 1rem;
  letter-spacing: .04em; cursor: pointer;
  border: 2px solid var(--steel-900); background: var(--white); color: var(--steel-900);
  border-radius: var(--radius); padding: .5rem 1.1rem;
  transition: background .12s ease, transform .12s ease, box-shadow .12s ease;
}
.stepper button:hover { transform: translate(-2px, -2px); box-shadow: var(--hard); }
.stepper button[aria-selected="true"] { background: var(--yellow); box-shadow: var(--hard); }
.step-detail {
  background: var(--white); border: 2px solid var(--steel-900); border-radius: var(--radius);
  box-shadow: var(--hard); padding: 1.6rem 1.8rem; margin-top: 1.2rem;
}
.step-detail .when { font-family: var(--mono); font-weight: 600; color: var(--orange-deep); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.step-detail h3 { margin: .2rem 0 .4rem; font-size: 1.35rem; }
.step-detail p { margin: 0; color: var(--muted); }

/* Photo strips & banners */
.photo-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.photo-strip figure { margin: 0; border: 2px solid var(--steel-900); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--white); }
.photo-strip figcaption { padding: .55rem .9rem; font-family: var(--mono); font-size: .72rem; color: var(--muted); border-top: 1px solid var(--steel-150); }
.banner-ph { border: 2px solid var(--steel-900); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--hard); margin: 2rem 0 0; }
.banner-ph img, .banner-ph svg { display: block; width: 100%; }

/* Footer — machine plate */
.site-footer {
  background: var(--steel-950); color: var(--steel-300); padding: 3.4rem 0 2rem; margin-top: 0;
  border-top: 8px solid transparent; border-image: var(--hazard) 8;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; }
.site-footer h3 { color: #fff; font-size: 1.1rem; margin-top: 0; }
.site-footer a { color: var(--steel-300); text-decoration: none; }
.site-footer a:hover { color: var(--yellow); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; font-size: .92rem; }
.footer-bottom { border-top: 1px solid var(--steel-700); margin-top: 2rem; padding-top: 1.25rem; font-size: .8rem; color: var(--steel-500); }

/* Utility */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Motion layer */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0;
  background: var(--yellow); z-index: 100;
}
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .6s cubic-bezier(.2,.7,.3,1), transform .6s cubic-bezier(.2,.7,.3,1); }
.reveal.r-left { transform: translateX(-44px); }
.reveal.r-right { transform: translateX(44px); }
.reveal.r-scale { transform: scale(.94) translateY(16px); }
.reveal.in { opacity: 1; transform: none; }
.reveal-head { opacity: 0; transform: translateY(36px); transition: opacity .7s cubic-bezier(.2,.7,.25,1), transform .7s cubic-bezier(.2,.7,.25,1); }
.reveal-head.in { opacity: 1; transform: none; }
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; position: relative; overflow: hidden; }
.tilt::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0;
  background: radial-gradient(260px 260px at var(--gx, 50%) var(--gy, 50%), rgba(255, 200, 60, .25), transparent 70%);
  transition: opacity .2s ease;
}
.tilt:hover::after { opacity: 1; }
.magnetic { transform: translate(var(--tx, 0), var(--ty, 0)); will-change: transform; }
.hero .hero-grid { position: relative; z-index: 4; }
.cine-content { z-index: 5; }
.scroll-cue { z-index: 5; }

/* Responsive */
@media (max-width: 1080px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; width: 100%; position: absolute;
    left: 0; top: 100%; background: var(--steel-900); padding: .75rem 1.25rem 1rem;
    align-items: stretch; border-bottom: 3px solid var(--yellow);
  }
  .nav-links.open { display: flex; }
  .nav-bar { position: relative; }
}
@media (max-width: 860px) {
  .hero-grid, .split, .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-bar { position: relative; }
  .journey { height: auto; }
  .journey-pin { position: static; height: auto; padding: 3rem 0; }
  .journey-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .gear-svg { max-width: 260px; }
  .stations { min-height: 0; }
  .station { position: static; opacity: 1; transform: none; pointer-events: auto; margin-bottom: .8rem; padding: 1.3rem 1.5rem; }
  .station-ticks { display: none; }
  .hscroll { height: auto; }
  .hscroll-pin { position: static; height: auto; padding: 3rem 0; }
  .h-track { flex-direction: column; transform: none !important; padding: 0 1.25rem; }
  .hpanel { flex: 1 1 auto; }
  .cine-content h1 { font-size: clamp(2.6rem, 12vw, 3.8rem); }
  .section-navy { margin: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-head { opacity: 1; transform: none; transition: none; }
  .tilt, .magnetic { transform: none !important; }
  .tilt::after { display: none; }
  .partner-track { animation: none; }
  .scroll-progress { display: none; }
  .hero .glow, .cine-hero .glow { display: none; }
  .scroll-cue::after { animation: none; }
  .journey { height: auto; } .journey-pin { position: static; height: auto; padding: 3rem 0; }
  .stations { min-height: 0; }
  .station { position: static; opacity: 1; transform: none; pointer-events: auto; margin-bottom: .8rem; }
  .station-ticks { display: none; }
  .hscroll { height: auto; } .hscroll-pin { position: static; height: auto; padding: 3rem 0; }
  .h-track { flex-direction: column; transform: none !important; padding: 0 1.25rem; }
  .cine-layers svg, .cine-layers .sun { transform: none !important; }
  .btn, .card, .doc-card, .media-grid figure { transition: none; }
}

/* Print */
@media print {
  .site-header, .site-footer, .btn, .demo-banner, .scroll-progress { display: none; }
  body { background: #fff; }
}

/* ---- Accessibility toolbar + modes ---- */
.a11y-btn {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--steel-900); color: var(--yellow);
  border: 2px solid var(--yellow); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.a11y-btn:hover, .a11y-btn:focus { background: var(--steel-950); outline: 3px solid rgba(255,176,0,.5); }
.a11y-panel {
  position: fixed; right: 1.1rem; bottom: 4.6rem; z-index: 90;
  width: 240px; background: var(--white); border: 2px solid var(--steel-900);
  border-radius: var(--radius); box-shadow: var(--hard); padding: .8rem;
}
.a11y-head {
  font-family: var(--display); text-transform: uppercase; font-weight: 700;
  font-size: 1.1rem; color: var(--steel-900); padding: 0 .2rem .5rem;
  border-bottom: 3px solid var(--yellow); margin-bottom: .6rem;
}
.a11y-opt {
  display: block; width: 100%; text-align: left; font-family: var(--body);
  font-weight: 600; font-size: .9rem; color: var(--ink); cursor: pointer;
  background: var(--bg); border: 1.5px solid var(--steel-150); border-radius: var(--radius);
  padding: .5rem .7rem .5rem 2rem; margin-bottom: .4rem; position: relative;
}
.a11y-opt::before {
  content: ""; position: absolute; left: .6rem; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; border: 2px solid var(--steel-500); border-radius: 3px; background: #fff;
}
.a11y-opt[aria-pressed="true"] { border-color: var(--steel-900); background: #fff7e0; }
.a11y-opt[aria-pressed="true"]::before { background: var(--yellow); border-color: var(--steel-900); }
.a11y-opt:hover, .a11y-opt:focus { border-color: var(--steel-900); outline: none; }
.a11y-reset { padding-left: .7rem; color: var(--orange-deep); }
.a11y-reset::before { display: none; }
.a11y-note { font-size: .72rem; color: var(--muted); margin: .4rem .2rem 0; line-height: 1.5; }

/* Mode: text size */
html.a11y-textlg body { font-size: 19px; }
html.a11y-textxl body { font-size: 21.5px; line-height: 1.75; }

/* Mode: high contrast */
html.a11y-contrast body { color: #000; }
html.a11y-contrast .section-intro, html.a11y-contrast .card p, html.a11y-contrast .doc-card p,
html.a11y-contrast .news-item p, html.a11y-contrast .station p, html.a11y-contrast .hpanel p,
html.a11y-contrast .detail-panel p, html.a11y-contrast .step-detail p { color: #21262c; }
html.a11y-contrast .hero p.lead, html.a11y-contrast .cine-content .lead,
html.a11y-contrast .stat-band .label { color: #e8ecf0; }
html.a11y-contrast .nav-links a { color: #dfe4e9; }
html.a11y-contrast a { text-decoration: underline; }
html.a11y-contrast .hero::before, html.a11y-contrast .cine-hero::before { opacity: .08; }

/* Mode: readable font */
html.a11y-readable body, html.a11y-readable .btn, html.a11y-readable .stepper button {
  font-family: Verdana, Tahoma, sans-serif; letter-spacing: .02em; word-spacing: .08em;
}
html.a11y-readable body { line-height: 1.85; }

/* Mode: highlight links */
html.a11y-links a {
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px;
  background: rgba(255, 176, 0, .22); outline: 1px dashed var(--orange-deep); outline-offset: 1px;
}
html.a11y-links .nav-links a, html.a11y-links .btn { outline-width: 2px; }

/* Mode: reduce motion (class twin of the media query) */
html.a11y-nomotion .reveal, html.a11y-nomotion .reveal-head { opacity: 1 !important; transform: none !important; transition: none !important; }
html.a11y-nomotion .tilt, html.a11y-nomotion .magnetic { transform: none !important; }
html.a11y-nomotion .tilt::after { display: none; }
html.a11y-nomotion .partner-track { animation: none; }
html.a11y-nomotion .scroll-cue::after { animation: none; }
html.a11y-nomotion .hero .glow, html.a11y-nomotion .cine-hero .glow { display: none; }
html.a11y-nomotion .journey { height: auto; }
html.a11y-nomotion .journey-pin { position: static; height: auto; padding: 3rem 0; }
html.a11y-nomotion .stations { min-height: 0; }
html.a11y-nomotion .station { position: static; opacity: 1; transform: none; pointer-events: auto; margin-bottom: .8rem; }
html.a11y-nomotion .station-ticks { display: none; }
html.a11y-nomotion .hscroll { height: auto; }
html.a11y-nomotion .hscroll-pin { position: static; height: auto; padding: 3rem 0; }
html.a11y-nomotion .h-track { flex-direction: column; transform: none !important; padding: 0 1.25rem; }
html.a11y-nomotion html { scroll-behavior: auto; }

@media print { .a11y-btn, .a11y-panel { display: none; } }

/* Toolkit design-direction tag */
.tag.tag-design { background: var(--yellow); color: var(--steel-950); }

/* IMT logo plate (white ground for the navy logo on dark surfaces) */
.logo-plate { background: #fff; border-radius: 6px; padding: 5px 10px; display: inline-flex; align-items: center; }
.logo-plate img { display: block; height: 42px; width: auto; }
.site-footer .logo-plate img { height: 56px; }

/* Language toggle */
.nav-links a.lang-switch {
  border: 1.5px solid var(--steel-500); border-radius: 999px; color: #fff;
  padding: .3rem .85rem; margin-left: .4rem; font-size: .88rem;
}
.nav-links a.lang-switch:hover { border-color: var(--yellow); color: var(--yellow); }

/* Subtle slow drift on hero photos (replaces the cursor spotlight) */
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.07) translateY(-1.2%); } }
.cine-hero .hero-bg, .hero .hero-bg { animation: hero-drift 22s ease-in-out infinite alternate; will-change: transform; }
@media (prefers-reduced-motion: reduce) { .cine-hero .hero-bg, .hero .hero-bg { animation: none; } }
html.a11y-nomotion .cine-hero .hero-bg, html.a11y-nomotion .hero .hero-bg { animation: none; }
