/* Outloop website. Colors, type and motion follow the game's design tokens (Palette, Themes, WorldTint, Motion). */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka.woff2") format("woff2"), url("../fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-stretch: 75% 125%;
  font-display: swap;
}

/* MARK: Themes. Paper and Ink are the game's own palettes; the four others are its unlockable themes. */

:root, [data-theme="paper"] {
  --bg: #F7F4EE; --bg-top: #FFF7EA; --surface: #FFFFFF; --muted: #EFEBE3;
  --ink: #1C1B22; --ink-2: #5E5B68; --ink-3: #716D7A;
  --accent: #F0502F; --on-accent: #FFFFFF; --danger: #E5484D; --success: #2F9E6E; --gold: #E9A91C;
  --dot-opacity: .16; --hairline: rgb(28 27 34 / .09); --shadow: 0 24px 60px -28px rgb(28 27 34 / .28);
  --mark-tile: url(#mark-paper); --mark-ink: #1F1D2B;
  color-scheme: light;
}
[data-theme="ink"] {
  --bg: #121217; --bg-top: #15151C; --surface: #1B1B22; --muted: #24242D;
  --ink: #F2EEE6; --ink-2: #A9A5B0; --ink-3: #8E8A97;
  --accent: #FF6B47; --on-accent: #1C1B22; --danger: #FF6369; --success: #3DBE86; --gold: #F5C04A;
  --dot-opacity: .16; --hairline: rgb(242 238 230 / .11); --shadow: 0 0 0 1px rgb(242 238 230 / .08);
  --mark-tile: url(#mark-night); --mark-ink: #F2EEE6;
  color-scheme: dark;
}
[data-theme="blueprint"] {
  --bg: #0F2A4A; --bg-top: #0F2A4A; --surface: #15355C; --muted: #294260;
  --ink: #EAF2FF; --ink-2: #BECADB; --ink-3: #A4B2C5;
  --accent: #FFC857; --on-accent: #1C1B22; --danger: #FF6369; --success: #3DBE86; --gold: #F5C04A;
  --dot-opacity: .16; --hairline: rgb(234 242 255 / .13); --shadow: 0 0 0 1px rgb(234 242 255 / .1);
  --mark-tile: url(#mark-night); --mark-ink: #F2EEE6;
  color-scheme: dark;
}
[data-theme="sage"] {
  --bg: #EEF2EA; --bg-top: #EEF2EA; --surface: #FAFBF9; --muted: #E0E4DC;
  --ink: #1F2A22; --ink-2: #48524A; --ink-3: #616A62;
  --accent: #3E8E5E; --on-accent: #FFFFFF; --danger: #E5484D; --success: #2F9E6E; --gold: #E9A91C;
  --dot-opacity: .16; --hairline: rgb(31 42 34 / .1); --shadow: 0 24px 60px -28px rgb(31 42 34 / .28);
  --mark-tile: url(#mark-paper); --mark-ink: #1F1D2B;
  color-scheme: light;
}
[data-theme="terracotta"] {
  --bg: #F6EDE6; --bg-top: #F6EDE6; --surface: #FCFAF8; --muted: #E8DED8;
  --ink: #2B1D18; --ink-2: #544741; --ink-3: #6C605A;
  --accent: #C4552E; --on-accent: #FFFFFF; --danger: #E5484D; --success: #2F9E6E; --gold: #E9A91C;
  --dot-opacity: .16; --hairline: rgb(43 29 24 / .1); --shadow: 0 24px 60px -28px rgb(43 29 24 / .28);
  --mark-tile: url(#mark-paper); --mark-ink: #1F1D2B;
  color-scheme: light;
}
[data-theme="mono"] {
  --bg: #FFFFFF; --bg-top: #FFFFFF; --surface: #FFFFFF; --muted: #EDEDED;
  --ink: #000000; --ink-2: #333333; --ink-3: #525252;
  --accent: #000000; --on-accent: #FFFFFF; --danger: #000000; --success: #000000; --gold: #000000;
  --dot-opacity: .2; --hairline: rgb(0 0 0 / .16); --shadow: 0 0 0 1.5px #000;
  --mark-tile: url(#mark-paper); --mark-ink: #1F1D2B;
  color-scheme: light;
}

/* MARK: Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: "Fredoka", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 1.125rem; line-height: 1.55; font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color .35s ease, color .35s ease;
}
[data-theme] { color: var(--ink); }
img, video, canvas, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.018em; text-wrap: balance; }
h1 { font-size: clamp(3.5rem, 10.4vw, 8.25rem); line-height: .9; }
h2 { font-size: clamp(2.35rem, 5.8vw, 4.5rem); line-height: 1; }
h3 { font-size: 1.4rem; line-height: 1.2; }
p { text-wrap: pretty; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }
.wrap.narrow { width: min(820px, 100% - 48px); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-weight: 600; }
.skip:focus { top: 16px; }
.fine { font-size: .9rem; color: var(--ink-3); }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* MARK: Buttons. Title only, like the game's own. */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 58px; padding: 0 30px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-weight: 600; font-size: 1.0625rem; text-decoration: none; white-space: nowrap;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--ink) 62%, #000), 0 18px 26px -14px rgb(0 0 0 / .45);
  transition: transform .16s cubic-bezier(.3, 1.6, .5, 1), box-shadow .16s ease, background-color .2s;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 7px 0 color-mix(in srgb, var(--ink) 62%, #000), 0 22px 30px -14px rgb(0 0 0 / .45); }
.button:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 62%, #000); }
.button.accent { background: var(--accent); color: var(--on-accent); box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 66%, #000), 0 18px 30px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.button.accent:hover { box-shadow: 0 7px 0 color-mix(in srgb, var(--accent) 66%, #000), 0 24px 34px -14px color-mix(in srgb, var(--accent) 70%, transparent); }
.button.accent:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--accent) 66%, #000); }
.button.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ink) 22%, transparent); }
.button.ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.button.ghost:active { transform: translateY(1px); box-shadow: inset 0 0 0 2px var(--ink); }
.button.small { min-height: 44px; padding: 0 20px; font-size: .97rem; box-shadow: 0 3px 0 color-mix(in srgb, var(--ink) 62%, #000); }
.button.small:hover { box-shadow: 0 5px 0 color-mix(in srgb, var(--ink) 62%, #000); }
.button.small:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--ink) 62%, #000); }
.button.big { min-height: 68px; padding: 0 40px; font-size: 1.2rem; }

/* Apple's App Store badge, unaltered. Its clear space is a quarter of its height on every side. */
.store-badge { display: inline-flex; border-radius: 10px; transition: transform .16s cubic-bezier(.3, 1.6, .5, 1); }
.store-badge img { height: 58px; width: auto; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge:active { transform: translateY(2px); }
.store-badge.big img { height: 68px; }

.icon-button {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline), 0 2px 6px -3px rgb(0 0 0 / .25);
  transition: transform .15s, background-color .2s;
}
.icon-button:hover { transform: scale(1.07); }
.icon-button:active { transform: scale(.94); }
.icon-button svg { width: 21px; height: 21px; fill: currentColor; }
.icon-button[aria-pressed="false"] .wave { display: none; }
.icon-button[aria-pressed="false"] { color: var(--ink-3); }

/* MARK: Navigation */

.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-top) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow .3s, background-color .35s;
}
.nav.scrolled { box-shadow: 0 1px 0 var(--hairline); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.45rem; letter-spacing: -.01em; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 22%; box-shadow: 0 3px 8px -3px rgb(0 0 0 / .35); }
.mark-tile { fill: var(--mark-tile); }
.mark-ink { fill: var(--mark-ink); stroke: var(--mark-ink); }
.mark-red { fill: #F0502F; stroke: #F0502F; }
.nav-links { display: flex; gap: 6px; }
.nav-links a { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 1rem; text-decoration: none; color: var(--ink-2); transition: background-color .2s, color .2s; }
.nav-links a:hover { background: var(--muted); color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
[data-theme="paper"] .when-dark, [data-theme="sage"] .when-dark, [data-theme="terracotta"] .when-dark, [data-theme="mono"] .when-dark { display: none; }
[data-theme="ink"] .when-light, [data-theme="blueprint"] .when-light { display: none; }

/* MARK: Hero */

.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 8vw, 96px); background: linear-gradient(var(--bg-top), var(--bg)); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 26px; padding: 7px 14px 7px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); font-size: .92rem; font-weight: 500; color: var(--ink-2);
}
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
/* The heading names the game first, in the small chip, then the slogan. */
.hero h1 { display: grid; justify-items: start; }
.hero h1 .chip { font-size: .92rem; font-weight: 500; line-height: 1.35; letter-spacing: 0; }
.hero h1 .out { position: relative; display: inline-flex; align-items: baseline; gap: .12em; color: var(--accent); white-space: nowrap; }
.hero h1 .out svg { width: .86em; height: .43em; align-self: center; margin-top: .12em; animation: escape 4.2s cubic-bezier(.6, 0, .3, 1) 1.2s infinite; }
@keyframes escape {
  0%, 62% { transform: translateX(0); opacity: 1; }
  66% { transform: translateX(-.07em); opacity: 1; }
  82% { transform: translateX(1.5em); opacity: 0; }
  83% { transform: translateX(-.16em); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.lede { max-width: 30em; margin-top: 28px; font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.45; color: var(--ink-2); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: .97rem; font-weight: 500; color: var(--ink-3); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .55; }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: clamp(48px, 7vw, 88px); }
.numbers > div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 22px 24px 20px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.numbers dt { font-size: .98rem; font-weight: 500; color: var(--ink-3); }
.numbers dd { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.numbers > div:nth-child(1) dd { color: var(--accent); }

/* MARK: The playable board */

.play { --tint: var(--accent); display: grid; gap: 10px; min-width: 0; }
.play-hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.play-title { display: grid; line-height: 1.15; }
.play-title strong { font-size: 1.25rem; font-weight: 600; }
.play-tools { display: flex; justify-content: flex-end; gap: 8px; }
.hearts { display: inline-flex; gap: 5px; justify-self: center; }
.hearts svg { width: 22px; height: 22px; fill: var(--danger); transition: transform .3s cubic-bezier(.3, 1.8, .5, 1), fill .2s; }
.hearts svg.spent { fill: color-mix(in srgb, var(--ink) 16%, transparent); transform: scale(.82); }
.hearts.mini { position: absolute; top: 14px; right: 16px; gap: 3px; }
.hearts.mini svg { width: 15px; height: 15px; }
.play-stage { position: relative; height: clamp(380px, 58vh, 620px); border-radius: 32px; }
.play-stage.tall { height: clamp(430px, 66vh, 680px); }
.play-stage canvas, .step-board canvas, .theme-board canvas { width: 100%; height: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.play-stage canvas:focus-visible { outline-offset: -3px; border-radius: 32px; }
.play-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 28px; font-size: .95rem; font-weight: 500; color: var(--ink-3); }
.play-tip { padding: 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--tint) 14%, transparent); color: color-mix(in srgb, var(--tint) 78%, var(--ink)); transition: opacity .4s; }
.play-tip:empty { opacity: 0; }
.play-overlay {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 24px; border-radius: 32px; text-align: center;
  background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: overlay-in .45s cubic-bezier(.2, .8, .2, 1);
}
.play-overlay[hidden] { display: none; }
@keyframes overlay-in { from { opacity: 0; transform: scale(.96); } }
.result { display: grid; justify-items: center; gap: 14px; max-width: 22em; }
.result h3 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1; }
.result p { color: var(--ink-2); }
.stars { display: inline-flex; gap: 6px; }
.stars svg { width: 38px; height: 38px; fill: var(--gold); animation: star-in .5s cubic-bezier(.3, 1.9, .5, 1) backwards; }
.stars svg:nth-child(2) { animation-delay: .12s; }
.stars svg:nth-child(3) { animation-delay: .24s; }
.stars svg.empty { fill: color-mix(in srgb, var(--ink) 14%, transparent); }
@keyframes star-in { from { transform: scale(0) rotate(-40deg); opacity: 0; } }
.result .cta-row { justify-content: center; margin-top: 8px; }
.flight-layer { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 60; pointer-events: none; }

/* MARK: Sections */

.section { padding: clamp(76px, 11vw, 150px) 0; }
.section-head { display: grid; justify-items: center; gap: 18px; max-width: 800px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.section-head.left { justify-items: start; margin-inline: 0; text-align: left; }
.section-head p:not(.eyebrow) { max-width: 34em; font-size: clamp(1.1rem, 1.5vw, 1.28rem); color: var(--ink-2); }
.section-head .eyebrow { padding: 6px 14px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 13%, transparent); color: color-mix(in srgb, var(--accent) 82%, var(--ink)); }

.js .reveal { opacity: 0; transform: translateY(26px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--delay, 0s); }

/* MARK: One rule */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 14px 14px 30px; border-radius: 34px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow); }
.step-board { position: relative; aspect-ratio: 1; margin-bottom: 26px; border-radius: 24px; background: var(--bg); overflow: hidden; }
.step-number { display: inline-grid; place-items: center; width: 34px; height: 34px; margin: 0 14px 12px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 1.05rem; }
.step h3, .step p { padding: 0 14px; }
.step h3 { font-size: 1.6rem; }
.step p { margin-top: 8px; color: var(--ink-2); }

