/* Demetria.xyz: one night in a dark house, from Vespers at dusk to Lauds at dawn. */

@font-face {
  font-family: "Vesper";
  src: url("../fonts/Vesper-Regular.woff") format("woff"), url("../fonts/Vesper-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --void: #060307; --ink: #0d070e; --plum: #23101f; --wine: #3f0a16; --ox: #5e0c1b;
  --blood: #8a1121; --crimson: #b0182b; --red: #d42a3a; --rose: #d9577f; --pink: #f07fa3;
  --blush: #f8afc6; --bone: #e8ddd0; --ivory: #fff6ea; --candle: #f7ad45; --gold: #c99a2e; --moon: #d9d3e6;
  --sky-a: #1c0811; --sky-b: #5e0c1b;
  --glass: rgba(35, 16, 31, .55); --glass-line: rgba(232, 221, 208, .09);
  --ease: cubic-bezier(.32, .08, .24, 1);      /* Apple's quick-out curve */
  --ease-soft: cubic-bezier(.52, .16, .24, 1);
  --r: 28px;
  --gutter: 16px;
  --sans: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
@media (min-width: 760px) { :root { --gutter: 40px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--void); color: var(--bone);
  font: 400 18px/1.6 var(--sans); overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { max-width: 100%; }
a { color: var(--pink); }
button { font: inherit; color: inherit; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
.vesper { font-family: "Vesper", Georgia, serif; font-weight: 400; -webkit-font-smoothing: none; letter-spacing: 0; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 12px; left: 12px; z-index: 100; background: var(--bone); color: var(--void); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

/* Vesper is crisp at multiples of 12px */
.h-xl { font-size: 48px; line-height: 1.15; margin: 0 0 16px; color: var(--ivory); text-shadow: 3px 3px 0 var(--blood); }
.h-l { font-size: 36px; line-height: 1.2; margin: 0 0 12px; color: var(--ivory); }
.h-m { font-size: 24px; line-height: 1.3; margin: 4px 0 10px; color: var(--ivory); }
@media (min-width: 760px) { .h-xl { font-size: 72px; } }
.eyebrow { font-size: 14px; letter-spacing: .18em; text-transform: uppercase; color: var(--rose); margin: 0 0 12px; font-weight: 700; }
.lede { font-size: 20px; max-width: 40em; color: rgba(232, 221, 208, .86); margin: 0 0 8px; }
@media (min-width: 760px) { .lede { font-size: 22px; } }
.small { font-size: 15px; color: rgba(232, 221, 208, .7); }
.center { text-align: center; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: 120px 0; }
.section-head { margin-bottom: 48px; }
.ink { color: var(--wine) !important; text-shadow: none !important; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 0; font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
  transition: transform .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-primary { background: var(--blood); color: var(--ivory); box-shadow: 0 0 0 1px rgba(255, 246, 234, .08) inset, 0 10px 30px -10px rgba(212, 42, 58, .6); }
.btn-ghost { background: rgba(232, 221, 208, .08); color: var(--bone); box-shadow: 0 0 0 1px var(--glass-line) inset; }
.btn-dark { background: var(--wine); color: var(--ivory); }
@media (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn-primary:hover { background: var(--crimson); }
  .btn-ghost:hover { background: rgba(232, 221, 208, .14); }
}
.btn:active { transform: scale(.97); }
.row-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 12px; }

/* ---------------------------------------------------------------- the threshold */
.gate {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: var(--void);
  transition: opacity 1s var(--ease) .5s, visibility 0s linear 1.5s;
}
.gate-inner { text-align: center; padding: 24px; }
.gate-symbol { width: min(70vw, 420px); overflow: visible; transform-origin: 50% 90%; transition: transform 1.5s cubic-bezier(.7, 0, .3, 1); }
.gate-symbol .d { fill: none; stroke: var(--bone); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s var(--ease) forwards; }
.gate-symbol .d0 { animation-delay: .2s; }
.gate-symbol .d1 { animation-delay: .7s; }
.gate-symbol .d2 { animation-delay: 1.1s; }
.gate-symbol .d3 { animation-delay: 1.4s; }
.gate-symbol .d4 { animation-delay: 1.6s; }
.gate-symbol .d5 { animation-delay: 1.75s; }
.gate-symbol .dot { fill: var(--candle); opacity: 0; animation: glow 2.4s ease-in-out 1.9s infinite; }
.gate-symbol .key { fill: var(--gold); stroke: var(--void); stroke-width: 1.6; opacity: 0; transform: translateY(-30px); animation: drop .7s cubic-bezier(.3, 1.6, .5, 1) 2.1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes drop { to { opacity: 1; transform: none; } }
@keyframes glow { 0%, 100% { opacity: .55; filter: drop-shadow(0 0 2px var(--candle)); } 50% { opacity: 1; filter: drop-shadow(0 0 6px var(--candle)); } }
.gate-count { display: flex; justify-content: center; gap: 14px; margin: 18px 0 8px; font: 700 14px var(--sans); letter-spacing: .1em; color: var(--rose); }
.gate-count span { opacity: 0; animation: drop .5s var(--ease) forwards; transform: translateY(6px); }
.gate-count span:nth-child(1) { animation-delay: 1.75s; } .gate-count span:nth-child(2) { animation-delay: 1.6s; }
.gate-count span:nth-child(3) { animation-delay: 1.4s; } .gate-count span:nth-child(4) { animation-delay: 1.1s; }
.gate-count span:nth-child(5) { animation-delay: .7s; } .gate-count span:nth-child(6) { animation-delay: .2s; }
.gate-title { font-size: 24px; color: var(--bone); margin: 18px 0 28px; opacity: 0; animation: drop .9s var(--ease) 2.5s forwards; }
@media (min-width: 760px) { .gate-title { font-size: 36px; } }
.gate-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; opacity: 0; animation: drop .9s var(--ease) 2.8s forwards; }
/* walking through the arch: the symbol grows until its centre fills the screen */
.gate.open { opacity: 0; visibility: hidden; pointer-events: none; }
.gate.open .gate-symbol { transform: scale(24); }
.gate.open .gate-title, .gate.open .gate-actions, .gate.open .gate-count { opacity: 0 !important; transition: opacity .3s; animation: none; }
.gate.gone { display: none; }

/* ---------------------------------------------------------------- the sky behind everything */
.sky { position: fixed; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--sky-a), var(--sky-b)); }
#embers { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.moon {
  position: absolute; width: 56px; height: 56px; left: 0; top: 0; border-radius: 50%;
  background: radial-gradient(circle at 38% 38%, var(--ivory), var(--moon) 55%, #a9a2bd);
  box-shadow: 0 0 40px 10px rgba(217, 211, 230, .22), 0 0 120px 40px rgba(217, 211, 230, .08);
  transform: translate(var(--mx, 10vw), var(--my, 20vh)); opacity: var(--mo, .9);
  -webkit-mask: radial-gradient(circle at 68% 34%, transparent 30%, #000 31%); mask: radial-gradient(circle at 68% 34%, transparent 30%, #000 31%);
}

/* ---------------------------------------------------------------- the nav: frosted glass */
.nav {
  position: fixed; z-index: 40; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; gap: 16px;
  padding: 0 var(--gutter); background: rgba(6, 3, 7, .55);
  -webkit-backdrop-filter: blur(15px) saturate(140%); backdrop-filter: blur(15px) saturate(140%);
  border-bottom: 1px solid var(--glass-line);
  transform: translateY(-100%); transition: transform .6s var(--ease);
}
.nav.show { transform: none; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ivory); flex: none; }
.nav-brand svg { width: 38px; height: 23px; }
.nav-brand span { font-size: 24px; }
.nav nav { flex: 1; min-width: 0; }
.nav-links { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; justify-content: center; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { display: block; padding: 6px 12px; border-radius: 999px; color: rgba(232, 221, 208, .78); text-decoration: none; font-size: 15px; white-space: nowrap; transition: background .3s, color .3s; }
.nav-links a.on { background: rgba(232, 221, 208, .12); color: var(--ivory); }
@media (pointer: fine) { .nav-links a:hover { color: var(--ivory); } }
.nav-hour { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--rose); white-space: nowrap; flex: none; }
.nav-progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--blood), var(--candle)); box-shadow: 0 0 10px var(--candle); }
@media (max-width: 759px) {
  .nav { height: auto; flex-wrap: wrap; padding-top: 8px; padding-bottom: 6px; gap: 4px 12px; }
  .nav-brand span { font-size: 24px; }
  .nav nav { order: 3; flex-basis: 100%; }
  .nav-links { justify-content: flex-start; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
  .nav-hour { margin-left: auto; font-size: 11px; }
}

/* ---------------------------------------------------------------- sticky, scroll-scrubbed scenes */
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* the hero: walk down the hallway towards her */
.hero { height: 220vh; position: relative; }
.hero .sticky { display: grid; place-items: center; }
.hero-art {
  position: absolute; left: 50%; top: 50%; height: min(88svh, 900px); aspect-ratio: 135 / 240;
  transform: translate(-50%, -50%) scale(calc(1 + var(--hp, 0) * .9)); transform-origin: 50% 40%;
  will-change: transform;
}
.hero-art img { width: 100%; height: 100%; display: block; filter: brightness(calc(1 - var(--hp, 0) * .55)); }
.hero-art::after { content: ""; position: absolute; inset: -1px; background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(6, 3, 7, .75) 75%, var(--void) 100%); pointer-events: none; }
/* the candle she's holding flickers */
.hero-candle { position: absolute; left: 50.5%; top: 51%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 173, 69, .55), rgba(247, 173, 69, .12) 40%, transparent 70%); mix-blend-mode: screen; animation: flicker 3.2s infinite; }
@keyframes flicker { 0%, 100% { opacity: .85; transform: translate(-50%, -50%) scale(1); } 20% { opacity: .65; } 40% { opacity: 1; transform: translate(-50%, -51%) scale(1.06); } 60% { opacity: .75; } 75% { opacity: .95; transform: translate(-50%, -50%) scale(.97); } }
/* your own candle: light follows the pointer */
.hero-light { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(circle 160px at var(--lx, 50%) var(--ly, 50%), rgba(247, 173, 69, .22), transparent 70%); mix-blend-mode: screen; }
@media (pointer: fine) { .hero:hover .hero-light { opacity: 1; } }
.hero-text {
  position: relative; z-index: 2; text-align: center; padding: 0 var(--gutter); margin-top: 32vh;
  opacity: calc(1 - var(--hp, 0) * 2.2); transform: translateY(calc(var(--hp, 0) * -60px));
}
.hero-text .eyebrow { color: var(--blush); text-shadow: 0 2px 12px var(--void); }
.hero-title { font-size: 72px; line-height: 1; margin: 0; color: var(--ivory); text-shadow: 4px 4px 0 var(--blood), 0 0 40px rgba(6, 3, 7, .9); }
@media (min-width: 760px) { .hero-title { font-size: 120px; } .hero-text { margin-top: 38vh; } }
/* on phones the name sits at the bottom, over a dark fade, so her face stays clear */
@media (max-width: 759px) {
  .hero .sticky { place-items: end center; }
  .hero-art { top: 44%; height: min(78svh, 620px); }
  .hero .sticky::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: linear-gradient(transparent, rgba(6, 3, 7, .92) 55%); pointer-events: none; }
  .hero-text { margin: 0 0 max(28px, env(safe-area-inset-bottom)); }
  .hero-sub { font-size: 16px; margin-bottom: 18px; }
  .scroll-hint { display: none; }
}
/* on wide screens she stands to the right and the name sits beside her */
@media (min-width: 1000px) {
  .hero-art { left: 70%; }
  .hero .sticky { place-items: center start; }
  .hero-text { margin: 0 0 0 max(var(--gutter), calc(50vw - 560px)); text-align: left; max-width: 640px; }
  .hero-actions { justify-content: flex-start; }
  .hero-sub { margin-left: 0; }
}
@media (min-width: 1690px) { .hero-title { font-size: 144px; } }
.tagline { color: var(--rose); font-size: 24px; margin: 14px 0 6px; text-shadow: 0 2px 10px var(--void); }
@media (min-width: 760px) { .tagline { font-size: 36px; } }
.hero-sub { margin: 0 auto 24px; max-width: 30em; text-shadow: 0 2px 10px var(--void); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.scroll-hint { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: rgba(232, 221, 208, .6); opacity: calc(1 - var(--hp, 0) * 6); }
.scroll-hint span::after { content: ""; display: block; width: 1px; height: 36px; margin: 10px auto 0; background: linear-gradient(var(--bone), transparent); animation: hint 2s var(--ease) infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* the statement lights up word by word */
.statement { height: 150vh; }
.statement .sticky { display: grid; place-items: center; padding: 0 var(--gutter); }
.statement-text { font: 700 34px/1.25 var(--sans); max-width: 22ch; margin: 0; letter-spacing: -.01em; }
@media (min-width: 760px) { .statement-text { font-size: 64px; } }
.statement-text .w { opacity: .14; transition: opacity .4s var(--ease), color .4s; }
.statement-text .w.lit { opacity: 1; }
.statement-text .w.glow { color: var(--rose); }

/* ---------------------------------------------------------------- tiles (the home screen of her) */
.bento { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(6, 1fr); gap: 20px; } }
.tile {
  position: relative; background: var(--glass); border-radius: var(--r); padding: 28px;
  box-shadow: 0 0 0 1px var(--glass-line) inset, 0 30px 60px -30px rgba(0, 0, 0, .8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow: hidden;
  transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .5s var(--ease);
}
.tile::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle 240px at var(--tx, 50%) var(--ty, 50%), rgba(255, 246, 234, .08), transparent 70%); }
@media (pointer: fine) { .tile.tilt:hover::before { opacity: 1; } }
.tile p { margin: 0 0 10px; }
.tile-label { font: 700 13px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rose); margin: 0 0 14px; }
@media (min-width: 760px) {
  .tile-hi { grid-column: span 6; }
  .tile-making { grid-column: span 3; } .tile-horror { grid-column: span 3; } .tile-mark { grid-column: span 3; }
  .tile-palette { grid-column: span 3; }
}
.tile-hi { display: grid; gap: 24px; align-items: center; background: linear-gradient(135deg, rgba(94, 12, 27, .55), rgba(35, 16, 31, .55)); }
@media (min-width: 760px) { .tile-hi { grid-template-columns: 220px 1fr; } }
.bust { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 22px; overflow: hidden; width: 100%; max-width: 256px; aspect-ratio: 1; box-shadow: 0 0 0 1px var(--glass-line); }
.bust img { width: 100%; height: 100%; display: block; transition: transform .6s var(--ease); }
@media (pointer: fine) { .bust:hover img { transform: scale(1.04); } }
.making { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 18px; }
.dot-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: rgba(217, 87, 127, .16); color: var(--rose); margin-right: 8px; font-family: "Vesper"; font-size: 24px; }
.faves { color: var(--blush); }
.mark-wrap { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; }
.mark-wrap img { width: 100%; height: 100%; display: block; border-radius: 18px; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.swatch { aspect-ratio: 1; border-radius: 16px; border: 0; cursor: pointer; position: relative; box-shadow: 0 0 0 1px var(--glass-line) inset; transition: transform .3s var(--ease); }
.swatch span { position: absolute; left: 8px; bottom: 6px; font-size: 11px; font-weight: 700; text-align: left; line-height: 1.2; }
@media (pointer: fine) { .swatch:hover { transform: scale(1.06); } }

/* ---------------------------------------------------------------- the album */
.album { display: grid; gap: 40px; }
@media (min-width: 1000px) { .album { grid-template-columns: minmax(320px, 440px) 1fr; gap: 64px; align-items: start; } .album-art { position: sticky; top: 96px; } }
.album-art { position: relative; }
.cover { position: relative; z-index: 2; width: 100%; height: auto; aspect-ratio: 1; display: block; border-radius: 10px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--glass-line); transition: transform .5s var(--ease); }
.playing .cover { transform: rotate(-2deg); }
/* a record slides out from behind the cover and spins while it plays */
.record { position: absolute; z-index: 1; top: 3%; left: 3%; width: 94%; aspect-ratio: 1; border-radius: 50%;
  background: repeating-radial-gradient(circle, #0b0709 0 2px, #1a1216 3px 4px); box-shadow: 0 0 0 2px #000; display: grid; place-items: center;
  transition: transform .8s var(--ease); }
.record img { width: 36%; border-radius: 50%; animation: spin 4s linear infinite paused; }
.playing .record { transform: translateX(16%) rotate(8deg); }
@media (max-width: 999px) { .playing .record { transform: translateX(10%); } }
.playing .record img { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.viz { display: block; width: 100%; height: 64px; margin: 24px 0 18px; image-rendering: pixelated; }
.album-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tracks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--glass-line); }
.track { border-bottom: 1px solid var(--glass-line); }
.track button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; width: 100%; padding: 14px 8px; cursor: pointer; border-radius: 14px; transition: background .3s; }
.track button:focus-visible { outline: 3px solid var(--rose); }
@media (pointer: fine) { .track button:hover { background: rgba(232, 221, 208, .06); } }
.track img { width: 56px; height: 56px; border-radius: 8px; }
.track .t-title { display: block; font-weight: 700; color: var(--ivory); font-size: 18px; }
.track .t-mood { display: block; font-size: 15px; color: rgba(232, 221, 208, .65); }
.track .t-num { font-family: "Vesper"; font-size: 24px; color: var(--rose); margin-right: 8px; -webkit-font-smoothing: none; }
.track .t-len { font-variant-numeric: tabular-nums; color: rgba(232, 221, 208, .6); font-size: 15px; text-align: right; }
.track .t-len a { display: block; font-size: 13px; color: var(--pink); margin-top: 2px; }
.track.bonus .t-num { color: var(--gold); }
.track.now button { background: rgba(138, 17, 33, .35); }
.track.now .t-title::after { content: " ♪"; color: var(--rose); }
.track-sep { padding: 22px 8px 8px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }

