/* Fonts are served from this site, never from a third party (SIL OFL 1.1, licenses in assets/fonts/).
   Variable woff2 from the Fontsource packages; latin-ext loads only when a page uses one of its glyphs. */
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("assets/fonts/bricolage-grotesque-latin-ext-opsz-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("assets/fonts/bricolage-grotesque-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #000;
  --ink: #f5f1ea;
  --mute: rgba(245, 241, 234, 0.56);
  --faint: rgba(245, 241, 234, 0.08);
  --line: rgba(245, 241, 234, 0.09);
  --orange: #ff5f1f;
  --spring: cubic-bezier(0.22, 1.18, 0.36, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
html { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
em { font-style: normal; color: var(--orange); }

/* One language at a time. */
html[data-lang="it"] [data-l="en"], html[data-lang="en"] [data-l="it"] { display: none !important; }

/* Film grain over everything: depth without noise in the layout. */
.grain {
  position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: 0.07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.pet { display: block; width: 100%; height: 100%; }

/* ---------------------------------------------------------------- header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid rgba(245, 241, 234, 0.05);
}
.brand { display: flex; align-items: center; gap: 9px; font: 700 18px/1 var(--display); letter-spacing: -0.02em; }
.brand .pet { width: 28px; height: 28px; }
.top nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 28px); font-size: 14px; color: var(--mute); }
.top nav a { transition: color 0.25s; }
.top nav a:hover { color: var(--ink); }
.lang { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; padding: 6px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); }
@media (max-width: 640px) { .top nav a { display: none; } }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 110px 20px 80px; text-align: center;
}
.glow {
  position: absolute; left: 50%; top: 38%; width: min(900px, 140vw); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 95, 31, 0.2), rgba(255, 95, 31, 0.05) 45%, transparent 70%);
  pointer-events: none; animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.8; } }
.hero-pet {
  position: relative; width: clamp(200px, 34vh, 360px); aspect-ratio: 1;
  animation: rise 1.4s var(--out) both; outline: none;
  -webkit-tap-highlight-color: transparent;
}
.hero-pet:focus-visible { outline: 2px solid var(--orange); outline-offset: 8px; border-radius: 50%; }
.caption {
  display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 26px;
  padding: 7px 14px; border-radius: 99px; background: var(--faint); border: 1px solid var(--line);
  font-size: 13px; color: var(--mute); animation: rise 1.4s 0.15s var(--out) both;
}
.cap-dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; transition: background 0.5s; }
#cap-text { display: inline-block; min-width: 9ch; transition: opacity 0.25s, transform 0.25s var(--out); }
#cap-text.swap { opacity: 0; transform: translateY(4px); }

.display {
  margin: 0; font: 760 clamp(46px, 8.4vw, 118px)/0.95 var(--display);
  font-variation-settings: "opsz" 96; letter-spacing: -0.045em;
}
.display.small { font-size: clamp(38px, 5.6vw, 76px); }
.hero .line { display: block; animation: rise 1.3s var(--out) both; }
.hero .line:nth-child(1) { animation-delay: 0.25s; }
.hero .line:nth-child(2) { animation-delay: 0.36s; }
.lead { max-width: 620px; margin: 24px auto 0; color: var(--mute); font-size: clamp(16px, 1.5vw, 19px); }
.hero .lead { animation: rise 1.3s 0.5s var(--out) both; }
.ctas { display: flex; gap: 12px; margin-top: 34px; flex-wrap: wrap; justify-content: center; animation: rise 1.3s 0.62s var(--out) both; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 99px;
  font-weight: 600; font-size: 15px; transition: transform 0.35s var(--spring), background 0.25s, border-color 0.25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn.solid { background: var(--ink); color: #000; }
.btn.ghost { border: 1px solid var(--line); background: var(--faint); }
.btn.ghost:hover { border-color: rgba(245, 241, 234, 0.25); }
.btn svg { width: 16px; height: 16px; }
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(0.98); } }

/* ---------------------------------------------------------------- story */
.story {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px); padding: 0 clamp(16px, 5vw, 72px); max-width: 1320px; margin: 0 auto;
}
.stage { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.screen {
  position: relative; width: 100%; aspect-ratio: 16 / 10; container-type: inline-size;
  border-radius: 2.2cqw; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 95, 31, 0.07), transparent 60%),
    linear-gradient(180deg, #0d0d10, #050506);
  border: 1px solid var(--line);
  box-shadow: 0 40px 120px -40px rgba(255, 95, 31, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
/* A quiet desktop: one window with a few lines of text, so the notch sits on a Mac. */
.desk { position: absolute; left: 12%; right: 12%; top: 22%; bottom: 10%; border-radius: 1.4cqw; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(255, 255, 255, 0.04); }
.desk::before { content: ""; position: absolute; left: 2cqw; top: 1.6cqw; width: 5cqw; height: 1cqw; border-radius: 1cqw;
  background: radial-gradient(circle at 0.5cqw 50%, rgba(255,255,255,.14) 0.45cqw, transparent 0.5cqw), radial-gradient(circle at 2.2cqw 50%, rgba(255,255,255,.1) 0.45cqw, transparent 0.5cqw), radial-gradient(circle at 3.9cqw 50%, rgba(255,255,255,.08) 0.45cqw, transparent 0.5cqw); }
.desk i { display: block; height: 0.9cqw; margin: 0 4cqw 1.6cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.05); }
.desk i:first-child { margin-top: 5.5cqw; width: 40%; background: rgba(255, 255, 255, 0.08); }
.desk i:nth-child(3) { width: 82%; } .desk i:nth-child(4) { width: 64%; } .desk i:nth-child(5) { width: 74%; }
.bezel { position: absolute; inset: 0 0 auto; height: 3.8cqw; background: rgba(255, 255, 255, 0.025); border-bottom: 1px solid rgba(255, 255, 255, 0.03); }

/* The notch: one element morphing between shapes, its contents fading in after it lands. */
.notch {
  --w: 15cqw; --h: 3.8cqw; --r: 1.4cqw;
  position: absolute; top: 0; left: 50%; width: var(--w); height: var(--h);
  transform: translateX(-50%); background: #000; border-radius: 0 0 var(--r) var(--r);
  transition: width 0.75s var(--spring), height 0.75s var(--spring), border-radius 0.75s var(--spring);
  will-change: width, height;
  font-size: clamp(8px, 1.55cqw, 15px); line-height: 1.35;
}
.notch[data-state="listen"] { --w: 44cqw; --h: 9.4cqw; --r: 2.6cqw; }
.notch[data-state="stealth"] { --w: 66cqw; --h: 14.5cqw; --r: 3.2cqw; }
.notch[data-state="music"] { --w: 56cqw; --h: 17cqw; --r: 3.4cqw; }
.notch[data-state="agent"] { --w: 60cqw; --h: 17.5cqw; --r: 3.4cqw; }

.n-left, .n-right {
  position: absolute; top: 0; height: 3.8cqw; display: flex; align-items: center; gap: 0.8cqw;
  transition: opacity 0.35s;
}
.n-left { left: 1.6cqw; }
.n-right { right: 1.8cqw; }
.n-left .pet { width: 2.6cqw; height: 2.6cqw; }
.n-left .art { width: 2.3cqw; height: 2.3cqw; border-radius: 0.5cqw; background: linear-gradient(135deg, #e7b24a, #c4462b 60%, #3a1d2f); display: none; }
.notch[data-state="music"] .n-left .pet { display: none; }
.notch[data-state="music"] .n-left .art { display: block; }
.n-right > * { display: none; }
.notch[data-state="listen"] .wave { display: flex; }
.notch[data-state="music"] .eq, .notch[data-state="music"] .left { display: flex; }
.notch[data-state="stealth"] .n-left .pet, .notch[data-state="agent"] .n-left .pet { opacity: 1; }
.left { font-size: 0.85em; font-weight: 600; color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }

.wave, .eq { align-items: center; gap: 0.35cqw; height: 2cqw; }
.wave i, .eq i { display: block; width: 0.42cqw; border-radius: 1cqw; background: #fff; animation: bar 0.9s ease-in-out infinite; }
.wave i { height: 1.8cqw; }
.wave i:nth-child(2) { animation-delay: -0.2s; } .wave i:nth-child(3) { animation-delay: -0.45s; }
.wave i:nth-child(4) { animation-delay: -0.1s; } .wave i:nth-child(5) { animation-delay: -0.6s; }
.eq i { height: 1.6cqw; background: #f1b979; animation-duration: 0.7s; }
.eq i:nth-child(2) { animation-delay: -0.3s; } .eq i:nth-child(3) { animation-delay: -0.15s; } .eq i:nth-child(4) { animation-delay: -0.5s; }
@keyframes bar { 0%, 100% { transform: scaleY(0.35); } 50% { transform: scaleY(1); } }

.layer {
  position: absolute; inset: 4.6cqw 2.2cqw 1.8cqw; display: flex; flex-direction: column; justify-content: center;
  opacity: 0; transform: translateY(0.8cqw) scale(0.98); pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.notch[data-state="listen"] .l-listen, .notch[data-state="stealth"] .l-stealth,
.notch[data-state="music"] .l-music, .notch[data-state="agent"] .l-agent {
  opacity: 1; transform: none; transition: opacity 0.45s 0.28s, transform 0.6s 0.28s var(--out);
}
.l-listen { align-items: center; inset-block-start: 3.8cqw; }
.said { color: rgba(255, 255, 255, 0.92); font-weight: 500; }
.l-stealth { gap: 0.8cqw; text-align: left; }
.l-stealth .q { color: rgba(255, 255, 255, 0.45); font-size: 0.9em; }
.l-stealth .a { color: #fff; font-weight: 600; font-size: 1.12em; line-height: 1.3; }
.l-music { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: 1fr auto; gap: 1cqw 1.6cqw; align-items: center; }
.cover { grid-row: 1; width: 7.6cqw; height: 7.6cqw; border-radius: 1.2cqw; background: linear-gradient(135deg, #e7b24a, #c4462b 60%, #3a1d2f); box-shadow: 0 1cqw 3cqw -1cqw rgba(231, 120, 60, 0.55); }
.meta { display: flex; flex-direction: column; min-width: 0; }
.meta b { font-size: 1.2em; }
.meta span { color: rgba(255, 255, 255, 0.55); font-size: 0.9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.controls { display: flex; align-items: center; gap: 1.6cqw; }
.controls i { display: block; width: 1.6cqw; height: 1.6cqw; background: #fff; }
.controls .prev { clip-path: polygon(100% 0, 45% 50%, 100% 100%, 55% 100%, 0 50%, 55% 0); }
.controls .next { clip-path: polygon(0 0, 55% 50%, 0 100%, 45% 100%, 100% 50%, 45% 0); }
.controls .play { width: 3.6cqw; height: 3.6cqw; border-radius: 50%; position: relative; }
.controls .play::before, .controls .play::after { content: ""; position: absolute; top: 31%; width: 0.45cqw; height: 38%; background: #000; border-radius: 0.2cqw; }
.controls .play::before { left: 38%; } .controls .play::after { right: 38%; }
.bar { grid-column: 1 / -1; height: 0.5cqw; border-radius: 1cqw; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.bar i { display: block; height: 100%; width: 42%; background: #f1b979; border-radius: inherit; }
.notch[data-state="music"] .bar i { animation: progress 14s linear infinite; }
@keyframes progress { from { width: 38%; } to { width: 64%; } }

.l-agent { gap: 1cqw; padding: 1.2cqw 1.6cqw; border-radius: 1.8cqw; background: rgba(255, 140, 40, 0.11); border: 1px solid rgba(255, 140, 40, 0.32); inset: 4.4cqw 1.8cqw 1.6cqw; }
.who { display: flex; align-items: center; gap: 0.8cqw; font-weight: 600; }
.hand { width: 1.5cqw; height: 1.5cqw; border-radius: 50%; background: #ff9a3c; }
.l-agent code { font: 500 0.95em/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0.8cqw 1cqw; border-radius: 0.8cqw; background: rgba(255, 255, 255, 0.06); }
.buttons { display: flex; justify-content: flex-end; gap: 0.8cqw; }
.buttons i { font-style: normal; font-weight: 600; font-size: 0.9em; padding: 0.4cqw 1.2cqw; border-radius: 99px; background: rgba(255, 255, 255, 0.08); }
.buttons .ok { background: #ff9a3c; color: #000; }

.steps { padding: 30svh 0 30svh; }
.step {
  min-height: 70svh; display: flex; flex-direction: column; justify-content: center;
  opacity: 0.22; transform: translateX(10px); transition: opacity 0.6s var(--out), transform 0.8s var(--out);
}
.step.on { opacity: 1; transform: none; }
.step .num { margin: 0 0 12px; font: 600 13px/1 var(--body); letter-spacing: 0.14em; color: var(--orange); }
.step h2 { margin: 0; font: 720 clamp(30px, 3.6vw, 50px)/1.02 var(--display); letter-spacing: -0.035em; }
.step p:not(.num) { margin: 16px 0 0; color: var(--mute); font-size: 18px; max-width: 30ch; }

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; gap: 0; }
  .stage { top: 64px; height: auto; padding: 8px 0 18px; z-index: 2; background: linear-gradient(#000 85%, transparent); }
  .steps { padding: 6svh 0 20svh; }
  .step { min-height: 62svh; transform: none; }
  .notch { font-size: clamp(7px, 2.3cqw, 13px); }
}

/* ---------------------------------------------------------------- pets */
.pets { padding: 18svh clamp(16px, 5vw, 72px) 10svh; text-align: center; max-width: 1320px; margin: 0 auto; }
.pets .lead { margin-bottom: 56px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card {
  margin: 0; padding: 22px 20px 26px; border-radius: 30px; text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  border: 1px solid var(--line);
  transition: transform 0.6s var(--spring), border-color 0.4s, background 0.4s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255, 95, 31, 0.4); background: linear-gradient(180deg, rgba(255, 95, 31, 0.07), rgba(255, 255, 255, 0.012)); }
.card .pet { width: 100%; aspect-ratio: 1; height: auto; }
.card figcaption { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.card b { font: 700 22px/1.1 var(--display); letter-spacing: -0.02em; }
.card figcaption > span { color: var(--mute); font-size: 14.5px; line-height: 1.45; }
.brain { font-style: normal; font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; margin-top: 4px; transition: color 0.6s; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .card { padding: 14px 14px 18px; border-radius: 24px; } .card b { font-size: 19px; } }

/* ---------------------------------------------------------------- film + get */
.film { padding: 6svh clamp(16px, 5vw, 72px); }
.frame { max-width: 1040px; margin: 0 auto; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: #050505; }
.frame video { display: block; width: 100%; height: auto; }

.get { padding: 16svh 20px 12svh; text-align: center; display: flex; flex-direction: column; align-items: center; }
.get .pet { width: clamp(150px, 22vh, 220px); height: auto; aspect-ratio: 1; margin-bottom: 20px; }
.specs { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 40px 0 0; padding: 0; }
.specs li { display: flex; flex-direction: column; gap: 2px; padding: 14px 22px; border-radius: 18px; background: var(--faint); border: 1px solid var(--line); min-width: 150px; }
.specs b { font: 700 20px/1.1 var(--display); }
.specs span { color: var(--mute); font-size: 13px; }

.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 30px clamp(16px, 5vw, 72px) 40px; color: var(--mute); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--out), transform 1.2s var(--out); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .notch, .layer, .step, .reveal, .card { transition-duration: 0.2s !important; }
  .reveal { transform: none; }
}

/* ---------------------------------------------------------------- prices
   One motif: Pixi's dust grains are the AI messages. Free counts 50 of them a day; Pixi lets them flow.
   Text here is held to AAA (--text is about 11:1 on black). Motion lives under .prices.motion, which main.js adds
   only when the visitor hasn't asked for reduced motion; without it every element is simply visible. */
.prices {
  --text: rgba(245, 241, 234, 0.8);
  --warm: rgba(255, 95, 31, 0.09);
  --warm-line: rgba(255, 95, 31, 0.42);
  max-width: 1200px; margin: 0 auto; padding: 16svh clamp(16px, 5vw, 72px) 8svh;
}
.prices-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; gap: 18px 56px; margin-bottom: clamp(40px, 7vh, 72px); }
.prices-lead { margin: 0 0 0.6em; max-width: 30ch; color: var(--text); font-size: clamp(18px, 1.7vw, 22px); line-height: 1.45; }
.tier h3 { margin: 0; font: 760 clamp(28px, 2.8vw, 38px)/1 var(--display); letter-spacing: -0.035em; }
.tier p { margin: 0; color: var(--text); font-size: 17px; line-height: 1.55; max-width: 58ch; }
.tier .pet { flex: none; height: auto; aspect-ratio: 1; }
.tier .btn { justify-content: center; translate: var(--tx, 0) var(--ty, 0); transition: transform 0.35s var(--spring), translate 0.6s var(--out), background 0.25s, border-color 0.25s; }
.prices a:focus-visible, .period input:focus-visible + label { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Free: a band, no box. Mochi dozes next to today's 50 grains. */
.tier.free { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; align-items: center; gap: 22px 36px; padding: 30px 0; }
.tier.free::before, .tier.free::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--line); transform-origin: left center; }
.tier.free::before { top: 0; }
.tier.free::after { bottom: 0; }
.tier.free .pet { width: 96px; }
.tier-copy { display: grid; gap: 10px; }
.tier.free .amount { margin-left: 0.3em; color: var(--text); font-weight: 600; }
.grains { display: grid; grid-template-columns: repeat(25, 8px); gap: 7px 6px; }
.grains i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); opacity: 0.85; }

/* Paid: Pixi is the big warm block, Sponsor the smaller one that holds the wall. CTAs sit on the same baseline.
   A soft light follows the pointer inside each block (main.js sets --mx/--my). */
.paid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; margin-top: 22px; }
.tier.pixi, .tier.sponsor { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 18px; padding: clamp(26px, 3.2vw, 44px); border-radius: 34px; }
.tier.pixi { background: var(--warm); border: 1px solid var(--warm-line); }
.tier.sponsor { background: var(--faint); border: 1px solid var(--line); }
.tier.pixi::before, .tier.sponsor::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(460px circle at var(--mx, 70%) var(--my, 0%), var(--glow), transparent 62%);
  opacity: 0; transition: opacity 0.8s var(--out);
}
.tier.pixi { --glow: rgba(255, 95, 31, 0.17); }
.tier.sponsor { --glow: rgba(245, 241, 234, 0.08); }
.tier.pixi:hover::before, .tier.sponsor:hover::before { opacity: 1; }
.tier-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.tier.pixi .pet { width: clamp(112px, 12vw, 156px); margin: -14px -10px -22px 0; }
.tier.sponsor .pet { width: clamp(92px, 9vw, 120px); margin: -10px -6px -16px 0; }
.tagline { margin-top: 10px !important; }
.tier .price { margin: 0; color: var(--ink); font: 800 clamp(52px, 6.2vw, 84px)/0.92 var(--display); font-variation-settings: "opsz" 96; letter-spacing: -0.05em; }
.tier.sponsor .price { margin-top: -6px; font-size: clamp(44px, 4.6vw, 60px); }
.tier .price small { margin-left: 0.25em; color: var(--text); font: 500 17px/1 var(--body); letter-spacing: 0; white-space: nowrap; }
.tier.sponsor .btn, .cta-swap { margin-top: auto; }
.tier.sponsor .btn { align-self: flex-start; }

/* Unlimited, shown: the same grains, orange, flowing past without end (main.js eases the flow in and out). */
.stream {
  height: 8px; margin: 2px 0;
  background-image: radial-gradient(circle at 4px 4px, var(--orange) 0 3.4px, transparent 3.9px);
  background-size: 14px 8px; background-repeat: repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

/* Monthly / yearly: two radios and a sliding pill, no script. Price, line and checkout roll between the two:
   the leaving one goes up and blurs, the arriving one rises from below. */
.period { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; align-self: flex-start; margin: 4px 0 0; padding: 4px; min-inline-size: 0; border: 1px solid var(--warm-line); border-radius: 99px; background: rgba(0, 0, 0, 0.4); }
.period::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 99px; background: var(--ink); transition: transform 0.65s var(--out); }
.tier.pixi:has(#period-year:checked) .period::before { transform: translateX(100%); }
.period input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.period label { position: relative; padding: 9px 20px; border-radius: 99px; color: var(--text); font-size: 15px; font-weight: 600; text-align: center; cursor: pointer; transition: color 0.45s var(--out); }
.period input:checked + label { color: var(--bg); }
.swap { display: grid; justify-items: start; }
.swap > * { grid-area: 1 / 1; transition: opacity 0.6s var(--out), transform 0.8s var(--out), filter 0.6s var(--out), visibility 0s; }
.tier.pixi:has(#period-year:checked) .swap > .month,
.tier.pixi:not(:has(#period-year:checked)) .swap > .year {
  opacity: 0; filter: blur(10px); visibility: hidden; pointer-events: none;
  transition-duration: 0.4s, 0.5s, 0.4s, 0s; transition-delay: 0s, 0s, 0s, 0.4s;
}
.tier.pixi:has(#period-year:checked) .swap > .month { transform: translateY(-30%); }
.tier.pixi:not(:has(#period-year:checked)) .swap > .year { transform: translateY(30%); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wall { display: flex; flex-wrap: wrap; gap: 8px; }
.wall > span { padding: 8px 15px; border-radius: 99px; background: rgba(245, 241, 234, 0.06); border: 1px solid var(--line); font-size: 15px; }
.wall .empty { color: var(--text); }
.prices .note { max-width: 72ch; margin: 30px 0 0; color: var(--text); font-size: 15px; line-height: 1.6; }

/* ---- the choreography (only with .prices.motion) ---- */
/* Heading: every word rises out of its own mask. */
.prices .w { display: inline-block; overflow: clip; padding: 0 0.03em 0.14em; margin-bottom: -0.14em; vertical-align: top; }
.prices .w > span { display: inline-block; }
.prices .w.p { margin-left: -0.1em; }
.prices.motion .prices-head .w > span { transform: translateY(112%); transition: transform 1.25s var(--out) calc(var(--wi) * 80ms); }
.prices.motion .prices-head.in .w > span { transform: none; }
.prices.motion .prices-lead { opacity: 0; translate: 0 16px; transition: opacity 1s var(--out) 0.45s, translate 1.2s var(--out) 0.45s; }
.prices.motion .prices-head.in .prices-lead { opacity: 1; translate: none; }

/* Free band: the rules draw themselves, then Mochi, the words, and the grains light up in a wave. */
.prices.motion .tier.free::before, .prices.motion .tier.free::after { transform: scaleX(0); transition: transform 1.6s var(--out); }
.prices.motion .tier.free::after { transition-delay: 0.12s; }
.prices.motion .tier.free.in::before, .prices.motion .tier.free.in::after { transform: none; }
.prices.motion .tier.free > .pet, .prices.motion .tier.free > .tier-copy { opacity: 0; translate: 0 18px; transition: opacity 0.9s var(--out), translate 1.1s var(--out); }
.prices.motion .tier.free > .tier-copy { transition-delay: 0.1s; }
.prices.motion .tier.free > .btn { opacity: 0; filter: blur(6px); transition: opacity 0.9s var(--out) 0.9s, filter 0.9s var(--out) 0.9s, transform 0.35s var(--spring), translate 0.6s var(--out); }
.prices.motion .tier.free.in > * { opacity: 1; translate: none; filter: none; }
.prices.motion .grains i { opacity: 0.1; transform: scale(0.45); }
.prices.motion .tier.free.in .grains i {
  animation: grain 0.8s var(--out) calc(var(--i) * 20ms + 0.3s) both, glint 7s ease-in-out calc(var(--i) * 55ms + 2.6s) infinite;
}
@keyframes grain { from { opacity: 0.1; transform: scale(0.45); } to { opacity: 0.85; transform: none; } }
@keyframes glint { 0%, 84%, 100% { opacity: 0.85; transform: none; } 90% { opacity: 1; transform: scale(1.4); } }

/* Paid blocks: they open from a mask and rise; their contents follow in sequence. */
.prices.motion .tier.pixi, .prices.motion .tier.sponsor {
  opacity: 0; translate: 0 56px; clip-path: inset(16% 0 0 0 round 34px);
  transition: opacity 1s var(--out), translate 1.4s var(--out), clip-path 1.4s var(--out);
}
.prices.motion .tier.sponsor { transition-delay: 0.14s; }
.prices.motion .tier.pixi.in, .prices.motion .tier.sponsor.in { opacity: 1; translate: none; clip-path: inset(0 round 34px); }
.prices.motion .tier.pixi > *, .prices.motion .tier.sponsor > * { opacity: 0; translate: 0 22px; transition: opacity 0.9s var(--out), translate 1.1s var(--out); }
.prices.motion .tier.in > * { opacity: 1; translate: none; }
.prices.motion .tier.in > :nth-child(1) { transition-delay: 0.22s; }
.prices.motion .tier.in > :nth-child(2) { transition-delay: 0.3s; }
.prices.motion .tier.in > :nth-child(3) { transition-delay: 0.38s; }
.prices.motion .tier.in > :nth-child(4) { transition-delay: 0.46s; }
.prices.motion .tier.in > :nth-child(5) { transition-delay: 0.54s; }
.prices.motion .tier.in > :nth-child(6) { transition-delay: 0.62s; }
.prices.motion .tier.in > .price-swap { transition-duration: 1.1s, 1.5s; }
.prices.motion .note { opacity: 0; transition: opacity 1.2s var(--out) 0.2s; }
.prices.motion .note.in { opacity: 1; }

/* The characters drift a little with the scroll, a touch of depth. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .tier .tier-top .pet { animation: drift linear both; animation-timeline: view(); animation-range: cover; }
    @keyframes drift { from { translate: 0 24px; } to { translate: 0 -24px; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  .prices *, .prices *::before, .prices *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; }
}

@media (max-width: 980px) {
  .prices-head, .paid { grid-template-columns: 1fr; }
  .tier.free { grid-template-columns: 76px minmax(0, 1fr); }
  .tier.free .pet { width: 76px; }
  .tier.free .grains, .tier.free .btn { grid-column: 1 / -1; }
  .grains { grid-template-columns: repeat(auto-fill, 8px); }
  .tier.free .btn { justify-self: start; }
}
@media (max-width: 480px) {
  .tier.pixi, .tier.sponsor { border-radius: 26px; }
  .prices.motion .tier.pixi.in, .prices.motion .tier.sponsor.in { clip-path: inset(0 round 26px); }
  .tier.free .btn { justify-self: stretch; }
  .tier.sponsor .btn, .cta-swap, .cta-swap .btn { align-self: stretch; justify-self: stretch; }
}

.get-btn { margin-top: 30px; }
.nav-get { color: var(--ink) !important; font-weight: 600; }
.foot .legal a { color: var(--mute); }
.foot .legal a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- simple pages */
.doc { max-width: 720px; margin: 0 auto; padding: 16svh 20px 10svh; }
.doc h1 { margin: 0 0 22px; font: 800 clamp(36px, 6vw, 60px)/1 var(--display); letter-spacing: -0.03em; }
.doc h2 { margin: 34px 0 10px; font: 700 20px/1.2 var(--display); }
.doc p, .doc li { color: var(--mute); font-size: 15.5px; line-height: 1.6; }
.doc a:not(.btn) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
/* The license key: monospace, selectable in one click, wraps anywhere instead of overflowing a phone screen. */
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; padding: 2px 6px; border-radius: 6px; background: var(--faint); overflow-wrap: anywhere; -webkit-user-select: all; user-select: all; display: inline-block; max-width: 100%; }
.doc .btn.ghost { color: var(--ink); }
.doc .ctas { animation: none; justify-content: flex-start; margin-top: 12px; }
/* The Copy button says "Copied ✓" for a moment (grazie.js toggles .done). */
.doc .btn .copy-done { display: none; }
.doc .btn.done .copy-done { display: inline; }
.doc .btn.done .copy-idle { display: none; }
/* Shown next to Copy when the clipboard is blocked and the key has been selected instead. */
.doc .hint { align-self: center; color: var(--mute); font-size: 14px; }
/* States that get focus from grazie.js: no ring on plain text. */
.doc [tabindex="-1"]:focus { outline: none; }
