/* Dolphin: Padel landing kit, shared by the five variants.
   The page is plain: white by day, dark grey at night, following the system. All the colour is in the things on it
   (buttons, lesson nodes, the ball, props), as on Duolingo. Words on a bright face are always navy; white words only go on
   deep faces. Nothing is cropped by a container: where something leaves the screen it fades, it is never cut. */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900;1000&display=swap");

:root {
  color-scheme: light dark;
  /* brand constants, the same in both themes */
  --navy: #0a234f;
  --lime: #d7f35a;
  --coral: #ff6a3d;
  --blue: #2d63cc;
  --blue-d: #173a86;
  --court: #2f66d8;
  --court-d: #214fb4;
  --gold: #ffc61a;   --gold-d: #e6a000;
  --green: #5ad41f;  --green-d: #3fa90c;
  --azure: #22b7f5;  --azure-d: #0d90d2;
  --orange: #ff7f4d; --orange-d: #e45a22;
  --violet: #bd7fff; --violet-d: #9553ea;
  --pink: #ff86c8;   --pink-d: #e85aa6;
  --aqua: #2fdcc0;   --aqua-d: #10b398;
  --ok: #187a47;     --ok-d: #0f5c34;
  --no: #c93a40;
  --on-bright: #0a234f;
  /* surfaces and text */
  --bg: #ffffff;
  --soft: #f3f7fb;
  --card: #ffffff;
  --edge: #e2e8f0;
  --ink: #0a234f;
  --ink-2: #33486f;
  --meta: #52627c;
  --lime-d: #587200;
  --off: #dfe7f0;       /* a lesson still to come */
  --off-d: #bccadb;
  --tint: 20%;          /* how much of its colour a soft blob keeps */
  --blob-base: var(--bg);
  --amber: #ff9800;  --amber-d: #d96f22;
  --teal: color-mix(in oklab, var(--aqua) 55%, var(--aqua-d)); --teal-d: var(--aqua-d);
  --bezel-ring: rgba(255, 255, 255, 0.2);
  --shadow: rgba(10, 35, 79, 0.2);
  --mascot-shadow: rgba(10, 35, 79, 0.16);
  --mascot-halo: transparent;

  --font: ui-rounded, "SF Pro Rounded", Nunito, system-ui, sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --gutter: clamp(20px, 5vw, 56px);
  --s: 1;               /* scales a lesson path; a page sets it on the path's container */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131f24;
    --soft: #1a2930;
    --card: #202f36;
    --edge: #37464f;
    --ink: #f1f7fb;
    --ink-2: #d5e0e8;
    --meta: #a7b6c0;
    --lime-d: #8fae1e;
    --off: #37464f;
    --off-d: #2a373f;
    --tint: 9%;           /* at night the patch is a quiet grey disc with a trace of its colour; a strong tint goes muddy */
    --blob-base: var(--soft);
    --bezel-ring: rgba(255, 255, 255, 0.34);
    --shadow: rgba(0, 0, 0, 0.5);
    --mascot-shadow: rgba(0, 0, 0, 0.36);
    --mascot-halo: rgba(241, 247, 251, 0.22);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-weight: 700; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 900; letter-spacing: -0.02em; line-height: 1.04; text-wrap: balance; color: var(--ink); }
p { text-wrap: pretty; }
a { color: inherit; }
img, video, svg { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--azure); outline-offset: 3px; border-radius: 8px; }
.lede { font: 700 clamp(18px, 1.8vw, 22px)/1.45 var(--font); color: var(--meta); }

/* The depth button: a face on a lip that travels down when pressed. */
.btn {
  --face: var(--lime); --lip: var(--lime-d); --btn-ink: var(--on-bright); --travel: 5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border: 0; border-radius: 16px; cursor: pointer; text-decoration: none;
  font: 900 18px/1 var(--font); letter-spacing: 0.01em; color: var(--btn-ink); background: var(--face);
  box-shadow: 0 var(--travel) 0 var(--lip); transform: translateY(0);
  transition: transform 90ms var(--ease), box-shadow 90ms var(--ease), filter 120ms;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(var(--travel)); box-shadow: 0 0 0 var(--lip); }
