/* Desktop Glow: the site of the pack. The direction comes from the apps themselves: true black and Apple's light gray,
   white ink, pills, Quicksand for titles. Sections alternate dark and light (folder rule: two neighbours never share a
   tone, the footer included). The menu is the island: a black pill that grows on a spring. */

/* ---- fonts (Quicksand, OFL, the same files the clock and the setup use) */
@font-face { font-family: "Quicksand"; src: url("fonts/Quicksand-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("fonts/Quicksand-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Quicksand"; src: url("fonts/Quicksand-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  /* colors: the two backgrounds, the ink on each, and the pack's own accents */
  --black: #000;
  --black-raised: #1c1c1e;   /* blocks on the dark sections (Apple's system gray 6, the apps' cards) */
  --light: #f2f2f7;          /* light sections (Apple's light background, the Fundo Vivo light theme) */
  --light-raised: #ffffff;
  --ink-dark: #0b0b0d;       /* text on light */
  --ink-dark-soft: #4a4a55;
  --ink-light: #f5f5f7;      /* text on dark */
  --ink-light-soft: #a1a1aa;
  --line-dark: rgba(255, 255, 255, .16);
  --line-light: rgba(0, 0, 0, .12);
  --glow: #8f86ff;           /* the island's icon color, used once: the word "glow" */
  --focus: #5ea4ff;

  /* type: two families, five sizes */
  --title: "Quicksand", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --body: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --size-hero: clamp(64px, 6.4vw, 196px);
  --size-h2: clamp(48px, 4.4vw, 128px);
  --size-lead: clamp(19px, 1.25vw, 30px);
  --size-body: clamp(16px, 0.95vw, 22px);
  --size-small: clamp(14px, 0.75vw, 17px);

  /* space: base 4 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px; --s10: 144px;
  --band-pad: clamp(96px, 9vw, 220px);
  --wrap: min(92vw, 2760px);

  /* shape and motion */
  --radius-frame: clamp(22px, 1.6vw, 40px);
  --radius-block: 22px;
  --shadow-frame: 0 30px 80px rgba(0, 0, 0, .28);
  --spring: cubic-bezier(.34, 1.56, .64, 1);  /* the island's overshoot */
  --out: cubic-bezier(.22, 1, .36, 1);
  --fast: 150ms;
  --normal: 300ms;
  --slow: 520ms;             /* only the island menu: its spring overshoots, like the real island's */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--light);
  color: var(--ink-dark);
  font-family: var(--body);
  font-size: var(--size-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--title); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
::selection { background: var(--glow); color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
html { scrollbar-color: #8a8a93 var(--light); }
.skip { position: absolute; left: var(--s4); top: -80px; z-index: 50; background: #000; color: #fff; padding: var(--s3) var(--s5); border-radius: 999px; }
.skip:focus { top: var(--s4); }

.wrap { width: var(--wrap); margin: 0 auto; }
.band { padding: var(--band-pad) 0; position: relative; }
.light { background: var(--light); color: var(--ink-dark); }
.dark { background: var(--black); color: var(--ink-light); }
.dark ::selection { background: var(--ink-light); color: #000; }
.lead { font-size: var(--size-lead); line-height: 1.45; max-width: 34ch; }
.light .lead { color: var(--ink-dark-soft); }
.dark .lead { color: var(--ink-light-soft); }
.meta { font-size: var(--size-small); margin-top: var(--s4); }
.light .meta { color: var(--ink-dark-soft); }
.dark .meta { color: var(--ink-light-soft); }

/* ---- the island menu */
.island {
  position: fixed; top: 14px; left: 50%; z-index: 40;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s5);
  height: 52px; padding: 0 var(--s3) 0 var(--s5);
  background: #000; color: #fff;
  border-radius: 26px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .14);
  font-family: var(--title); font-weight: 500; font-size: 16px;
  width: 470px;
  transition: width var(--slow) var(--spring), height var(--slow) var(--spring), border-radius var(--slow) var(--spring);
}
.island-mark { display: flex; align-items: center; gap: var(--s3); text-decoration: none; white-space: nowrap; font-weight: 700; }
.island-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 3px rgba(143, 134, 255, .25); }
.island-links { display: flex; gap: var(--s5); margin-left: auto; }
.island-links a { text-decoration: none; color: #c7c7cc; transition: color var(--fast) var(--out); }
.island-links a:hover { color: #fff; }
.island-lang {
  font: inherit; font-size: 13px; letter-spacing: .04em; color: #fff;
  background: #1c1c1e; border: 0; border-radius: 15px; height: 30px; padding: 0 var(--s3); cursor: pointer;
  transition: background var(--fast) var(--out);
}
.island-lang:hover { background: #2c2c2e; }
.island-get {
  white-space: nowrap; text-decoration: none; font-weight: 700; font-size: 15px;
  background: #fff; color: #000; border-radius: 18px; height: 36px; padding: 0 var(--s4);
  display: flex; align-items: center;
  max-width: 0; padding-inline: 0; opacity: 0; overflow: hidden; margin-left: calc(-1 * var(--s5));
  transition: max-width var(--slow) var(--spring), padding var(--slow) var(--spring), margin var(--slow) var(--spring), opacity var(--fast) var(--out);
}
/* past the hero the pill grows and the download comes out of it */
.island.open { width: 640px; }
.island.open .island-get { max-width: 200px; padding-inline: var(--s4); opacity: 1; margin-left: 0; }

/* ---- buttons */
.actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.btn {
  display: inline-flex; align-items: center; gap: var(--s3);
  height: clamp(54px, 3.2vw, 72px); padding: 0 clamp(26px, 1.6vw, 38px);
  border-radius: 999px; font-family: var(--title); font-weight: 700; font-size: clamp(17px, 1vw, 23px);
  text-decoration: none; white-space: nowrap;
  transition: transform var(--fast) var(--out), background var(--fast) var(--out), color var(--fast) var(--out);
}
.btn:active { transform: scale(.97); }
.btn-solid { background: #000; color: #fff; }
.btn-solid:hover { background: #26262b; }
.btn-light { background: #fff; color: #000; margin-top: var(--s6); }
.btn-light:hover { background: #dedee4; }
.ic { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- hero: title left, the rest on the right, the framed video under both */
.hero { padding-top: clamp(150px, 11vw, 260px); }
.hero-head { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s8); align-items: end; margin-bottom: clamp(48px, 4vw, 96px); }
.hero-title { font-size: var(--size-hero); font-weight: 500; line-height: .98; letter-spacing: -.02em; }
.glow { color: var(--glow); }

/* ---- framed video (the Lusion block): big radius, margin all around, a sound button in the corner */
.frame {
  margin: 0; position: relative; overflow: hidden;
  border-radius: var(--radius-frame); background: #0b0b0d;
  box-shadow: var(--shadow-frame);
  aspect-ratio: 16 / 9;
}
.frame video { width: 100%; height: 100%; object-fit: cover; }
.frame-hero { width: min(100%, calc((100svh - 140px) * 16 / 9)); margin: 0 auto; }
.dark .frame { box-shadow: 0 0 0 1px var(--line-dark); }
.sound {
  position: absolute; right: var(--s5); bottom: var(--s5);
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0, 0, 0, .62); color: #fff; display: grid; place-items: center;
  transition: background var(--fast) var(--out), transform var(--fast) var(--out);
}
.sound:hover { background: rgba(0, 0, 0, .85); }
.sound:active { transform: scale(.94); }
.sound svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound .spk { fill: currentColor; stroke: none; }
.sound .on { display: none; }
.sound[aria-pressed="true"] .on { display: inline; }
.sound[aria-pressed="true"] .off { display: none; }

/* ---- app sections: text and video side by side, mirrored on every other one */
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: clamp(48px, 5vw, 160px); align-items: center; }
.flip .app-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.flip .app-text { order: 2; }
.app-grid .frame { width: min(100%, calc((100svh - 200px) * 16 / 9)); justify-self: center; }
.app-icon { width: clamp(72px, 4.6vw, 120px); height: auto; border-radius: 22%; margin-bottom: var(--s6); }
.app h2 { font-size: var(--size-h2); font-weight: 500; line-height: 1; letter-spacing: -.015em; margin-bottom: var(--s5); }
.chips { list-style: none; padding: 0; margin: var(--s6) 0 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); }
.chips li {
  display: inline-flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s5) var(--s3) var(--s4); border-radius: 999px;
  font-size: var(--size-body); line-height: 1.3;
}
.chips li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--app); flex-shrink: 0; }
.dark .chips li { background: var(--black-raised); }
.light .chips li { background: var(--light-raised); }

/* ---- install */
.install h2, .faq h2 { font-size: var(--size-h2); font-weight: 500; line-height: 1; letter-spacing: -.015em; margin-bottom: var(--s5); }
.install-grid { display: grid; grid-template-columns: 1.1fr 1fr 0.9fr; gap: clamp(48px, 4vw, 128px); align-items: start; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: var(--s7); }
.steps li { counter-increment: step; display: grid; grid-template-columns: auto 1fr; column-gap: var(--s5); }
.steps li::before {
  content: counter(step); grid-row: span 2;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--black-raised); font-family: var(--title); font-weight: 700; color: var(--ink-light);
}
.steps h3, .note h3 { font-size: var(--size-lead); font-weight: 700; margin-bottom: var(--s2); line-height: 1.3; }
.steps p, .note p { color: var(--ink-light-soft); }
.note { background: var(--black-raised); border-radius: var(--radius-block); padding: var(--s6); }

/* ---- faq */
.faq-grid { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(48px, 5vw, 160px); align-items: start; }
.faq-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s6); }
details { border-bottom: 1px solid var(--line-light); padding: var(--s5) 0; }
summary {
  cursor: pointer; list-style: none; font-family: var(--title); font-weight: 700; font-size: var(--size-lead);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s4);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; width: 14px; height: 14px; flex-shrink: 0; margin-right: 6px; /* the box turned 45 degrees is wider */
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px); transition: transform var(--normal) var(--spring);
}
details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
details p { margin-top: var(--s3); color: var(--ink-dark-soft); max-width: 52ch; }

