/* Iron Forge — front desk (public marketing).
 *
 * Sign-up is NOT here: the CTAs link to the member app's own /register, so there is one sign-up form
 * to style, one to keep in step with auth changes, and one that offers SSO.
 * (fix_front_desk_signup_redirects_to_the_app)
 *
 * Single, deliberate look: the Iron Forge "forge" identity (warm surfaces + ember accent), the same
 * token names the app uses so it feels like one product (docs/branding-and-styling.md). Every colour
 * literal lives ONLY in a --custom-property declaration below; everything else uses var(...) — that is
 * what keeps the colour-drift ratchet (scripts/check-colour-drift.sh) green.
 *
 * Type: three weights only — 400 / 600 / 700 (500 and 800 are banned). Barlow for body, Barlow Semi
 * Condensed for display/eyebrows. Self-hosted (assets/fonts).
 */

/* ── Fonts ─────────────────────────────────────────────────────────────────────────────────────── */
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/barlow-700.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/barlow-semi-condensed-600.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/barlow-semi-condensed-700.woff2') format('woff2'); }

/* ── Tokens (the ONLY place literals live) ─────────────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg: #161009;
  --bg-2: #1c1410;
  --surface: #271f15;
  --surface-2: #3b2f1f;
  --border: #4e3e29;
  --primary: #e0602a;      /* ember — the Iron Forge identity accent */
  --primary-dark: #bd4e1f;
  --text: #f8f4ee;
  --text-secondary: #c3b6a4;
  --text-dim: #9a8b77;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --font: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Barlow Semi Condensed', 'Barlow', -apple-system, BlinkMacSystemFont, sans-serif;
  /* rgba composites — declared here (custom properties) so no rgba literal appears as a real value */
  --scrim: rgba(10, 6, 2, 0.74);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.45);
  --glow: 0 0 60px rgba(224, 96, 42, 0.16);
  --hairline: rgba(255, 255, 255, 0.06);
  --chip-bg: rgba(255, 255, 255, 0.035);
  --on-primary: #1a0f06;   /* text on an ember button */
  --primary-soft: rgba(224, 96, 42, 0.12);
  /* ── The staging watermark ──────────────────────────────────────────────────────────────────
     The front desk had NO environment marking on any plane, so test.iron-forge.app was
     indistinguishable from the live marketing site and always had been. The ribbon is now
     single-sourced across all four front ends (frontend/shared/js/staging-ribbon.js), and these are
     the three tokens it needs — the front desk defined none of them, having its own ember palette
     rather than the consoles' status scale.

     --warning and --on-warning are the style guide's FIXED values (docs/branding-and-styling.md),
     not a re-theme: the amber warning fill and its deep ink are the same on every surface by design,
     which is the whole point of a warning colour. ⚠ Do NOT swap them for --primary here — an ember
     band would read as the Iron Forge brand accent rather than as "this is not production".
     (fix_the_front_desk_carries_no_environment_marking_on_any_plane) */
  --warning: #f59e0b;
  --on-warning: #2a1d00;
  --ribbon-shadow: rgba(0, 0, 0, 0.35);
}

