@font-face { font-family: "Outfit"; src: url("../fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/intertight-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url("../fonts/intertight-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/spacemono.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url("../fonts/spacemono-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* Paste-up: newsprint and press black do the structure; vermilion marks position,
   stamp red is the cull, riso green the keep. Tokens mirror the app's DESIGN.md. */
:root {
  --film: #131211;
  --film-card: #1e1c1a;
  --on-film: #f2ece2;
  --on-film-2: #948c80;
  --paper: #f0eae0;
  --print: #f8f4ec;
  --muted: #e2dacd;
  --ink: #141311;
  --ink-2: #6e6a61;
  --accent: #d93c1e;
  --accent-film: #ff5333;
  --stamp: #c4381f;
  --keep: #4a752e;
  --keep-film: #9bc883;
  --line: rgb(20 19 17 / 0.16);
  --line-film: rgb(242 236 226 / 0.16);

  --display: "Outfit", system-ui, sans-serif;
  --body: "Inter Tight", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;

  --inset: clamp(20px, 5vw, 72px);
  --sec: clamp(96px, 14vw, 200px);
  --r-card: 6px;
  --r-ctl: 5px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Film grain on the page stock, never on photos or type. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.07;
  background-image: 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 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r-ctl); }
.skip:focus { top: 12px; }

.data { font: 400 0.75rem/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }

h2 {
  font: 800 clamp(2.4rem, 5.4vw, 4.6rem)/0.98 var(--display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.copy p, .try-copy p, .private > p, .get > p { max-width: 34ch; color: var(--ink-2); margin-top: 1.25rem; }

/* Buttons: the action is always the inverse of the ground, never colored. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-ctl);
  background: var(--ink);
  color: var(--paper);
  font: 500 1rem/1 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background-color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 17px; height: 20px; flex: none; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-delete { background: var(--stamp); color: var(--print); }
.btn-delete[disabled] { background: var(--muted); color: var(--ink-2); cursor: default; }

/* Header */
.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(14px, env(safe-area-inset-top)) var(--inset) 14px;
  color: var(--ink);
  transition: color 0.4s, background-color 0.4s;
}
.bar[data-solid] { background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.bar[data-solid][data-theme="film"] { background: var(--film); box-shadow: 0 1px 0 var(--line-film); }
.bar[data-theme="film"] { color: var(--on-film); }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.1875rem/1 var(--display); letter-spacing: -0.02em; }
.mark svg { width: 26px; height: 26px; }

/* Hero */
.hero {
  --hero-bg: #131211;
  --hero-fg: #f2ece2;
  --hero-fg-2: #948c80;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  background: var(--hero-bg);
  color: var(--hero-fg);
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-inner {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: minmax(0, 1fr) auto;
  column-gap: clamp(24px, 4vw, 64px);
  padding: 96px var(--inset) clamp(28px, 4vw, 48px);
  pointer-events: none;
}
.hero-inner a { pointer-events: auto; }
.hero-copy { grid-area: 1 / 1 / 3 / 2; align-self: end; }
.hero-stage { grid-area: 1 / 2 / 2 / 3; min-height: 0; }
.hero-title {
  font: 800 clamp(3.4rem, 6.4vw, 7rem)/0.9 var(--display);
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero-sub { max-width: 32ch; margin-top: 1.5rem; text-wrap: pretty; color: var(--hero-fg-2); font-size: clamp(1.0625rem, 1.3vw, 1.25rem); }
.hero .stores { margin-top: 2rem; }
.hero .btn-store { background: var(--hero-fg); color: var(--hero-bg); white-space: nowrap; }
.hero-steps { grid-area: 2 / 2 / 3 / 3; display: grid; margin-top: 20px; font-weight: 500; font-size: clamp(1rem, 1.4vw, 1.25rem); }
.hero-steps li { grid-area: 1 / 1; opacity: 0; }
.hero-steps li:first-child { opacity: 1; }
.hero-rail { grid-area: 2 / 2 / 3 / 3; align-self: start; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; max-width: 240px; }
.hero-rail i { height: 3px; border-radius: 2px; background: var(--hero-fg-2); opacity: 0.35; }
.hero-rail i:first-child { background: var(--accent-film); opacity: 1; }

/* Section rhythm */
.try, .months, .burst, .get { padding: var(--sec) var(--inset); }
.private { padding: var(--sec) var(--inset); }

/* Try it */
.try {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.try-copy { justify-self: end; max-width: 30rem; }
.try-then { padding-top: 1.25rem; border-top: 1px solid var(--line); margin-top: 2rem !important; }
.demo { position: relative; width: min(100%, 400px); }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.demo-month { font: 700 1.375rem/1 var(--display); letter-spacing: -0.02em; }
.deck { position: relative; aspect-ratio: 0.74; margin-bottom: 28px; touch-action: pan-y; border-radius: var(--r-card); }
.deck-stack { position: absolute; inset: 0; }
.print {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 4.5% 4.5% 0;
  background: var(--print);
  border-radius: var(--r-card);
  box-shadow: inset 0 0 0 1px var(--line);
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  cursor: grab;
}
.print:active { cursor: grabbing; }
.print img { flex: 1 1 0; min-height: 0; width: 100%; object-fit: cover; border-radius: 2px; pointer-events: none; }
.print figcaption { display: flex; justify-content: space-between; padding: 12px 2px; color: var(--ink); }
.stamp {
  position: absolute;
  top: 9%;
  padding: 6px 10px;
  border: 2px solid currentColor;
  border-radius: 4px;
  font: 700 1.125rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--print);
  opacity: 0;
}
.stamp-keep { left: 8%; color: var(--keep); transform: rotate(-10deg); }
.stamp-clear { right: 8%; color: var(--stamp); transform: rotate(10deg); }

.rail { display: grid; grid-auto-flow: column; gap: 3px; }
.rail i { height: 6px; border-radius: 2px; background: var(--muted); transition: background-color 0.35s; }
.rail i.is-now { background: var(--accent); }
.rail i.is-keep { background: var(--keep); }
.rail i.is-clear { background: var(--stamp); }
.deck-status { display: flex; justify-content: space-between; margin-top: 10px; color: var(--ink-2); }
.deck-actions { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; margin-top: 22px; }
.verdict {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border: 0;
  border-radius: var(--r-ctl);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
  font: 400 0.75rem/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, opacity 0.2s;
}
.verdict svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.verdict-clear { color: var(--stamp); }
.verdict-keep { color: var(--keep); }
.verdict-undo { min-width: 76px; color: var(--ink-2); }
.verdict[disabled] { opacity: 0.35; cursor: default; }
.verdict-clear.is-lit { background: var(--stamp); color: var(--print); }
.verdict-keep.is-lit { background: var(--keep); color: var(--print); }
@media (hover: hover) {
  .verdict:not([disabled]):hover { box-shadow: inset 0 0 0 1px currentColor; }
  .btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--ink); }
}

.sheet, .cleared { padding-top: 4px; }
.sheet[hidden], .cleared[hidden] { display: none; }
.sheet-title { font: 700 1.75rem/1.05 var(--display); letter-spacing: -0.025em; }
.sheet-title:focus { outline: none; }
.sheet-hint { color: var(--ink-2); margin: 6px 0 18px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.sheet-grid:empty { display: none; }
.thumb { position: relative; padding: 0; border: 0; border-radius: 3px; background: none; cursor: pointer; overflow: hidden; }
.thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: opacity 0.3s; }
.thumb:not(.is-rescued) img { opacity: 0.72; }
.thumb .data { position: absolute; left: 6px; bottom: 6px; padding: 3px 5px; border-radius: 2px; background: var(--print); color: var(--keep); opacity: 0; transition: opacity 0.2s; }
.thumb.is-rescued .data { opacity: 1; }

/* Grease pencil: drawn across the frame, lifted off when rescued. */
.strike { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.strike path { fill: none; stroke: var(--stamp); stroke-width: 4.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: 0; transition: stroke-dashoffset 0.45s var(--ease), opacity 0s 0.45s; }
.thumb:not(.is-rescued) .strike path, .frame[aria-checked="false"] .strike path { stroke-dashoffset: 0; opacity: 1; transition: stroke-dashoffset 0.45s var(--ease), opacity 0s; }

.cleared-num { font: 800 clamp(3.5rem, 9vw, 5.5rem)/0.9 var(--display); letter-spacing: -0.045em; color: var(--keep); }
.cleared-num:focus { outline: none; }
.cleared-line { font: 600 1.375rem/1.2 var(--display); margin-top: 12px; }
.cleared-note { color: var(--ink-2); margin: 6px 0 26px; }

/* Months */
.months, .burst {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.archive { border-top: 1px solid var(--line); }
.archive-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  column-gap: 20px;
  row-gap: 10px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.sleeve {
  grid-row: 1 / 3;
  padding: 7px 5px;
  border-radius: 3px;
  background:
    repeating-linear-gradient(90deg, var(--film) 0 4px, #6b665e 4px 7px, var(--film) 7px 10px) top / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, var(--film) 0 4px, #6b665e 4px 7px, var(--film) 7px 10px) bottom / 100% 3px no-repeat,
    var(--film);
}
.sleeve img { aspect-ratio: 3 / 4; object-fit: cover; border-radius: 1px; }
.archive-name { font: 700 clamp(1.375rem, 2.2vw, 1.875rem)/1 var(--display); letter-spacing: -0.025em; }
.archive-meta { color: var(--ink-2); text-align: right; }
.is-done .archive-meta { color: var(--keep); }
.archive-bar { grid-column: 2 / 4; height: 4px; border-radius: 2px; background: var(--muted); position: relative; overflow: hidden; }
.archive-bar::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p)); background: var(--accent); }
.is-done .archive-bar::after { background: var(--keep); }

/* Burst */
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.2vw, 14px);
  padding: 26px clamp(10px, 1.4vw, 16px);
  border-radius: var(--r-card);
  background:
    repeating-linear-gradient(90deg, transparent 0 10px, #6b665e 10px 20px, transparent 20px 30px) 0 8px / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 10px, #6b665e 10px 20px, transparent 20px 30px) 0 calc(100% - 8px) / 100% 8px no-repeat,
    var(--film);
}
.frame { position: relative; padding: 0; border: 0; background: none; border-radius: 2px; cursor: pointer; }
.frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; transition: opacity 0.35s, filter 0.35s; }
.frame[aria-checked="false"] img { opacity: 0.55; filter: saturate(0.6); }
.frame[aria-checked="true"] { box-shadow: 0 0 0 3px var(--keep-film); }
.frame .strike path { stroke: #f2543a; }
.strip-hint { color: var(--ink-2); margin-top: 14px; font-size: 1rem; }

/* Privacy: the one film band after the hero */
.private { background: var(--film); color: var(--on-film); }
.private h2 { max-width: 14ch; }
.nos { margin-top: clamp(40px, 6vw, 72px); font: 300 clamp(2.4rem, 7vw, 6.5rem)/1.02 var(--display); letter-spacing: -0.035em; }
.nos li + li { border-top: 1px solid var(--line-film); }
.nos li { padding: 0.12em 0; }
.private > p { color: var(--on-film-2); margin-top: clamp(32px, 5vw, 56px); }

/* Get */
.get h2 { max-width: 15ch; font-size: clamp(2.6rem, 6.4vw, 5.6rem); }
.get > p { margin-bottom: 2.25rem; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; }

/* Legal pages: one readable column of plain type under the solid paper bar. */
.legal { max-width: calc(40rem + 2 * var(--inset)); margin: 0 auto; padding: 128px var(--inset) var(--sec); }
.legal h1 { font: 800 clamp(2.8rem, 7vw, 5rem)/0.98 var(--display); letter-spacing: -0.035em; }
.legal-date { margin-top: 1.25rem; color: var(--ink-2); }
.legal section { margin-top: clamp(48px, 7vw, 72px); }
.legal h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.05; letter-spacing: -0.025em; }
.legal h3 { margin: 1.75rem 0 0; font: 700 1.125rem/1.3 var(--display); }
.legal p, .legal ul { margin-top: 1rem; color: var(--ink-2); }
.legal strong { color: var(--ink); font-weight: 500; }
.legal ul li { position: relative; padding-left: 1.25rem; }
.legal ul li + li { margin-top: 0.5rem; }
.legal ul li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 1px; background: var(--accent); }
.legal-short { padding: clamp(24px, 4vw, 36px); border-radius: var(--r-card); background: var(--print); box-shadow: inset 0 0 0 1px var(--line); }
.legal-short ul { color: var(--ink); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--inset) max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.foot nav { display: flex; gap: 24px; }

/* Mobile */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    padding-top: 84px;
  }
  .hero-copy { grid-area: 1 / 1; align-self: start; }
  .hero-stage { grid-area: 2 / 1; margin-top: 16px; }
  .hero-steps { grid-area: 3 / 1; margin-top: 12px; }
  .hero-rail { grid-area: 4 / 1; margin-top: 14px; }
  .hero-title { font-size: clamp(2.9rem, 13.5vw, 4.6rem); }
  .hero-sub { margin-top: 1rem; font-size: 1rem; }
  .hero .stores { gap: 10px; margin-top: 1.25rem; }
  .hero .btn-store { flex: 1 1 auto; gap: 8px; min-height: 46px; padding: 0 14px; }

  .try, .months, .burst { grid-template-columns: minmax(0, 1fr); }
  .try-copy { justify-self: start; }
  .demo { justify-self: center; }
}
@media (max-height: 700px) and (max-width: 860px) {
  .hero-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
