/* ============================================================
   dailymovementph · Swiss/punk poster house style (lane-poster)
   Each section is one poster with ONE two-colour register.
   Rules: ~/.claude/skills/lane-poster/references/design-language.md
   ============================================================ */

@font-face { font-family: "Inter Tight"; font-weight: 100 900; font-style: normal; font-display: swap; src: url("../fonts/InterTight-latin.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/IBMPlexMono-500-latin.woff2") format("woff2"); }

:root {
  --red: #E8322B;
  --yellow: #F2EA3B;
  --paper: #F4F1EA;
  --ink: #0D0D0D;
  --black: #000;
  --navy: #1F2556;
  --lavender: #8B7FE8;      /* shapes only */
  --lavender-text: #7B6FE0; /* large text only (3.6:1 on paper) */
  --cream: #F4F1EA;
  --gutter: 20px;
  --maxw: 720px;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.215, .61, .355, 1);   /* power3.out */
  --ease-expo: cubic-bezier(.19, 1, .22, 1);   /* expo.out */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.45 var(--sans);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--paper); padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- type ---------- */
.mono, .chrome, .tag, .lane-box, .help.mono {
  font-family: var(--mono);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 14px;
}
.display, .display-2, .display-3 {
  font-weight: 800;
  text-transform: lowercase;
  margin: 0;
  line-height: .92;
}
.display { font-size: clamp(56px, 16vw, 128px); letter-spacing: -0.055em; }
.display-2 { font-size: clamp(42px, 11.5vw, 84px); letter-spacing: -0.05em; margin-bottom: 28px; }
.display-3 { font-size: clamp(30px, 8vw, 48px); letter-spacing: -0.04em; }
.display b, .display-2 b, .display-3 b { color: var(--accent); font-weight: 800; }

/* ---------- posters (sections) ---------- */
.poster {
  position: relative;
  padding: 40px 0 0;
  background: var(--ground);
  color: var(--fg);
  overflow: hidden;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); position: relative; z-index: 1; }

.poster--red      { --ground: var(--red);   --fg: var(--black); --accent: var(--yellow); --line: var(--black); }
.poster--navy     { --ground: var(--paper); --fg: var(--navy);  --accent: var(--red);    --line: var(--navy); background-image: var(--grain); }
.poster--lavender { --ground: var(--paper); --fg: var(--ink);   --accent: var(--lavender-text); --line: var(--ink); background-image: var(--grain); }
.poster--black    { --ground: var(--ink);   --fg: var(--cream); --accent: var(--red);    --line: var(--cream); }
.poster--red .display b { color: var(--black); }

.chrome { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.chrome a { text-decoration: none; }
.chrome a:hover, .chrome a:focus-visible { text-decoration: underline; }

/* ---------- the lane: on every poster ---------- */
.lane { position: relative; height: 84px; margin-top: 40px; }
.lane::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--line); }
.lane .ticks {
  position: absolute; left: 0; right: 0; top: 5px; height: 18px;
  background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 48px);
  animation: ticks 2.4s linear infinite;
}
.lane-box {
  position: absolute; right: var(--gutter); top: 30px;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 3px solid var(--line); color: var(--fg); font-size: 16px;
}
.lane--left .lane-box { right: auto; left: var(--gutter); }
@keyframes ticks { to { background-position: -48px 0; } }

/* ---------- hero ---------- */
.hero { padding-top: 24px; }
.hero .display { margin-top: 8px; max-width: 9.5em; }
.hero mark {
  color: var(--black);
  background: linear-gradient(var(--yellow), var(--yellow)) no-repeat 0 50% / 100% 86%;
  padding: 0 .06em;
  animation: bar .6s var(--ease-expo) .15s both;
}
@keyframes bar { from { background-size: 0% 86%; } }
.hero .kicker { margin: 18px 0 0; }
.hero .lead { font-size: 19px; max-width: 26em; margin: 18px 0 0; position: relative; z-index: 2; }
.hero .trust { margin: 16px 0 0; }
.hero .wrap { padding-bottom: 150px; }
.runner {
  position: absolute; right: -10px; bottom: 66px;
  width: min(58vw, 340px); aspect-ratio: 1971 / 1740;
  background: url("../img/runner-dots-01.webp") center / contain no-repeat;
  animation: stride .42s steps(1) infinite;
  pointer-events: none;
}
@keyframes stride {
  0%   { background-image: url("../img/runner-dots-01.webp"); }
  20%  { background-image: url("../img/runner-dots-02.webp"); }
  40%  { background-image: url("../img/runner-dots-03.webp"); }
  60%  { background-image: url("../img/runner-dots-04.webp"); }
  80%  { background-image: url("../img/runner-dots-05.webp"); }
}
@media (min-width: 760px) {
  .hero .wrap { padding-bottom: 60px; }
  .runner { right: max(20px, calc(50% - 460px)); bottom: 70px; width: 340px; }
  .hero .lead { max-width: 21em; }
}