/* ---- footer */
.foot { padding: var(--s9) 0; }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s7); flex-wrap: wrap; }
.foot-mark { font-family: var(--title); font-weight: 700; font-size: var(--size-lead); }
.foot-small { color: var(--ink-light-soft); font-size: var(--size-small); margin-top: var(--s2); }
.sponsor {
  display: inline-flex; align-items: center; gap: var(--s2); margin-top: var(--s5);
  height: 44px; padding: 0 var(--s5); border-radius: 22px;
  background: var(--black-raised); color: var(--ink-light); text-decoration: none;
  font-family: var(--title); font-weight: 700; font-size: var(--size-small);
  transition: background var(--fast) var(--out);
}
.sponsor:hover { background: #2c2c2e; }
.sponsor .ic { color: #ff6b8a; }
.foot-contact { display: flex; flex-direction: column; align-items: flex-end; gap: var(--s3); }
.foot-label { font-family: var(--title); font-weight: 700; font-size: var(--size-small); color: var(--ink-light); }
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); font-size: var(--size-small); }
.foot-links a {
  display: inline-flex; align-items: center; gap: var(--s2); height: 40px; padding: 0 var(--s4); border-radius: 20px;
  background: var(--black-raised); color: var(--ink-light); text-decoration: none;
  transition: background var(--fast) var(--out);
}
.foot-links a:hover { background: #2c2c2e; }
.foot-links .ic { width: 18px; height: 18px; stroke-width: 1.8; }
.foot-links .dot { fill: currentColor; stroke: none; }
@media (max-width: 1280px) { .foot-contact { align-items: flex-start; } .foot-links { justify-content: flex-start; } }

/* ==== motion (04/11/2026: "it is too still, I want animations"). Everything is on screen from the start; the motion
   only dresses it, and only transform/opacity/filter move, so it stays on the graphics card. With "reduce motion" in
   Windows none of this runs (the block at the end). */

/* the glow behind the hero: two soft lights, violet and coral, drifting slowly (the "glow" of the name) */
.hero { overflow: hidden; isolation: isolate; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: 70vw; height: 70vw; border-radius: 50%;
  will-change: transform;
}
.hero::before { left: -18vw; top: 18%; background: radial-gradient(closest-side, rgba(143, 134, 255, .42), rgba(143, 134, 255, 0)); animation: drift-a 19s ease-in-out infinite alternate; }
.hero::after { right: -22vw; top: 34%; background: radial-gradient(closest-side, rgba(255, 143, 112, .34), rgba(255, 143, 112, 0)); animation: drift-b 23s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(14vw, -6vw) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-12vw, 5vw) scale(.9); } }

