/* The Olympus Secrets - the game's own site.
   The palette, the letters and the cut-cornered frames are the game's; so are
   its four moods. Each section names its mood (data-mood) and the page takes on
   its colours as the section comes into view, as the game's screen does when
   the story turns (js/site.js). */

@font-face { font-family: "Cinzel"; src: url("../assets/fonts/Cinzel.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("../assets/fonts/EBGaramond.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "EB Garamond"; font-style: italic; src: url("../assets/fonts/EBGaramond-Italic.ttf") format("truetype"); font-display: swap; }

/* Registered, so the colours blend from one mood to the next instead of jumping. */
@property --void   { syntax: "<color>"; inherits: true; initial-value: #05040A; }
@property --night  { syntax: "<color>"; inherits: true; initial-value: #090713; }
@property --deep   { syntax: "<color>"; inherits: true; initial-value: #171027; }
@property --plum   { syntax: "<color>"; inherits: true; initial-value: #2A1942; }
@property --edge   { syntax: "<color>"; inherits: true; initial-value: #33244a; }
@property --text   { syntax: "<color>"; inherits: true; initial-value: #DDD5E5; }
@property --soft   { syntax: "<color>"; inherits: true; initial-value: #c9c0d6; }
@property --muted  { syntax: "<color>"; inherits: true; initial-value: #92879E; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #8B62B5; }
@property --bright { syntax: "<color>"; inherits: true; initial-value: #b596e2; }

:root {
  --serif: "EB Garamond", Georgia, serif;
  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --gutter: clamp(16px, 4vw, 48px);
  --wide: 1180px;
  --cut: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  transition: --void 1.1s var(--ease), --night 1.1s var(--ease), --deep 1.1s var(--ease),
              --plum 1.1s var(--ease), --edge 1.1s var(--ease), --text 1.1s var(--ease),
              --soft 1.1s var(--ease), --muted 1.1s var(--ease), --accent 1.1s var(--ease),
              --bright 1.1s var(--ease);
  color-scheme: dark;
}

/* The four moods, as in the game (web/style.css). Peace is the default. */
:root, :root[data-mood="peace"] {
  --void: #05040A; --night: #090713; --deep: #171027; --plum: #2A1942; --edge: #33244a;
  --text: #DDD5E5; --soft: #c9c0d6; --muted: #92879E; --accent: #8B62B5; --bright: #b596e2;
}
:root[data-mood="investigation"] {
  --void: #04060d; --night: #070b14; --deep: #0d1526; --plum: #16243a; --edge: #26405e;
  --text: #dde7f1; --soft: #c3d0dd; --muted: #8598a8; --accent: #5f9dc2; --bright: #9ed3ec;
}
:root[data-mood="danger"] {
  --void: #080606; --night: #120c0d; --deep: #1d1213; --plum: #2e1618; --edge: #6d2529;
  --text: #f0e0df; --soft: #dcc7c6; --muted: #a58c8c; --accent: #c9454c; --bright: #ff8d90;
}
:root[data-mood="divine"] {
  --void: #090704; --night: #14100a; --deep: #1d1710; --plum: #2e2413; --edge: #7a5f2a;
  --text: #f6efdd; --soft: #e2d6ba; --muted: #a8977a; --accent: #d5b25f; --bright: #f4d98d;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 400 clamp(17px, 1.05vw + 12px, 20px)/1.65 var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--bright); text-decoration-color: color-mix(in srgb, var(--bright) 40%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--bright); }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--void); }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--deep); padding: 8px 14px; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ type */
.eyebrow {
  font: 600 0.78rem/1 var(--display);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.08em; margin: 0; line-height: 1.15; }
h2 { font-size: clamp(2rem, 3.6vw + 0.6rem, 3.6rem); color: var(--text); }
h3 { font-size: clamp(1.1rem, 0.6vw + 0.9rem, 1.35rem); letter-spacing: 0.12em; color: var(--bright); }
.lede { font-size: clamp(1.1rem, 0.8vw + 0.85rem, 1.45rem); color: var(--soft); max-width: 46ch; margin: 22px 0 0; }
em { color: var(--bright); }

/* the game's divider: a hairline with a diamond in its middle */
.divider { display: flex; align-items: center; gap: 14px; color: var(--accent); margin: 26px 0; max-width: 420px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, currentColor, transparent); opacity: .7; }
.divider i { width: 9px; height: 9px; border: 1px solid currentColor; transform: rotate(45deg); }
.center .divider { margin-inline: auto; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ------------------------------------------------------------- the frame */
/* The game's panels: a box with its corners cut, a thin outer line. */
.frame {
  position: relative;
  padding: clamp(20px, 2.4vw, 32px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--deep) 88%, transparent), color-mix(in srgb, var(--night) 92%, transparent));
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                     calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.frame::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--edge);
  clip-path: inherit;
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  padding: 1px;
}

/* ---------------------------------------------------------------- header */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  transition: background .4s, backdrop-filter .4s, padding .4s;
}
/* Three columns, the outer two of equal width: the links sit in the true middle,
   not pushed right by the wider brand. */
.nav { display: grid; grid-template-columns: 1fr auto 1fr; }
.nav-end { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 10px; }

/* The download card: the app's own icon, large and sharp. */
#get .app-card-icon {
  width: clamp(120px, 30vw, 168px); height: auto; aspect-ratio: 1; border-radius: 23%;
  display: block; margin: 0 auto 26px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 70px -24px #000,
              0 0 90px -20px color-mix(in srgb, var(--accent) 75%, transparent);
  animation: icon-float 6s ease-in-out infinite;
}
@keyframes icon-float { 50% { transform: translateY(-8px); } }
#get h2 { margin-bottom: 10px; }
.app-card-meta { color: var(--muted); font: 400 .78rem/1.4 var(--display); letter-spacing: .2em; text-transform: uppercase; margin: 0 0 28px; }
@media (prefers-reduced-motion: reduce) { #get .app-card-icon { animation: none; } }

.nav.solid {
  background: color-mix(in srgb, var(--void) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  padding-block: 10px;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--edge) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 34px; height: 34px; border-radius: 50%; }
.brand span { font: 400 0.82rem/1.1 var(--display); letter-spacing: 0.22em; }
.nav ul { list-style: none; display: flex; gap: clamp(12px, 2vw, 28px); margin: 0; padding: 0; }
.nav a.link {
  font: 400 0.74rem/1 var(--display); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--soft); text-decoration: none; padding: 6px 0; position: relative;
}
.nav a.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--accent); transform: scaleX(0); transition: transform .35s var(--ease);
}
.nav a.link:hover::after, .nav a.link.here::after { transform: scaleX(1); }
.nav a.link.here { color: var(--bright); }
.lang {
  font: 400 0.72rem/1 var(--display); letter-spacing: 0.2em; color: var(--soft);
  background: transparent; border: 1px solid var(--edge); padding: 8px 12px; cursor: pointer;
}
.lang:hover { color: var(--bright); border-color: var(--accent); }
.nav-end { display: flex; align-items: center; gap: 14px; }
.menu-toggle { display: none; }

/* the reading line at the very top */
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 60; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
              background: linear-gradient(90deg, var(--accent), var(--bright)); }

/* --------------------------------------------------------------- buttons */
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.center .cta { justify-content: center; }
.button {
  --cut: 9px;
  display: inline-flex; align-items: center; gap: 12px;
  font: 400 0.82rem/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
  padding: 16px 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--plum) 90%, transparent), color-mix(in srgb, var(--deep) 95%, transparent));
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)),
                     calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
  box-shadow: inset 0 0 0 1px var(--edge);
  transition: transform .3s var(--ease), box-shadow .3s, color .3s;
}
.button:hover { transform: translateY(-2px); color: var(--bright); box-shadow: inset 0 0 0 1px var(--accent), 0 10px 40px -12px var(--accent); }
/* Google Play's own badge, untouched, with the game's icon beside it. */
.store { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; border-radius: 12px;
         transition: transform .3s var(--ease), filter .3s; }
