/* ==========================================================================
   KEPT RESPONSE — design system
   Darkroom editorial: one object (the service tag) floating in warm darkness,
   cream type as the only decoration. Ember is rare: stamps, credits, tags.
   ========================================================================== */

/* Self-hosted Hanken Grotesk (variable, 400–500). No request to Google. */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Color */
  --walnut: #100904;      /* canvas — never pure black */
  --walnut-2: #170d06;    /* faint lift for panels */
  --bark: #382416;        /* the one solid surface: filled CTA */
  --cork: #40372e;        /* hairlines, dashed dividers */
  --driftwood: #6c5f51;   /* muted structure: borders, ticks (not for text) */
  --dim: #94857a;         /* secondary text, 5.5:1 on walnut */
  --sand: #b9a68f;        /* quiet text on dark */
  --cream: #ffedd7;       /* all type — never pure white */
  --paper: #f6e2c8;       /* the tag's paper */
  --paper-edge: #c9ae8c;  /* tag thickness */
  --ember: #dc5000;       /* stamps, credits, short emphasis only */

  /* Type */
  --font: "Hanken Grotesk", "Inter", "Helvetica Neue", Arial, sans-serif;
  --display: clamp(52px, 9.2vw, 150px);
  --heading: clamp(36px, 4.6vw, 72px);
  --heading-sm: clamp(20px, 1.9vw, 26px);
  --body-xl: clamp(21px, 2vw, 29px);
  --label: 12px;

  /* Shape — the entire radius vocabulary */
  --r-card: 12px;
  --r-ghost: 22.5px;
  --r-pill: 36px;

  --gutter: clamp(16px, 2.2vw, 32px);
  --dash: 1px dashed var(--cork);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--walnut);
  color: var(--cream);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-feature-settings: "ss01" on, "tnum" on;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--ember); color: var(--cream); }
:focus-visible { outline: 1px dashed var(--cream); outline-offset: 4px; }

/* film grain — darkroom texture */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .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%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Type voices ---------- */
.up { text-transform: uppercase; font-weight: 500; letter-spacing: 0; }
.display { font-size: var(--display); line-height: .88; font-weight: 500; text-transform: uppercase; margin: 0; }
.h { font-size: var(--heading); line-height: .9; font-weight: 500; text-transform: uppercase; margin: 0; }
.h-sm { font-size: var(--heading-sm); line-height: 1.09; font-weight: 500; text-transform: uppercase; margin: 0; }
.label { font-size: var(--label); line-height: 1.2; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
.voice { font-size: var(--body-xl); line-height: 1.26; font-weight: 400; margin: 0; max-width: 30ch; }
.quiet { color: var(--sand); }
.muted { color: var(--dim); }
.ember { color: var(--ember); }
.micro { font-family: Arial, system-ui, sans-serif; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); }

/* ---------- Structure ---------- */
.dash { border: 0; border-top: var(--dash); margin: 0; }
.pad { padding-inline: var(--gutter); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) calc(var(--gutter) + env(safe-area-inset-right, 0px)) 18px calc(var(--gutter) + env(safe-area-inset-left, 0px));
  transition: background .4s ease, border-color .4s ease;
  border-bottom: 1px dashed transparent;
}
.nav.scrolled { background: rgba(16, 9, 4, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--cork); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 14px; font-weight: 500; text-transform: uppercase; white-space: nowrap; }
.brand svg { width: 30px; height: auto; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav ul a { text-decoration: none; font-size: 12px; font-weight: 500; text-transform: uppercase; padding-bottom: 3px; border-bottom: 1px dashed transparent; transition: border-color .2s; }
.nav ul a:hover, .nav ul a.active { border-bottom-color: var(--cream); }
.nav-right { display: flex; align-items: center; gap: 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font: 500 12px/1 var(--font); text-transform: uppercase; text-decoration: none; white-space: nowrap;
  color: var(--cream); border-radius: var(--r-pill);
  background: var(--bark); border: 1px solid var(--bark); padding: 16px 26px;
  transition: background .25s, border-color .25s, transform .25s;
}
.btn:hover { background: #4a3020; border-color: #4a3020; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; border-color: var(--cream); border-radius: var(--r-ghost); padding: 11px 18px; }
.btn.ghost:hover { background: rgba(255, 237, 215, .08); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(3px); }
.link { font-size: 12px; font-weight: 500; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--cream); padding-bottom: 2px; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--cork); border-radius: var(--r-card); padding: 24px; }

