/* The YARN landing page - design pass, 8 October 2026 (docs/12-landing.md). */

@font-face { font-family: "Inter"; src: url(/fonts/Inter.ttf); font-display: swap; }
@font-face { font-family: "InterMedium"; src: url(/fonts/InterMedium.ttf); font-display: block; }
@font-face { font-family: "EB Garamond"; src: url(/fonts/EBGaramond.ttf); font-display: block; }
@font-face { font-family: "Caveat"; src: url(/fonts/Caveat.ttf); font-display: block; }
@font-face { font-family: "Amatic SC"; src: url(/fonts/AmaticSC.ttf); font-display: block; }
@font-face { font-family: "Cedarville Cursive"; src: url(/fonts/CedarvilleCursive.ttf); font-display: block; }
@font-face { font-family: "Special Elite"; src: url(/fonts/SpecialElite.ttf); font-display: block; }
@font-face { font-family: "Libre Baskerville"; src: url(/fonts/LibreBaskerville.ttf); font-display: block; }
@font-face { font-family: "Reenie Beanie"; src: url(/fonts/ReenieBeanie.ttf); font-display: block; }
@font-face { font-family: "Homemade Apple"; src: url(/fonts/HomemadeApple.ttf); font-display: block; }

:root {
  --ink: #fff7ec;            /* the type: warm paper-white, as on the headset */
  --ink-quiet: rgba(255, 244, 230, 0.78);
  --ground: #3a1a10;         /* under the illustration, and where it runs out */
  --glow: rgba(255, 236, 205, 0.55);
  --gutter: clamp(16px, 5vw, 64px);
}

* { box-sizing: border-box; }
html { background: var(--ground); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font: 16px/1.6 "Inter", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--ink); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

[data-face="garamond"]    { font-family: "EB Garamond", Georgia, serif; }
[data-face="caveat"]      { font-family: "Caveat", cursive; }
[data-face="amatic"]      { font-family: "Amatic SC", sans-serif; }
[data-face="cedarville"]  { font-family: "Cedarville Cursive", cursive; }
[data-face="elite"]       { font-family: "Special Elite", monospace; }
[data-face="baskerville"] { font-family: "Libre Baskerville", Georgia, serif; }
[data-face="reenie"]      { font-family: "Reenie Beanie", cursive; }
[data-face="apple"]       { font-family: "Homemade Apple", cursive; }
[data-face="intermedium"] { font-family: "InterMedium", "Inter", sans-serif; }

/* --- The room ------------------------------------------------------------------------------ */

.backdrop { position: fixed; inset: 0; overflow: hidden; z-index: -2; background: var(--ground); }
.backdrop img { position: absolute; top: 0; left: 0; height: 100%; width: auto; max-width: none; transform-origin: 0 50%; will-change: transform; user-select: none; }
.backdrop .shade {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(40, 14, 6, 0.55), rgba(40, 14, 6, 0.38) 35%, rgba(40, 14, 6, 0.6));
  opacity: var(--shade, 0.35);
}

.thread { position: absolute; top: 0; left: 0; width: 100%; pointer-events: none; z-index: -1; overflow: visible; }
.thread path { fill: none; stroke: var(--ink); stroke-width: 1.1; stroke-linecap: round; opacity: 0.55; filter: drop-shadow(0 0 3px var(--glow)); }

/* --- The bar ------------------------------------------------------------------------------- */

