/* ==========================================================================
   Car Showables — Phase 0
   Design system derived from the triptych artwork: angled accent banners,
   technical grid ground, condensed italic caps, dotted leader lines.

   SAFARI NOTE: no mask-image / -webkit-mask-image anywhere, no feTurbulence,
   no backdrop-filter over fixed layers. Fades are baked into gradient stacks.
   See CLAUDE.md "Frontend: Safari-safe CSS".
   ========================================================================== */

@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-700-italic.woff2') format('woff2');
  font-weight: 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-600-italic.woff2') format('woff2');
  font-weight: 600; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('/fonts/barlow-condensed-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --ink:    #0E0E10;
  --panel:  #1C1C1F;
  --plate:  #282829;   /* brand charcoal */
  --paper:  #F2F2F0;
  --dim:    #8C8C93;
  --line:   #2E2E33;

  /* accent — swapped by [data-accent] below */
  --accent:      #E21A22;
  --accent-text: #FF3B33;   /* brightened: 5.44:1 on --ink, small text safe */
  --on-accent:   #FFFFFF;   /* 4.77:1 on red */

  --display: 'Barlow Condensed', 'Helvetica Neue', Impact, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, 'SF Mono', monospace;

  --shell: 1200px;
  --gut: clamp(1.25rem, 4vw, 3rem);
}

:root[data-accent="blue"] {
  --accent:      #8AC3E4;
  --accent-text: #8AC3E4;   /* 10.1:1 on --ink */
  --on-accent:   #0E0E10;   /* 10.1:1 on blue — white would be 1.9:1 */
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 2px;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--on-accent);
  padding: .75rem 1.25rem; z-index: 100; font-weight: 700;
}
.skip:focus { left: 0; }

/* ---------- shared devices ------------------------------------------------ */

/* angled accent banner — the artwork's signature label shape */
.banner {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1;
  padding: .5rem 2.25rem .55rem 1.1rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 1.1rem) 100%, 0 100%);
  transition: background-color .45s ease, color .45s ease;
}

/* technical grid ground, as on panel 2 */
.grid-ground {
  position: relative;
  background-color: var(--panel);
  background-image:
    repeating-linear-gradient(to right,  rgba(255,255,255,.045) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.045) 0 1px, transparent 1px 48px);
}

/* dotted leader line, as on the schematic callouts */
.leader {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dim);
}
.leader::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-text); flex: none;
  transition: background-color .45s ease;
}
.leader::after {
  content: ""; flex: 1; height: 1px;
  background-image: linear-gradient(to right, var(--line) 0 4px, transparent 4px 8px);
  background-size: 8px 1px;
}

.serial {
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .14em;
  color: var(--dim);
}

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 1rem;
  transition: color .45s ease;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700; font-style: italic;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: -.005em;
  margin: 0;
}

h1 { font-size: clamp(2.75rem, 8.5vw, 5.75rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1rem; }
.lede { font-size: clamp(1.05rem, 2vw, 1.2rem); color: #CFCFD4; max-width: 46ch; }

/* ---------- header -------------------------------------------------------- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,14,16,.92);
  border-bottom: 1px solid var(--line);
}
.site-head .shell {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; }
.brand img.blue { display: none; }
:root[data-accent="blue"] .brand img.red { display: none; }
:root[data-accent="blue"] .brand img.blue { display: block; }
.brand span {
  font-family: var(--display); font-weight: 700; font-style: italic;
  text-transform: uppercase; font-size: 1.15rem; letter-spacing: .01em;
}

.nav { display: flex; gap: 1.5rem; }
.nav a {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim); text-decoration: none;
}
.nav a:hover { color: var(--paper); }
@media (max-width: 720px) { .site-head .nav { display: none; } }

/* accent chips — the miniature customizer */
.chips { display: flex; align-items: center; gap: .45rem; }
.chips .label {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim); margin-right: .15rem;
}
@media (max-width: 520px) { .chips .label { display: none; } }
.chip {
  width: 22px; height: 22px; border-radius: 50%; padding: 0;
  border: 2px solid transparent; cursor: pointer;
  background-clip: content-box; box-shadow: 0 0 0 1px var(--line);
}
.chip[data-c="red"]  { background-color: #E21A22; }
.chip[data-c="blue"] { background-color: #8AC3E4; }
.chip[aria-pressed="true"] { border-color: var(--paper); box-shadow: none; }

/* ---------- hero ---------------------------------------------------------- */

.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.hero-copy { max-width: 60ch; }
.hero h1 { margin-bottom: 1.25rem; }
.hero h1 .hl { color: var(--accent-text); transition: color .45s ease; }

/* triptych — three panels, accent cross-fade */
.tryptych {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(.5rem, 1.2vw, 1rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 760px) { .tryptych { grid-template-columns: 1fr; } }

.panel {
  position: relative;
  aspect-ratio: 2100 / 1500;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
}
.panel img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .45s ease;
}
.panel img.blue { opacity: 0; }
:root[data-accent="blue"] .panel img.red  { opacity: 0; }
:root[data-accent="blue"] .panel img.blue { opacity: 1; }

.tryptych-foot {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: space-between;
  margin-top: 1rem;
}
.tryptych-foot .leader { flex: 1 1 260px; }

/* ---------- section scaffolding ------------------------------------------- */

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin-bottom: .9rem; }
.section-head p { color: var(--dim); max-width: 58ch; margin: 0; }

/* ---------- formats grid -------------------------------------------------- */

.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1.25rem; }

.format {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
}
.format-art { position: relative; aspect-ratio: 2100/1500; overflow: hidden; background: var(--plate); }
.format-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .45s ease;
}
.format-art img.blue { opacity: 0; }
:root[data-accent="blue"] .format-art img.red  { opacity: 0; }
:root[data-accent="blue"] .format-art img.blue { opacity: 1; }
/* No product photo yet — show the mark, dimmed, so the card reads as a
   placeholder rather than a finished product shot. Both colour variants share
   one grid cell so they cross-fade like the panels instead of stacking. */
