/* Dybe's website (concept doc, tab Website): an app landing page in the game's sky. Apple's system font for text, Fredoka
   (the game's font) only in the wordmark; clean gradients; the game on real-looking iPhones. */
@font-face { font-family: "Fredoka"; src: url(fonts/Fredoka-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --head: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --brand: "Fredoka", ui-rounded, system-ui, sans-serif;
  --ink: #1f1d2b;
  --muted: #5f5b6e;
  --paper: #f6f1ec;
  --line: #e3dcd4;
  --accent: #c2513f;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); line-height: 1.5; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; letter-spacing: -.025em; line-height: 1.05; text-wrap: balance; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* Navigation */
nav { display: flex; align-items: center; gap: 30px; height: 72px; font-size: 14px; }
nav .brand { display: flex; align-items: center; gap: 10px; font-family: var(--brand); font-size: 22px; font-weight: 600; margin-right: auto; }
nav .brand img { width: 30px; height: 30px; border-radius: 7px; }
nav .lang { display: flex; gap: 6px; }
nav .lang b { font-weight: 700; }
nav .lang a { opacity: .6; }
nav .lang a:hover, nav .link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

/* Store badge (Apple's artwork, unchanged) */
.store { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.store img { height: 54px; width: auto; }
.soon { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .5; }

/* The iPhone: titanium band, black bezel, the island, side buttons and a faint glare over the glass. */
.iphone { --w: 310px; --t: calc(var(--w) * .014); --b: calc(var(--w) * .036); --sw: calc(var(--w) - 2 * (var(--t) + var(--b)));
  position: relative; width: var(--w); padding: var(--t); flex: none; border-radius: calc(var(--sw) * .145 + var(--t) + var(--b));
  background: linear-gradient(155deg, #b9b6b0 0%, #f2f0ec 9%, #9a968f 24%, #dedbd5 48%, #8c8882 72%, #e6e3de 90%, #a9a59f 100%);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .28), 0 50px 90px -40px rgba(32, 24, 48, .55), 0 24px 40px -24px rgba(32, 24, 48, .4); }
.iphone .body { position: relative; padding: var(--b); border-radius: calc(var(--sw) * .145 + var(--b)); background: #050507;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); }
.iphone .screen { position: relative; aspect-ratio: 393 / 852; border-radius: calc(var(--sw) * .145); overflow: hidden; background: #e9c2a6; isolation: isolate; }
.iphone .screen video { width: 100%; height: 100%; object-fit: cover; }
.iphone .island { position: absolute; z-index: 2; left: 50%; top: calc(var(--sw) / .4613 * .0135); transform: translateX(-50%);
  width: calc(var(--sw) * .315); height: calc(var(--sw) / .4613 * .0435); border-radius: 999px; background: #000; }
.iphone .glare { position: absolute; z-index: 3; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, .03) 26%, rgba(255, 255, 255, 0) 40%); }
.iphone .btn { position: absolute; width: calc(var(--w) * .011); border-radius: 2px; background: linear-gradient(90deg, #8a8781, #e4e1dc 55%, #918d87); }
.iphone .btn.l { left: calc(var(--w) * -.009); }
.iphone .btn.r { right: calc(var(--w) * -.009); }
.iphone .b1 { top: 17%; height: 4.2%; } .iphone .b2 { top: 24%; height: 7.2%; } .iphone .b3 { top: 32.6%; height: 7.2%; } .iphone .b4 { top: 26.5%; height: 11.5%; }

/* First screen: the game's sky with the finished sculpture swaying in it. */
/* The video is sized by the narrower of the hero's width and height, so the sculpture stays in the right half beside the text. */
.hero { position: relative; height: 100svh; min-height: 640px; max-height: 880px; overflow: hidden; container-type: size; background: linear-gradient(#8f9aa8, #a5adb3 60%, #b4b3b0); }
.hero > video { position: absolute; top: 50%; left: 71%; width: min(89cqw, 84cqh * 16 / 9); height: auto; max-width: none; aspect-ratio: 16 / 9; object-fit: cover; transform: translate(-50%, -50%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(236, 236, 240, .55) 0%, rgba(236, 236, 240, .25) 34%, rgba(236, 236, 240, 0) 52%); }
.hero .wrap { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }
.hero .text { margin: auto 0; max-width: min(600px, 46cqw); padding-bottom: 40px; }
.hero .icon { width: 84px; height: 84px; border-radius: 19px; margin-bottom: 26px; box-shadow: 0 12px 30px -8px rgba(40, 30, 60, .4); }
.hero h1 { font-size: clamp(42px, 5.2vw, 72px); letter-spacing: -.035em; }
.hero .lead { font-size: 21px; margin: 22px 0 34px; max-width: 30ch; line-height: 1.45; color: #34314a; }

/* The story: one iPhone stands still while the stations scroll past it; each station swaps the phone's clip (crossfade)
   and lends the page its clip's sky. On phones the iPhone stays small at the top and the text scrolls below it. */
@property --s1 { syntax: "<color>"; inherits: true; initial-value: #f0d2c0; }
@property --s2 { syntax: "<color>"; inherits: true; initial-value: #f3dcc3; }
.story { position: relative; background: var(--s2); transition: --s1 .9s ease, --s2 .9s ease; }
.story .sky { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; background: linear-gradient(var(--s1), var(--s2)); }
.story .grid { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.story .pin { grid-column: 2; grid-row: 1; position: sticky; top: max(20px, calc(50vh - 330px)); align-self: start; display: flex; justify-content: center; padding: 0 0 40px; }
.story .steps { grid-column: 1; grid-row: 1; padding: 18vh 0 30vh; }
.story .intro { padding: 0 0 20vh; }
.story .intro + .station { margin-top: -10vh; }
.story .intro h2 { font-size: clamp(36px, 4.6vw, 56px); }
.story .intro p.muted { font-size: 20px; margin-top: 14px; }
.station { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .5s ease; }
.station.tool { min-height: 62vh; }
.station.on { opacity: 1; }
.station h3 { font-size: clamp(32px, 3.8vw, 48px); max-width: 15ch; }
.station p.muted { font-size: 20px; margin-top: 16px; max-width: 32ch; }
.station .label { font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: rgba(31, 29, 43, .55); margin-bottom: 14px; }
.station.tool h3 { display: flex; align-items: center; gap: 16px; font-size: clamp(30px, 3.4vw, 42px); }
.tile { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; flex: none; background: var(--c); box-shadow: 0 10px 22px -10px var(--c); }
.tile svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.story .muted { color: #4a4658; }
.iphone .screen video { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.iphone .screen video.on { opacity: 1; }
[data-tool="Brush"] { --c: #ff5038; } [data-tool="Cross"] { --c: #f0a800; } [data-tool="Beam"] { --c: #2c86f0; }
[data-tool="Flood"] { --c: #0fbf84; } [data-tool="Rainbow"] { --c: #9a62f0; }
[data-tool="Push"], [data-tool="Tape"], [data-tool="Build"], [data-tool="Chisel"] { --c: #5b6075; }

/* Closing band on the dusk-to-night sky */
.final { text-align: center; padding: 150px 0 60px; color: #fff; background: linear-gradient(#7a6494, #474c82 60%, #2e3058); }
.final .icon { width: 120px; height: 120px; border-radius: 27px; margin: 0 auto 30px; box-shadow: 0 16px 36px -10px rgba(10, 10, 30, .5); }
.final h2 { font-size: clamp(38px, 5vw, 60px); }
.final p { font-size: 20px; opacity: .8; margin: 16px auto 34px; max-width: 36ch; }
.final .store { justify-content: center; }
footer { display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; font-size: 13px; margin-top: 110px; }
footer a, footer span { opacity: .7; }
footer a:hover { opacity: 1; }

/* Imprint, privacy, support */
.legal { max-width: 720px; padding-bottom: 100px; }
.legal h1 { font-size: clamp(38px, 5vw, 56px); margin: 40px 0 24px; }
.legal h2 { font-size: 24px; margin: 40px 0 10px; letter-spacing: -.015em; }
.legal p, .legal address { font-size: 18px; font-style: normal; margin-top: 10px; }
.legal .lead { font-size: 21px; }
.legal a.mail { text-decoration: underline; text-underline-offset: 3px; }
.legal .back { display: inline-block; margin-top: 60px; font-weight: 600; }

@media (max-width: 860px) {
  nav .link { display: none; }
  .hero > video { top: 4%; left: 50%; width: auto; height: 48%; transform: translateX(-50%); }
  .hero::after { background: linear-gradient(0deg, rgba(232, 232, 236, .85) 0%, rgba(232, 232, 236, .4) 45%, rgba(232, 232, 236, 0) 70%); }
  .hero .text { margin: auto 0 60px; max-width: none; }
  .hero .icon { display: none; }
  .story .grid { grid-template-columns: 1fr; gap: 0; }
  .story .pin { grid-column: 1; grid-row: 1; top: 0; z-index: 2; padding: 14px 0 26px; margin: 0 -28px;
    background: linear-gradient(var(--s1) 88%, transparent); }
  .story .pin .iphone { --w: min(46vw, 23svh); }
  /* Pin and text share the one cell, so the pin sticks for the whole story; the text starts below it. */
  .story .steps { grid-column: 1; grid-row: 1; padding: calc(min(46vw, 23svh) * 2.09 + 70px) 0 40vh; }
  .story .intro { padding: 0 0 6vh; }
  .story .intro + .station { margin-top: 0; }
  .station, .station.tool { min-height: 46svh; justify-content: flex-start; }
  .station h3 { font-size: 28px; }
  .station.tool h3 { font-size: 26px; }
  .station p.muted, .story .intro p.muted { font-size: 17px; }
  .tile { width: 42px; height: 42px; border-radius: 12px; }
  .tile svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
.legal h3 { font-size: 19px; margin: 26px 0 0; letter-spacing: -.01em; }