.btn--blue { --face: var(--blue); --lip: var(--blue-d); --btn-ink: #fff; }
.btn--white { --face: #fff; --lip: #cfd9e6; --btn-ink: var(--navy); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 16px; border-radius: 14px; --travel: 4px; }

/* The official store badges, untouched. Both are the same height and always sit side by side (stacked, their different widths
   make them look like two sizes), so the height comes down on a narrow screen until the pair fits. */
.stores { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
.badge { display: block; flex: none; height: clamp(34px, 10.400vw, 56px); border-radius: 10px; transition: transform 140ms var(--spring); -webkit-tap-highlight-color: transparent; }
.badge img { display: block; height: 100%; width: auto; max-width: none; }
.badge:hover { transform: translateY(-2px); }
.badge:active { transform: scale(0.96); }

/* A card: Duolingo's 2 px outline with a heavier foot. */
.card { background: var(--card); border: 2px solid var(--edge); border-bottom-width: 5px; border-radius: 22px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-radius: 14px; background: var(--card); color: var(--ink); border: 2px solid var(--edge); border-bottom-width: 4px; font: 900 16px/1 var(--font); white-space: nowrap; }
.chip svg { width: 20px; height: 20px; flex: none; }
.chip--ok { background: var(--ok); border-color: var(--ok-d); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 900 21px/1 var(--font); letter-spacing: -0.02em; color: var(--ink); }
.brand img { width: 38px; height: 38px; display: block; border-radius: 10px; }

/* A soft round patch of colour for a phone or a prop to stand on. It sits behind; nothing is clipped to it. */
.blob { position: absolute; border-radius: 50%; background: color-mix(in oklab, var(--tone, var(--azure)) var(--tint), var(--blob-base)); transition: background-color 500ms var(--ease); }

/* The phone. --pw sets its width; everything else is in proportion. Screens are the app's own 1320 x 2868 captures. */
.phone {
  --pw: 300px;
  position: relative; flex: none; width: var(--pw); padding: calc(var(--pw) * 0.034); border-radius: calc(var(--pw) * 0.165);
  background: linear-gradient(150deg, #4a5873 0%, #0d1424 20%, #0d1424 76%, #38455f 100%);
  box-shadow: inset 0 0 0 calc(var(--pw) * 0.006) var(--bezel-ring), 0 calc(var(--pw) * 0.09) calc(var(--pw) * 0.18) calc(var(--pw) * -0.07) var(--shadow);
}
.phone::before, .phone::after { content: ""; position: absolute; width: calc(var(--pw) * 0.012); border-radius: 3px; background: #26324a; }
.phone::before { left: calc(var(--pw) * -0.009); top: 22%; height: 7%; box-shadow: 0 calc(var(--pw) * 0.2) 0 #26324a, 0 calc(var(--pw) * 0.36) 0 #26324a; }
.phone::after { right: calc(var(--pw) * -0.009); top: 30%; height: 11%; }
.phone__screen { position: relative; display: block; overflow: hidden; aspect-ratio: 1320 / 2868; border-radius: calc(var(--pw) * 0.132); background: #0a234f; isolation: isolate; }
.phone__screen > img, .phone__screen > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* The reel is the store preview with its caption band cut off, so the phone draws its own status bar above it. */
.phone__screen--reel > video { top: 6.15%; height: 93.85%; transition: opacity 160ms linear; }
.phone__screen--reel > video.is-dip { opacity: 0; }
.phone__status {
  position: absolute; inset: 0 0 auto; height: 6.15%; z-index: 2; display: flex; align-items: center; justify-content: space-between;
  padding: 0 9% 0 11%; background: #0a234f; color: #fff; transition: background-color 180ms linear, color 180ms linear; font: 800 calc(var(--pw) * 0.047) / 1 var(--font);
}
.phone__status::before { content: ""; position: absolute; left: 50%; top: 26%; width: 30%; height: 58%; transform: translateX(-50%); border-radius: 99px; background: #000; }
.phone__status svg { height: calc(var(--pw) * 0.04); width: auto; fill: currentColor; }

/* A stage: a soft round patch with a whole phone on it and a few things around it. Everything is placed inside the stage's own
   box and sized from its width, so nothing can hang off the screen. */
.stage { position: relative; container-type: inline-size; width: 100%; max-width: 540px; aspect-ratio: 1 / 1.1; margin: 0 auto; }
.stage .blob { left: 5%; right: 5%; top: 50%; aspect-ratio: 1; transform: translateY(-50%); }
.stage .phone { --pw: 46cqw; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(var(--tilt, 0deg)); }
.stage__ball { position: absolute; z-index: 3; left: 3%; bottom: 3%; width: 26cqw; }
.stage__ball .pball { width: 100%; height: auto; }
.stage__item { position: absolute; z-index: 3; }
.stage .prop { width: 17cqw; height: 17cqw; }
.stage .chip { font-size: clamp(13px, 3.400cqw, 17px); height: auto; padding: 0.55em 0.8em; }
.tile { display: flex; align-items: center; gap: 0.6em; padding: 0.65em 0.9em; border-radius: 16px; background: var(--card); color: var(--ink); border: 2px solid var(--edge); border-bottom-width: 5px; font: 800 clamp(13px, 3.300cqw, 17px)/1.2 var(--font); white-space: nowrap; }
.tile i { display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; border: 2px solid var(--edge); font: 900 0.8em/1 var(--font); font-style: normal; color: var(--meta); flex: none; }
.tile--pick { background: #ffdf4f; border-color: #c79a14; color: var(--on-bright); }
.tile--pick i { border-color: #967000; color: var(--on-bright); }

/* Props: one drawn set, navy outline on flat colour, like the ball. <svg class="prop"><use href="#p-racket"/></svg> */
.prop { display: block; width: 72px; height: 72px; overflow: visible; }
.bob { animation: bob 4.4s ease-in-out infinite; animation-delay: var(--bd, 0s); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-10px) rotate(calc(var(--r, 0deg) + 3deg)); } }
/* Things that arrive, arrive once, with a spring, when their section is on screen. */
.pop { transform: scale(0); opacity: 0; transition: transform 240ms var(--ease), opacity 180ms linear; }
.is-in .pop, .pop.is-in { transform: scale(1); opacity: 1; transition: transform 560ms var(--spring) var(--d, 0ms), opacity 200ms linear var(--d, 0ms); }

/* Lesson-path pieces, after the app's Lessons tab: a 90 x 72 face on an 8 px lip. */
.pnode { --u: var(--green); --u-d: var(--green-d); position: relative; flex: none; width: calc(90px * var(--s)); height: calc(80px * var(--s)); }
.pnode::before, .pnode::after { content: ""; position: absolute; left: 0; width: 100%; height: calc(72px * var(--s)); border-radius: 50%; transition: background-color 260ms var(--ease); }
.pnode::before { top: calc(8px * var(--s)); background: var(--u-d); }
.pnode::after { top: 0; background: linear-gradient(172deg, transparent 28%, rgba(255, 255, 255, 0.26) 28% 44%, transparent 44% 53%, rgba(255, 255, 255, 0.16) 53% 60%, transparent 60%), var(--u); }
.pnode > svg { position: absolute; z-index: 1; left: 50%; top: calc(36px * var(--s)); width: calc(40px * var(--s)); height: calc(40px * var(--s)); transform: translate(-50%, -50%); fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 260ms var(--ease); }
.pnode--locked { --u: var(--off); --u-d: var(--off-d); }
.pnode--locked > svg { stroke: var(--off-d); }
.pnode--gold { --u: var(--gold); --u-d: var(--gold-d); }
.pnode--sky { --u: var(--azure); --u-d: var(--azure-d); }
.pnode--violet { --u: var(--violet); --u-d: var(--violet-d); }
.pnode--coral { --u: var(--orange); --u-d: var(--orange-d); }
.pnode--aqua { --u: var(--aqua); --u-d: var(--aqua-d); }
.pnode--pink { --u: var(--pink); --u-d: var(--pink-d); }
.pnode.is-stamp::after { animation: pnode-stamp 460ms var(--spring); }
.pnode.is-stamp > svg { animation: pnode-glyph 460ms var(--spring); }
@keyframes pnode-stamp { 18% { transform: translateY(calc(7px * var(--s))) scale(1.06, 0.92); } }
@keyframes pnode-glyph { 0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; } 18% { transform: translate(-50%, calc(-50% + 7px * var(--s))) scale(1.16); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); } }
.pnode__ring { position: absolute; left: 50%; top: calc(40px * var(--s)); width: calc(124px * var(--s)); height: calc(106px * var(--s)); transform: translate(-50%, -50%); border-radius: 50%; border: calc(7px * var(--s)) solid color-mix(in oklab, var(--u) 40%, var(--bg)); }
/* The unit block: white words, as on the app's Lessons tab (styles/path.css --ub-ink). */
.ublock { --u: var(--green); --u-d: var(--green-d); display: flex; align-items: center; gap: 14px; min-height: 66px; padding: 10px 18px; border-radius: 18px; background: var(--u); color: #fff; box-shadow: 0 5px 0 var(--u-d); transition: background-color 280ms var(--ease), box-shadow 280ms var(--ease); }
.ublock b { display: block; font: 900 20px/1.15 var(--font); letter-spacing: -0.01em; }
.ublock span { display: block; font: 800 15px/1.25 var(--font); }

/* Mobile download dock: slides up once the hero's own buttons have scrolled away. */
.dock {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50; display: none; align-items: center; gap: 12px;
  padding: 10px 10px 13px 12px; border-radius: 22px; background: var(--card); border: 2px solid var(--edge); border-bottom-width: 5px;
  box-shadow: 0 18px 40px -14px var(--shadow); transform: translateY(170%); transition: transform 420ms var(--spring);
}
.dock.is-up { transform: translateY(0); }
.dock__icon { width: 46px; height: 46px; border-radius: 12px; flex: none; overflow: hidden; }
.dock__icon img { width: 100%; height: 100%; display: block; }
.dock__text { flex: 1; min-width: 0; line-height: 1.15; }
.dock__text b { display: block; font: 900 16px/1.15 var(--font); color: var(--ink); }
.dock__text span { font: 700 13px/1.2 var(--font); color: var(--meta); }
@media (max-width: 760px) {
  .dock { display: flex; }
  /* The dock carries the name, the icon and the button on a phone, so the page has no header there. */
  body.has-dock header.top { display: none; }
  body.has-dock main { padding-top: 22px; }
}

/* A closing card and the footer, the same on every page */
.finale { max-width: 1120px; margin: clamp(64px, 9vw, 120px) auto 0; padding: 0 var(--gutter); }
.finale__in { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px clamp(24px, 5vw, 64px); padding: clamp(36px, 5.500vw, 68px); border-radius: 40px; background: var(--court); color: #fff; box-shadow: 0 8px 0 var(--court-d); }
.finale h2 { font-size: clamp(34px, 4.800vw, 64px); letter-spacing: -0.03em; color: #fff; }
.finale p { margin-top: 14px; max-width: 34ch; font: 700 clamp(18px, 1.700vw, 21px)/1.4 var(--font); color: #e3ecff; }
.finale p b { font-weight: 1000; font-size: 1.3em; line-height: 1; letter-spacing: -0.01em; color: var(--lime); font-variant-numeric: tabular-nums; }
.finale .stores { margin-top: 26px; }
.finale__ball { width: clamp(120px, 15vw, 200px); --mascot-shadow: rgba(3, 16, 42, 0.34); --mascot-halo: transparent; }
.finale__ball .pball { width: 100%; height: auto; }
.foot { max-width: 1120px; margin: 0 auto; padding: 34px var(--gutter) 44px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; font: 700 15px/1.3 var(--font); color: var(--meta); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
@media (max-width: 760px) {
  .finale__in { grid-template-columns: 1fr; text-align: center; border-radius: 32px; }
  .finale p { margin-inline: auto; }
  .finale .stores { justify-content: center; }
  .finale__ball { order: -1; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .pop { transform: none; opacity: 1; }
}
