/* Layout: one night-side page. Split hero (thesis + live crew ID you can edit), the paper dossier as the only light object, three priced items, Morfeus field notes. */
:root {
  --void: #08080b;
  --panel: #101015;
  --line: #25252e;
  --text: #ebe7de;
  --soft: #c4c0b7;
  --muted: #8e8a97;
  --eye: #e6b23e;
  --eye-deep: #9c7120;
  --paper: #ece5d6;
  --ink: #1d1a16;
  --ink-soft: #6b6357;
  --stamp: #a8412c;
  --f-display: "Michroma", "Eurostile", "Arial Black", sans-serif;
  --f-head: "Audiowide","Eurostile", "Arial Black", sans-serif;
  --f-voice: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --f-data: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}

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

body {
  background-color: var(--void);
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgba(235, 231, 222, .45) 50%, transparent 51%),
    radial-gradient(1px 1px at 63% 42%, rgba(235, 231, 222, .3) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 84% 9%, rgba(230, 178, 62, .35) 50%, transparent 51%),
    radial-gradient(1px 1px at 37% 77%, rgba(235, 231, 222, .25) 50%, transparent 51%);
  background-size: 360px 360px, 520px 520px, 700px 700px, 440px 440px;
  color: var(--text);
  font-family: var(--f-voice);
  font-size: 18px;
  line-height: 1.55;
}

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

a { color: inherit; }

.label {
  font-family: var(--f-display);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Header */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--f-display);
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.brand svg { width: 28px; height: 28px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(44px, 7vw, 96px);
}
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
h1 {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.6vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: .01em;
  text-wrap: balance;
}
h1 em { font-style: normal; color: var(--eye); }
.lede { margin: 0; max-width: 34em; font-size: 1.16rem; font-weight: 300; color: var(--soft); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--text);
  font-family: var(--f-display);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--eye); border-color: var(--eye); color: var(--void); }
.btn-primary:hover { background: var(--text); border-color: var(--text); }
:focus-visible { outline: 2px solid var(--eye); outline-offset: 3px; }

/* Crew ID card */
.hero-card { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.card-stage {
  container-type: inline-size;
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  perspective: 1100px;
}
.idcard {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 85.6 / 53.98;
  border-radius: 3.7cqw;
  font-size: calc(100cqw / 46);
  padding: 1.5em 1.7em 1.3em 2.1em;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: .9em;
  overflow: hidden;
  color: var(--text);
  background: radial-gradient(120% 95% at 88% 0%, #1d1c27 0%, #0d0d12 55%, #060608 100%);
  border: 1px solid rgba(235, 231, 222, .09);
  box-shadow: 0 40px 70px -28px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(230, 178, 62, .18);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.idcard::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
radial-gradient(60% 50% at 80% 110%, rgba(230, 178, 62, .08), transparent 70%);
}
.idcard > * { position: relative; min-width: 0; }
.holo {
  position: absolute !important;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(235, 231, 222, .07) 45%, transparent 60%);
  background-size: 260% 260%;
  background-position: var(--hx, 30%) var(--hy, 30%);
  transition: background-position .45s cubic-bezier(.2, .7, .2, 1);
}
.card-top { display: flex; align-items: center; gap: .8em; }
.card-top svg { width: 2.7em; height: 2.7em; flex: none; }
.agency { display: flex; flex-direction: column; gap: .25em; min-width: 0; }
.agency b {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: .78em;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.agency span { font-family: var(--f-data); font-size: .66em; color: var(--muted); letter-spacing: .04em; }
.kind {
  margin-left: auto;
  flex: none;
  font-family: var(--f-display);
  font-size: .66em;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--eye);
  border: 1px solid currentColor;
  border-radius: .3em;
  padding: .35em .6em;
}
.card-body { display: grid; grid-template-columns: 9.4em minmax(0, 1fr); gap: 1.4em; align-items: start; }
.photo-wrap { position: relative; }
.photo {
  aspect-ratio: 3 / 4;
  border-radius: .5em;
  overflow: hidden;
  background: #14141b;
  border: 1px solid rgba(235, 231, 222, .12);
}
.photo img, .photo svg { display: block; width: 100%; height: 100%; object-fit: cover; }
.seal {
  position: absolute;
  right: -1.1em;
  bottom: -.9em;
  width: 3.4em;
  height: 3.4em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f3d27a, var(--eye) 55%, var(--eye-deep));
  opacity: .9;
  border: 1px solid rgba(235, 231, 222, .3);
  display: grid;
  place-items: center;
  font-family: var(--f-display);
  font-size: .5em;
  letter-spacing: .1em;
  color: var(--void);
}
.fields { margin: 0; display: grid; gap: .55em; }
.fields dt {
  font-family: var(--f-display);
  font-size: .52em;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.fields dd {
  margin: .15em 0 0;
  font-family: var(--f-data);
  font-size: .98em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.fields .name dd { font-family: var(--f-display); font-size: 1.35em; letter-spacing: .05em; text-transform: uppercase; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: .8em; }
.mrz {
  font-family: var(--f-data);
  font-size: .9em;
  letter-spacing: .1em;
  line-height: 1.35;
  color: rgba(235, 231, 222, .72);
  white-space: pre;
  overflow: hidden;
  border-top: 1px dashed rgba(235, 231, 222, .14);
  padding-top: .6em;
}
.novelty {
  position: absolute !important;
  left: .55em;
  bottom: 1.3em;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--f-data);
  font-size: .5em;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.blink { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.08); } }