/* ── Reset / base ──────────────────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 700; line-height: 1.1; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
em { font-style: normal; color: var(--primary); }

.eyebrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0 0 .8em;
}
.eyebrow.center, .center { text-align: center; }
.accent { color: var(--primary); }

/* ── Buttons ───────────────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font); font-weight: 600; font-size: 1rem;
  padding: .8em 1.5em; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-surface { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-surface:hover { border-color: var(--primary); }
.btn-sm { padding: .55em 1em; font-size: .9rem; }
.btn-lg { padding: 1em 2em; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ── Top bar ───────────────────────────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem clamp(1rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: .01em; }
.topnav { display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.6rem); }
.topnav > a { color: var(--text-secondary); font-weight: 600; font-size: .95rem; }
.topnav > a:hover { color: var(--text); text-decoration: none; }
.topnav-app { display: none; }

/* ── Hero ──────────────────────────────────────────────────────────────────────────────────────── */
.hero {
  max-width: 900px; margin: 0 auto; padding: clamp(3rem, 9vw, 7rem) clamp(1rem, 5vw, 2rem) clamp(2rem, 5vw, 4rem);
  text-align: center;
}
.hero-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.8rem, 9vw, 5.5rem); line-height: .98; letter-spacing: -0.02em;
  margin-bottom: .35em;
}
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: var(--text-secondary); max-width: 40ch; margin: 0 auto 2rem; }
.hero-paths { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-path {
  flex: 1 1 220px; max-width: 300px;
  display: flex; flex-direction: column; gap: .2rem; align-items: flex-start;
  padding: 1.1rem 1.3rem; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  color: var(--text); cursor: pointer; transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.hero-path:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: var(--shadow-sm); }
.hero-path.is-chosen { border-color: var(--primary); box-shadow: var(--glow); }
.hero-path-k { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.hero-path.is-train .hero-path-k { color: var(--primary); }
.hero-path-d { color: var(--text-secondary); font-size: .95rem; }
.hero-coach { margin-top: 1.8rem; color: var(--text-dim); font-size: .95rem; }
.hero-coach a { font-weight: 600; }

/* ── Layout helpers ────────────────────────────────────────────────────────────────────────────── */
/* Vertical rhythm between landing sections (incl. #library, the program listing). The old
   clamp(3rem, 8vw, 6rem) put up to 6rem (~96px) top AND bottom on every section — ~192px between
   section contents on desktop — and the steep 8vw slope made the gap balloon on wide screens. Tighter
   and more consistent mobile<->desktop: min 2.5rem, gentler 5vw slope, max 4.5rem. Horizontal padding
   is unchanged (no new horizontal scroll). (fix_landing_program_listing_section_whitespace) */
section { padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1rem, 5vw, 2rem); }
/* ⚠ …but that is a BARE ELEMENT SELECTOR, so it also hits any <section> NESTED inside a band, which
   is never what a band's padding is for. The programme pages' "How Iron Forge runs it" wraps each
   sub-heading in <section class="prog-help-sec">, so every one of them silently took 40px top AND
   bottom plus a 19.5px horizontal indent — measured 120px between sub-sections against the FAQ's 49px,
   and help text sitting further in than FAQ text. The FAQ escaped it only by being <dt>/<dd> rather
   than sections, which is why the owner could report (2026-08-13) that the help spacing was "too big"
   while "spacing for FAQ is good" — an accident of markup, not a design choice.
   Scoped at the PATTERN, not at .prog-help-sec, so the next nested <section> cannot inherit it either.
   (fix_frontdesk_help_section_spacing_is_looser_than_the_faq) */
section section { padding: 0; }
.features, .library, .how, .cta-band { max-width: 1080px; margin: 0 auto; }
.features > h2.center, .library > h2.center, .how > h2.center { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 20ch; margin-inline: auto; }
.lede { color: var(--text-secondary); max-width: 46ch; margin: -.3rem auto 2rem; }

/* Reveal-on-scroll (progressive; .in-view added by JS, or immediately without IO) */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ── Path sections ─────────────────────────────────────────────────────────────────────────────── */
.path-section {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center;
  scroll-margin-top: 5rem;
}
.path-section h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.path-section p { color: var(--text-secondary); font-size: 1.08rem; }
.path-train { border-top: 1px solid var(--hairline); }
.path-section.is-active .shot-frame { border-color: var(--primary); box-shadow: var(--glow); }
.soft-note { font-size: .95rem; color: var(--text-dim); }
.soft-note strong { color: var(--primary); font-weight: 600; }

.ticks { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.ticks li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; color: var(--text-secondary); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: .7rem; height: .7rem;
  background: var(--primary); border-radius: 2px; transform: rotate(45deg);
}

/* ── Screenshot frames (real captures are the ticket's remaining step; missing = labelled frame) ── */
.shot-frame {
  margin: 0; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  overflow: hidden; box-shadow: var(--shadow-lg); position: relative; min-height: 240px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.shot-frame .shot { width: 100%; height: auto; display: block; }
.shot-frame figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .55rem .9rem; font-family: var(--font-display); font-weight: 600; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .1em; color: var(--text-dim);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
}
/* When the screenshot file isn't there yet, hide the broken <img> and show the frame as an intentional
   placeholder (so the layout reads as "screenshot goes here", not "broken"). */
.shot-frame.shot-missing { display: flex; align-items: center; justify-content: center; min-height: 300px; }
.shot-frame.shot-missing .shot { display: none; }
.shot-frame.shot-missing::after {
  content: "App screenshot"; color: var(--text-dim); font-family: var(--font-display);
  font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: .85rem;
}
.shot-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 3vw, 2rem); margin-top: 2.5rem; }

