/* ==========================================================================
   PRETTY RASCAL — LOOKBOOK 2026
   Fixed-canvas editorial document. 1920 × 1080, scaled to viewport.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Grounds */
  --cream:        #EFEAE0;   /* Sorrento Cream, lifted — primary page ground */
  --cream-deep:   #E5DDCE;
  --ink:          #17150F;
  --noir:         #100E0B;
  --gold:         #B8912F;

  /* Colourways, sampled from the collection photography */
  --amalfi:       #5A7CBE;
  --positano:     #8A9440;
  --ravello:      #7A5540;
  --sorrento:     #E4DBC9;
  --noir-sw:      #16130F;
  --brown:        #6A4530;
  --matcha:       #97883F;
  --butter:       #F0DC97;

  /* Type */
  --display: "Bodoni Moda", "Didot", "Bodoni MT", Georgia, serif;
  --sans:    "Jost", "Futura", "Helvetica Neue", Arial, sans-serif;

  --t-chapter: 148px;
  --t-display: 92px;
  --t-title:   62px;
  --t-hook:    30px;
  --t-body:    18px;
  --t-label:   11.5px;
  --t-micro:   10.5px;

  /* Grid — 12 col, 104px margin, 28px gutter → 117px column */
  --margin: 104px;
  --gutter: 28px;

  --rule: rgba(184, 145, 47, 0.42);
  --rule-ink: rgba(23, 21, 15, 0.16);

  --ease: cubic-bezier(0.22, 0.61, 0.24, 1);
}

/* --- Reset -------------------------------------------------------------- */

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #0B0A08;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

img { display: block; max-width: 100%; }

/* --- Viewport & stage --------------------------------------------------- */

.viewport {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.stage {
  position: relative;
  width: 1920px;
  height: 1080px;
  flex: none;
  transform-origin: center center;
  background: var(--cream);
  overflow: hidden;
}

/* --- Pages -------------------------------------------------------------- */

.page {
  position: absolute;
  inset: 0;
  background: var(--cream);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page.is-current {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.page--noir  { background: var(--noir);   color: var(--sorrento); }
.page--cocoa { background: #2E2018;       color: #EDE3D6; }
.page--full  { background: var(--noir); }

/* Grid helper: content area inside margins */
.frame {
  position: absolute;
  inset: 76px var(--margin);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
}

/* --- Typography --------------------------------------------------------- */

.wordmark {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  line-height: 1;
}

.chapter {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--t-chapter);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0;
}

.style-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--t-display);
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}

.page-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: var(--t-title);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.hook {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: var(--t-hook);
  line-height: 1.35;
  letter-spacing: 0.005em;
  margin: 0;
}

.body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: var(--t-body);
  line-height: 1.85;
  letter-spacing: 0.012em;
  margin: 0;
}
.body + .body { margin-top: 1.35em; }

.label {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.26em;
  line-height: 1.4;
  margin: 0;
}

.micro {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  line-height: 1.5;
  margin: 0;
}

.gold { color: var(--gold); }
.dim  { opacity: 0.62; }

/* Hairline rules — the only permitted decoration */
.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
  transform-origin: left center;
}
.rule--ink { background: var(--rule-ink); }

/* --- Page furniture ----------------------------------------------------- */

.footer {
  position: absolute;
  left: var(--margin);
  right: var(--margin);
  bottom: 44px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  z-index: 5;
}

.footer .wordmark {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--t-micro);
  letter-spacing: 0.34em;
  color: var(--gold);
}

.footer .folio {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--t-micro);
  letter-spacing: 0.18em;
  color: var(--gold);
}

.page--noir .footer .wordmark,
.page--noir .footer .folio { color: var(--gold); }

/* --- Images ------------------------------------------------------------- */