/* ---------- form ---------- */
.field { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
legend, .field > label {
  display: block; padding: 0; margin: 0 0 10px;
  font-weight: 700; font-size: 19px; line-height: 1.25;
}
.help { margin: -4px 0 10px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--stack { flex-direction: column; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: flex; align-items: center; justify-content: center;
  min-width: 52px; min-height: 52px; padding: 10px 16px;
  border: 3px solid var(--navy); background: transparent;
  font-weight: 700; font-size: 18px; color: var(--navy);
  transition: background-color .15s, color .15s;
}
.chips--big .chip span { min-width: 110px; font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.chips--stack .chip span { justify-content: flex-start; }
.chip input:checked + span { background: var(--navy); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }

.time-inputs { display: flex; gap: 10px; flex-wrap: wrap; }
.time-inputs label, .inline-input { display: flex; align-items: center; gap: 8px; }
input[type="text"], input[type="email"] {
  height: 52px; padding: 0 12px;
  border: 3px solid var(--navy); border-radius: 0; background: #fff;
  font-size: 20px; font-weight: 700; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.time-inputs input { width: 72px; text-align: center; }
.inline-input input { width: 110px; }
#other-km-wrap { margin-top: 12px; flex-wrap: wrap; }
#other-km-wrap label { font-weight: 700; }
input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
input[aria-invalid="true"] { border-color: var(--red); }

.field-error { margin: 8px 0 0; min-height: 0; font-weight: 700; color: #B3221C; } /* 5.6:1 on paper */
.field-error:empty { display: none; }

.optional { margin: 6px 0 28px; border-top: 3px solid var(--navy); border-bottom: 3px solid var(--navy); padding: 14px 0 0; }
.optional summary { cursor: pointer; font-weight: 700; font-size: 18px; padding-bottom: 14px; list-style: none; }
.optional summary::-webkit-details-marker { display: none; }
.optional summary::after { content: "+"; float: right; font-family: var(--mono); font-size: 22px; line-height: 1; }
.optional[open] summary::after { content: "−"; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 14px 24px; border: 0; border-radius: 0; cursor: pointer;
  font-weight: 800; font-size: 24px; letter-spacing: -0.03em; text-transform: lowercase;
  text-decoration: none;
}
.btn .arrow { width: 24px; height: 24px; }
.btn--navy { background: var(--navy); color: var(--paper); width: 100%; }
.btn--ink { background: var(--black); color: var(--cream); width: 100%; }
.btn--outline { background: transparent; color: var(--fg); border: 3px solid var(--line); font-size: 19px; min-height: 52px; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.poster--red .btn:focus-visible { outline-color: var(--black); outline-offset: 3px; box-shadow: 0 0 0 6px var(--yellow); }
.btn[disabled] { opacity: .7; cursor: progress; }

/* ---------- results: masked headline reveal ---------- */
.reveal { overflow: hidden; padding-bottom: .06em; }
.reveal > span { display: block; animation: rise .75s var(--ease) both; }
@keyframes rise { from { transform: translateY(105%); } }

/* ---------- zones card (paper + lavender) ---------- */
.card-chrome { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.zone { border-top: 3px solid var(--ink); padding: 16px 0 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: end; }
.zones { border-bottom: 3px solid var(--ink); }
.zone .tag { grid-column: 1 / -1; justify-self: start; }
.zone .pace { font-family: var(--mono); font-weight: 500; font-size: clamp(34px, 10vw, 54px); letter-spacing: -0.02em; line-height: 1; }
.zone .pace small { font-size: 15px; letter-spacing: .08em; margin-left: 6px; }
.zone .name { grid-column: 1 / -1; font-weight: 700; font-size: 19px; }
.zone .note { grid-column: 1 / -1; margin: 0; }
.meter { display: flex; gap: 4px; align-self: center; }
.meter i { width: 16px; height: 30px; border: 3px solid var(--ink); }
.meter i.on { background: var(--lavender); }
.talk { display: inline-block; margin: 22px 0 0; background: var(--ink); color: var(--paper); padding: 12px 16px; }
.talk-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 22px; }
.talk-row .talk { margin: 0; }
.zone-figure {
  flex: none; width: 118px; aspect-ratio: 1971 / 1740; margin-right: -8px;
  background: var(--lavender);
  -webkit-mask: url("../img/runner-flat-05.webp") center / contain no-repeat;
  mask: url("../img/runner-flat-05.webp") center / contain no-repeat;
  pointer-events: none;
}
.notes { margin-top: 22px; }
.notes p { margin: 0 0 12px; }
.estimate { font-weight: 700; font-size: 19px; }
.callout {
  margin: 22px 0 0; padding: 16px;
  border: 3px solid var(--ink);
}
.callout .tag { display: block; margin-bottom: 8px; }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin: 0; }

/* ---------- warnings ---------- */
.warnings { margin: 0 0 32px; padding: 0; list-style: none; }
.warnings li { border-top: 3px solid var(--navy); padding: 14px 0; }
.warnings li:last-child { border-bottom: 3px solid var(--navy); }
.tag { display: inline-block; background: var(--fg); color: var(--ground); padding: 8px 12px; margin-bottom: 8px; }
.tag--red { background: var(--red); color: var(--black); }
.warnings p { margin: 0; }

/* ---------- plan weeks (paper + navy) ---------- */
.plan-meta { margin: -12px 0 24px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 10px; }
.rest-note { margin: 0 0 24px; font-size: 15px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 20px; height: 20px; display: inline-block; }
.week { border-top: 5px solid var(--navy); padding: 18px 0 8px; break-inside: avoid; }
.week-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.week-head .lane-box { position: static; width: 44px; height: 44px; flex: none; }
.week-head .tag { margin: 0; }
.strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0 0 14px; }
.strip i, .legend i {
  display: grid; place-items: center; aspect-ratio: 1; font-style: normal;
  border: 3px solid var(--navy); font-family: var(--mono); font-size: 14px; color: var(--navy);
}
.k-easy, .k-shakeout { background: var(--navy); color: var(--paper) !important; }
.k-long, .k-race { background: var(--red); border-color: var(--red) !important; color: var(--black) !important; }
.k-tempo { background: var(--navy) linear-gradient(var(--red), var(--red)) no-repeat 0 100% / 100% 30%; color: var(--paper) !important; }
.k-cross { border-style: dashed !important; }
.days { list-style: none; margin: 0; padding: 0; }
.days li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(31, 37, 86, .35); }
.days .d { padding-top: 2px; }
.days .t { font-weight: 700; display: block; }
.days .x { display: block; }
.days li.is-rest .t { font-weight: 500; }

.locked { position: relative; max-height: 560px; overflow: hidden; }
.locked > .weeks-inner { filter: blur(6px); user-select: none; -webkit-user-select: none; pointer-events: none; }
.locked::after { content: ""; position: absolute; inset: auto 0 0 0; height: 200px; background: linear-gradient(transparent, var(--paper)); }

/* ---------- gate card (red register inside any section) ---------- */
.gate { --ground: var(--red); --fg: var(--black); --accent: var(--black); --line: var(--black);
  background: var(--red); color: var(--black); margin: 28px calc(var(--gutter) * -1); padding: 28px var(--gutter) 30px; position: relative; }
@media (min-width: 760px) { .gate { margin-left: 0; margin-right: 0; } }
.gate .display-3 mark { color: var(--black); background: linear-gradient(var(--yellow), var(--yellow)) no-repeat 0 50% / 100% 86%; padding: 0 .05em; animation: bar .6s var(--ease-expo) .2s both; }
.gate .display-3 b { color: var(--black); }
.gate .tag { background: var(--black); color: var(--red); margin: 0 0 14px; }
.gate p { margin: 14px 0 18px; font-size: 18px; }
.gate label.lbl { display: block; font-weight: 700; margin-bottom: 8px; }
.gate input[type="email"] { width: 100%; border-color: var(--black); }
.gate input:focus-visible { outline-color: var(--black); box-shadow: 0 0 0 6px var(--yellow); }
.consent { display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; margin: 16px 0 18px; cursor: pointer; font-size: 15px; line-height: 1.4; }
.consent input { width: 28px; height: 28px; margin: 2px 0 0; accent-color: var(--black); }
.consent input:focus-visible { outline: 3px solid var(--black); outline-offset: 2px; }
.gate .err { font-weight: 700; margin: 10px 0 0; background: var(--black); color: var(--yellow); padding: 8px 12px; }
.gate .err:empty { display: none; }
.gate .fine { font-size: 15px; margin: 14px 0 0; }
.gate .status { font-weight: 700; margin: 14px 0 0; }
.gate .status:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.done-box { background: var(--black); color: var(--yellow); padding: 14px 16px; font-weight: 700; margin: 24px 0 0; }
.done-box:empty { display: none; }

/* ---------- how to use (black register) ---------- */
.checklist { list-style: none; margin: 0; padding: 0; counter-reset: c; }
.checklist li { counter-increment: c; display: grid; grid-template-columns: 48px 1fr; gap: 12px; border-top: 3px solid var(--cream); padding: 14px 0; }
.checklist li:last-child { border-bottom: 3px solid var(--cream); }
.checklist li::before { content: counter(c, decimal-leading-zero); font-family: var(--mono); font-size: 16px; color: var(--red); padding-top: 2px; }
.actions { display: grid; gap: 10px; margin-top: 32px; }
.actions .btn--outline { width: 100%; }
.actions .btn--primary { background: var(--red); color: var(--black); width: 100%; }
.inapp-tip, .copy-status { margin: 4px 0 0; }
.inapp-tip:empty, .copy-status:empty { display: none; }
.inapp-tip { background: var(--yellow); color: var(--black); padding: 12px 14px; font-weight: 700; }

/* ---------- footer ---------- */
.footer { padding-top: 28px; }
.footer .chrome { margin-bottom: 20px; }
.disclaimer p { font-family: var(--mono); font-size: 14px; letter-spacing: .02em; margin: 0 0 10px; }
.privacy { margin-top: 18px; border-top: 3px solid var(--black); padding-top: 12px; }
.privacy summary { cursor: pointer; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; text-transform: lowercase; }
.privacy dl { margin: 12px 0 0; }
.privacy dt { font-weight: 700; margin-top: 10px; }
.privacy dd { margin: 2px 0 0; }
.small { font-size: 13px; }

/* ---------- motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- print / Save as PDF: paper + ink only ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .poster { background: #fff !important; color: #000 !important; padding: 0 0 8mm; overflow: visible;
    --fg: #000; --line: #000; --ground: #fff; --accent: #000; }
  .hero .runner, .hero .lead, .hero .trust, .hero .kicker, #form-section, .gate, .actions, .skip,
  .lane .ticks, .zone-figure, .locked::after, .privacy, .footer .lane, .talk { display: none !important; }
  .hero .wrap { padding-bottom: 0; }
  .hero .display { font-size: 28pt; }
  .hero mark { background: none; }
  .display-2 { font-size: 22pt; margin-bottom: 4mm; }
  .lane { height: 0; margin: 4mm 0; }
  .lane::before { height: 1.5pt; }
  .lane-box { display: none; }
  .week-head .lane-box { display: grid; border-width: 1.5pt; width: 26pt; height: 26pt; }
  .tag { background: none !important; color: #000 !important; border: 1pt solid #000; padding: 2pt 5pt; }
  .strip { grid-template-columns: repeat(7, 22pt); gap: 3pt; margin-bottom: 4pt; }
  .strip i { border-width: 1pt; border-color: #000; color: #000; font-size: 8pt; }
  .display-3 { font-size: 16pt; }
  .days li { padding: 3pt 0; border-color: #bbb; grid-template-columns: 34pt 1fr; }
  .days .d { font-size: 8pt; }
  .week { padding-top: 6pt; }
  .week-head { margin-bottom: 4pt; }
  .zone .pace { font-size: 20pt; }
  .zone { padding: 6pt 0; }
  .k-easy, .k-shakeout, .k-tempo, .k-long, .k-race { background: #ddd !important; color: #000 !important; border-color: #000 !important; }
  .k-long, .k-race { background: #999 !important; }
  .week { break-inside: avoid; border-top-width: 2pt; }
  .locked { max-height: none; }
  .locked > .weeks-inner { filter: none; }
  .checklist li, .zone, .warnings li { border-color: #000 !important; border-width: 1pt !important; }
  .checklist li::before { color: #000; }
  .meter i { border-width: 1pt; }
  .meter i.on { background: #999; }
  a { text-decoration: none; }
}

/* gate button looks inactive until email + consent are filled in (still tappable, to show the reason) */
.btn.is-inactive { opacity: .55; }
.done-box .retry { margin-top: 10px; color: var(--yellow); border-color: var(--yellow); width: 100%; }