/* the title: each word lands with a short rise (JS wraps the words), and "glow." breathes */
.hero-title .w { display: inline-block; animation: word-in 800ms var(--out) both; animation-delay: calc(var(--i) * 80ms + 120ms); }
@keyframes word-in { from { transform: translateY(45%); opacity: 0; filter: blur(10px); } }
.glow { animation: breathe 3.6s ease-in-out 1.2s infinite alternate; }
@keyframes breathe { from { text-shadow: 0 0 0 rgba(143, 134, 255, 0); } to { text-shadow: 0 0 .32em rgba(143, 134, 255, .55); } }

/* the island menu opens on a spring when the page loads (app.js), and its bottom edge shows how far you scrolled */
.island::after {
  content: ""; position: absolute; left: 26px; right: 26px; bottom: 5px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, #8f86ff, #ff8fb0, #ff8f70); transform-origin: left; transform: scaleX(0); opacity: .85;
}
@supports (animation-timeline: scroll()) {
  .island::after { animation: progress linear both; animation-timeline: scroll(root); }
  @keyframes progress { to { transform: scaleX(1); } }
}

/* each app's own colour glowing behind its video, drifting */
.app { overflow: hidden; isolation: isolate; }
.app::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: 64vw; height: 64vw; top: 50%; right: -8vw;
  transform: translateY(-50%); border-radius: 50%; will-change: transform;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--app) 30%, transparent), transparent);
  animation: app-drift 17s ease-in-out infinite alternate;
}
.light.app::before { background: radial-gradient(closest-side, color-mix(in oklab, var(--app) 22%, transparent), transparent); }
.flip.app::before { right: auto; left: -8vw; }
@keyframes app-drift { to { transform: translateY(-44%) translateX(-4vw) scale(1.12); } }
.app-icon { animation: float 6.5s ease-in-out infinite alternate; }
@keyframes float { from { transform: translateY(-4px) rotate(-1.5deg); } to { transform: translateY(6px) rotate(1.5deg); } }