.format-art .no-art {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--plate);
}
.format-art .no-art img {
  position: static; grid-area: 1 / 1;
  width: 44%; height: auto; object-fit: contain;
  opacity: .5;
}
.format-art .no-art img.blue { opacity: 0; }
:root[data-accent="blue"] .format-art .no-art img.red  { opacity: 0; }
:root[data-accent="blue"] .format-art .no-art img.blue { opacity: .5; }

.format-body { padding: 1.25rem 1.25rem 1.5rem; display: flex; flex-direction: column; flex: 1; gap: .6rem; }
/* The dimension line is the card's spec, not decoration — it carries the real
   physical size. Reserved at two lines so the titles align across the row even
   when "4" x 6" - double-sided" wraps and "24" x 36"" does not. */
.format-dim {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  line-height: 1.45; min-height: 2.9em; margin: 0;
  text-transform: uppercase; color: var(--accent-text);
  transition: color .45s ease;
}
.format h3 { font-size: 1.3rem; }
/* :not() is load-bearing. `.format p` (0,1,1) outranks `.format-dim` (0,1,0),
   so a bare selector here steals the eyebrow's colour and gives it flex:1 —
   two growing children split the free space and nothing bottom-aligns. */
/* Every child of .format-body is a <p>, so the exclusions are load-bearing.
   A :not() argument contributes its own specificity, which makes this rule
   (0,2,1) — enough to outrank .format .status (0,2,0) and reset the auto
   margin below if .status is not excluded here too. */
.format p:not(.format-dim):not(.status) { color: var(--dim); font-size: .9rem; margin: 0; }
/* auto top margin rather than flex-grow on the description: the margin eats the
   free space outright, so the rules line up across the row whatever the copy
   length. Shorthand, so the UA's default <p> margins go with it. */
.format .status {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim);
  border-top: 1px solid var(--line); padding-top: .75rem;
  margin: auto 0 0;
}

/* ---------- how it works — a genuine sequence, so it is numbered ---------- */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.75rem; }
.step { display: flex; flex-direction: column; gap: .65rem; }
.step .n {
  font-family: var(--display); font-weight: 700; font-style: italic;
  font-size: 2.6rem; line-height: 1; color: var(--accent-text);
  transition: color .45s ease;
}
.step h3 { font-size: 1.15rem; }
.step p { color: var(--dim); font-size: .92rem; margin: 0; }

/* ---------- signup -------------------------------------------------------- */

.signup .shell { position: relative; z-index: 1; }
.signup-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 820px) { .signup-inner { grid-template-columns: 1fr; } }

form.waitlist { display: flex; flex-direction: column; gap: 1rem; }

.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim);
}
.field input, .field select {
  font: inherit; font-size: .95rem;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); border-radius: 0;
  padding: .7rem .85rem;
  width: 100%;
}
.field input::placeholder { color: #56565C; }
.field input:focus-visible, .field select:focus-visible { border-color: var(--accent-text); }

button.cta {
  align-self: flex-start;
  font-family: var(--display); font-weight: 700; font-style: italic;
  text-transform: uppercase; font-size: 1.15rem; letter-spacing: .02em;
  background: var(--accent); color: var(--on-accent);
  border: 0; cursor: pointer;
  padding: .7rem 2.5rem .75rem 1.3rem;
  clip-path: polygon(0 0, 100% 0, calc(100% - 1.1rem) 100%, 0 100%);
  transition: background-color .45s ease, color .45s ease, filter .2s ease;
}
button.cta:hover { filter: brightness(1.12); }
button.cta[disabled] { opacity: .55; cursor: default; filter: none; }

.form-note { font-size: .8rem; color: var(--dim); margin: 0; }

.status-msg { font-size: .9rem; margin: 0; min-height: 1.4em; }
.status-msg[data-state="ok"]   { color: var(--accent-text); }
.status-msg[data-state="err"]  { color: #FF6B6B; }

/* ---------- about page ---------------------------------------------------- */

.prose { max-width: 62ch; }
.prose p { color: #CFCFD4; }
.prose h2 { margin: 2.5rem 0 1rem; }

.placeholder {
  border: 1px dashed var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}
.placeholder p { margin: 0; color: var(--dim); font-size: .9rem; }
.placeholder strong { color: var(--paper); }

/* ---------- footer -------------------------------------------------------- */

.site-foot { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; }
.site-foot .shell {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
  align-items: center; justify-content: space-between;
}
.site-foot .marks { display: flex; align-items: center; gap: .75rem; }
.site-foot img { width: 32px; height: 32px; opacity: .85; }
.site-foot img.blue { display: none; }
:root[data-accent="blue"] .site-foot img.red { display: none; }
:root[data-accent="blue"] .site-foot img.blue { display: block; }
.site-foot .serial { color: #55555C; }

/* ---------- small structural utilities ------------------------------------ *
   These exist because `style-src 'self'` blocks style *attributes*, not just
   <style> blocks — a one-off inline override is not a shortcut here, it is a
   silently dropped rule. */

/* A banner sets its own baseline; the heading under it needs the gap. */
.section-head .banner + h2,
.signup-inner .banner + h2 { margin-top: 1.25rem; }
.signup-inner .banner + h2 { margin-bottom: .9rem; }

/* Hero running straight into the section below it, with no rule between. */
.hero-flush { padding-bottom: 0; }
.section-flush { border-top: 0; }

/* Inline link inside body copy, where the underline alone is too quiet. */
.accent-link { color: var(--accent-text); }