/* the mini player */
.mini {
  position: fixed; z-index: 45; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); width: min(560px, calc(100% - 24px));
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 22px;
  background: rgba(13, 7, 14, .72); -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 0 0 1px var(--glass-line) inset, 0 20px 50px -10px rgba(0, 0, 0, .8);
  transform: translate(-50%, 0); transition: transform .6s var(--ease), opacity .6s;
}
.mini[hidden] { display: flex; transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
.mini img { width: 48px; height: 48px; border-radius: 10px; flex: none; }
.mini-meta { flex: 1; min-width: 0; }
.mini-title { margin: 0; font-weight: 700; font-size: 16px; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-hour { margin: 0; font-size: 13px; color: var(--rose); }
.mini-seek { width: 100%; height: 4px; margin: 6px 0 0; accent-color: var(--rose); }
.icon-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; font-size: 16px; color: var(--bone); }
.icon-btn-big { width: 48px; height: 48px; background: var(--blood); color: var(--ivory); }
@media (pointer: fine) { .icon-btn:hover { background: rgba(232, 221, 208, .1); } .icon-btn-big:hover { background: var(--crimson); } }

/* ---------------------------------------------------------------- the symbol, drawn by scrolling */
.symbol-sec { height: 320vh; }
.symbol-stage { height: 100%; display: grid; place-items: center; align-content: center; gap: 24px; padding: 72px var(--gutter) 24px; text-align: center; }
.symbol-draw { width: min(92vw, 760px); overflow: visible; }
.symbol-draw .strokes > * { fill: none; stroke: var(--bone); stroke-width: 1.8; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--s, 0)); }
.symbol-draw .fills { opacity: var(--fill, 0); transition: opacity .2s; }
.sym-dot { fill: var(--ivory); opacity: var(--s, 0); }
.sym-key { fill: var(--gold); stroke: var(--void); stroke-width: 1.6; opacity: var(--kv, 0); transform: translateY(calc((1 - var(--kv, 0)) * -24px)); }
.sym-nums text { fill: var(--rose); font-family: "Vesper"; opacity: var(--s, 0); }
.symbol-copy .lede { margin: 0 auto; min-height: 2.6em; transition: opacity .3s; }
.symbol-more { padding-top: 40px; }
.symbol-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1000px) { .symbol-grid { grid-template-columns: 1fr 1.2fr; } }
.howto { margin: 0; }
.howto img { width: 100%; height: auto; border-radius: var(--r); box-shadow: 0 0 0 1px var(--glass-line); }
.howto figcaption { font-size: 14px; color: rgba(232, 221, 208, .6); margin-top: 10px; text-align: center; }

