/* FOLD: Lumi's Paper World — foldgame.app
   Plain CSS, no build step. Colours follow the game palette. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Game palette */
  --blue: #4DA9F5;
  --pink: #F26BAA;
  --gold: #F5BE54;
  --green: #67CFA6;
  --violet: #A18AF2;

  /* Light theme */
  --bg: #F8F7FA;
  --bg-soft: #F1EEF7;
  --surface: rgba(255, 255, 255, 0.74);
  --surface-solid: #FFFFFF;
  --ink: #2C2D43;
  --text: #42435A;
  --muted: #5C5D76;
  --line: rgba(66, 67, 90, 0.14);
  --line-strong: rgba(66, 67, 90, 0.26);
  --link: #1D5FA8;
  --accent: #6048BF;
  --accent-strong: #4B36A6;
  --focus: #1D5FA8;
  --sky: linear-gradient(180deg, #EAE4F5 0%, #F6DCE8 56%, #F8E2CF 100%);
  --sky-top: #EAE4F5;
  --btn-bg: #33344B;
  --btn-bg-hover: #23243A;
  --btn-ink: #FFFFFF;
  --paper: #FFFBF7;
  --paper-back: #F3E3F0;
  --paper-line: rgba(66, 67, 90, 0.13);
  --frame: rgba(66, 67, 90, 0.26);
  --shadow-s: 0 1px 2px rgba(66, 67, 90, 0.06), 0 6px 18px -8px rgba(66, 67, 90, 0.18);
  --shadow-m: 0 2px 4px rgba(66, 67, 90, 0.05), 0 22px 48px -22px rgba(66, 67, 90, 0.34);
  --orb-opacity: 0.45;
  --cloud: rgba(255, 255, 255, 0.55);
  --ghost: rgba(255, 255, 255, 0.24);

  /* Origami shading */
  --o-1: #F4F2F7;
  --o-2: #E2DCEC;
  --o-3: #CFC4E0;
  --o-4: #A99DB8;
  --o-5: #8F849F;

  --r-s: 12px;
  --r-m: 20px;
  --r-l: 28px;
  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14142A;
    --bg-soft: #1A1A35;
    --surface: rgba(255, 255, 255, 0.06);
    --surface-solid: #1F1F3D;
    --ink: #F6F3FF;
    --text: #DEDAEF;
    --muted: #B1AECB;
    --line: rgba(237, 234, 247, 0.14);
    --line-strong: rgba(237, 234, 247, 0.3);
    --link: #9CCBFF;
    --accent: #C6B8FF;
    --accent-strong: #D2C6FF;
    --focus: #BFE6FF;
    --sky: linear-gradient(180deg, #14142A 0%, #22213F 56%, #342E52 100%);
    --sky-top: #14142A;
    --btn-bg: #EDEAF7;
    --btn-bg-hover: #FFFFFF;
    --btn-ink: #1B1B36;
    --paper: #F4F1FF;
    --paper-back: #D9D2F2;
    --paper-line: rgba(40, 40, 70, 0.16);
    --frame: rgba(237, 234, 247, 0.34);
    --shadow-s: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px -8px rgba(0, 0, 0, 0.5);
    --shadow-m: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 54px -22px rgba(0, 0, 0, 0.7);
    --orb-opacity: 0.26;
    --cloud: rgba(237, 234, 247, 0.12);
    --ghost: rgba(237, 234, 247, 0.07);

    --o-1: #F4F1FF;
    --o-2: #DCD5F2;
    --o-3: #BDB2E0;
    --o-4: #8D82B5;
    --o-5: #6F6599;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

main { flex: 1 0 auto; }

img, svg { max-width: 100%; display: block; }
img { height: auto; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 6.4vw, 4.1rem); letter-spacing: -0.026em; line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); letter-spacing: -0.022em; }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: 0.35em; }

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { text-decoration-thickness: 0.14em; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

strong { color: var(--ink); font-weight: 650; }

code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.38em;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.container {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip-link {
  position: absolute;
  left: 12px; top: -80px;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-ink);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

/* Eyebrows that sit on the tinted sky need the stronger accent to keep AA contrast. */
.hero .eyebrow,
.page-hero .eyebrow,
.cta .eyebrow { color: var(--accent-strong); }

.lead {
  font-size: clamp(1.1rem, 2.1vw, 1.3rem);
  line-height: 1.55;
  color: var(--text);
  max-width: 38em;
}

.muted { color: var(--muted); }
.small { font-size: 0.92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--sky-top) 78%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: 0.16em;
  padding: 6px 4px 6px 0;
}
.brand-mark { width: 32px; height: 32px; flex: none; border-radius: 9px; box-shadow: var(--shadow-s); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.6vw, 14px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 clamp(8px, 1.6vw, 14px);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
}
.site-nav a:hover { background: var(--surface); color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* ---------- Buttons and store badge ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0 1.35em;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); box-shadow: var(--shadow-s); }
.btn-primary:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-solid); transform: translateY(-1px); }
.btn[aria-disabled="true"] { opacity: 0.6; cursor: default; transform: none; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Placeholder for the official App Store badge (see README). */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 20px 8px 16px;
  border-radius: 14px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  text-decoration: none;
  box-shadow: var(--shadow-s);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.store-badge:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.store-badge svg { width: 28px; height: 28px; flex: none; }
.store-badge-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-badge-text small { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em; opacity: 0.86; }
.store-badge-text strong { font-size: 1.14rem; font-weight: 700; color: inherit; letter-spacing: -0.01em; }

/* Official "Download on the App Store" badge, once it replaces the placeholder (see README). */
.store-badge-official { display: inline-block; border-radius: 10px; line-height: 0; }
.store-badge-official img { height: 56px; width: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--sky);
  padding: clamp(40px, 7vw, 88px) 0 clamp(64px, 9vw, 120px);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: var(--orb-opacity);
  pointer-events: none;
}
.hero::before { width: 420px; height: 420px; left: -140px; top: -120px; background: var(--violet); }
.hero::after { width: 460px; height: 460px; right: -160px; bottom: -200px; background: var(--gold); }

