:root {
  --rebate: #0a0a09;
  --black: #121211;
  --ink: #ecebe7;
  --ink-dim: #aeada7;
  --paper: #e7e6e1;
  --paper-ink: #161614;
  --paper-dim: #4b4a46;
  --rule: #c2c1bb;
  --lightbox: #f2f1ec;
  --edge: #b9b8b1;
  --marker: #d23b22;

  --display: "Archivo", "Helvetica Neue", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --hand: "Permanent Marker", cursive;

  --gutter: clamp(1rem, 4vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* 35mm perforation: 4.75mm pitch, KS hole about 2 x 2.8mm. */
  --perfs: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='16' viewBox='0 0 19 16'%3E%3Crect x='5.5' y='2' width='8' height='12' rx='1.6' fill='%23f2f1ec'/%3E%3C/svg%3E");

  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* Whole-page silver grain. The tile is generated by app.js. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  background-image: var(--grain, none);
  background-size: 160px 160px;
  opacity: 0.55;
}

::selection { background: var(--marker); color: var(--lightbox); }

a { color: inherit; text-underline-offset: 0.2em; }

:focus-visible { outline: 2px solid var(--marker); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 62;
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; text-wrap: pretty; }

.wrap {
  max-width: 68rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--wide { max-width: 90rem; }

/* ---------- Film ---------- */

.strip,
.frame { margin: 0; }

.rebate {
  position: relative;
  background-color: var(--rebate);
  background-image: var(--perfs);
  background-repeat: repeat-x;
  background-size: auto 62%;
}

.rebate--top { background-position: 0 100%; }
.rebate--bottom { background-position: 0 0; }

.edge {
  position: absolute;
  left: 0.6em;
  right: 0.6em;
  font-family: var(--mono);
  font-weight: 500;
  font-size: var(--edge-size, 0.625rem);
  letter-spacing: 0.08em;
  color: var(--edge);
  white-space: nowrap;
  overflow: hidden;
  line-height: 1;
}

.rebate--top .edge { top: 12%; }
.rebate--bottom .edge { bottom: 12%; }

.print {
  display: block;
  width: 100%;
  background: var(--rebate);
}

/* The panoramic hero: a Widelux-ish 24 x 59mm frame, full bleed. */
.strip--pano .rebate { height: clamp(1.75rem, 4.4vw, 3.75rem); }
.strip--pano .edge { --edge-size: clamp(0.5625rem, 1.05vw, 0.875rem); left: 2.5vw; }
.strip--pano .print { aspect-ratio: 59 / 24; }

@media (max-width: 40rem) {
  .strip--pano .print { aspect-ratio: 2 / 1; }
}

/* The single authored moment: the hero print comes up in the tray. */
@media (prefers-reduced-motion: no-preference) {
  .print--latent { filter: brightness(2.6) contrast(0.25); }
  .print--developed {
    filter: none;
    transition: filter 3.2s var(--ease-out);
  }
}

/* ---------- Hero ---------- */

.hero { padding-bottom: clamp(4rem, 10vw, 8rem); }

.hero__copy {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-top: clamp(2.5rem, 6vw, 5rem);
}

.hero h1 {
  font-size: clamp(3.25rem, 11vw, 6rem);
  max-width: 11ch;
}

.hero__body {
  display: grid;
  gap: 1rem;
  max-width: 38rem;
}

.lede {
  font-size: clamp(1.3125rem, 2.4vw, 1.625rem);
  line-height: 1.35;
}

.hero__body p:not(.lede) { color: var(--ink-dim); font-size: 1.125rem; }
.hero .hero__fine { color: var(--ink); font-style: italic; }

@media (min-width: 60rem) {
  .hero__copy {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }
}

/* ---------- Paper sections ---------- */

.paper {
  background: var(--paper);
  color: var(--paper-ink);
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

.paper + .paper { padding-top: 0; }

.paper h2,
.notes h2,
.faq h2 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  margin-bottom: 1.25rem;
}

.intro {
  max-width: 36rem;
  font-size: 1.1875rem;
  color: var(--paper-dim);
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

/* The starter pack: a packing manifest, rules between rows. */
.manifest {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--paper-ink);
}

.manifest li {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.manifest h3 {
  font-size: 1.75rem;
  margin-bottom: 0.4rem;
}

.manifest p {
  max-width: 34rem;
  color: var(--paper-dim);
}

.qty {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: "wdth" 62;
  font-size: 3.75rem;
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}

.qty--words { font-size: 2.25rem; line-height: 0.95; }

@media (min-width: 48rem) {
  .manifest li { grid-template-columns: 9rem minmax(0, 1fr); gap: 2rem; padding-block: 1.75rem; }
  .qty { font-size: 4.5rem; }
  .qty--words { font-size: 2.75rem; }
}

.total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 80;
  font-size: 1.375rem;
}

.total__price {
  font-weight: 800;
  font-variation-settings: "wdth" 62;
  font-size: clamp(3rem, 8vw, 5rem);
  line-height: 1;
}

.total__note {
  text-align: right;
  color: var(--paper-dim);
  font-style: italic;
  margin-top: 0.25rem;
}

/* ---------- Contact sheet ---------- */

.sheet { padding-top: clamp(4rem, 9vw, 7rem); }

.paper.sheet { border-top: 1px solid var(--rule); }

.contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  row-gap: 2.25rem;
  margin-top: 0.5rem;
}

@media (min-width: 40rem) { .contact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 72rem) { .contact { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.frame { position: relative; }

.frame .rebate { height: clamp(1.25rem, 2.2vw, 1.75rem); }
.frame .edge { --edge-size: 0.5625rem; }
.frame .print { aspect-ratio: 3 / 2; }

.frame figcaption {
  padding: 0.75rem 0.75rem 0 0.1rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--paper-ink);
}

.mark {
  position: absolute;
  left: -4%;
  width: 108%;
  top: 0.4rem;
  height: calc(100% - 3.5rem);
  overflow: visible;
  pointer-events: none;
  fill: none;
  stroke: var(--marker);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.92;
}

.marker {
  display: block;
  font-family: var(--hand);
  color: var(--marker);
  font-size: 1.375rem;
  line-height: 1.1;
  transform: rotate(-3deg);
  transform-origin: left;
  margin-bottom: 0.2rem;
}

/* ---------- Processing notes ---------- */

.notes { padding-block: clamp(4.5rem, 10vw, 8rem); }

.notes__grid { display: grid; gap: 2rem; }

@media (min-width: 60rem) {
  .notes__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); align-items: start; }
}