.store:hover { transform: translateY(-2px); filter: drop-shadow(0 10px 24px color-mix(in srgb, var(--accent) 45%, transparent)); }
.store-icon { width: 54px; height: 54px; border-radius: 23%; box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 8px 24px -8px #000; }
.play-pill {
  display: inline-flex; align-items: center; gap: 12px; height: 54px; padding: 0 22px 0 18px;
  border-radius: 14px; color: #fff;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  border: 1px solid color-mix(in srgb, var(--accent) 45%, rgba(255,255,255,.12));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 30px -14px #000;
  transition: border-color .3s, background .3s;
}
.store:hover .play-pill { border-color: var(--accent); background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05)); }
.play-logo { width: 24px; height: 26px; flex: none; }
.play-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left;
             font-family: "Google Sans", "Product Sans", Roboto, "Segoe UI", system-ui, sans-serif; }
.play-text small { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.play-text b { font-size: 1.12rem; font-weight: 500; letter-spacing: -.005em; }
.button.play { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--deep))); color: var(--void); box-shadow: none; }
.button.play:hover { color: var(--void); box-shadow: 0 12px 44px -10px var(--accent); }
.button svg { width: 20px; height: 20px; flex: none; }
.button small { display: block; font: italic 400 0.78rem/1.1 var(--serif); letter-spacing: 0.02em; text-transform: none; opacity: .85; }
.button .two { display: flex; flex-direction: column; gap: 4px; text-align: left; }