/* Builder under the card */
.builder {
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  font-family: var(--f-data);
  font-size: .95rem;
}
.file-pick { position: relative; }
.file-pick input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-pick:focus-within .btn { outline: 2px solid var(--eye); outline-offset: 3px; }
.builder .reroll { grid-column: 1 / -1; }
.builder .hint { grid-column: 1 / -1; margin: 0; font-family: var(--f-data); font-size: .74rem; color: var(--muted); }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 40em; margin-bottom: clamp(32px, 4vw, 52px); }
h2 {
  margin: 0;
  font-family: var(--f-head);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.25;
  text-wrap: balance;
}
.section-head p { margin: 0; color: var(--soft); }

/* Kit */
.kit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 5vw, 72px); align-items: start; }
.kit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kit-list li {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 20px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.kit-list li:last-child { border-bottom: 1px solid var(--line); }
.kit-list .label { color: var(--eye); padding-top: 5px; }
.kit-list p { margin: 0; color: var(--soft); }
.kit-list strong { color: var(--text); font-weight: 500; }

.dossier {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  padding: clamp(26px, 4vw, 42px);
  border-radius: 1px;
  transform: rotate(-1.2deg);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .95);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.stamp {
  position: absolute;
  top: 22px;
  right: 20px;
  border: 2px solid var(--stamp);
  color: var(--stamp);
  font-family: var(--f-display);
  font-size: .62rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  padding: 6px 10px;
  transform: rotate(7deg);
  opacity: .85;
}
.d-head { margin: 0; font-family: var(--f-data); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding-right: 120px; }
.dossier h3 { margin: 0; font-weight: 500; font-size: 1.85rem; line-height: 1.1; }
.d-grid { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 18px; font-size: 1rem; }
.d-grid dt { font-family: var(--f-data); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); padding-top: 4px; }
.d-grid dd { margin: 0; }
.dossier .story { margin: 0; font-size: 1.06rem; border-top: 1px solid rgba(29, 26, 22, .2); padding-top: 14px; }
.d-sign { margin: 0; font-style: italic; }
.d-sign span { font-style: normal; font-family: var(--f-data); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }

/* Shop */
.offers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.offer {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 2px;
  min-width: 0;
}
.offer.featured { border-color: var(--eye-deep); }
.offer h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.price { margin: 0; font-family: var(--f-display); font-size: 2.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--f-data); font-size: .8rem; color: var(--muted); letter-spacing: .04em; margin-left: 6px; }
.offer p { margin: 0; color: var(--soft); }
.offer .meta { font-family: var(--f-data); font-size: .76rem; color: var(--muted); }
.offer .btn { margin-top: auto; }
.offer .status { min-height: 1.4em; font-family: var(--f-data); font-size: .74rem; color: var(--eye); }

/* Field notes */
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.notes li {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 24px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}
.notes .label { padding-top: 10px; }
.notes p { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 300; line-height: 1.35; max-width: 30em; }

footer { border-top: 1px solid var(--line); padding-block: 32px 48px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-family: var(--f-data); font-size: .76rem; color: var(--muted); }
.foot p { margin: 0; max-width: 46em; }

@media (max-width: 900px) {
  .hero, .kit { grid-template-columns: minmax(0, 1fr); }
  .offers { grid-template-columns: minmax(0, 1fr); }
  .dossier { transform: none; }
}
@media (max-width: 560px) {
  .kit-list li, .notes li { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .notes .label { padding-top: 0; }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .d-head { padding-right: 0; padding-top: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .idcard, .holo { transition: none; }
  .blink { animation: none; }
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* File page, thanks page, legal pages */
.file-hero { align-items: start; }
.share { display: flex; flex-direction: column; gap: 18px; }
.share blockquote {
  margin: 0;
  max-width: 30em;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  font-weight: 300;
  line-height: 1.3;
}
.hint { margin: 0; font-family: var(--f-data); font-size: .74rem; color: var(--muted); }
.notfound, .page { padding-block: clamp(56px, 8vw, 104px); }
.page { max-width: 46em; display: flex; flex-direction: column; gap: 16px; }
.page h3 { margin: 18px 0 0; font-family: var(--f-display); font-weight: 400; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--eye); }
.page p, .page li { margin: 0; color: var(--soft); }
.btn:disabled { opacity: .5; cursor: wait; }
@media print {
  body { background: #fff; color: #000; }
  .bar, footer, .section, .cta-row { display: none; }
  .card-stage { width: 85.6mm; max-width: none; margin: 0; }
  .idcard, .dossier { box-shadow: none; transform: none; }
}