.datasheet { margin: 0; border-top: 2px solid var(--ink); }

.datasheet div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1rem;
  border-bottom: 1px solid #3a3936;
}

.datasheet dt {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 80;
  font-size: 1rem;
  color: var(--ink-dim);
  padding-top: 0.2rem;
}

.datasheet dd { margin: 0; font-size: 1.1875rem; }

@media (max-width: 30rem) {
  .datasheet div { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* ---------- FAQ ---------- */

.faq {
  padding-block: clamp(4rem, 9vw, 7rem);
  border-top: 1px solid #2c2b29;
}

.faq h2 { max-width: 18ch; margin-bottom: clamp(2rem, 4vw, 3rem); }

.qa { margin: 0; display: grid; gap: 2rem; max-width: 46rem; }

.qa dt {
  font-family: var(--display);
  font-weight: 700;
  font-variation-settings: "wdth" 80;
  font-size: 1.5rem;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.qa dd { margin: 0; color: var(--ink-dim); font-size: 1.125rem; max-width: 40rem; }

/* ---------- Invitation ---------- */

.invite {
  background: var(--rebate);
  padding-block: clamp(5rem, 12vw, 10rem);
}

.invite h2 {
  font-size: clamp(3rem, 10vw, 6rem);
  max-width: 12ch;
  margin-bottom: 2rem;
}

.invite p { max-width: 36rem; font-size: 1.1875rem; color: var(--ink-dim); }

/* ---------- Footer ---------- */

.foot {
  background: var(--rebate);
  border-top: 1px solid #2c2b29;
  padding-block: 2rem 2.5rem;
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

/* ---------- 404 ---------- */

.lost {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 1.5rem;
  padding-block: 4rem;
}

.lost .frame { max-width: 30rem; }
.lost .frame .print { background: var(--rebate); }
.lost h1 { font-size: clamp(3rem, 10vw, 5.5rem); }
.lost p { color: var(--ink-dim); font-size: 1.1875rem; max-width: 32rem; }

/* ---------- Contact sheets page ---------- */

.sheet__more {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  font-size: 1.1875rem;
  color: var(--paper-dim);
}

.sheet__more a { color: var(--paper-ink); font-weight: 600; text-decoration-color: var(--marker); text-decoration-thickness: 2px; }

.proofs-head {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5.5rem);
}

.back { font-family: var(--display); font-weight: 700; font-variation-settings: "wdth" 80; font-size: 1rem; }
.back a { color: var(--ink-dim); text-decoration-color: var(--marker); }
.back a:hover { color: var(--ink); }

.proofs-head h1 { font-size: clamp(3.25rem, 10vw, 6rem); max-width: 13ch; }

.proofs-head__body { display: grid; gap: 0.75rem; max-width: 36rem; }
.proofs-head__body p:not(.lede) { color: var(--ink-dim); font-size: 1.125rem; }

.rolls { display: grid; gap: clamp(3.5rem, 8vw, 6.5rem); padding-bottom: clamp(5rem, 10vw, 8rem); }

.roll__head {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
}

@media (min-width: 48rem) {
  .roll__head { grid-template-columns: 12rem minmax(0, 1fr); align-items: baseline; gap: 2rem; }
}

.roll__head h2 { font-size: clamp(2.25rem, 4.5vw, 3rem); }
.roll__head p { color: var(--ink-dim); font-size: 1.1875rem; max-width: 38rem; }

.roll__sheet {
  position: relative;
  background: var(--paper);
  aspect-ratio: 2400 / 1735;
  touch-action: pan-y;
  cursor: crosshair;
  overflow: hidden;
}

.roll__sheet img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .roll__sheet img { transition: opacity 1.4s var(--ease-out); }
}

.roll__sheet.is-developed img { opacity: 1; }

.loupe {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(9rem, 22vw, 15rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--rebate);
  box-shadow: 0 14px 40px rgb(10 10 9 / 0.45);
  background-color: var(--paper);
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease-out;
}

.loupe.is-on { opacity: 1; }

.review h2 { max-width: none; }
.review__back { margin-top: 2rem; }
.review__back a { color: var(--ink); font-weight: 600; text-decoration-color: var(--marker); text-decoration-thickness: 2px; }