.shot {
  position: relative;
  overflow: hidden;
  background: var(--cream-deep);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.shot--eyeline img { object-position: center 22%; }
.shot--low img     { object-position: center 55%; }
.shot--mid img     { object-position: center 42%; }

.bleed {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scrim for reversed-out type over photography */
.scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scrim--top    { background: linear-gradient(to bottom, rgba(10,9,7,0.52) 0%, rgba(10,9,7,0.10) 38%, rgba(10,9,7,0) 62%); }
.scrim--bottom { background: linear-gradient(to top,   rgba(10,9,7,0.62) 0%, rgba(10,9,7,0.14) 40%, rgba(10,9,7,0) 70%); }
.scrim--full   { background: rgba(10,9,7,0.42); }
.scrim--noir   { background: rgba(10,9,7,0.58); }

/* --- Colourway strip ---------------------------------------------------- */

.ways {
  display: grid;
  column-gap: var(--gutter);
}
.ways--4 { grid-template-columns: repeat(4, 1fr); }
.ways--5 { grid-template-columns: repeat(5, 1fr); }
.ways--3 { grid-template-columns: repeat(3, 1fr); }

.way .shot { aspect-ratio: 2 / 3; }

.way-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
}

.swatch {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px rgba(23,21,15,0.22);
}
.page--noir .swatch,
.page--cocoa .swatch { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28); }

/* Swatch-only row, for colourways without photography */
.chips { display: flex; gap: 52px; }
.chip { display: flex; align-items: center; gap: 11px; }
.chip .swatch { width: 15px; height: 15px; }

/* --- Caption blocks ----------------------------------------------------- */

.caption {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.012em;
  margin: 0;
}

/* --- Spec table (Stock page) -------------------------------------------- */

.spec { width: 100%; border-collapse: collapse; }
.spec tr { border-bottom: 1px solid rgba(255,255,255,0.14); }
.spec tr:first-child { border-top: 1px solid rgba(255,255,255,0.14); }
.spec th, .spec td { padding: 11px 0; text-align: left; vertical-align: baseline; }
.spec th {
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  opacity: 0.58;
  width: 42%;
}
.spec td {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  letter-spacing: 0.012em;
}
.spec .fill { color: var(--gold); font-weight: 400; letter-spacing: 0.06em; }

/* --- Contents page ------------------------------------------------------ */

.toc-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 26px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule-ink);
  cursor: pointer;
  background: none;
  border-left: 0; border-right: 0; border-top: 0;
  width: 100%;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: opacity 0.3s var(--ease);
}
.toc-entry:hover { opacity: 0.55; }
.toc-entry:focus-visible { outline: 1px solid var(--gold); outline-offset: 6px; }

.toc-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 30px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.toc-ways { justify-self: start; }
.toc-folio { color: var(--gold); }

/* ==========================================================================
   Motion — designed in, not sprinkled on.
   Elements lift and settle; images wipe open from the base.
   ========================================================================== */

.page.is-current [data-anim] {
  animation: settle 620ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 60ms);
}

.page.is-current [data-anim="wipe"] {
  animation: wipe 900ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

.page.is-current [data-anim="rule"] {
  animation: draw 700ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 70ms + 120ms);
}