/* -------------------------------------------------------------- sections */
section { position: relative; padding: clamp(96px, 12vw, 170px) var(--gutter); }
/* tilted phones and their glow never widen the page (clip keeps the story's sticky film working) */
main > section:not(.story) { overflow-x: clip; }
.inner { max-width: var(--wide); margin: 0 auto; position: relative; }
.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.split.flip > :first-child { order: 2; }
.split > * { min-width: 0; }

/* things that rise into place as they come into view */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ hero */
.hero { min-height: 100svh; display: grid; place-items: center; padding-top: 120px; overflow: hidden; isolation: isolate; }
.hero-bg {
  position: absolute; inset: -6% -2% -2%; z-index: -2;
  background: url("../assets/img/title-bg.webp") center 30% / cover no-repeat;
  transform: translate3d(0, calc(var(--hero-shift, 0) * 1px), 0) scale(1.06);
  will-change: transform;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse at 50% 38%, transparent 0 25%, color-mix(in srgb, var(--void) 70%, transparent) 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--void) 35%, transparent) 0%, transparent 30%, var(--void) 96%);
}
#feathers { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.title-mark { text-align: center; }
.title-mark .the { font: 400 clamp(1rem, 1.2vw + 0.6rem, 1.5rem)/1 var(--display); letter-spacing: 0.6em; color: var(--soft); display: flex; align-items: center; justify-content: center; gap: 22px; }
.title-mark .the::before, .title-mark .the::after { content: ""; width: clamp(40px, 12vw, 160px); height: 1px; background: linear-gradient(90deg, transparent, var(--accent)); }
.title-mark .the::after { transform: scaleX(-1); }
.title-mark h1 {
  font-size: clamp(2.4rem, 7.2vw, 6.2rem);
  letter-spacing: 0.1em;
  margin-top: 16px;
  background: linear-gradient(180deg, #f4ecff 0%, var(--bright) 55%, var(--accent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 32px color-mix(in srgb, var(--accent) 45%, transparent));
}
.title-mark .divider { margin: 22px auto 0; max-width: 520px; }
.hero .lede { margin: 26px auto 0; text-align: center; max-width: 40ch; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 400 0.66rem/1 var(--display); letter-spacing: 0.34em; color: var(--muted); text-decoration: none;
}
.scroll-cue i { width: 1px; height: 46px; background: linear-gradient(var(--accent), transparent); animation: drip 2.4s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* -------------------------------------------------------------- the story */
/* A tall section; its film stays pinned while the page scrolls through it. */
.story { padding: 0; height: 620vh; }
.story-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #000; }
.story-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, var(--void) 0%, transparent 18%, transparent 62%, color-mix(in srgb, var(--void) 92%, transparent) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, color-mix(in srgb, var(--void) 55%, transparent) 100%);
}
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; mix-blend-mode: screen; }
.chapter {
  position: absolute; left: 0; right: 0; bottom: clamp(56px, 12vh, 140px); z-index: 2;
  padding: 0 var(--gutter); text-align: center;
  opacity: 0; transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  pointer-events: none;
}
.chapter.on { opacity: 1; transform: none; }
.chapter .numeral { font: 400 0.74rem/1 var(--display); letter-spacing: 0.4em; color: var(--accent); }
.chapter p {
  font: italic 400 clamp(1.4rem, 2.4vw + 0.7rem, 2.6rem)/1.3 var(--serif);
  color: #fff; max-width: 30ch; margin: 14px auto 0;
  text-shadow: 0 2px 30px rgba(0, 0, 0, .9), 0 0 2px rgba(0, 0, 0, .8);
}
.story-meter { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); z-index: 3; display: grid; gap: 14px; }
.story-meter b { width: 8px; height: 8px; border: 1px solid var(--accent); transform: rotate(45deg); transition: background .4s, box-shadow .4s; }
.story-meter b.on { background: var(--bright); box-shadow: 0 0 14px var(--bright); }
.story-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 400 .7rem/1 var(--display); letter-spacing: .3em; color: var(--muted); }

