/* Streemly website — one stylesheet for every page.
   Colours come from DESIGN.md: dark-first (matches the app's dark theme and the TV app),
   with the light scheme applied when the visitor's system prefers light. */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0e1020;
  --surface: #121527;
  --surface-2: #1a1d3a;
  --surface-3: #242850;
  --line: rgba(229, 225, 235, 0.1);
  --text: #e5e1eb;
  --text-muted: #b3afc2;
  --primary: #4b3daf;
  --primary-bright: #8a7dff;
  --accent: #a24294;
  --on-primary: #ffffff;
  --glow-1: rgba(75, 61, 175, 0.55);
  --glow-2: rgba(162, 66, 148, 0.35);
  --frame: #05060d;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);

  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 20px;
  --max: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #fcf8ff;
    --surface: #f4effb;
    --surface-2: #ebe5f6;
    --surface-3: #e5e0f1;
    --line: rgba(28, 27, 34, 0.1);
    --text: #1c1b22;
    --text-muted: #474553;
    --primary: #4b3daf;
    --primary-bright: #4b3daf;
    --accent: #85287a;
    --glow-1: rgba(100, 87, 201, 0.28);
    --glow-2: rgba(162, 66, 148, 0.18);
    --frame: #1c1b22;
    --shadow: 0 30px 70px -25px rgba(40, 30, 90, 0.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-bright); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--primary-bright); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(64px, 10vw, 120px); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--primary-bright); margin-bottom: 12px;
}
.section-title { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 800; }
.section-lead { margin-top: 14px; color: var(--text-muted); font-size: clamp(1rem, 1.6vw, 1.125rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: inherit; font-weight: 700; font-size: 0.95rem; text-decoration: none;
  padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #5a4bc8; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--surface-2); }

.play-badge { display: inline-block; line-height: 0; transition: transform 0.15s ease; }
.play-badge:hover { transform: translateY(-2px); }
/* Official badge, trimmed to its visible edge; Google asks for clear space around it, which the layout gaps provide. */
.play-badge img { width: 180px; height: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a:not(.btn) {
  color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.93rem;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:not(.btn):hover { color: var(--text); background: var(--surface-2); }
.nav .btn { margin-left: 8px; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 760px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 20px; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav:not(.open) { display: none; }
  .nav a:not(.btn) { padding: 12px; }
  .nav .btn { margin: 8px 0 0; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 96px) clamp(64px, 10vw, 120px); }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; z-index: 0;
}
.hero::before { width: 620px; height: 620px; right: -120px; top: -80px; background: var(--glow-1); }
.hero::after { width: 460px; height: 460px; right: 280px; top: 260px; background: var(--glow-2); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .grad {
  background: linear-gradient(95deg, var(--primary-bright), #d27ac4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-lead { margin-top: 20px; font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--text-muted); max-width: 520px; }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chip {
  font-size: 0.82rem; font-weight: 600; color: var(--text-muted);
  padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
}
.hero-art { position: relative; height: clamp(440px, 52vw, 600px); }
.hero-art .phone { position: absolute; width: clamp(200px, 22vw, 270px); }
.hero-art .phone:first-child { left: 4%; top: 0; transform: rotate(-6deg); z-index: 2; }
.hero-art .phone:last-child { left: 46%; top: 10%; transform: rotate(5deg); }

@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .chips { justify-content: center; }
  .hero-art { height: 440px; max-width: 460px; margin-inline: auto; width: 100%; }
  .hero-art .phone { width: 190px; }
  .hero-art .phone:first-child { left: 6%; }
  .hero-art .phone:last-child { left: auto; right: 6%; }
  .hero::before { right: -240px; top: 280px; }
  .hero::after { right: auto; left: -200px; top: 420px; }
}

/* ---------- Device frames ---------- */
.phone {
  aspect-ratio: 9 / 19.5; padding: 9px; border-radius: 38px; background: var(--frame);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
/* A handset held sideways — the orientation every player capture is taken in. */
.phone-land {
  aspect-ratio: 19.5 / 9; padding: 9px; border-radius: 30px; background: var(--frame);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.tv {
  aspect-ratio: 16 / 9; padding: 10px; border-radius: 16px; background: var(--frame);
  box-shadow: var(--shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.08);
}
.screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: 30px; background: linear-gradient(160deg, #2a2466 0%, #121527 55%, #3a1740 100%);
}
.tv .screen { border-radius: 8px; }
.phone-land .screen { border-radius: 22px; }
/* Placeholder shown until the real capture exists: the img removes itself if it fails to load. */
.screen::after {
  content: attr(data-label); position: absolute; inset: auto 0 45% 0; text-align: center;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(229, 225, 235, 0.55);
}
.screen img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 18px;
  background: var(--primary); color: var(--on-primary); font-weight: 800;
}
.step h3 { font-size: 1.15rem; font-weight: 700; }
.step p { margin-top: 8px; color: var(--text-muted); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.features-band { background: var(--surface); border-block: 1px solid var(--line); }
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
/* Ten cards: two even rows of five on wide screens, two per row on tablets. */
@media (min-width: 1100px) { .features { grid-template-columns: repeat(5, 1fr); } .feature { padding: 22px 20px; } }
@media (min-width: 560px) and (max-width: 860px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { padding: 24px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); }
.feature .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--primary) 22%, transparent); color: var(--primary-bright);
}
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.05rem; font-weight: 700; }
.feature p { margin-top: 6px; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Carousels ---------- */
.carousel-wrap { position: relative; }
.carousel {
  display: flex; gap: clamp(16px, 3vw, 32px); overflow-x: auto; scroll-snap-type: x mandatory;
  /* Full-bleed track: slides scroll to the viewport edges but start aligned with the content column. */
  --inset: max(var(--gutter), calc(50vw - var(--max) / 2 + var(--gutter)));
  padding: 12px var(--inset) 40px; margin-inline: calc(50% - 50vw);
  scroll-padding-inline: var(--inset);
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 auto; scroll-snap-align: center; margin: 0; }
.slide figcaption { margin-top: 18px; text-align: center; font-weight: 600; font-size: 0.93rem; color: var(--text-muted); }
.phone-slide .phone { width: clamp(210px, 24vw, 250px); }
.tv-slide { width: min(860px, 86vw); }
.carousel-controls { display: flex; justify-content: center; gap: 12px; }
.carousel-btn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line);
}
.carousel-btn:hover { background: var(--surface-3); }
.carousel-btn svg { width: 22px; height: 22px; }

/* ---------- Player ---------- */
.player-band { position: relative; overflow: hidden; }
.player-band::before {
  content: ""; position: absolute; right: -180px; top: 10%; width: 700px; height: 700px;
  background: var(--glow-2); filter: blur(130px); opacity: 0.6; pointer-events: none;
}
.player-band > .container { position: relative; }
/* Phone and TV captures sit in the same track, so size them by height and let the
   frames' own aspect ratios decide how wide each one ends up. */
.player-slide .phone-land, .player-slide .tv { height: clamp(200px, 30vw, 330px); width: auto; }
/* Below this the height floor would make the 19.5:9 frame wider than the screen, so size
   by width instead and let each frame's ratio pick its own height. */
@media (max-width: 480px) {
  .player-slide .phone-land, .player-slide .tv { height: auto; width: 86vw; }
}
.player-slide .screen img { object-position: center; }

.player-split { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2.5vw, 24px); }
.player-col { padding: clamp(24px, 3vw, 34px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.player-col .icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--primary) 22%, transparent); color: var(--primary-bright);
}
.player-col .icon svg { width: 24px; height: 24px; }
.player-col h3 { font-size: 1.25rem; font-weight: 800; }
.player-col > p { margin-top: 8px; color: var(--text-muted); font-size: 0.95rem; }
.player-list { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.player-list li { position: relative; padding-left: 26px; color: var(--text-muted); font-size: 0.95rem; }
/* A play triangle for a bullet. */
.player-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.42em; width: 10px; height: 11px;
  background: var(--primary-bright); clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.player-list strong { color: var(--text); font-weight: 700; }
@media (max-width: 860px) { .player-split { grid-template-columns: 1fr; } }

.player-both {
  margin-top: clamp(16px, 2.5vw, 24px); padding: clamp(24px, 3vw, 34px); border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 26%, var(--surface)) 0%, var(--surface) 65%);
  border: 1px solid var(--line);
}
.player-both h3 { font-size: 1.25rem; font-weight: 800; }
.player-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 28px; margin: 22px 0 0; padding: 0; list-style: none; }
.player-specs li { padding-left: 16px; border-left: 3px solid var(--primary); }
.player-specs strong { display: block; font-size: 1rem; }
.player-specs span { color: var(--text-muted); font-size: 0.95rem; }
@media (max-width: 860px) { .player-specs { grid-template-columns: 1fr; } }