@keyframes settle {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

@keyframes wipe {
  from { clip-path: inset(0 0 100% 0); }
  to   { clip-path: inset(0 0 0 0); }
}

@keyframes draw {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Page-level crossfade */
.page { transition: opacity 380ms var(--ease), visibility 0s linear 380ms; }
.page.is-current { transition: opacity 380ms var(--ease), visibility 0s; }

/* ==========================================================================
   Chrome — navigation, rail, contents overlay
   ========================================================================== */

.chrome {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.rail {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 9px 18px;
  pointer-events: auto;
  background: rgba(11, 10, 8, 0.72);
  backdrop-filter: blur(9px);
  opacity: 0;
  transition: opacity 340ms var(--ease);
}
.chrome.is-awake .rail { opacity: 1; }

.rail button {
  appearance: none;
  background: none;
  border: 0;
  padding: 4px 6px;
  color: rgba(239, 234, 224, 0.72);
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: color 240ms var(--ease);
}
.rail button:hover:not(:disabled) { color: var(--gold); }
.rail button:disabled { opacity: 0.24; cursor: default; }
.rail button:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

.ticks { display: flex; gap: 7px; }

.tick {
  width: 7px;
  height: 7px;
  padding: 0;
  background: rgba(239, 234, 224, 0.26);
  border: 0;
  cursor: pointer;
  transition: background 260ms var(--ease), transform 260ms var(--ease);
}
.tick:hover { background: rgba(239, 234, 224, 0.6); }
.tick.is-on { background: var(--gold); transform: scaleY(2.1); }
.tick:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }

.rail-count {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: rgba(239, 234, 224, 0.6);
  min-width: 58px;
  text-align: center;
}

/* Edge click zones */
.edge {
  position: absolute;
  top: 0;
  bottom: 76px;
  width: 13vw;
  max-width: 190px;
  pointer-events: auto;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
}
.edge--prev { left: 0; }
.edge--next { right: 0; }
.edge:focus-visible { outline: 1px solid var(--gold); outline-offset: -8px; opacity: 1; }

/* Hint, shown once */
.hint {
  position: absolute;
  right: 26px;
  bottom: 28px;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(239, 234, 224, 0.42);
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
.chrome.is-awake .hint { opacity: 1; }

/* --- Review overlay (internal; off by default) --------------------------- */

.stage[data-review="on"] [data-verify] {
  box-shadow: inset 0 0 0 1px rgba(184, 145, 47, 0.85);
  background: rgba(184, 145, 47, 0.09);
}
.stage[data-review="on"] [data-verify]::after {
  content: attr(data-verify);
  position: absolute;
  left: 0;
  top: calc(100% + 7px);
  max-width: 460px;
  padding: 9px 12px;
  background: var(--gold);
  color: #14120C;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-transform: none;
  z-index: 40;
}
[data-verify] { position: relative; }

.review-flag {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  padding: 7px 15px;
  background: var(--gold);
  color: #14120C;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: none;
}
body[data-review="on"] .review-flag { display: block; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .page.is-current [data-anim],
  .page.is-current [data-anim="wipe"],
  .page.is-current [data-anim="rule"] {
    animation: none !important;
  }
  .page { transition: opacity 1ms linear !important; }
  * { scroll-behavior: auto !important; }
}

/* ==========================================================================
   Small screens — the deck unrolls into a stack
   ========================================================================== */

@media (max-width: 900px), (max-height: 480px) {
  /* Release the 100% height so the document itself scrolls. */
  html, body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    background: var(--cream);
  }

  /* The stage keeps its 1920px coordinate space and is scaled down whole,
     so every page stays pixel-faithful. JS sets the scale and the height. */
  .viewport {
    position: static;
    display: block;
    overflow: hidden;
    /* place-items still aligns block children in Chromium — reset it, or the
       1920px stage gets centred to a negative offset and scrolls off-screen. */
    place-items: start;
  }

  .stage {
    width: 1920px;
    height: auto;
    transform-origin: top left;
  }

  .page {
    position: relative;
    inset: auto;
    width: 1920px;
    height: 1080px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }

  .page + .page { border-top: 2px solid rgba(23,21,15,0.14); }

  /* Entry animations would all fire at once on a stack — run them off. */
  .page [data-anim] { animation: none !important; }

  .rail, .edge, .hint { display: none !important; }
}

/* ==========================================================================
   Print — one landscape sheet per page
   ========================================================================== */

@media print {
  @page { size: 1920px 1080px; margin: 0; }

  html, body { overflow: visible; background: #fff; height: auto; }
  .chrome, .review-flag { display: none !important; }

  .viewport { position: static; display: block; }

  .stage {
    width: 1920px;
    height: auto;
    transform: none !important;
  }

  .page {
    position: relative;
    inset: auto;
    width: 1920px;
    height: 1080px;
    opacity: 1 !important;
    visibility: visible !important;
    page-break-after: always;
    break-after: page;
    animation: none !important;
  }
  .page:last-child { page-break-after: auto; break-after: auto; }

  .page [data-anim] { animation: none !important; opacity: 1 !important; transform: none !important; clip-path: none !important; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* --- Detail crops -------------------------------------------------------
   The supplied photography is full looks, not macro shots. These crops zoom
   into a named region so the detail pages read as construction studies.     */

.shot--zoom img {
  object-position: var(--op, center);      /* selects the vertical band */
  transform: scale(var(--z, 1.7));         /* magnifies within it       */
  transform-origin: var(--zx, 50%) var(--zy, 50%);
}

/* --- Cover plate -------------------------------------------------------- */

.plate {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  overflow: hidden;
  background: var(--cream-deep);
}
.plate img { width: 100%; height: 100%; object-fit: cover; object-position: center 34%; }