/* ── Feature grid ──────────────────────────────────────────────────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.2rem; margin-top: 2.5rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.feature h3 { font-size: 1.2rem; }
.feature p { color: var(--text-secondary); margin: 0; font-size: .98rem; }

/* ── Program library chips ─────────────────────────────────────────────────────────────────────── */
.prog-chips { list-style: none; padding: 0; margin: 2.5rem auto 0; max-width: 820px;
  display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.prog-chips li {
  font-family: var(--font-display); font-weight: 600; font-size: .95rem;
  padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--chip-bg); color: var(--text);
}
.prog-chips li.more { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
/* Chips are now links to the per-program pages (feat_frontdesk_program_landing_pages). */
.prog-chips li a { color: inherit; text-decoration: none; display: block; }
.prog-chips li a:hover { color: var(--primary); }
.prog-chips li.more .linklike { color: var(--primary); font-weight: 600; }
.linklike { background: none; border: none; padding: 0; cursor: pointer; color: var(--primary); font: inherit; }
.linklike:hover { text-decoration: underline; }

/* ── How it works ──────────────────────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; margin: 2.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.steps li { text-align: center; padding: 1.5rem; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem;
  border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin-bottom: .8rem;
}
.steps h3 { font-size: 1.25rem; }
.steps p { color: var(--text-secondary); margin: 0; }

/* ── CTA band ──────────────────────────────────────────────────────────────────────────────────── */
.cta-band {
  text-align: center; margin-top: 2rem;
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem !important;
}
.cta-band h2 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem); }
.cta-band p { color: var(--text-secondary); font-size: 1.15rem; }
.cta-actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.cta-secondary { color: var(--text-secondary); font-weight: 600; }

/* ── Footer ────────────────────────────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--hairline); padding: 2.5rem clamp(1rem, 5vw, 3rem);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  color: var(--text-dim);
}
.footer-brand { display: flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 700; color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-links a { color: var(--text-secondary); font-weight: 600; font-size: .95rem; }
.footer-fine { flex-basis: 100%; margin: 0; font-size: .85rem; }

/* ── Responsive ────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .path-section { grid-template-columns: 1fr; }
  .path-build .shot-frame { order: 2; }
  .shot-row { grid-template-columns: 1fr; }
  .topnav > a:not(.topnav-app) { display: none; }
}
@media (min-width: 761px) { .topnav-app { display: inline; } }

/* ── Get the app ─────────────────────────────────────────────────────────────────────────────────
   Site-styled link buttons rather than Google's / Apple's official badge artwork: that art is
   trademarked and carries brand guidelines on size, clear space and wording, so committing it is an
   owner decision and not a layout tidy-up. Swapping it in later is a drop-in replacement for these.
   (feat_front_desk_app_store_badges) */
.store-row {
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1.5rem;
}
.store-badge {
  display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-width: 11rem; padding: .55rem 1.1rem; text-align: left;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); text-decoration: none;
}
.store-badge:hover { background: var(--surface-2); }
.store-kicker { font-size: .72rem; font-weight: 400; color: var(--text-secondary); line-height: 1.3; }
.store-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; line-height: 1.2; }

/* The iOS control is not a link and must not read as one — no pointer, no hover lift, dimmed. */
.store-badge.is-soon { cursor: default; opacity: .55; }
.store-badge.is-soon:hover { background: var(--surface); }

/* ── Locale picker ─────────────────────────────────────────────────────────────────────────────────
   The top bar's language + units control. (feat_frontdesk_is_territory_aware_and_offers_a_locale_picker)

   It is a native <select>: keyboard and screen-reader behaviour for free, and a five-item choice is
   not worth reimplementing as a menu. Sized and coloured off the SAME tokens as the nav links beside
   it (--text-secondary, weight 600, .95rem) so it reads as part of the bar rather than as a widget
   dropped into it — docs/branding-and-styling.md is binding, so no hex and no invented weight here. */
.locale-picker { display: flex; align-items: center; }
.locale-select {
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: .25rem 1.5rem .25rem .5rem;
  cursor: pointer;
  /* The native arrow is drawn in the OS accent on some platforms, which is the one colour the style
     guide cannot reach. Suppress it and draw our own from --text-secondary. */
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - .8rem) center, calc(100% - .5rem) center;
  background-size: .3rem .3rem, .3rem .3rem;
  background-repeat: no-repeat;
}
.locale-select:hover { color: var(--text); border-color: var(--border); }
.locale-select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
/* The <option> list is drawn by the OS, so it needs a real background or it renders white-on-white
   in a dark theme on several platforms. */
.locale-select option { background: var(--bg); color: var(--text); }

/* A label the picker needs for assistive tech but that would clutter the bar visually. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