.hero-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 90px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg));
  pointer-events: none;
}

.hero-grid {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}

.hero-copy .lead { margin-bottom: 1.6rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-bottom: 1.5rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.chips li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.chips li::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dot, var(--violet));
  box-shadow: 0 0 8px var(--dot, var(--violet));
}

/* ---------- Fold demo ---------- */
.fold-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.fold-stage {
  position: relative;
  width: min(340px, 78vw);
  aspect-ratio: 1;
  perspective: 1100px;
  display: grid;
  place-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fold-halo {
  position: absolute;
  inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 66%);
  opacity: 0.8;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .fold-halo { background: radial-gradient(circle, rgba(191, 230, 255, 0.24) 0%, rgba(191, 230, 255, 0) 66%); }
}

.sheet {
  position: relative;
  width: 86%;
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transform: rotateX(8deg);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.3, 0.1, 0.2, 1);
}

.sheet-frame {
  position: absolute;
  inset: -9px;
  border: 2px dashed var(--frame);
  border-radius: 22px;
}

.half {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
}
.half-right { left: 50%; }
.half-left {
  left: 0;
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.35, 0.05, 0.2, 1);
}

.face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--paper-line) 0 0),
    linear-gradient(var(--paper-line) 0 0),
    linear-gradient(var(--paper-line) 0 0),
    linear-gradient(var(--paper-line) 0 0);
  background-size: 1px 100%, 100% 1px, 100% 1px, 100% 1px;
  background-position: 50% 0, 0 25%, 0 50%, 0 75%;
  background-repeat: no-repeat;
  box-shadow: 0 18px 36px -18px rgba(66, 67, 90, 0.45);
}
.half-right .face { border-radius: 0 14px 14px 0; border-left: 1px dashed var(--line-strong); }
.half-left .face-front { border-radius: 14px 0 0 14px; }
.half-left .face-back {
  border-radius: 0 14px 14px 0;
  transform: rotateY(180deg);
  background-color: var(--paper-back);
  box-shadow: -10px 12px 26px -12px rgba(66, 67, 90, 0.5);
}

.node {
  position: absolute;
  width: 29%;
  aspect-ratio: 1;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.9) 0%, var(--c) 44%, color-mix(in srgb, var(--c) 78%, #2a2340) 100%);
  box-shadow: 0 0 16px 2px color-mix(in srgb, var(--c) 60%, transparent);
  transition: opacity 0.5s ease, scale 0.5s ease;
}
.face-back .node { opacity: 0.6; }

.bloom {
  position: absolute;
  width: 16%;
  aspect-ratio: 1;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  translate: -50% -50%;
  border-radius: 50%;
  border: 3px solid var(--c);
  box-shadow: 0 0 18px var(--c), inset 0 0 12px var(--c);
  opacity: 0;
  pointer-events: none;
  transform: translateZ(2px);
}

