/* Six Glasses: shared tokens, type and parts for both pages.
   Direction: "The dark room" (tasteskill draw, seed 2078002842). One near-black field; each bottle is the
   lit thing on its screen, and the room takes the colour of its glass. */

@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/bodoni-moda-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;
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/bodoni-moda-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('../assets/fonts/bodoni-moda-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-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;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  /* Palette: black and crimson, from the sheet. The fields below are the darkest tone of each glass. */
  --bg: #0a0a0a;
  --surface: #151515;
  --ink: #efefef;
  --muted: #9a9a9a;
  --accent: #b11226;
  --accent-ink: #ffffff;
  --room: var(--bg); /* the colour the room has right now; set per section and per page */

  --display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Five steps, from the sheet; the display step is the closing question only. */
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(4.25rem, 11vw, 10.5rem);

  --margin: clamp(16px, 2.3vw, 32px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in: cubic-bezier(0.55, 0, 0.78, 0.4);
  --ease-both: cubic-bezier(0.65, 0, 0.35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--room);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, canvas, video, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: var(--accent); color: var(--accent-ink); }

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

.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
  font-variation-settings: 'opsz' 96;
}
.lead { font-size: var(--step-lead); line-height: 1.4; }
.small { font-size: var(--step-small); line-height: 1.5; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; left: var(--margin); top: 12px; z-index: 100;
  padding: 12px 18px; background: var(--ink); color: var(--bg);
  transform: translateY(-160%); text-decoration: none;
}
.skip:focus-visible { transform: none; }

/* Header: the name top-left, one link top-right, on 32px margins. */
/* It sits at the top of the page and scrolls away with it, so it never lies over the text. */
.masthead {
  position: absolute; inset: 0 0 auto 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px var(--margin);
  font-size: var(--step-small); line-height: 1.2;
  pointer-events: none;
}
.masthead a { pointer-events: auto; display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.masthead a:hover { text-decoration: underline; }
.masthead__name { font-weight: 500; gap: 0.6em; }
.masthead__name span { color: var(--muted); font-weight: 400; }

/* One button shape for the whole site: square corners, solid. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 56px; min-width: 200px; padding: 0 28px;
  border: 0; border-radius: 0;
  background: var(--accent); color: var(--accent-ink);
  font-size: var(--step-body); font-weight: 500; letter-spacing: 0.005em;
  text-decoration: none; cursor: pointer;
}
.button:hover { background: #c4182e; }
.button--quiet { background: var(--surface); color: var(--ink); }
.button--quiet:hover { background: #222; }
.button[disabled], .button[aria-disabled='true'] { background: #2a2a2a; color: #a6a6a6; cursor: not-allowed; }

.textlink { display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; }

.sample {
  display: inline-block; margin-left: 0.4em;
  font-size: var(--step-small); font-weight: 400; color: var(--muted);
}

/* Reveals (peptide-library): parts arrive once, staggered by --i. Hidden states hang off html.motion,
   so if a script fails nothing stays hidden. Reduced: everything is simply there. */
.motion [data-reveal] > * {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 75ms);
}
.motion [data-reveal].in > * { opacity: 1; transform: none; }

/* Footer: the page's last photograph (the six concept bottles), darkened evenly; the name runs along the bottom. */
.closing {
  position: relative; isolation: isolate;
  min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto auto;
  padding: 32px var(--margin) 32px;
  background: #0a0a0a;
  overflow: hidden;
}
.closing__picture { position: absolute; inset: 0; z-index: -1; }
.closing__picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; filter: brightness(0.62); }
.closing__top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; font-size: var(--step-body); }
.closing__top ul { display: grid; gap: 0; }
.closing__top a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.closing__top a:hover { text-decoration: underline; }
.closing__facts { max-width: 34ch; text-align: right; color: var(--ink); }
.closing__name {
  font-family: var(--display); font-weight: 400; letter-spacing: -0.03em; line-height: 0.86;
  font-size: clamp(4.5rem, 17vw, 17rem); white-space: nowrap;
  margin: 0 0 18px -0.04em;
  font-variation-settings: 'opsz' 96;
}
.closing__legal { font-size: var(--step-body); line-height: 1.5; color: #e2e2e2; max-width: 64ch; }
.closing__legal a { color: inherit; }
@media (max-width: 720px) {
  .closing { min-height: 88svh; }
  .closing__facts { text-align: left; }
  .closing__name { font-size: 21vw; white-space: normal; }
}

/* The spray: an SVG mist that fills the screen with the next room's colour (new effect). */
.spray { position: fixed; inset: 0; z-index: 80; pointer-events: none; width: 100vw; height: 100vh; }

/* Cross-document View Transitions (new effect): the bottle travels between the collection and its page. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; }
::view-transition-group(*) { animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation-duration: 0.3s !important; }
  ::view-transition-group(*) { animation-name: none !important; }
}
html.still::view-transition-group(*) { animation-name: none !important; }
html.still::view-transition-old(*), html.still::view-transition-new(*) { animation-duration: 0.3s !important; }
