: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; }
}