/* ---------------------------------------------------------------- segmented control */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(232, 221, 208, .07); box-shadow: 0 0 0 1px var(--glass-line) inset; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; cursor: pointer; white-space: nowrap; font-weight: 700; font-size: 15px; color: rgba(232, 221, 208, .7); transition: background .35s var(--ease), color .35s; }
.seg button[aria-selected="true"], .seg button[aria-checked="true"] { background: var(--bone); color: var(--void); }
.seg-small button { padding: 8px 14px; font-size: 14px; }

/* ---------------------------------------------------------------- wallpapers */
.walls { display: flex; gap: 28px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 40px var(--gutter) 32px; margin: 0 calc(var(--gutter) * -1); scrollbar-width: thin; align-items: flex-end; }
@media (min-width: 1180px) { .walls { margin: 0 calc((100vw - 1180px) / -2 - var(--gutter)); padding-left: calc((100vw - 1180px) / 2 + var(--gutter)); padding-right: calc((100vw - 1180px) / 2 + var(--gutter)); } }
.wall { flex: none; scroll-snap-align: center; text-align: center; text-decoration: none; color: var(--bone); animation: rise .7s var(--ease) both; }
.wall:nth-child(2) { animation-delay: .06s; } .wall:nth-child(3) { animation-delay: .12s; } .wall:nth-child(4) { animation-delay: .18s; } .wall:nth-child(5) { animation-delay: .24s; } .wall:nth-child(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.frame { position: relative; overflow: hidden; background: #000; transition: transform .5s var(--ease), box-shadow .5s var(--ease); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); }
.frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (pointer: fine) { .wall:hover .frame { transform: translateY(-8px); box-shadow: 0 40px 70px -20px rgba(138, 17, 33, .6); } }
.f-iphone { width: 220px; aspect-ratio: 1290 / 2796; border-radius: 34px; border: 7px solid #17121a; }
.f-ipad { width: 300px; aspect-ratio: 2048 / 2732; border-radius: 22px; border: 10px solid #17121a; }
.f-macbook, .f-macbook-16in { width: 440px; aspect-ratio: 2880 / 1864; border-radius: 12px 12px 0 0; border: 10px solid #17121a; border-bottom-width: 14px; }
.f-macbook-16in { aspect-ratio: 3456 / 2234; width: 480px; }
.f-apple-watch { width: 170px; aspect-ratio: 410 / 502; border-radius: 40px; border: 9px solid #17121a; }
@media (max-width: 759px) { .f-macbook, .f-macbook-16in { width: 300px; } .f-ipad { width: 240px; } .f-iphone { width: 190px; } }
.base { height: 10px; margin: 0 -24px; border-radius: 0 0 14px 14px; background: linear-gradient(#2b2430, #17121a); }
.lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding-top: 14%; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); pointer-events: none; }
.lock .ld { font-size: 11px; font-weight: 700; opacity: .9; }
.lock .lt { font-family: "Vesper"; font-size: 48px; line-height: 1.1; -webkit-font-smoothing: none; }
.f-apple-watch .lock { padding-top: 10%; } .f-apple-watch .lt { font-size: 36px; } .f-apple-watch .ld { display: none; }
.wall-name { display: block; margin-top: 16px; font-weight: 700; }
.wall-size { display: block; font-size: 13px; color: rgba(232, 221, 208, .6); }
.wall-dl { display: inline-block; margin-top: 8px; font-size: 14px; color: var(--pink); }

/* ---------------------------------------------------------------- the phone and its icons */
.icons-grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) { .icons-grid { grid-template-columns: auto 1fr; gap: 80px; } }
.phone-col { display: grid; place-items: center; }
.phone { width: min(340px, calc((100svh - 140px) * .4614)); min-width: 260px; max-width: 100%; aspect-ratio: 1290 / 2796; border-radius: 52px; padding: 10px; background: linear-gradient(145deg, #2e2632, #0f0b11); box-shadow: 0 0 0 1px #3a3040, 0 60px 100px -30px rgba(0, 0, 0, .95), 0 0 120px -20px rgba(138, 17, 33, .45); }
.phone-screen { position: relative; height: 100%; border-radius: 42px; overflow: hidden; background: url("../img/wall/sacred-heart-iphone.png") center / cover; image-rendering: pixelated; display: flex; flex-direction: column; }
.phone-status { display: flex; justify-content: space-between; padding: 14px 26px 0; font-size: 13px; font-weight: 700; color: #fff; }
.home { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; padding: 22px 16px; align-content: start; flex: 1; }
.dock { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 10px 12px; padding: 12px 10px; border-radius: 30px; background: rgba(255, 246, 234, .16); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.app { all: unset; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.app img { width: 100%; max-width: 58px; aspect-ratio: 1; border-radius: 23%; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); transition: transform .3s var(--ease); }
.app span { font-size: 10px; color: #fff; text-shadow: 0 1px 3px #000; white-space: nowrap; overflow: hidden; max-width: 64px; text-overflow: ellipsis; }
.dock .app span { display: none; }
.app:focus-visible img { outline: 3px solid var(--rose); }
@media (pointer: fine) { .app:hover img { transform: scale(1.1); } }
.app:active img { transform: scale(.9); }
.jiggling .app img { animation: jiggle .3s ease-in-out infinite alternate; }
.jiggling .app:nth-child(2n) img { animation-delay: -.15s; animation-duration: .27s; }
@keyframes jiggle { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }
.steps { padding-left: 1.3em; margin: 20px 0; } .steps li { margin-bottom: 6px; }

/* the bottom sheet */
.sheet { border: 0; padding: 32px 28px 28px; width: min(420px, calc(100% - 24px)); border-radius: 32px; text-align: center; color: var(--bone);
  background: rgba(13, 7, 14, .9); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); box-shadow: 0 0 0 1px var(--glass-line) inset, 0 40px 100px rgba(0, 0, 0, .8); }
.sheet::backdrop { background: rgba(6, 3, 7, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet .5s var(--ease); }
@keyframes sheet { from { opacity: 0; transform: translateY(40px) scale(.96); } }
.sheet-icon { width: 192px; height: 192px; border-radius: 23%; margin: 0 auto 16px; display: block; box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .9); }
.sheet-close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(232, 221, 208, .1); cursor: pointer; }
@media (max-width: 759px) { .sheet { margin: auto auto 0; border-radius: 32px 32px 0 0; width: 100%; max-width: 100%; padding-bottom: max(28px, env(safe-area-inset-bottom)); } @keyframes sheet { from { transform: translateY(100%); } } }

/* ---------------------------------------------------------------- tones */
.tone-groups { display: grid; gap: 20px; }
@media (min-width: 900px) { .tone-groups { grid-template-columns: repeat(3, 1fr); } }
.tone-group { background: var(--glass); border-radius: var(--r); padding: 22px; box-shadow: 0 0 0 1px var(--glass-line) inset; }
.tone-group h3 { margin: 0 0 8px; }
.tone { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--glass-line); }
.tone:first-of-type { border-top: 0; }
.tone-play { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; background: rgba(217, 87, 127, .15); color: var(--rose); font-size: 14px; }
.tone-play svg { position: absolute; inset: -3px; width: 50px; height: 50px; transform: rotate(-90deg); }
.tone-play circle { fill: none; stroke: var(--rose); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--tp, 0)); }
.tone.on .tone-play { background: var(--rose); color: var(--void); }
.tone-meta { flex: 1; min-width: 0; }
.tone-name { display: block; font-weight: 700; color: var(--ivory); }
.tone-len { font-size: 13px; color: rgba(232, 221, 208, .55); }
.tone-dl { font-size: 14px; font-weight: 700; text-decoration: none; padding: 6px 12px; border-radius: 999px; background: rgba(232, 221, 208, .07); }
.tone-bars { display: inline-flex; gap: 2px; height: 12px; align-items: flex-end; margin-left: 6px; vertical-align: middle; opacity: 0; }
.tone.on .tone-bars { opacity: 1; }
.tone-bars i { width: 3px; background: var(--rose); animation: bar .8s ease-in-out infinite alternate; }
.tone-bars i:nth-child(2) { animation-delay: -.3s; } .tone-bars i:nth-child(3) { animation-delay: -.55s; }
@keyframes bar { from { height: 3px; } to { height: 12px; } }
.howto-tones { margin: 28px 0; background: var(--glass); border-radius: 20px; padding: 0 22px; box-shadow: 0 0 0 1px var(--glass-line) inset; }
.howto-tones summary { cursor: pointer; padding: 18px 0; font-weight: 700; }
.howto-tones div { padding-bottom: 12px; }

/* ---------------------------------------------------------------- the font tester */
.tester { background: var(--glass); border-radius: var(--r); padding: 24px; box-shadow: 0 0 0 1px var(--glass-line) inset; margin-bottom: 24px; }
.tester input { width: 100%; font: 400 20px var(--sans); padding: 14px 18px; border-radius: 14px; border: 0; background: rgba(6, 3, 7, .6); color: var(--ivory); box-shadow: 0 0 0 1px var(--glass-line) inset; }
.tester-controls { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.tester-out { margin: 12px 0 0; font-size: var(--ts, 72px); line-height: 1.15; color: var(--tc, var(--bone)); overflow-wrap: anywhere; min-height: 1.2em; text-shadow: 3px 3px 0 var(--blood); transition: color .3s; }
.glyphs { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; margin-bottom: 32px; }
.glyphs span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: rgba(232, 221, 208, .05); font-size: 36px; color: var(--ivory); transition: background .3s, transform .3s var(--ease); }
@media (pointer: fine) { .glyphs span:hover { background: var(--blood); transform: scale(1.15); } }

/* ---------------------------------------------------------------- Lauds: the dawn */
.dawn { height: 240vh; }
.dawn .sticky { display: grid; place-items: start center; text-align: center; }
.sunrise { position: absolute; left: 50%; bottom: 4vh; width: min(92vw, 720px, 76vh); transform: translate(-50%, calc((1 - var(--dp, 0)) * 110%)); }
.sunrise svg { display: block; width: 100%; position: relative; }
.rays { position: absolute; left: 50%; top: 92%; width: 220%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; opacity: var(--dp, 0);
  background: repeating-conic-gradient(from 0deg, rgba(255, 246, 234, .22) 0deg 4deg, transparent 4deg 16deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 60%); mask: radial-gradient(circle, #000 15%, transparent 60%); animation: turn 60s linear infinite; }
@keyframes turn { to { transform: translate(-50%, -50%) rotate(360deg); } }
.dawn-lines { position: relative; z-index: 2; padding: 15vh var(--gutter) 0; }
.dawn-line { font-size: 36px; color: var(--ivory); margin: 0 0 12px; opacity: 0; transform: translateY(20px); transition: opacity 1s var(--ease), transform 1s var(--ease); text-shadow: 3px 3px 0 var(--blood); }
.dawn-line.lit { opacity: 1; transform: none; }
@media (min-width: 760px) { .dawn-line { font-size: 48px; } }
@media (min-width: 1165px) and (min-height: 900px) { .dawn-line { font-size: 72px; } }
.candles-sec { padding: 120px 0 140px; }
.candles { display: grid; grid-template-columns: repeat(8, 28px); justify-content: center; gap: 14px 18px; margin: 40px auto 16px; }
@media (min-width: 760px) { .candles { grid-template-columns: repeat(16, 28px); } }
.candle { position: relative; width: 28px; height: 52px; }
.candle::before { content: ""; position: absolute; left: 9px; bottom: 0; width: 10px; height: 30px; background: var(--ivory); box-shadow: inset -3px 0 0 #e1d2bf; }
.candle::after { content: ""; position: absolute; left: 11px; bottom: 30px; width: 6px; height: 10px; border-radius: 50% 50% 40% 40%; background: var(--candle); opacity: 0; transform: scale(0); transition: opacity .4s, transform .5s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 0 12px 4px rgba(247, 173, 69, .7), 0 -2px 0 1px #fff2c2 inset; }
.candle.lit::after { opacity: 1; transform: scale(1); animation: candle 1.8s ease-in-out infinite; }
.candle:nth-child(3n).lit::after { animation-delay: -.6s; } .candle:nth-child(5n).lit::after { animation-delay: -1.1s; }
@keyframes candle { 0%, 100% { transform: scale(1) skewX(0); } 30% { transform: scale(1.1, .92) skewX(4deg); } 60% { transform: scale(.94, 1.08) skewX(-3deg); } }
.count { font-size: 72px; margin: 8px 0 16px; line-height: 1; }
.finale { font-size: 36px; margin: 40px 0 0; opacity: 0; transform: translateY(20px); transition: opacity 1.4s var(--ease), transform 1.4s var(--ease); }
.finale.lit { opacity: 1; transform: none; }
@media (min-width: 760px) { .finale { font-size: 48px; } }
.candles-sec .lede { margin: 0 auto; }

/* ---------------------------------------------------------------- footer and toast */
.foot { padding: 80px 0 140px; background: var(--void); text-align: center; position: relative; }
.foot-sym { width: 120px; }
.foot-links { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.foot-links a { color: var(--bone); text-decoration: none; }
.toast { position: fixed; z-index: 70; top: 72px; left: 50%; transform: translate(-50%, -30px); opacity: 0; pointer-events: none; padding: 12px 20px; border-radius: 999px; max-width: calc(100% - 32px); text-align: center;
  background: rgba(13, 7, 14, .85); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 0 0 1px var(--glass-line) inset; transition: transform .5s var(--ease), opacity .5s; font-weight: 700; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* scroll reveals */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease-soft), transform 1s var(--ease-soft); }
.reveal.in { opacity: 1; transform: none; }
.tile.reveal.in { transform: perspective(900px) rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); }

/* the hidden window */
body.pride .sky { background: linear-gradient(180deg, #2a1830, #5bcefa22), linear-gradient(180deg, var(--sky-a), var(--sky-b)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero, .statement, .symbol-sec, .dawn { height: auto; }
  .sticky { position: relative; height: auto; min-height: 100svh; }
  .statement-text .w { opacity: 1; }
  .gate-symbol .key, .gate-title, .gate-actions, .gate-count span { opacity: 1; transform: none; }
}
.howto img + img { margin-top: 16px; }