.demo-crane {
  position: absolute;
  width: 96%;
  height: auto;
  opacity: 0;
  transform: translateY(18px) scale(0.72);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  filter: drop-shadow(0 22px 22px rgba(66, 67, 90, 0.28));
  pointer-events: none;
}

.fold-demo[data-state="folded"] .half-left,
.fold-demo[data-state="matched"] .half-left,
.fold-demo[data-state="origami"] .half-left { transform: rotateY(180deg); }

.fold-demo[data-state="matched"] .half-right .node,
.fold-demo[data-state="matched"] .face-back .node,
.fold-demo[data-state="origami"] .half-right .node,
.fold-demo[data-state="origami"] .face-back .node { opacity: 0; scale: 1.5; }

.fold-demo[data-state="matched"] .bloom { animation: bloom 0.85s ease-out both; animation-delay: var(--d, 0s); }

.fold-demo[data-state="origami"] .sheet { opacity: 0; transform: rotateX(8deg) scale(0.5) rotate(-10deg); }
.fold-demo[data-state="origami"] .demo-crane { opacity: 1; transform: none; animation: float 7s ease-in-out 0.9s infinite; }

@keyframes bloom {
  0% { opacity: 0.95; scale: 0.5; }
  100% { opacity: 0; scale: 3.4; }
}
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

.demo-caption { margin: 0; color: var(--text); font-size: 0.93rem; text-align: center; }

.js-only { visibility: hidden; }
.js .js-only { visibility: visible; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(40px, 6vw, 72px) 0; }
.section-soft { background: var(--bg-soft); }

.section-head { max-width: 44rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

/* Three steps */
.steps {
  display: grid;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  margin: 0;
  position: relative;
  padding: 24px 24px 26px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
.step-art { width: 100%; height: auto; margin-bottom: 14px; border-radius: 14px; background: var(--bg-soft); }
.step h3 { margin-bottom: 0.3em; }
.step p { margin: 0; color: var(--text); }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--c, var(--violet));
  color: #23243A;
  font-size: 0.86rem;
  font-weight: 800;
  vertical-align: 0.12em;
}

/* Feature rows */
.feature {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(36px, 5vw, 60px) 0;
}
.feature + .feature { border-top: 1px solid var(--line); }
@media (min-width: 860px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .feature.flip .feature-art { order: 2; }
}
.feature-copy p { max-width: 34em; }
.feature-copy > :last-child { margin-bottom: 0; }

.feature-art {
  border-radius: var(--r-l);
  background: var(--sky);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-m);
  overflow: hidden;
}
.feature-art svg { width: 100%; height: auto; }

.ticks { list-style: none; padding: 0; margin: 1.1rem 0 0; display: grid; gap: 10px; }
.ticks li {
  margin: 0;
  position: relative;
  padding-left: 30px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.42em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--c, var(--green));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.7 6.2a.9.9 0 0 0-1.4-1.1L7.2 9 5.6 7.5a.9.9 0 1 0-1.2 1.3l2.3 2.2a.9.9 0 0 0 1.3-.1l3.7-4.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0Zm3.7 6.2a.9.9 0 0 0-1.4-1.1L7.2 9 5.6 7.5a.9.9 0 1 0-1.2 1.3l2.3 2.2a.9.9 0 0 0 1.3-.1l3.7-4.7Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Realm cards (fixed pastel skies in both themes, like the game) */
.realms {
  display: grid;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: clamp(28px, 4vw, 44px) 0 0;
}
@media (min-width: 760px) { .realms { grid-template-columns: repeat(3, 1fr); } }