/* MARK: Praise band */

.praise { overflow: hidden; padding: 6px 0; border-block: 1px solid var(--hairline); background: var(--surface); }
.praise-track { display: flex; width: max-content; gap: .55em; align-items: center; font-size: clamp(2.6rem, 7.4vw, 6rem); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; white-space: nowrap; animation: marquee 70s linear infinite; }
.praise-track span:nth-child(3n + 1) { color: var(--accent); }
.praise-track span:nth-child(3n + 2) { color: transparent; -webkit-text-stroke: 2px var(--ink); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* MARK: Worlds */

.worlds { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(20px, 3vw, 44px); align-items: stretch; }
.world-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; min-height: 420px; padding: clamp(24px, 3vw, 40px);
  border-radius: 36px; background: var(--tint, var(--accent)); color: var(--on-tint, #fff); overflow: hidden;
  transition: background-color .35s ease, color .35s ease;
  /* The card's text changes as the mouse moves over the worlds. Chrome would scroll the page to keep that text in place,
     which moves another world under a resting mouse and starts a loop; the page keeps still instead. */
  overflow-anchor: none;
}
.world-card::before {
  content: attr(data-number); position: absolute; top: -.16em; right: .02em; font-size: clamp(11rem, 22vw, 19rem); font-weight: 700; line-height: 1; letter-spacing: -.05em;
  color: color-mix(in srgb, var(--on-tint, #fff) 15%, transparent); pointer-events: none;
}
.world-kicker { display: flex; flex-wrap: wrap; gap: 8px; font-size: .86rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.world-kicker span { padding: 5px 12px; border-radius: 999px; background: color-mix(in srgb, var(--on-tint, #fff) 18%, transparent); }
.world-card h3 { position: relative; font-size: clamp(2.6rem, 5.4vw, 4.4rem); line-height: .95; }
.world-rule { position: relative; max-width: 22em; font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.4; font-weight: 500; }
.world-note { position: relative; font-size: .9rem; opacity: .78; }
.world-wall { display: grid; grid-template-columns: repeat(10, 1fr); gap: clamp(5px, .8vw, 10px); align-content: center; }
.world-wall button {
  aspect-ratio: 1; border-radius: 50%; background: var(--w); color: var(--on-w, #fff);
  font-size: clamp(.72rem, 1.25vw, 1.02rem); font-weight: 600; font-variant-numeric: tabular-nums;
  transition: transform .22s cubic-bezier(.3, 1.7, .5, 1), box-shadow .2s;
}
.world-wall button:hover { transform: scale(1.14); }
.world-wall button[aria-pressed="true"] { transform: scale(1.16); box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--w); }
.world-wall button:focus-visible { outline-offset: 2px; border-radius: 50%; }
/* Locked worlds: a faded disc with a padlock; the card hints at the chapter and offers the app. */
.world-wall button[data-locked] { position: relative; background: color-mix(in srgb, var(--w) 22%, var(--surface)); color: color-mix(in srgb, var(--w) 70%, var(--ink)); }
.world-wall button[data-locked]::after { content: ""; position: absolute; right: 2%; bottom: 2%; width: 34%; height: 34%; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgb(0 0 0 / .22); }
.world-wall button[data-locked]::before { content: ""; position: absolute; z-index: 1; right: 2%; bottom: 2%; width: 34%; height: 34%; background: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M6.5 12V8.5a5.5 5.5 0 0 1 11 0V12' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'/%3E%3Crect x='2' y='11' width='20' height='16' rx='5'/%3E%3C/svg%3E") center / 48% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M6.5 12V8.5a5.5 5.5 0 0 1 11 0V12' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'/%3E%3Crect x='2' y='11' width='20' height='16' rx='5'/%3E%3C/svg%3E") center / 48% no-repeat; }
.world-card[data-locked] h3::before { content: ""; display: inline-block; width: .62em; height: .72em; margin-right: .16em; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M6.5 12V8.5a5.5 5.5 0 0 1 11 0V12' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'/%3E%3Crect x='2' y='11' width='20' height='16' rx='5'/%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 24 28'%3E%3Cpath d='M6.5 12V8.5a5.5 5.5 0 0 1 11 0V12' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'/%3E%3Crect x='2' y='11' width='20' height='16' rx='5'/%3E%3C/svg%3E") center / contain no-repeat; }
.world-unlock { position: relative; margin-top: 4px; }
.world-unlock .store-badge img { height: 50px; }

.motion { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 6vw, 90px); align-items: center; margin-top: clamp(64px, 9vw, 120px); }
.motion-copy h3 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.motion-copy > p { margin-top: 8px; color: var(--ink-2); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 28px; }
.tabs button {
  --w: var(--accent);
  display: grid; gap: 4px; padding: 16px 18px; border-radius: 22px; text-align: left; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline); transition: box-shadow .2s, transform .2s, background-color .2s;
}
.tabs button strong { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1.15rem; }
.tabs button strong::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--w); }
.tabs button span { font-size: .93rem; line-height: 1.4; color: var(--ink-2); }
.tabs button:hover { transform: translateY(-2px); }
.tabs button[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--w); background: color-mix(in srgb, var(--w) 9%, var(--surface)); }

.phone {
  position: relative; width: min(300px, 72vw); aspect-ratio: 660 / 1434; padding: 9px; border-radius: 50px; background: #0B0B0F;
  box-shadow: inset 0 0 0 1.5px #3a3a44, 0 40px 70px -30px rgb(0 0 0 / .55), 0 10px 20px -10px rgb(0 0 0 / .3);
}
.phone img, .phone video { width: 100%; height: 100%; border-radius: 41px; object-fit: cover; background: #F7F4EE; }

/* MARK: Knots */

.knots { background: var(--bg); padding-bottom: clamp(76px, 11vw, 150px); }
.knot-play { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.knot-side h3 { font-size: 1.7rem; margin-bottom: 18px; }
.knot-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.knot-picker button {
  display: grid; justify-items: center; gap: 4px; padding: 10px 6px 9px; border-radius: 18px; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--hairline); font-size: .82rem; font-weight: 500; color: var(--ink-2);
  transition: transform .2s cubic-bezier(.3, 1.7, .5, 1), box-shadow .2s, color .2s;
}
.knot-picker button canvas { width: 54px; height: 68px; }
.knot-picker button:hover { transform: translateY(-3px); color: var(--ink); }
.knot-picker button[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--w, var(--accent)); color: var(--ink); }
.knot-side .fine { margin-top: 18px; }

.atlas-rows { display: grid; gap: 14px; margin: clamp(64px, 9vw, 120px) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); overflow: hidden; }
.atlas-row { display: flex; width: max-content; gap: 14px; animation: marquee 72s linear infinite; }
.atlas-row.reverse { animation-direction: reverse; }
.print { display: grid; justify-items: center; gap: 6px; width: 104px; padding: 12px 8px 10px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--w) 70%, transparent); }
.print canvas { width: 60px; height: 80px; }
.print b { font-size: .78rem; font-weight: 500; line-height: 1.15; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.print small { font-size: .62rem; font-weight: 600; letter-spacing: .1em; color: var(--ink-3); }
/* A secret Knot: a question mark on the dot grid instead of its shape. */
.print.mystery { box-shadow: none; border: 1.5px dashed color-mix(in srgb, var(--w) 55%, transparent); }
.mystery-mark { display: grid; place-items: center; width: 60px; height: 80px; border-radius: 10px; font-size: 44px; font-weight: 600; line-height: 1; color: color-mix(in srgb, var(--w) 80%, var(--ink)); background: radial-gradient(color-mix(in srgb, var(--w) 40%, transparent) 1.3px, transparent 1.8px) 0 0 / 10px 10px; }

.atlas { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(28px, 6vw, 80px); align-items: center; }
.atlas-copy h3 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.atlas-copy > p { margin-top: 14px; max-width: 30em; font-size: 1.15rem; color: var(--ink-2); }
.secret-meter { display: grid; justify-items: start; gap: 14px; max-width: 30em; margin-top: 26px; }
.secret-meter .meter { width: 100%; height: 10px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.secret-meter .meter i { display: block; width: 2%; height: 100%; border-radius: inherit; background: var(--accent); }
.secret-meter p { font-size: 1rem; color: var(--ink-2); }
.secret-meter strong { color: var(--ink); }
.atlas-phones { position: relative; display: flex; padding: 20px 10px; }
.atlas-phones .phone { width: min(250px, 42vw); }
.tilt-left { transform: rotate(-5deg) translateY(14px); z-index: 1; }
.tilt-right { transform: rotate(5deg) translateY(-10px); margin-left: -46px; }

/* MARK: Modes */

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mode { position: relative; padding: clamp(24px, 3vw, 36px); border-radius: 34px; background: color-mix(in srgb, var(--tint) 9%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint) 22%, transparent); overflow: hidden; }
.mode h3 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
.mode p { margin-top: 10px; color: var(--ink-2); max-width: 30em; }
.mode-icon { width: 60px; height: 60px; margin-bottom: 18px; }
.mode-journey { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 5vw, 70px); align-items: center; min-height: 480px; padding: 44px clamp(28px, 6vw, 90px) 44px clamp(28px, 5vw, 64px); }
.mode-journey h3 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); }
.mode-journey p { font-size: 1.15rem; }
.mode-journey .phone { position: absolute; right: clamp(28px, 6vw, 90px); top: 44px; width: 300px; transform: rotate(4deg); }
.ticks { display: grid; gap: 10px; margin-top: 22px; font-weight: 500; }
.ticks li { display: flex; gap: 10px; align-items: baseline; }
.ticks li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--tint); transform: translateY(-1px); }