/* ---------- TV band ---------- */
.tv-band { position: relative; overflow: hidden; background: var(--surface); border-block: 1px solid var(--line); }
.tv-band::before {
  content: ""; position: absolute; left: 50%; top: 40%; width: 900px; height: 500px; transform: translate(-50%, -50%);
  background: var(--glow-1); filter: blur(120px); opacity: 0.55; pointer-events: none;
}
.tv-band > .container { position: relative; }
.tv-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; list-style: none; padding: 0; }
.tv-points li { padding-left: 16px; border-left: 3px solid var(--primary); }
.tv-points strong { display: block; font-size: 1rem; }
.tv-points span { color: var(--text-muted); font-size: 0.95rem; }
@media (max-width: 800px) { .tv-points { grid-template-columns: 1fr; } }

/* ---------- What's new teaser ---------- */
.news {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 28px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 30%, var(--surface)) 0%, var(--surface) 70%);
  border: 1px solid var(--line);
}
.news ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.news li { position: relative; padding-left: 30px; }
.news li::before {
  content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.news .link-arrow { display: inline-block; margin-top: 20px; font-weight: 700; }
@media (max-width: 800px) { .news { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 56px 20px 22px; font-weight: 700; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 22px 22px; color: var(--text-muted); }
.faq details > div p + p { margin-top: 10px; }

/* ---------- Final CTA ---------- */
.cta { text-align: center; }
.cta .brand-mark { width: 84px; height: 84px; margin: 0 auto 24px; border-radius: 22px; box-shadow: var(--shadow); }
.cta .play-badge { margin-top: 32px; }
.disclaimer {
  max-width: 680px; margin: 48px auto 0; padding: 16px 20px; border-radius: 14px; font-size: 0.9rem;
  color: var(--text-muted); background: var(--surface); border: 1px solid var(--line);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--text-muted); font-size: 0.9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--text-muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- Document pages (changelog, legal, 404) ---------- */
.page-hero { padding-block: clamp(48px, 8vw, 88px) 24px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.page-hero p { margin-top: 12px; color: var(--text-muted); }
.prose { max-width: 760px; padding-bottom: clamp(64px, 10vw, 110px); color: var(--text-muted); }
.prose strong { color: var(--text); }
.prose > strong, .prose > p > strong:only-child { display: block; margin-top: 8px; }
.prose p { margin-block: 0 14px; }
.prose ul { padding-left: 1.3em; margin-block: 0 14px; }
.prose li { margin-bottom: 6px; }
.prose br { display: block; content: ""; margin-top: 12px; }

.release { padding: 28px 0; border-top: 1px solid var(--line); }
.release:first-of-type { border-top: 0; padding-top: 0; }
.release h2 { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.release time { display: block; margin-top: 4px; font-size: 0.9rem; }
.release ul { margin-top: 16px; }

.not-found { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 16px; padding-block: 80px; }
.not-found h1 { font-size: clamp(3rem, 12vw, 6rem); font-weight: 800; }
.not-found p { color: var(--text-muted); }
.not-found .btn { justify-self: center; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