.realm {
  margin: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-m);
  color: var(--realm-ink);
  background: var(--realm-sky);
}
.realm svg { width: 100%; height: auto; }
.realm-body { padding: 4px 24px 26px; }
.realm h3 { color: var(--realm-ink); font-size: 1.3rem; margin-bottom: 0.2em; }
.realm-sub { font-style: italic; margin-bottom: 0.8em; opacity: 0.92; }
.realm p:last-child { margin-bottom: 0; }
.realm-garden { --realm-ink: #42435A; --realm-sky: linear-gradient(180deg, #EAE4F5, #F6DCE8 56%, #F8E2CF); }
.realm-ocean { --realm-ink: #2F4A66; --realm-sky: linear-gradient(180deg, #D4F1F4, #BFE2F8 56%, #E6ECFA); }
.realm-forest { --realm-ink: #274A47; --realm-sky: linear-gradient(180deg, #D7EFE3, #CFE6EE 56%, #DCE3F5); }

.quote {
  margin: clamp(28px, 4vw, 44px) auto 0;
  max-width: 40rem;
  padding: 0;
  text-align: center;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink);
  font-style: italic;
}
.quote footer { margin-top: 0.7em; font-size: 0.9rem; font-style: normal; color: var(--muted); }

/* Card grids */
.cards {
  display: grid;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
@media (min-width: 620px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  margin: 0;
  padding: 22px 22px 24px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
.card h3 { font-size: 1.08rem; margin-bottom: 0.35em; }
.card p { margin: 0; font-size: 0.98rem; }
.card-icon {
  width: 44px; height: 44px;
  margin-bottom: 14px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--c, var(--violet)) 22%, var(--surface-solid));
  border: 1px solid color-mix(in srgb, var(--c, var(--violet)) 40%, transparent);
  color: var(--ink);
}
.card-icon svg { width: 24px; height: 24px; }

/* ---------- Gallery ---------- */
.gallery-wrap { position: relative; }
.gallery {
  display: flex;
  gap: clamp(14px, 2.4vw, 24px);
  list-style: none;
  margin: 0;
  padding: 8px var(--gutter) 22px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.gallery:focus-visible { outline-offset: -3px; border-radius: var(--r-m); }
.gallery li { margin: 0; flex: none; width: clamp(200px, 56vw, 250px); scroll-snap-align: start; }
@media (min-width: 1200px) {
  .gallery { padding-inline: calc((100vw - var(--wrap)) / 2); scroll-padding-inline: calc((100vw - var(--wrap)) / 2); }
}

.shot { margin: 0; }
.shot img {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
  border-radius: 30px;
  border: 1px solid var(--line-strong);
  background: var(--bg-soft);
  box-shadow: var(--shadow-m);
}
.shot figcaption { margin-top: 14px; font-size: 0.93rem; color: var(--muted); text-align: center; }
.shot figcaption strong { display: block; color: var(--ink); font-size: 1rem; }

.gallery-nav { display: none; gap: 10px; justify-content: flex-end; margin-bottom: 6px; }
.js .gallery-nav { display: flex; }
.icon-btn {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.icon-btn:hover { background: var(--surface-solid); }
.icon-btn[disabled] { opacity: 0.4; cursor: default; }
.icon-btn svg { width: 20px; height: 20px; }

/* ---------- Call to action ---------- */
.cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  padding: clamp(40px, 7vw, 76px) clamp(22px, 5vw, 60px);
  border-radius: var(--r-l);
  background: var(--sky);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-m);
}
.cta h2 { margin-bottom: 0.4em; }
.cta .lead { margin-inline: auto; margin-bottom: 1.6rem; }
.cta-crane { width: clamp(120px, 22vw, 170px); margin: 0 auto 18px; filter: drop-shadow(0 14px 14px rgba(66, 67, 90, 0.22)); }
.cta-note { margin: 1.2rem 0 0; font-size: 0.93rem; color: var(--muted); }

/* ---------- Inner pages ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--sky);
  padding: clamp(40px, 6vw, 76px) 0 clamp(44px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 380px; height: 380px;
  right: -120px; top: -160px;
  border-radius: 50%;
  background: var(--violet);
  filter: blur(70px);
  opacity: var(--orb-opacity);
}
.page-hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.3rem); margin-bottom: 0.35em; }
.page-hero .lead { margin-bottom: 0; }
.page-meta { margin: 1.1rem 0 0; font-size: 0.93rem; color: var(--text); }

.page-body { padding: clamp(36px, 6vw, 68px) 0 clamp(56px, 8vw, 96px); }

.layout {
  display: grid;
  gap: clamp(28px, 5vw, 60px);
}
@media (min-width: 960px) {
  .layout { grid-template-columns: 230px minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: 88px; }
}

.toc {
  padding: 18px 20px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
}
.toc h2 { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.7em; }
.toc ol, .toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 7px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 0.96rem;
  font-weight: 550;
  line-height: 1.35;
}
.toc a:hover { color: var(--link); text-decoration: underline; }

.prose { max-width: 46rem; }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); margin-top: 2.4em; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.7em; scroll-margin-top: 88px; }
.prose li { margin-bottom: 0.5em; }
.prose > :last-child { margin-bottom: 0; }

.callout {
  margin: 0 0 2rem;
  padding: 22px 24px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  box-shadow: var(--shadow-s);
}
.callout h2, .callout h3 { font-size: 1.12rem; margin: 0 0 0.5em; }
.callout > :last-child { margin-bottom: 0; }
.callout ul { margin-bottom: 0; }
.callout.note { border-left-color: var(--gold); }

.contact-card {
  margin-top: 2.4rem;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--r-l);
  background: var(--sky);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-s);
}
.contact-card h2 { margin-top: 0; }
.contact-card > :last-child { margin-bottom: 0; }
.email { font-weight: 700; font-size: 1.1rem; word-break: break-all; }

/* FAQ */
.faq-group { margin-top: 2.6rem; }
.faq-group:first-child { margin-top: 0; }
.faq-group > h2 { scroll-margin-top: 88px; }
.faq {
  padding: 20px 22px 22px;
  margin-top: 14px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
  scroll-margin-top: 88px;
}
.faq h3 { margin: 0 0 0.5em; font-size: 1.12rem; }
.faq > :last-child { margin-bottom: 0; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-m);
  border: 1px solid var(--line);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table-wrap:focus-visible { outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
caption { text-align: left; padding: 14px 18px 0; color: var(--muted); font-size: 0.92rem; }
th, td { text-align: left; vertical-align: top; padding: 13px 18px; border-bottom: 1px solid var(--line); }
tr:last-child > th, tr:last-child > td { border-bottom: 0; }
thead th { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
tbody th { color: var(--ink); font-weight: 650; }
.fact-table tbody th { width: 34%; min-width: 130px; }
.fact-table td { overflow-wrap: anywhere; }
.credits-table { min-width: 620px; }
td.empty { color: var(--muted); font-style: italic; }

/* Press */
.press-grid { display: grid; gap: clamp(24px, 4vw, 44px); }
.press-grid > * { min-width: 0; }
@media (min-width: 860px) { .press-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); align-items: start; } }

.desc {
  padding: 20px 22px 22px;
  margin-top: 14px;
  border-radius: var(--r-m);
  background: var(--surface);
  border: 1px solid var(--line);
}
.desc h3 { margin: 0 0 0.2em; font-size: 1.06rem; }
.desc .count { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.7em; }
.desc > :last-child { margin-bottom: 0; }

.icon-slot { text-align: center; padding: 26px 22px; border-radius: var(--r-l); background: var(--sky); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.icon-slot img { width: min(200px, 60%); aspect-ratio: 1; margin: 0 auto 16px; border-radius: 22.37%; box-shadow: var(--shadow-m); }
.icon-slot p { margin: 0 0 0.9em; font-size: 0.95rem; }
.icon-slot > :last-child { margin-bottom: 0; }

.shots-grid {
  display: grid;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 150px), 1fr));
}
.shots-grid li { margin: 0; }
.shots-grid .shot img { border-radius: 20px; }
.shots-grid a { display: block; border-radius: 20px; }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.swatches li { margin: 0; display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.9rem; font-weight: 600; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 1px solid var(--line-strong); }

/* 404 */
.lost { text-align: center; padding: clamp(56px, 10vw, 120px) 0; }
.lost-art { width: min(300px, 70%); margin: 0 auto 26px; filter: drop-shadow(0 18px 18px rgba(66, 67, 90, 0.22)); }
.lost .lead { margin-inline: auto; margin-bottom: 1.8rem; }
.lost-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- Footer ---------- */
.site-footer {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: clamp(36px, 5vw, 56px) 0 calc(28px + env(safe-area-inset-bottom));
  font-size: 0.96rem;
}
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.6fr)); } }
.footer-brand p { margin: 12px 0 0; max-width: 26em; color: var(--muted); }
.site-footer h2 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-block; padding: 6px 0; color: var(--text); text-decoration: none; font-weight: 550; }
.site-footer li a:hover { color: var(--link); text-decoration: underline; }
.footer-base {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.88rem;
}
.footer-base p { margin: 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .fold-demo[data-state="origami"] .demo-crane { animation: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .toc, .skip-link, .gallery-nav { display: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
  .page-hero { background: none; border: 0; padding: 0 0 12px; }
  .page-hero::after { display: none; }
  a { color: inherit; }
}