/* ---------- Inputs (underline only) ---------- */
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { font-size: 12px; font-weight: 500; text-transform: uppercase; color: var(--sand); }
.field input, .field select, .field textarea {
  font: 400 clamp(18px, 1.5vw, 22px)/1.2 var(--font); color: var(--cream);
  background: transparent; border: 0; border-bottom: 1px solid var(--cream); border-radius: 0;
  padding: 4px 2px 10px; width: 100%; -webkit-appearance: none; appearance: none;
}
.field textarea { font-size: 18px; resize: vertical; min-height: 84px; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--cream) 50%), linear-gradient(135deg, var(--cream) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--walnut); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ember); }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }

/* ---------- The tag (brand object) ---------- */
.tag-stage { perspective: 1400px; }
.tag {
  --rx: 8deg; --ry: -18deg; --rz: -4deg;
  position: relative; width: min(560px, 86vw); aspect-ratio: 1.78;
  transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
  transition: transform .9s cubic-bezier(.2, .7, .2, 1);
  color: var(--walnut);
}
.tag .shape, .tag .edge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tag .shape, .tag .shape path { fill: var(--paper); }
.tag .edge { transform: translateZ(-7px); }
.tag .edge, .tag .edge path { fill: var(--paper-edge); }
.tag .edge.e2 { transform: translateZ(-3.5px); }
.tag .string { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; transform: translateZ(1px); pointer-events: none; }
.tag .string path { fill: none; stroke: var(--sand); stroke-width: 1.4; }
.tag .face {
  position: absolute; inset: 0; transform: translateZ(1px);
  padding: 7% 6% 6% 26%;
  display: flex; flex-direction: column; justify-content: space-between;
}
.tag .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: clamp(9px, 1.1vw, 12px); font-weight: 500; text-transform: uppercase; }
.tag .t-dash { border-top: 1px dashed rgba(16, 9, 4, .3); }
.tag .what { font-size: clamp(22px, 3.6vw, 42px); line-height: .9; font-weight: 500; text-transform: uppercase; }
.tag .quote { font-size: clamp(11px, 1.35vw, 15px); line-height: 1.3; color: #4b3a2a; max-width: 34ch; margin-top: 6px; }
.tag .times { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; font-size: clamp(8px, 1vw, 11px); font-weight: 500; text-transform: uppercase; }
.tag .times b { display: block; font-size: clamp(13px, 1.7vw, 20px); font-weight: 500; margin-top: 3px; }
.tag .stamp {
  position: absolute; right: 5%; bottom: 33%; transform: rotate(-11deg) translateZ(2px);
  color: var(--ember); border: 2px solid var(--ember); border-radius: 8px;
  padding: 4px 10px 3px; font-size: clamp(14px, 2.2vw, 26px); font-weight: 500; letter-spacing: .06em;
  mix-blend-mode: multiply; opacity: .92;
}
.tag .face > * { transition: opacity .35s ease, transform .35s ease; }
.tag.swap .face > * { opacity: 0; transform: translateY(4px); }

/* ---------- Reveal on scroll ---------- */
[hidden] { display: none !important; }

/* visible at rest; only blocks below the first screen start hidden (class added by script) */
.rv { transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.rv.pending { opacity: 0; transform: translateY(24px); }
.rv.d1 { transition-delay: .08s; } .rv.d2 { transition-delay: .16s; } .rv.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .rv.pending { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .nav ul { display: none; }
}