.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  padding-top: max(14px, env(safe-area-inset-top));
  transition: background 0.5s ease, backdrop-filter 0.5s ease;
}
.bar.scrolled { background: rgba(48, 18, 8, 0.42); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.bar .home img { height: 26px; width: auto; display: block; opacity: 0; transition: opacity 0.6s ease; }
.bar.scrolled .home img { opacity: 0.95; }
.bar nav { display: flex; gap: clamp(14px, 3vw, 28px); font-size: 14px; letter-spacing: 0.01em; }
.bar nav a { text-decoration: none; color: var(--ink-quiet); transition: color 0.3s, text-shadow 0.3s; white-space: nowrap; }
.bar nav a:hover, .bar nav a:focus-visible { color: var(--ink); text-shadow: 0 0 12px var(--glow); outline: none; }
body.signed-in [data-signed-out], body:not(.signed-in) [data-signed-in] { display: none; }
@media (max-width: 520px) { .bar nav a[href="#trailer"] { display: none; } .bar .home img { height: 19px; } }

/* --- Ribbons ------------------------------------------------------------------------------- */
/* The element carries the words (for anyone without script) and the size; landing.js lays them
   on a curve in an SVG and writes them out a letter at a time, with the nib light at the head. */

.ribbon { position: relative; font-size: var(--size, clamp(34px, 6.2vw, 84px)); line-height: 1.1; color: var(--ink); }
.ribbon.laid { color: transparent; }
.ribbon svg { position: absolute; left: 0; top: 50%; overflow: visible; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(60, 20, 8, 0.45)) drop-shadow(0 0 10px rgba(255, 236, 205, 0.18)); }
.ribbon svg text { fill: var(--ink); }
.ribbon svg circle.nib { fill: #fffaf2; filter: blur(1.5px) drop-shadow(0 0 8px #fff3dc) drop-shadow(0 0 18px rgba(255, 220, 170, 0.9)); transition: opacity 0.8s ease; }

/* --- The intro ----------------------------------------------------------------------------- */

/* Composed to leave the figure with the pen standing clear: the arc, the mark and the
   wordmark sit above him, and the two lines flank the space where he stands. */
.intro { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-content: start; justify-content: center; justify-items: center; padding: clamp(68px, 10vh, 110px) var(--gutter) 64px; text-align: center; }
.intro .r-arc { --size: clamp(22px, 3vw, 44px); width: min(780px, 92vw); }
.intro .logo { display: grid; justify-items: center; gap: 10px; margin: 6px 0 4px; }
.intro .logo .mark { width: clamp(76px, 8.5vw, 120px); height: auto; opacity: 0; transform: scale(0.94); transition: opacity 1.4s ease 1.2s, transform 1.6s ease 1.2s; filter: drop-shadow(0 2px 8px rgba(60, 20, 8, 0.35)); }
.intro .logo .word {
  width: clamp(190px, 26vw, 380px); height: auto; filter: drop-shadow(0 2px 6px rgba(60, 20, 8, 0.4));
  /* Written on, left to right, the way the logotype was drawn. */
  -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 55%); mask-image: linear-gradient(90deg, #000 45%, transparent 55%);
  -webkit-mask-size: 240% 100%; mask-size: 240% 100%; -webkit-mask-position: 100% 0; mask-position: 100% 0;
  transition: -webkit-mask-position 2.2s cubic-bezier(.45, .05, .35, 1) 1.5s, mask-position 2.2s cubic-bezier(.45, .05, .35, 1) 1.5s;
}
.ready .intro .logo .mark { opacity: 1; transform: none; }
.ready .intro .logo .word { -webkit-mask-position: 0 0; mask-position: 0 0; }
.intro-lines { width: min(1180px, 96vw); display: grid; grid-template-columns: 1fr clamp(90px, 14vw, 220px) 1fr; align-items: center; margin-top: 0; }
.intro .r-small { --size: clamp(18px, 2.1vw, 30px); width: 100%; }
.intro .r-poetry { --size: clamp(30px, 3.8vw, 56px); width: 100%; grid-column: 3; }
@media (max-width: 640px) {
  .intro-lines { grid-template-columns: 1fr; gap: 0; }
  .intro .r-poetry { grid-column: 1; }
}

/* --- The trailer --------------------------------------------------------------------------- */

.trailer { padding: 12vh var(--gutter); display: grid; place-items: center; }
.screen {
  position: relative; width: min(1120px, 100%); aspect-ratio: 16 / 9; border: 0; padding: 0; margin: 0;
  border-radius: 6px; overflow: hidden; cursor: pointer; color: var(--ink); font: inherit;
  background: rgba(36, 12, 5, 0.62); backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 30px 80px rgba(30, 8, 2, 0.45);
  display: grid; place-content: center; justify-items: center; gap: 10px;
}
.screen .watch { position: relative; font: clamp(30px, 4.4vw, 58px)/1.1 "EB Garamond", Georgia, serif; transition: text-shadow 0.4s; }
.screen .note { font-size: 13px; color: var(--ink-quiet); letter-spacing: 0.02em; }
.screen:hover .watch, .screen:focus-visible .watch { text-shadow: 0 0 22px var(--glow); }
.screen:focus-visible { outline: 1px solid var(--ink-quiet); outline-offset: 6px; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.nib { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #fffaf2; margin-left: 0.18em; vertical-align: 0.1em;
  box-shadow: 0 0 8px #fff3dc, 0 0 22px rgba(255, 220, 170, 0.9); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.45; transform: scale(0.8); } }

/* --- The story ----------------------------------------------------------------------------- */

.beat { min-height: 92vh; padding: 14vh var(--gutter); display: grid; align-content: center; justify-items: start; max-width: 1240px; margin: 0 auto; }
.beat.right { justify-items: end; text-align: right; }
.beat .ribbon { width: min(900px, 100%); }
.beat p { max-width: 30em; margin: 18px 0 0; color: var(--ink-quiet); font-size: clamp(16px, 1.25vw, 18px); text-shadow: 0 1px 3px rgba(40, 12, 4, 0.6);
  opacity: 0; transform: translateY(8px); transition: opacity 1.2s ease 0.6s, transform 1.2s ease 0.6s; }
.beat.seen p { opacity: 1; transform: none; }
.beat .verse { --size: clamp(26px, 3.6vw, 48px); width: min(760px, 100%); margin-top: 10px; }
.beat p.attrib { margin-top: 6px; font-size: 13px; letter-spacing: 0.04em; }

/* The face bloom: the chooser made of specimens. The chosen face is the lit one. */
.bloom { position: relative; width: min(760px, 100%); aspect-ratio: 1.6; margin: 2vh auto 0; justify-self: center; }
.bloom span {
  position: absolute; left: 50%; top: 50%; white-space: nowrap; font-size: clamp(14px, 2vw, 25px);
  transform: translate(var(--ax, -50%), -50%) translate(var(--x, 0), var(--y, 0)) scale(0.9);
  opacity: 0; color: var(--ink-quiet); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .7, .2, 1), color 0.6s, text-shadow 0.6s;
  text-shadow: 0 1px 3px rgba(40, 12, 4, 0.5);
}
.bloom.open span { opacity: 0.62; transform: translate(var(--ax, -50%), -50%) translate(var(--x), var(--y)) scale(1); }
.bloom.open span.lit { opacity: 1; color: var(--ink); text-shadow: 0 0 16px var(--glow), 0 0 2px #fff; }
.bloom .nib { position: absolute; left: 50%; top: 50%; margin: -5px 0 0 -5px; width: 10px; height: 10px; }

/* A handwritten aside under a ribbon, smaller and looser. */
.beat .aside { --size: clamp(24px, 3vw, 40px); width: min(560px, 100%); margin-top: 4px; }

/* Screenshots and clips from the headset: honest captures, set in the room like prints on a
   wall. No frame chrome, no device mock-up - the picture and one line under it. */
.shot { width: min(820px, 100%); margin: 6vh 0 0; opacity: 0; transform: translateY(18px); transition: opacity 1.4s ease, transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.shot.seen { opacity: 1; transform: none; }
.shot .frame { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: rgba(30, 10, 4, 0.5); box-shadow: 0 24px 70px rgba(30, 8, 2, 0.5), 0 2px 8px rgba(30, 8, 2, 0.3); }
.shot img, .shot video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.shot figcaption { margin-top: 12px; font-size: 13px; letter-spacing: 0.02em; color: var(--ink-quiet); text-shadow: 0 1px 3px rgba(40, 12, 4, 0.6); }
.shot.demo .frame { display: grid; place-items: center; background: rgba(30, 10, 4, 0.35); outline: 1px dashed rgba(255, 244, 230, 0.4); outline-offset: -1px; }
.shot.demo .frame::after { content: attr(data-slot); font: 14px "Inter", sans-serif; letter-spacing: 0.08em; color: var(--ink-quiet); }

/* --- The close ----------------------------------------------------------------------------- */

.close { min-height: 80vh; padding: 14vh var(--gutter) 10vh; display: grid; align-content: center; justify-items: center; text-align: center; }
.close .ribbon { --size: clamp(26px, 4vw, 56px); width: min(1000px, 100%); }
.close p { max-width: 34em; color: var(--ink-quiet); margin: 22px 0 0; }
.close p.quiet { font-size: 14px; margin-top: 10px; }

footer { padding: 28px var(--gutter) max(28px, env(safe-area-inset-bottom)); text-align: center; font-size: 13px; color: var(--ink-quiet); background: linear-gradient(180deg, transparent, rgba(30, 10, 4, 0.55)); }
footer a { color: var(--ink-quiet); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nib { animation: none; }
  .intro .logo .mark, .intro .logo .word, .beat p, .bloom span, .shot { transition: none; }
}