/* the download button: a light sweeps across on hover */
.btn-solid { position: relative; overflow: hidden; }
.btn-solid::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%) skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
}
@media (hover: hover) and (pointer: fine) {
  .btn-solid:hover::after { transform: translateX(120%) skewX(-20deg); transition: transform 700ms var(--out); }
  .chips li { transition: transform var(--fast) var(--out); }
  .chips li:hover { transform: translateX(6px); }
}

/* scrolling: the videos arrive tilted back in 3D and settle flat, with a slow zoom inside; the chips cascade in;
   the big titles rise. Driven by the scroll itself (Chromium), so nothing waits hidden */
@supports (animation-timeline: view()) {
  .frame { animation: tilt-in linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; transform-origin: 50% 100%; }
  @keyframes tilt-in { from { transform: perspective(1800px) rotateX(14deg) scale(.9); } }
  .frame video { animation: inner-zoom linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  @keyframes inner-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
  .chips li { animation: chip-in linear both; animation-timeline: view(); animation-range: entry 5% cover 28%; }
  .chips li:nth-child(2) { animation-range: entry 10% cover 31%; }
  .chips li:nth-child(3) { animation-range: entry 15% cover 34%; }
  .chips li:nth-child(4) { animation-range: entry 20% cover 37%; }
  .chips li:nth-child(5) { animation-range: entry 25% cover 40%; }
  @keyframes chip-in { from { transform: translateX(-36px); opacity: .25; } }
  .app h2, .install h2, .faq h2 { animation: title-in linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
  @keyframes title-in { from { transform: translateY(40px); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .island, .island-get, summary::after { transition: none; }
  .hero::before, .hero::after, .app::before, .app-icon, .glow, .hero-title .w, .island::after,
  .frame, .frame video, .chips li, .app h2, .install h2, .faq h2 { animation: none !important; }
  .btn-solid::after { display: none; }
}

/* ---- the 27" standing up (1080 wide) and anything narrower: one column */
@media (max-width: 1280px) {
  .hero-head, .app-grid, .flip .app-grid, .install-grid, .faq-grid { grid-template-columns: 1fr; }
  .flip .app-text { order: 0; }
  .app-grid .frame, .frame-hero { width: 100%; }
  .faq-list { grid-template-columns: 1fr; }
  .lead { max-width: 40ch; }
}
@media (max-width: 760px) {
  .island { width: auto; gap: var(--s4); }
  .island.open { width: auto; }
  .island-links { display: none; }
}

/* ---- the legal line under the footer: who answers for the site, the two legal pages, the trademark note */
.foot-legal { margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--line-dark); display: grid; gap: var(--s3); font-size: var(--size-small); color: var(--ink-light-soft); }
.foot-legal p:first-child { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.foot-legal a { color: var(--ink-light); }
.foot-marks { max-width: 110ch; }

/* ---- privacy and terms: one reading column on the light background, the island pill as the way back */
.legal-page .island { width: auto; }
.legal { padding: clamp(140px, 10vw, 220px) 0 var(--band-pad); }
.legal article { max-width: 78ch; margin: 0 auto; }
.legal h1 { font-size: var(--size-h2); font-weight: 500; line-height: 1; letter-spacing: -.015em; margin-bottom: var(--s4); }
.legal .updated { color: var(--ink-dark-soft); font-size: var(--size-small); margin-bottom: var(--s7); }
.legal h2 { font-size: var(--size-lead); font-weight: 700; margin: var(--s7) 0 var(--s3); }
.legal p, .legal li { color: var(--ink-dark); max-width: 72ch; }
.legal p + p { margin-top: var(--s3); }
.legal ul { padding-left: 1.2em; margin: var(--s3) 0 0; display: grid; gap: var(--s2); }
.legal table { width: 100%; border-collapse: collapse; margin-top: var(--s4); font-size: var(--size-small); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4) var(--s3) 0; border-bottom: 1px solid var(--line-light); }
.legal th { font-family: var(--title); font-weight: 700; }
.legal td:first-child { white-space: nowrap; font-weight: 600; }
.legal a { color: var(--ink-dark); }
.foot-legal.solo { margin-top: 0; border-top: 0; padding-top: 0; }
.legal table + p { margin-top: var(--s5); }