/* MARK: Themes */

.themes { background: var(--surface); border-block: 1px solid var(--hairline); }
.themes-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 6vw, 80px); align-items: center; }
.themes .section-head { margin-bottom: 34px; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.swatches button {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; border-radius: 22px; text-align: left;
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline); transition: transform .2s cubic-bezier(.3, 1.7, .5, 1), box-shadow .2s;
}
.swatches button:hover { transform: translateY(-3px); }
.swatches button[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--accent); }
.swatches i { grid-row: span 2; position: relative; width: 46px; height: 46px; border-radius: 14px; background: var(--sw-bg); box-shadow: inset 0 0 0 1px rgb(128 128 128 / .35); }
.swatches i::before { content: ""; position: absolute; left: 10px; top: 21px; width: 17px; height: 5px; border-radius: 3px; background: var(--sw-ink); box-shadow: 0 -9px 0 var(--sw-ink), 0 9px 0 var(--sw-ink); }
.swatches i::after { content: ""; position: absolute; right: 8px; top: 17px; width: 12px; height: 12px; border-radius: 50%; background: var(--sw-accent); }
.swatches strong { font-weight: 600; line-height: 1.1; align-self: end; }
.swatches span { font-size: .8rem; color: var(--ink-3); align-self: start; }
.theme-board { aspect-ratio: 1; border-radius: 40px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--hairline), var(--shadow); transition: background-color .35s; }