/* ------------------------------------------------------------- features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.feature img { width: 34px; height: 34px; margin-bottom: 18px; opacity: .9; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 60%, transparent)); }
.feature p { color: var(--soft); margin: 12px 0 0; font-size: 1rem; }
.feature { transition: transform .4s var(--ease); }
.feature:hover { transform: translateY(-4px); }

/* the five acts */
.acts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 64px; position: relative; }
.acts::before { content: ""; position: absolute; left: 10%; right: 10%; top: 22px; height: 1px; background: linear-gradient(90deg, transparent, var(--edge), var(--accent), var(--edge), transparent); }
.act { text-align: center; padding: 0 8px; }
.act b { display: grid; place-items: center; margin: 0 auto 18px; width: 44px; height: 44px; font: 400 .9rem/1 var(--display); color: var(--bright); background: var(--void); border: 1px solid var(--accent); transform: rotate(45deg); }
.act b span { transform: rotate(-45deg); }
.act h3 { font-size: .86rem; letter-spacing: .14em; }
.act p { font-size: .92rem; color: var(--muted); margin: 8px 0 0; }
.act.sealed h3 { color: var(--muted); filter: blur(0.4px); }

/* ---------------------------------------------------------------- phones */
.phone {
  position: relative; width: min(300px, 70vw); aspect-ratio: 9 / 19.5;
  border-radius: 38px; padding: 10px;
  background: linear-gradient(145deg, #2a2433, #0b090f 60%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 40px 90px -30px #000,
              0 0 120px -40px color-mix(in srgb, var(--accent) 70%, transparent);
}
.phone::before { content: ""; position: absolute; top: 18px; left: 50%; width: 9px; height: 9px; border-radius: 50%; transform: translateX(-50%); background: #000; z-index: 2; box-shadow: 0 0 0 2px #1b1720; }
/* The whole game screen, never cut: shown entire, with the game's own night above
   and below it, so the rounded corners fall on that and not on the picture. */
.phone img { width: 100%; height: 100%; box-sizing: border-box; padding: 16px 0;
             object-fit: contain; object-position: center; border-radius: 28px; background: #06050b; }
.phone-pair { display: flex; justify-content: center; align-items: center; }
.phone-pair .phone:last-child { margin-left: -60px; transform: translateY(60px) rotate(4deg); }
.phone-pair .phone:first-child { transform: rotate(-3deg); z-index: 1; }

/* the four moods, side by side */
.moods { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 26px); margin-top: 60px; }
.mood { cursor: pointer; text-align: center; background: none; border: 0; color: inherit; font: inherit; padding: 0; }
.mood .phone { width: 100%; transition: transform .5s var(--ease), box-shadow .5s; }
.mood:hover .phone, .mood:focus-visible .phone, .mood.on .phone { transform: translateY(-10px); }
.mood h3 { margin-top: 22px; font-size: .9rem; }
.mood p { font-size: .92rem; color: var(--muted); margin: 6px 0 0; }
.mood .swatch { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.mood .swatch i { width: 14px; height: 14px; transform: rotate(45deg); border: 1px solid rgba(255, 255, 255, .15); }

/* the gallery: a strip that scrolls sideways, each phone snapping into place */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 280px); gap: 34px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 50px var(--gutter) 60px; margin: 30px calc(var(--gutter) * -1) 0;
  scrollbar-width: thin; scrollbar-color: var(--accent) transparent;
  cursor: grab;
}
.gallery.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery figure { margin: 0; scroll-snap-align: center; }
.gallery .phone { width: 100%; }
.gallery figcaption { margin-top: 18px; text-align: center; font: italic 400 1rem/1.4 var(--serif); color: var(--soft); }
.gallery-nav { display: flex; gap: 10px; justify-content: flex-end; }
.gallery-nav button { --cut: 7px; width: 46px; height: 46px; color: var(--text); background: var(--deep); border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.gallery-nav button:hover { color: var(--bright); box-shadow: inset 0 0 0 1px var(--accent); }
.gallery-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.gallery-head > div { min-width: 0; }
h2 { overflow-wrap: break-word; }

/* the lightbox */
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100vw; height: 100svh; }
dialog.lightbox::backdrop { background: color-mix(in srgb, var(--void) 92%, transparent); backdrop-filter: blur(8px); }
dialog.lightbox img { height: min(88svh, 900px); width: auto; margin: 6svh auto 0; border-radius: 26px; box-shadow: 0 30px 120px -20px var(--accent); }
dialog.lightbox button { position: fixed; top: 18px; right: 22px; background: none; border: 0; color: var(--text); font: 400 2rem/1 var(--display); cursor: pointer; }

/* ---------------------------------------------------------------- learn */
.levels { display: flex; gap: 10px; flex-wrap: wrap; margin: 30px 0 0; }
.levels span { --cut: 6px; font: 400 .9rem/1 var(--display); letter-spacing: .14em; padding: 12px 16px; color: var(--soft); background: var(--deep); box-shadow: inset 0 0 0 1px var(--edge);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.levels span.on { color: var(--void); background: var(--accent); box-shadow: none; }
.points { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 18px; }
.points li { display: grid; grid-template-columns: 30px 1fr; gap: 14px; color: var(--soft); }
.points li::before { content: ""; width: 9px; height: 9px; margin: 11px 0 0 8px; border: 1px solid var(--accent); transform: rotate(45deg); }
.points b { color: var(--text); font-weight: 600; }
.word-demo { margin-top: 30px; max-width: 460px; }
.word-demo .w { font: 400 1.2rem/1 var(--display); letter-spacing: .14em; color: var(--bright); }
.word-demo .ctx { float: right; font: italic .95rem/1 var(--serif); color: var(--muted); }
.word-demo p { margin: 12px 0 0; color: var(--soft); }
.word-demo .tr { border-top: 1px solid var(--edge); margin-top: 14px; padding-top: 12px; }
.word-demo .tr b { font: 400 .8rem/1 var(--display); letter-spacing: .2em; color: var(--accent); margin-right: 12px; }

/* ------------------------------------------------------------- endings */
.endings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 56px; }
.ending { text-align: center; padding-block: 44px; }
.ending .seal { width: 54px; height: 54px; margin: 0 auto 22px; display: grid; place-items: center; border: 1px solid var(--accent); transform: rotate(45deg); }
.ending .seal span { transform: rotate(-45deg); font: 400 1.2rem/1 var(--display); color: var(--bright); }
.ending p { color: var(--soft); margin: 14px 0 0; font-style: italic; }
.ending.sealed h3 { color: var(--muted); letter-spacing: .4em; }
.fallen { margin-top: 60px; }

/* --------------------------------------------------------------- engine */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
.stat { text-align: center; }
.stat b { display: block; font: 400 clamp(2.4rem, 4vw, 3.6rem)/1 var(--display); color: var(--bright); }
.stat span { display: block; margin-top: 10px; font: 400 .74rem/1.3 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.engine { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.engine p { color: var(--soft); font-size: 1rem; margin: 12px 0 0; }

/* -------------------------------------------------------------- contact */
.studio { font: 400 clamp(2rem, 4vw, 3.2rem)/1 var(--display); letter-spacing: .16em; color: var(--text); }
.studio span { color: var(--accent); }
.motto { font: italic 400 clamp(1.1rem, 1vw + .8rem, 1.4rem)/1.3 var(--serif); color: var(--soft); margin: 16px 0 0; }
.presents { font: 400 .9rem/1 var(--display); letter-spacing: .3em; padding-left: .3em; color: var(--muted); margin: 0 0 26px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; text-align: left; }
.contact-grid p { color: var(--soft); margin: 10px 0 0; font-size: 1rem; }

footer {
  padding: 40px var(--gutter) 50px; border-top: 1px solid color-mix(in srgb, var(--edge) 70%, transparent);
  display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; align-items: center;
  font-size: .92rem; color: var(--muted);
}
footer nav { display: flex; gap: 22px; }
footer a { color: var(--soft); }

/* ---------------------------------------------------------- the privacy page */
.doc { max-width: 760px; margin: 0 auto; padding: 140px var(--gutter) 90px; }
.doc h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.doc h2 { font-size: 1.15rem; letter-spacing: .14em; color: var(--bright); margin-top: 2.2em; }
.doc p, .doc li { color: var(--soft); }
.doc .date { font-style: italic; color: var(--muted); }
.doc hr { border: 0; height: 1px; background: var(--edge); margin: 70px 0; }

/* ---------------------------------------------------------- small screens */
@media (max-width: 980px) {
  .split, .split.flip { grid-template-columns: 1fr; }
  .split.flip > :first-child { order: 0; }
  .features, .engine, .contact-grid { grid-template-columns: 1fr 1fr; }
  .moods { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .acts { grid-template-columns: 1fr; gap: 26px; text-align: left; }
  .acts::before { left: 21px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; background: linear-gradient(180deg, transparent, var(--accent), transparent); }
  .act { display: grid; grid-template-columns: 60px 1fr; text-align: left; align-items: center; }
  .act { padding: 0; }
  .act b { margin: 0; }
  .acts::before { left: 22px; }          /* through the diamonds' middles */
  .gallery-nav { display: none; }        /* a finger swipes; no arrows on a phone */
}
@media (max-width: 760px) {
  .nav ul { position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: center; gap: 30px;
            background: color-mix(in srgb, var(--void) 96%, transparent); backdrop-filter: blur(10px);
            opacity: 0; pointer-events: none; transition: opacity .35s; }
  .nav.open ul { opacity: 1; pointer-events: auto; }
  .nav a.link { font-size: 1rem; }
  .menu-toggle { display: grid; gap: 6px; width: 40px; height: 40px; place-content: center; background: none; border: 0; cursor: pointer; z-index: 2; }
  .menu-toggle i { width: 22px; height: 1px; background: var(--text); transition: transform .3s; }
  .nav.open .menu-toggle i:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.open .menu-toggle i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .brand span { display: none; }
  .features, .engine, .contact-grid, .endings { grid-template-columns: 1fr; }
  .phone-pair .phone { width: 200px; }
  h2 { font-size: 1.75rem; letter-spacing: 0.05em; }
  .nav ul { width: 100vw; }
  .phone-pair .phone { width: min(190px, 47vw); }
  .phone-pair .phone:last-child { margin-left: -16vw; transform: translateY(40px) rotate(4deg); }
  /* One phone alone is both first and last: it stands in the middle, only tilted. */
  .phone-pair .phone:only-child { margin-left: 0; width: min(230px, 62vw); transform: rotate(-3deg); }
  .story-meter { display: none; }
  /* On a phone the three sealed endings sit in one compact column. */
  .endings { gap: 12px; margin-top: 34px; }
  .ending { display: grid; grid-template-columns: 46px 1fr; align-items: center; column-gap: 18px;
            text-align: left; padding: 18px 20px; }
  .ending .seal { grid-row: span 2; width: 34px; height: 34px; margin: 0 auto; }
  .ending .seal span { font-size: .95rem; }
  .ending h3 { margin: 0; font-size: .95rem; }
  .ending p { margin: 4px 0 0; }
  .gallery .phone, .mood .phone { border-radius: 30px; }
  .gallery .phone img, .mood .phone img { border-radius: 22px; padding: 12px 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue i { animation: none; }
  :root { transition: none; }
}

/* the studio's name leads to darqalne.com */
a.studio { display: inline-block; text-decoration: none; transition: opacity .3s; }
a.studio:hover { opacity: .8; }
.presents a, .studio-link { color: inherit; text-decoration: none; }
.presents a:hover, .studio-link:hover { color: var(--bright); }
