/* ==========================================================================
   KIPTV — homepage
   A product page in the Apple manner: black, quiet, a lot of air, and every
   feature gets its own moment, a real device with the real app on screen.
   The screens never move inside their frames: the devices do (they enter,
   turn in 3D, float), driven by assets/js/home.js.

   Type: Google Sans Flex 400/500 at normal width, the apps' own font. No
   bold. Character comes from size, colour and motion, never from the letters.
   Colour: black, white, two greys, and the brand red #E50914 for the few
   things that must be found at once (download, eyebrows, the glow behind
   the screens).
   Layout: centred overture, then alternating copy/stage moments that pin on
   large screens and simply stack on phones.
   ========================================================================== */

:root {
  color-scheme: dark;
  --bg: #000;
  --surface: #0e0e10;
  --fg: #f5f5f7;
  --fg-2: #a1a1a6;
  --fg-3: #6e6e73;
  --hair: rgba(245, 245, 247, 0.14);
  --glass: rgba(14, 14, 16, 0.72);
  --red: #e50914;
  --red-text: #ff4651;            /* the brand red, lifted for small text on black */
  --red-glow: rgba(229, 9, 20, 0.5);
  --f: 'Google Sans Flex', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --nav-h: 52px;
  --gut: clamp(16px, 4vw, 44px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-hero: clamp(42px, 6.8vw, 96px);
  --t-statement: clamp(38px, 6.2vw, 88px);
  --t-moment: clamp(34px, 3.9vw, 58px);
  --t-lead: clamp(17px, 1.42vw, 21px);
  --dir: 1;
}
[dir="rtl"] { --dir: -1; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: clip;
  text-wrap: pretty;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4, strong, b { font-weight: 500; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
/* CJK: break lines between phrases, never inside a word */
:lang(ja) { word-break: auto-phrase; }
:lang(ko) { word-break: keep-all; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
}
.skip { position: fixed; top: 8px; inset-inline-start: 8px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--fg); color: #000; transform: translateY(-160%); transition: transform 0.2s; }
.skip:focus { transform: none; }

/* Global nav -------------------------------------------------------------- */
.gnav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow 0.3s;
}
.gnav.is-scrolled { box-shadow: 0 1px 0 var(--hair); }
.gnav-in {
  height: var(--nav-h);
  max-width: 1240px; margin-inline: auto;
  padding-left: max(var(--gut), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gut), env(safe-area-inset-right, 0px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.gnav-logo img { height: 19px; width: auto; }
.gnav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); font-size: 14px; color: var(--fg-2); }
.gnav-links a { transition: color 0.2s; }
.gnav-links a:hover { color: var(--fg); }
.gnav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; flex: none; border-radius: 999px; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg-2); transition: background-color 0.2s, color 0.2s;
}
.icon-btn:hover { color: var(--fg); background: rgba(245, 245, 247, 0.1); }
.icon-btn svg { width: 19px; height: 19px; }
.account-avatar { width: 26px; height: 26px; object-fit: cover; border-radius: 50%; }
.gnav-cta {
  margin-inline-start: 6px;
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color 0.2s;
}
.gnav-cta:hover { background: #f6121e; }
.menu-btn { display: none; }

.lang-select { position: relative; }
.lang-flag { font-size: 17px; line-height: 1; }
.lang-menu {
  position: absolute; top: calc(100% + 10px); inset-inline-end: 0;
  width: 210px; max-height: min(62vh, 520px); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; list-style: none; font-size: 14px;
  background: rgba(22, 22, 24, 0.97);
  border-radius: 16px; box-shadow: inset 0 0 0 1px var(--hair), 0 30px 70px rgba(0, 0, 0, 0.7);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s;
}
.lang-select.open .lang-menu { opacity: 1; visibility: visible; transform: none; }
.lang-menu li { padding: 9px 12px; border-radius: 10px; color: var(--fg-2); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.lang-menu li:hover, .lang-menu li:focus-visible { background: rgba(245, 245, 247, 0.08); color: var(--fg); outline: none; }
.lang-menu li.is-active { color: var(--fg); }
.lang-menu li.is-active::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

.menu-sheet {
  position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 0 0; z-index: 99;
  background: rgba(0, 0, 0, 0.94);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: 20px max(var(--gut), env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(var(--gut), env(safe-area-inset-left, 0px));
}
.menu-sheet nav { display: flex; flex-direction: column; }
.menu-sheet a { padding: 14px 0; font-size: 28px; letter-spacing: -0.02em; border-bottom: 1px solid var(--hair); }

@media (max-width: 819px) {
  .gnav-links { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 380px) { .gnav-cta { display: none; } }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 26px; border-radius: 999px;
  font-size: 17px; font-weight: 500; white-space: nowrap;
  transition: transform 0.4s var(--ease), background-color 0.2s, box-shadow 0.3s;
}
.btn-red { background: var(--red); color: #fff; box-shadow: 0 16px 44px -16px var(--red-glow); }
.btn-red:hover { background: #f6121e; transform: translateY(-1px); }
.link-more { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; color: var(--fg); }
.link-more svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.link-more:hover svg { transform: translateX(3px); }
[dir="rtl"] .link-more svg { transform: scaleX(-1); }
[dir="rtl"] .link-more:hover svg { transform: scaleX(-1) translateX(3px); }

/* Devices ------------------------------------------------------------------
   .dev (position + pose) > .dev-in (entrance) > .dev-float (idle float).
   Three layers so scroll, entrance and float never fight over one transform. */
.stage { position: relative; perspective: 1900px; perspective-origin: 50% 35%; container-type: inline-size; }
.dev { position: absolute; transform-style: preserve-3d; }
/* only where devices move with the scroll: elsewhere a layer per device would just eat memory */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) { .moment .dev, .hero-stage .dev { will-change: transform; } }
.dev-in, .dev-float { position: relative; transform-style: preserve-3d; }
.dev img { width: 100%; height: auto; }
.screen { position: absolute; overflow: hidden; background: #000; }
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; }
/* screen areas measured on the frame PNGs (store-screenshots/src/devices/Device.tsx) */
.screen-tv { left: 2.546%; top: 4.983%; width: 94.884%; height: 90.41%; }
.screen-iphone { left: 5.088%; top: 2.209%; width: 89.824%; height: 95.581%; border-radius: 13.725% / 6.332%; }
.frame { position: relative; pointer-events: none; }
.island { position: absolute; left: 36.04%; top: 3.415%; width: 27.93%; height: 4.06%; border-radius: 999px; background: #000; }
.glow { position: absolute; pointer-events: none; }

/* Hero -------------------------------------------------------------------- */
.hero { position: relative; padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(32px, 6vh, 72px)); }
.hero-copy { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 15px 7px 13px; border-radius: 999px;
  background: rgba(245, 245, 247, 0.06); box-shadow: inset 0 0 0 1px var(--hair);
  font-size: 14px; color: var(--fg-2);
}
.hero-tag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); flex: none; }
.hero-title {
  margin-top: 26px;
  font-size: var(--t-hero); line-height: 1.02; letter-spacing: -0.045em; font-weight: 500;
  text-wrap: balance; max-width: 16ch;
}
.hero-title br, .statement-title br { display: none; }
.hero-title .accent, .statement-title .accent { display: block; text-wrap: balance; }
.hero-title .accent {
  background: linear-gradient(100deg, #ff7a80 0%, #ff2d3a 40%, #e50914 70%, #b80610 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { margin-top: 24px; max-width: 34em; font-size: var(--t-lead); line-height: 1.45; color: var(--fg-2); }
.hero-platforms { list-style: none; margin-top: clamp(30px, 4.5vh, 46px); display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 18px clamp(22px, 3.2vw, 46px); }
.hero-platforms li { display: flex; flex-direction: column; align-items: center; gap: 9px; font-size: 13px; color: var(--fg-2); letter-spacing: 0.01em; }
.hero-platforms .hp-logo { display: block; width: auto; height: 34px; color: var(--fg); }
.hero-platforms .hp-apple { height: 36px; }
.hero-platforms .hp-droid { height: 42px; }
.hero-platforms .hp-google { height: 32px; }
.hero-platforms .hp-amazon { height: 38px; }
.hero-platforms .hp-win { height: 33px; }
.hero-ctas { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 26px; }

.hero-stage { width: min(1280px, 100%); margin: clamp(36px, 6vh, 64px) auto 0; aspect-ratio: 100 / 47; }
.glow-hero { inset: -14% 6% -6%; background: radial-gradient(46% 52% at 50% 44%, rgba(229, 9, 20, 0.34), rgba(229, 9, 20, 0.08) 55%, transparent 72%); }
.hero-stage .d-tv { inset-inline-start: 17cqw; top: 0; width: 66cqw; z-index: 1; }
.hero-stage .d-ipad { inset-inline-start: 1.5cqw; top: 16.5cqw; width: 20cqw; z-index: 2; }
.hero-stage .d-pixel { inset-inline-end: 1.5cqw; top: 12.5cqw; width: 11.2cqw; z-index: 2; }
.hero-stage .d-iphone { inset-inline-end: 10.5cqw; top: 18.5cqw; width: 12.6cqw; z-index: 3; }
/* resting poses, the same numbers as REST in home.js (rotateZ, rotateY, rotateX: GSAP's order) */
.hero-stage .d-ipad { transform: rotateZ(calc(-0.5deg * var(--dir))) rotateY(calc(21deg * var(--dir))); }
.hero-stage .d-iphone { transform: rotateZ(calc(0.5deg * var(--dir))) rotateY(calc(-19deg * var(--dir))); }
.hero-stage .d-pixel { transform: translate3d(0, 0, -60px) rotateY(calc(-26deg * var(--dir))); }

@media (max-width: 699px) {
  .hero-stage { width: 100%; aspect-ratio: 100 / 88; margin-top: 44px; }
  .glow-hero { inset: -10% -10% 0; }
  .hero-stage .d-tv { inset-inline-start: 4cqw; width: 92cqw; }
  .hero-stage .d-ipad { display: none; }
  .hero-stage .d-pixel { inset-inline-end: auto; inset-inline-start: 5cqw; top: 40cqw; width: 22cqw; }
  .hero-stage .d-iphone { inset-inline-end: 5cqw; top: 37cqw; width: 24cqw; }
}

/* Hero entrance: CSS, so it starts with the very first paint. The devices
   arrive from the sides and the depth into their resting pose (set by JS on
   the outer .dev); --dir mirrors the sideways moves for Arabic and Urdu. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 1.1s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.07s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.14s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.21s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.28s; }
  .hero-stage .dev-in { animation: dev-in 1.9s var(--ease) both; }
  .hero-stage .d-tv .dev-in { --from: translate3d(0, 150px, 0) rotateX(26deg) scale(0.94); animation-delay: 0.15s; }
  .hero-stage .d-ipad .dev-in { --from: translate3d(calc(-220px * var(--dir)), 0, 0) rotateY(calc(46deg * var(--dir))); animation-delay: 0.32s; }
  .hero-stage .d-iphone .dev-in { --from: translate3d(calc(200px * var(--dir)), 0, 0) rotateY(calc(-46deg * var(--dir))); animation-delay: 0.42s; }
  .hero-stage .d-pixel .dev-in { --from: translate3d(calc(240px * var(--dir)), 0, 0) rotateY(calc(-52deg * var(--dir))); animation-delay: 0.5s; }
  .glow-hero { animation: glow-in 2.4s var(--ease) 0.2s both; }
}
@media (max-width: 699px) and (prefers-reduced-motion: no-preference) {
  .hero-stage .dev-in { animation-duration: 1.3s; }
  .hero-stage .d-tv .dev-in { --from: translate3d(0, 60px, 0) scale(0.96); animation-delay: 0.12s; }
  .hero-stage .d-pixel .dev-in { --from: translate3d(0, 70px, 0); animation-delay: 0.3s; }
  .hero-stage .d-iphone .dev-in { --from: translate3d(0, 80px, 0); animation-delay: 0.38s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes dev-in { from { opacity: 0; transform: var(--from); } to { opacity: 1; transform: none; } }
@keyframes glow-in { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: none; } }

/* Statement --------------------------------------------------------------- */
.statement { padding-block: clamp(120px, 22vh, 240px) clamp(40px, 8vh, 100px); text-align: center; }
.statement-title {
  font-size: var(--t-statement); line-height: 1.04; letter-spacing: -0.045em; font-weight: 500;
  text-wrap: balance; max-width: 14ch; margin-inline: auto;
}
.statement-title .accent { color: var(--fg-3); }
.statement-title .w { display: inline-block; }

/* Moments ----------------------------------------------------------------- */
.moment { position: relative; }
.moment-pin { position: relative; padding-block: clamp(64px, 10vh, 120px); }
.moment > .moment-pin > .wrap { max-width: 1440px; }
.moment-grid { display: grid; grid-template-columns: minmax(0, 0.64fr) minmax(0, 1.36fr); gap: clamp(28px, 4vw, 72px); align-items: center; }
.moment-copy { max-width: 440px; min-width: 0; }
.eyebrow { font-size: var(--t-lead); font-weight: 500; color: var(--red-text); margin-bottom: 14px; }
.moment-title { font-size: var(--t-moment); line-height: 1.04; letter-spacing: -0.04em; font-weight: 500; text-wrap: balance; }
.moment-body { margin-top: 22px; font-size: var(--t-lead); line-height: 1.5; color: var(--fg-2); }
.moment-note { margin-top: 18px; font-size: 13px; line-height: 1.5; color: var(--fg-3); }
.moment-stage { aspect-ratio: 100 / 72; }
.glow-moment { inset: -6% -4% -2% 4%; background: radial-gradient(50% 50% at 55% 45%, rgba(229, 9, 20, 0.3), rgba(229, 9, 20, 0.06) 58%, transparent 74%); }

/* Where each device stands, per moment (cqw = % of the stage width). Large
   screens first; the small-screen layout follows in the media query below. */
.m-guide .moment-stage { aspect-ratio: 100 / 70; }
.m-guide .d-tv { inset-inline-start: 0; top: 8cqw; width: 96cqw; z-index: 1; }
.m-guide .d-iphone { inset-inline-start: 72cqw; top: 22cqw; width: 23cqw; z-index: 2; }

.m-replay .moment-stage { aspect-ratio: 100 / 70; }
.m-replay .d-tablet { inset-inline-start: 0; top: 4cqw; width: 100cqw; }

.m-multiview .d-tv { inset-inline-start: 7cqw; top: 6cqw; width: 98cqw; z-index: 1; }
.m-multiview .d-iphone { inset-inline-start: -2cqw; top: 24cqw; width: 23cqw; z-index: 2; }

.m-film .moment-stage { aspect-ratio: 100 / 68; }
.m-film .d-ipad { inset-inline-start: 14cqw; top: 2cqw; width: 48cqw; z-index: 1; }
.m-film .d-iphone { inset-inline-start: 56cqw; top: 18cqw; width: 23cqw; z-index: 2; }

.m-sync .moment-stage { aspect-ratio: 100 / 66; }
.m-sync .d-tv { inset-inline-start: 12cqw; top: 4cqw; width: 90cqw; z-index: 1; }
.m-sync .d-iphone { inset-inline-start: 0; top: 16cqw; width: 24cqw; z-index: 2; }

.m-search .moment-stage { aspect-ratio: 100 / 67; }
.m-search .d-tv { inset-inline-start: 0; top: 4cqw; width: 94cqw; z-index: 1; }
.m-search .d-pixel { inset-inline-start: 74cqw; top: 18cqw; width: 22cqw; z-index: 2; }

.m-quality .moment-stage { aspect-ratio: 100 / 68; }
.m-quality .d-picker { inset-inline-start: 16cqw; top: 7cqw; width: 30cqw; z-index: 1; }
.m-quality .d-iphone { inset-inline-start: 46cqw; top: 0; width: 33cqw; z-index: 2; }

.m-theme .moment-stage { aspect-ratio: 100 / 68; }
.m-theme .d-tv { inset-inline-start: 8cqw; top: 4cqw; width: 92cqw; z-index: 1; }
.m-theme .d-pixel { inset-inline-start: 1cqw; top: 22cqw; width: 21cqw; z-index: 2; }

/* Mac and Chromebook: copy on top, the two laptops side by side under it */
.m-computer .moment-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: clamp(24px, 4vh, 48px); }
.m-computer .moment-copy { max-width: 620px; }
.m-computer .moment-stage { width: min(1040px, 100%, calc((100vh - 380px) * 2.27)); aspect-ratio: 100 / 44; perspective-origin: 50% 88%; }
.m-computer .d-mac { inset-inline-start: 0; top: 5cqw; width: 54cqw; z-index: 1; }
.m-computer .d-cb { inset-inline-start: 47cqw; top: 12cqw; width: 52cqw; z-index: 2; }

/* A laptop in two pieces: the lid (with the screen) turns on its hinge */
.laptop { position: relative; transform-style: preserve-3d; }
.laptop .lid { position: relative; transform-origin: 50% 100%; transform-style: preserve-3d; }
.laptop img { width: 100%; height: auto; }
.laptop .lid img, .laptop .screen-off { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.laptop .base { position: relative; }
.screen-off { position: absolute; background: linear-gradient(155deg, #1b1b1f 0%, #0b0b0d 45%, #050506 100%); opacity: 0; pointer-events: none; }
.laptop-mac .screen-off { left: 9.437%; top: 2.686%; width: 81.103%; height: 92.314%; border-radius: 1.2% 1.2% 0 0 / 2% 2% 0 0; }
.laptop-chromebook .screen-off { left: 6.951%; top: 4.622%; width: 86.099%; height: 90.756%; }
.lid-edge { position: absolute; opacity: 0; pointer-events: none; border-radius: 999px 999px 2px 2px; }
.laptop-mac .lid-edge { left: 8.2%; right: 8.3%; bottom: 6.74%; height: 2.4%; background: linear-gradient(180deg, #e3e3e6, #a7a7ac 60%, #7c7c81); }
.laptop-chromebook .lid-edge { left: 5.6%; right: 5.6%; bottom: 5.93%; height: 2.6%; background: linear-gradient(180deg, #6c6e75, #3d3f45 60%, #2a2b30); }

/* On large screens with motion allowed, a moment holds still (sticky) while
   its devices perform; the extra height is the scroll that drives them. */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  html.js .moment { height: 250vh; }
  html.js .moment[data-len="short"] { height: 205vh; }
  html.js .moment-pin { position: sticky; top: 0; height: 100vh; padding-block: calc(var(--nav-h) + 24px) 24px; display: flex; align-items: center; overflow: hidden; }
  html.js .moment-pin > .wrap { width: 100%; }
}
@media (min-width: 900px) {
  .moment.is-flip .moment-grid { grid-template-columns: minmax(0, 1.36fr) minmax(0, 0.64fr); }
  .moment.is-flip .moment-copy { order: 2; }
}
@media (max-width: 899px) {
  .moment-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .moment-copy { max-width: 560px; }
  .moment-stage { aspect-ratio: 100 / 86; }
  .m-guide .moment-stage, .m-multiview .moment-stage { aspect-ratio: 100 / 86; }
  .m-guide .d-tv, .m-search .d-tv, .m-theme .d-tv, .m-sync .d-tv { inset-inline-start: 0; top: 0; width: 100cqw; }
  .m-guide .d-iphone { inset-inline-start: 66cqw; top: 24cqw; width: 30cqw; }
  .m-replay .moment-stage { aspect-ratio: 100 / 66; }
  .m-replay .d-tablet { top: 1cqw; }
  .m-multiview .d-tv { inset-inline-start: 0; top: 2cqw; width: 100cqw; }
  .m-multiview .d-iphone { inset-inline-start: auto; inset-inline-end: 3cqw; top: 23cqw; width: 30cqw; }
  .m-film .moment-stage { aspect-ratio: 100 / 88; }
  .m-film .d-ipad { inset-inline-start: 6cqw; top: 0; width: 56cqw; }
  .m-film .d-iphone { inset-inline-start: 60cqw; top: 26cqw; width: 30cqw; }
  .m-sync .moment-stage { aspect-ratio: 100 / 88; }
  .m-sync .d-iphone { inset-inline-start: 3cqw; top: 26cqw; width: 30cqw; }
  .m-search .moment-stage { aspect-ratio: 100 / 88; }
  .m-search .d-pixel { inset-inline-start: auto; inset-inline-end: 3cqw; top: 26cqw; width: 28cqw; }
  .m-quality .moment-stage { aspect-ratio: 100 / 96; }
  .m-quality .d-picker { inset-inline-start: 6cqw; top: 10cqw; width: 40cqw; }
  .m-quality .d-iphone { inset-inline-start: 48cqw; top: 0; width: 46cqw; }
  .m-theme .moment-stage { aspect-ratio: 100 / 86; }
  .m-theme .d-pixel { inset-inline-start: 3cqw; top: 28cqw; width: 26cqw; }
  .m-computer .moment-stage { width: 100%; aspect-ratio: 100 / 94; perspective-origin: 50% 60%; }
  .m-computer .d-mac { inset-inline-start: 0; top: 0; width: 92cqw; }
  .m-computer .d-cb { inset-inline-start: 18cqw; top: 46cqw; width: 82cqw; }
}

/* Shared section heads ------------------------------------------------------ */
.section-title { font-size: var(--t-moment); line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; text-wrap: balance; }
.section-title br { display: none; }
.section-title .accent { display: block; color: var(--fg-3); }
.section-lead { margin-top: 18px; font-size: var(--t-lead); line-height: 1.5; color: var(--fg-2); max-width: 36em; }
.section-head-center { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* And so much more ---------------------------------------------------------- */
.more { padding-block: clamp(110px, 18vh, 200px) clamp(30px, 6vh, 70px); }
.more .section-title { text-align: center; margin-inline: auto; max-width: 16ch; }
.more-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 6vh, 64px); }
.more-item { background: var(--surface); border-radius: 24px; padding: 26px 24px 28px; min-width: 0; }
.more-item svg { width: 30px; height: 30px; color: var(--red-text); margin-bottom: 18px; }
.more-item h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.more-item p { margin-top: 8px; font-size: 15px; line-height: 1.5; color: var(--fg-2); }
@media (max-width: 1023px) { .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .more-grid { grid-template-columns: minmax(0, 1fr); } .more-item { padding: 22px 20px 24px; } }

/* Platforms --------------------------------------------------------------- */
.platforms { padding-block: clamp(110px, 18vh, 200px) clamp(40px, 8vh, 90px); }
.hero + .platforms { padding-block: clamp(70px, 11vh, 130px) clamp(30px, 6vh, 70px); }
.fam-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: clamp(40px, 6vh, 64px); }
.fam { background: var(--surface); border-radius: 28px; padding: clamp(20px, 2.6vw, 36px); min-width: 0; overflow: hidden; }
.fam-stage { aspect-ratio: 100 / 62; margin-bottom: clamp(18px, 2.4vw, 30px); perspective: 1400px; }
/* Loghi delle famiglie (Apple; robot di Android, G di Google, a di Amazon; Windows), sopra il nome: la riga ha
   sempre la stessa altezza, così i tre titoli restano allineati. */
.fam-logos { display: flex; align-items: center; gap: 18px; height: 36px; margin-bottom: 12px; color: var(--fg); }
.fam-logo { display: block; height: 28px; width: auto; flex: none; }
.fam-logo-apple { height: 30px; }
.fam-logo-droid { height: 36px; }
.fam-logo-google { height: 26px; }
.fam-logo-amazon { height: 32px; }
.fam-name { font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.02em; }
.fam-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fam-list li { padding: 6px 12px; border-radius: 999px; background: rgba(245, 245, 247, 0.07); font-size: 14px; color: var(--fg); }
.fam-store { margin-top: 18px; display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--fg-2); }
.fam-store .dot { width: 7px; height: 7px; border-radius: 50%; background: #30d158; flex: none; }
.fam-stage-apple .p-vision { inset-inline-start: 0; top: 0; width: 34cqw; z-index: 1; }
.fam-stage-apple .p-atv { inset-inline-start: 30cqw; top: 2cqw; width: 64cqw; z-index: 1; }
.fam-stage-apple .p-mac { inset-inline-start: 0; top: 28cqw; width: 46cqw; z-index: 3; }
.fam-stage-apple .p-ipad { inset-inline-start: 50cqw; top: 30cqw; width: 18cqw; z-index: 3; }
.fam-stage-apple .p-iphone { inset-inline-start: 72cqw; top: 33cqw; width: 13cqw; z-index: 4; }
.fam-stage-android .p-gtv { inset-inline-start: 6cqw; top: 2cqw; width: 64cqw; z-index: 1; }
.fam-stage-android .p-tablet { inset-inline-start: 0; top: 31cqw; width: 38cqw; z-index: 3; }
.fam-stage-android .p-cb { inset-inline-start: 46cqw; top: 26cqw; width: 50cqw; z-index: 2; }
.fam-stage-android .p-pixel { inset-inline-start: 36cqw; top: 34cqw; width: 12cqw; z-index: 4; }
.fam-stage-windows .p-monitor { inset-inline-start: 14cqw; top: 0; width: 64cqw; z-index: 1; }
.fam-stage-windows .p-winlaptop { inset-inline-start: 0; top: 28cqw; width: 50cqw; z-index: 3; }
.fam-stage-windows .p-surface { inset-inline-start: 58cqw; top: 33cqw; width: 37cqw; z-index: 2; }
.fam-link { color: inherit; text-decoration: none; }
.fam-link:hover { color: var(--fg); text-decoration: underline; }
.soon {
  margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px;
  padding: 22px clamp(20px, 2.6vw, 36px); border-radius: 28px; box-shadow: inset 0 0 0 1px var(--hair);
}
.soon-label { font-weight: 500; }
.soon-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--fg-2); }
.soon-list li { display: inline-flex; align-items: center; gap: 9px; }
.soon-list svg { width: 22px; height: 22px; flex: none; }
.soon-list .soon-logo { width: auto; }
.soon-list .soon-logo-lg { height: 26px; }
.soon-list .soon-logo-samsung { height: 14px; color: var(--fg); }
@media (max-width: 899px) { .fam-grid { grid-template-columns: minmax(0, 1fr); } }

/* Reviews ----------------------------------------------------------------- */
.reviews { padding-block: clamp(110px, 18vh, 200px) clamp(30px, 6vh, 60px); }
.rev-source { margin-top: 14px; font-size: 14px; color: var(--fg-2); }
.rev-scroller { margin-top: clamp(32px, 5vh, 52px); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.rev-scroller::-webkit-scrollbar { display: none; }
.rev-scroller:focus-visible { outline-offset: -2px; }
.rev-track {
  list-style: none; display: flex; gap: 16px; width: max-content;
  --edge: max(max(var(--gut), env(safe-area-inset-left, 0px)), calc((100vw - 1240px) / 2 + var(--gut)));
  padding-inline: var(--edge);
}
.rev-card {
  flex: none; width: min(380px, 78vw); scroll-snap-align: start; scroll-margin-inline-start: var(--edge);
  display: flex; flex-direction: column; gap: 14px;
  background: var(--surface); border-radius: 24px; padding: 26px 26px 24px;
}
.rev-stars { color: #ffd700; letter-spacing: 3px; font-size: 15px; }
.rev-quote { flex: 1; font-size: 17px; line-height: 1.5; }
.rev-who { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 14px; color: var(--fg-2); }
.rev-name { color: var(--fg); }
.rev-ctl { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(245, 245, 247, 0.08); color: var(--fg); transition: background-color 0.2s, opacity 0.2s;
}
.round-btn:hover { background: rgba(245, 245, 247, 0.16); }
.round-btn:disabled { opacity: 0.35; cursor: default; }
.round-btn svg { width: 18px; height: 18px; }
[dir="rtl"] .round-btn svg { transform: scaleX(-1); }

/* FAQ ----------------------------------------------------------------------- */
.faq { padding-block: clamp(110px, 18vh, 200px); }
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 36px 72px; align-items: start; }
.faq-list { border-top: 1px solid var(--hair); }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-item summary {
  list-style: none; cursor: pointer; position: relative;
  padding-block: 22px; padding-inline: 0 40px;
  font-size: clamp(18px, 1.5vw, 21px); line-height: 1.35; letter-spacing: -0.01em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; inset-inline-end: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor;
  transform: translateY(-70%) rotate(45deg); transition: transform 0.3s var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq-item p { padding-inline: 0 40px; padding-bottom: 24px; color: var(--fg-2); max-width: 62ch; }
.faq-item p a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 899px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* Download ------------------------------------------------------------------ */
.download { padding-block: clamp(110px, 18vh, 200px) clamp(120px, 18vh, 200px); text-align: center; overflow: clip; }
.download .wrap { display: flex; flex-direction: column; align-items: center; }
/* The fan of the twelve K's, as in the brand art: red at the front on the right,
   each one further back a step to the left and a little darker. */
.k-fan { position: relative; width: min(560px, 86vw); aspect-ratio: 100 / 28.5; margin-bottom: clamp(36px, 6vh, 60px); }
.k-fan .k {
  position: absolute; top: 0; width: 32%; height: auto;
  left: calc((11 - var(--k)) * 6.18%);
  z-index: calc(20 - var(--k));
  filter: brightness(calc(1 - var(--k) * 0.065)) drop-shadow(-6px 0 12px rgba(0, 0, 0, 0.75));
}
.download-title { max-width: 14ch; }
.download-title .accent { color: var(--red-text); }
.download .section-lead { text-align: center; }
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 34px; }
.store { display: block; border-radius: 10px; transition: transform 0.4s var(--ease); }
.store:hover { transform: scale(1.04); }
.store-badge { display: block; height: 54px; width: auto; }
/* Come nel video dell'annuncio Android: nero col bordo grigio di App Store e Google Play, scritte nell'arancione
   di Downloader, il codice grande e bianco (scelte dell'utente del 2026-10-05 e del 2026-10-22). */
.store-fire { display: inline-flex; align-items: center; gap: 11px; height: 54px; padding: 0 20px 0 15px; background: #000; color: #f7941d; border-radius: 7px; box-shadow: inset 0 0 0 1.3px #a6a6a6; }
.store-fire .sf-logo { width: 30px; height: 30px; flex: none; margin-top: 3px; }
.store-fire .sf-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; text-align: left; }
.store-fire small { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; letter-spacing: 0.02em; }
.store-fire small svg { width: 11px; height: 11px; }
.store-fire b { font-size: 25px; font-weight: 700; color: #fff; letter-spacing: 0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* A quiet line under the badges for Android devices without Google Play (the APK page, /android). */
.apk-link { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; margin-top: 28px; font-size: 14px; line-height: 1.45; color: var(--fg-2); transition: color 0.2s; }
.apk-link:hover { color: var(--fg); }
.apk-link svg { width: 14px; height: 14px; flex: none; transition: transform 0.3s var(--ease); }
.apk-link:hover svg { transform: translateX(3px); }
[dir="rtl"] .apk-link svg { transform: scaleX(-1); }
[dir="rtl"] .apk-link:hover svg { transform: scaleX(-1) translateX(3px); }

/* Footer ------------------------------------------------------------------ */
.footer { border-top: 1px solid var(--hair); padding-block: 44px calc(40px + env(safe-area-inset-bottom, 0px)); font-size: 13px; color: var(--fg-3); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; }
.footer-top img { height: 17px; width: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 14px; color: var(--fg-2); }
.footer-links a:hover { color: var(--fg); }
.footer-legal { margin-top: 26px; max-width: 86ch; line-height: 1.6; }
.footer-credits { margin-top: 10px; font-size: 12px; }
.footer-copy { margin-top: 12px; }

/* Motion safety ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