/* MARK: Details */

.details { display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px 28px; }
.details li { padding-top: 20px; border-top: 3px solid var(--ink); }
.details h3 { font-size: 1.28rem; }
.details p { margin-top: 8px; font-size: 1.02rem; color: var(--ink-2); }

/* MARK: FAQ */

.faq { display: grid; gap: 12px; }
.faq details { border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 26px; cursor: pointer; font-size: 1.22rem; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 16px; height: 16px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 3px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 3px 100% no-repeat; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details p { padding: 0 26px 24px; color: var(--ink-2); max-width: 44em; }

/* MARK: Finale */

.finale { padding: clamp(84px, 12vw, 170px) 0; background: var(--bg); text-align: center; overflow: hidden; }
.finale-inner { display: grid; justify-items: center; gap: 22px; }
.finale-mark { width: clamp(120px, 18vw, 190px); height: auto; border-radius: 22.4%; box-shadow: 0 30px 60px -20px rgb(0 0 0 / .6); overflow: hidden; }
.finale-mark .mark-red { animation: leave 3.6s cubic-bezier(.7, 0, .3, 1) infinite; }
@keyframes leave {
  0%, 55% { transform: translateY(0); }
  60% { transform: translateY(40px); }
  78%, 80% { transform: translateY(-1100px); }
  80.01% { transform: translateY(900px); }
  100% { transform: translateY(0); }
}
.finale h2 { font-size: clamp(3rem, 9vw, 7rem); line-height: .95; }
.finale p { font-size: 1.25rem; color: var(--ink-2); }
.finale-get { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 34px; margin-top: 14px; }
.scan { display: none; align-items: center; gap: 16px; padding: 12px 20px 12px 12px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); text-align: left; }
.scan img { width: 108px; height: 108px; padding: 8px; border-radius: 16px; background: #F7F4EE; }
.finale .scan p { font-size: .98rem; line-height: 1.35; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) and (min-width: 861px) { .scan { display: flex; } }
.noscript { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); }
.finale .fine { font-size: .9rem; color: var(--ink-3); }

/* MARK: Footer */

.footer { padding: 64px 0 40px; background: var(--muted); font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { margin-top: 14px; color: var(--ink-2); }
/* Instagram and Facebook, in their own colors on a plain disc. */
.socials { display: flex; gap: 10px; margin-top: 18px; }
.social { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s; }
.social svg { width: 22px; height: 22px; }
.social:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--hairline), 0 10px 18px -10px rgb(0 0 0 / .45); }
.social:active { transform: scale(.94); }
.social[hidden] { display: none; }
.social-tiktok { color: var(--ink); }
.footer nav { display: grid; gap: 10px; align-content: start; }
.footer nav h2 { font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.footer nav a { text-decoration: none; color: var(--ink-2); width: fit-content; }
.footer nav a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--hairline); font-size: .86rem; color: var(--ink-3); }

/* MARK: Text pages (privacy, terms, support, worlds) */

.page { padding: clamp(40px, 7vw, 90px) 0 clamp(70px, 10vw, 130px); background: linear-gradient(var(--bg-top), var(--bg) 420px); }
.page h1 { font-size: clamp(2.7rem, 7vw, 5rem); line-height: .98; }
.page .updated { margin-top: 16px; color: var(--ink-3); font-weight: 500; }
.prose { margin-top: 44px; }
.prose h2 { margin: 2.2em 0 .5em; font-size: clamp(1.5rem, 2.6vw, 1.9rem); line-height: 1.15; }
.prose h3 { margin: 1.6em 0 .4em; font-size: 1.2rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: .9em; }
.prose ul { display: grid; gap: .5em; margin: .8em 0; padding-left: 1.3em; list-style: disc; }
.prose ul ::marker { color: var(--accent); }
.prose a { color: var(--ink); font-weight: 500; }
.prose table { width: 100%; margin: 1em 0; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hairline); }
.prose th { font-weight: 600; color: var(--ink); }
.prose td { color: var(--ink-2); }
.table-scroll { overflow-x: auto; }
.callout { margin-top: 30px; padding: 22px 26px; border-radius: 24px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.callout p { color: var(--ink-2); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 30px; }
.card { display: grid; gap: 8px; align-content: start; padding: 24px 26px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); text-decoration: none; }
.card h2, .card h3 { margin: 0; font-size: 1.3rem; }
.card p { color: var(--ink-2); font-size: 1rem; }
a.card { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
a.card:hover { transform: translateY(-3px); }
.not-found { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.not-found .wrap { display: grid; justify-items: center; gap: 20px; }

/* MARK: Small screens */

@media (max-width: 1020px) {
  .details { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  body { font-size: 1.0625rem; }
  .wrap, .wrap.narrow { width: min(1200px, 100% - 32px); }
  .hero-grid, .worlds, .knot-play, .themes-grid, .atlas, .motion { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; display: grid; justify-items: center; }
  .hero h1 { justify-items: center; }
  .cta-row, .facts { justify-content: center; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .world-card { min-height: 300px; position: sticky; top: 76px; z-index: 3; box-shadow: 0 18px 30px -18px rgb(0 0 0 / .45); }
  .world-wall { grid-template-columns: repeat(7, 1fr); gap: 7px; }
  .world-wall button { font-size: .95rem; }
  .motion-phone, .atlas-phones { justify-self: center; }
  .modes { grid-template-columns: 1fr; }
  .mode-journey { grid-template-columns: 1fr; min-height: 0; padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 36px) 0; }
  .mode-journey .phone { position: relative; right: auto; top: auto; justify-self: center; width: min(280px, 70vw); margin: 10px 0 -260px; transform: none; }
  .theme-board { max-width: 440px; width: 100%; margin-inline: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .knot-side { order: -1; }
  .knot-picker { grid-template-columns: repeat(6, minmax(64px, 1fr)); overflow-x: auto; padding: 4px 2px 10px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .knot-picker::-webkit-scrollbar { display: none; }
  .knot-side .fine { display: none; }
}
@media (max-width: 560px) {
  .tabs button span { display: none; }
  .tabs { grid-template-columns: repeat(3, 1fr); }
  .tabs button { padding: 12px 12px; }
  .tabs button strong { font-size: 1rem; }
  .details { grid-template-columns: 1fr; gap: 26px; }
  .button { min-height: 54px; padding: 0 24px; }
  .store-badge { justify-self: center; }
  .store-badge img { height: 54px; }
  .hero .cta-row { display: grid; width: 100%; }
  .facts { gap: 6px 14px; font-size: .86rem; }
  .facts li { gap: 6px; }
  .brand { font-size: 1.3rem; }
  .brand-mark { width: 34px; height: 34px; }
  .play-stage { height: clamp(360px, 62vh, 520px); }
  .faq summary { padding: 18px 20px; font-size: 1.1rem; }
  .faq details p { padding: 0 20px 20px; }
  .numbers > div { padding: 18px 18px 16px; border-radius: 22px; }
  .swatches button { padding: 10px; column-gap: 10px; }
  .atlas-phones .phone { width: 44vw; border-radius: 34px; padding: 6px; }
  .atlas-phones .phone img { border-radius: 28px; }
  .tilt-right { margin-left: -26px; }
}

/* MARK: Calm mode */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .praise-track, .atlas-row { animation: none !important; }
  .praise, .atlas-rows { overflow-x: auto; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .nav, .flight-layer, .praise, .atlas-rows, video { display: none !important; }
  body { background: #fff; color: #000; }
}
