/* Tinkeroo marketing site — shared styles for index.html and download/index.html.
   Palette tracks the app's dark theme (AllAppTheme.kt) and the share landing
   (appSharing.ts): #111318 surfaces, #6C9CFF primary. Hand-written, no build step. */

:root {
  --bg: #0f1115;
  --bg-raised: #171a21;
  --border: #262b36;
  --text: #f5f6f8;
  --muted: #9aa3b8;
  --accent: #6c9cff;
  --accent-soft: #d8e2ff;
  --energy: #ffb86c;
  --radius: 18px;
  --maxw: 1080px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* clear the sticky nav when jumping to #watch */
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(15, 17, 21, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #00214d;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 6px 24px rgba(108, 156, 255, 0.28);
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--accent); filter: none; }
.btn.sm { padding: 9px 18px; font-size: 14px; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 96px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -220px 0 auto;
  height: 620px;
  background:
    radial-gradient(46% 52% at 22% 34%, rgba(108, 156, 255, 0.30), transparent 70%),
    radial-gradient(40% 46% at 80% 20%, rgba(255, 184, 108, 0.16), transparent 70%);
  pointer-events: none;
  filter: blur(6px);
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-soft);
  background: rgba(108, 156, 255, 0.12);
  border: 1px solid rgba(108, 156, 255, 0.28);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  font-weight: 800;
}
h1 .grad {
  /* Route blue→amber through violet; a direct blend desaturates to grey mid-word. */
  background: linear-gradient(100deg, var(--accent) 0%, #c08cff 46%, var(--energy) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: 1.16rem;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 30em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ---------- phone mock ---------- */

.phone {
  position: relative;
  justify-self: center;
  width: 300px;
  height: 610px;
  border-radius: 42px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #14171e, #101318);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 0 9px #0b0d11;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.loop-toggle {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(10, 12, 16, 0.65);
  color: var(--fg);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.loop-toggle:hover { background: rgba(10, 12, 16, 0.85); }
.phone-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-bottom: 12px;
}
.phone-video {
  flex: 1;
  width: 100%;
  border-radius: 26px;
  object-fit: cover;
  background: #0b0d11;
  min-height: 0;
}

/* ---------- promo video ---------- */

.video-frame {
  position: relative;
  max-width: 880px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.video-frame .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0;
  cursor: pointer;
  background: rgba(10, 12, 16, 0.28);
  transition: background 0.2s ease;
}
.video-frame .play-overlay:hover { background: rgba(10, 12, 16, 0.14); }
.video-frame .play-overlay[hidden] { display: none; }
.play-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 40px rgba(108, 156, 255, 0.5);
  transition: transform 0.18s ease;
}
.video-frame .play-overlay:hover .play-btn { transform: scale(1.08); }
.play-btn svg { width: 30px; height: 30px; fill: #00214d; margin-left: 4px; }

/* ---------- screenshot gallery ---------- */

.gallery {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 24px 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: #333a48 transparent;
}
.gallery img {
  flex: none;
  width: 260px;
  height: auto; /* the width/height attrs reserve ratio; CSS must not pin height */
  border-radius: 20px;
  border: 1px solid var(--border);
  scroll-snap-align: center;
  background: var(--bg-raised);
}
.gallery::-webkit-scrollbar { height: 8px; }
.gallery::-webkit-scrollbar-thumb { background: #333a48; border-radius: 99px; }

/* ---------- sections ---------- */

section { padding: 88px 0; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  letter-spacing: -0.028em;
  margin: 0 0 12px;
  font-weight: 800;
}
.section-head p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 40em;
  font-size: 1.05rem;
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.step {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(108, 156, 255, 0.14);
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 16px;
}
.step h3 { margin: 0 0 8px; font-size: 1.12rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.97rem; }

/* ---------- showcase ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: center;
  margin-bottom: 34px;
}
.chip {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 17px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: #39404f; }
.chip[aria-pressed="true"] {
  background: rgba(108, 156, 255, 0.15);
  border-color: rgba(108, 156, 255, 0.45);
  color: var(--accent-soft);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.app {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.app:hover { transform: translateY(-3px); border-color: #3a4152; }
.app img {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  flex: none;
  background: #232833;
  object-fit: cover;
}
.app b { display: block; font-size: 15px; line-height: 1.3; }
.app span { font-size: 13px; color: var(--muted); line-height: 1.4; }
.app[hidden] { display: none; }

.showcase-note {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin-top: 30px;
}

/* ---------- features ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.feature .ico { font-size: 30px; line-height: 1; margin-bottom: 14px; }
.feature h3 { margin: 0 0 9px; font-size: 1.16rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.99rem; }

/* ---------- final cta ---------- */

.final {
  position: relative;
  text-align: center;
  background: linear-gradient(150deg, rgba(108, 156, 255, 0.14), rgba(255, 184, 108, 0.09));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 68px 28px;
  margin-bottom: 88px;
}
.final h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 800;
}
.final p { color: var(--muted); margin: 0 0 28px; font-size: 1.08rem; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
  color: var(--muted);
  font-size: 14px;
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

/* ---------- download page ---------- */

.dl {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}
.dl .brand { margin-bottom: 34px; font-size: 20px; }
.dl h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 14px; }
.dl p.lede { margin: 0 auto 34px; }
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg-raised);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 24px;
  border-radius: 999px;
}
.dl .hint { margin-top: 26px; font-size: 13px; color: var(--muted); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .cta-row { justify-content: center; }
  .steps, .features { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
}

@media (max-width: 420px) {
  .phone { width: 100%; max-width: 300px; height: 560px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------------- ad films strip (#films) ---------------- */
/* One row, equal heights: 16:9 and 9:16 tiles share a row, so column widths
   are proportional to each tile's aspect ratio. */
.films {
  display: grid;
  grid-template-columns: 1.778fr 1.778fr 0.5625fr 0.5625fr;
  gap: 14px;
}
.film {
  position: relative;
  display: block;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c0f16;
  cursor: pointer;
  text-decoration: none;
}
.film.h { aspect-ratio: 16 / 9; }
.film.v { aspect-ratio: 9 / 16; }
.film img, .film iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film img { object-fit: cover; transition: transform 0.35s ease; }
.film:hover img { transform: scale(1.04); }
.film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(15, 17, 21, 0.72);
  border: 1px solid rgba(216, 226, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}
.film-play svg { width: 22px; height: 22px; fill: var(--accent-soft); margin-left: 3px; }
.film:hover .film-play { transform: translate(-50%, -50%) scale(1.1); background: rgba(90, 139, 240, 0.85); }
/* Collapse at 900px like the page's other multi-column layouts — four-across
   below that squeezes the 9:16 tiles too thin. */
@media (max-width: 900px) {
  .films { grid-template-columns: 1fr 1fr; }
  .film.h { grid-column: span 2; }
}

/* The inline player is a SIBLING row inserted after .films, never a grid
   item — a full-row grid child reshuffles the remaining tiles into columns
   whose widths were tuned for the other aspect ratio. The playing tile
   stays in place, dimmed. */
.film.now-playing { opacity: 0.45; }
.film-theater {
  --theater-h: min(620px, 78vh);
  position: relative;
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c0f16;
}
.film-theater.h { aspect-ratio: 16 / 9; }
.film-theater.v { height: var(--theater-h); }
.film-theater iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film-theater.v iframe {
  left: 50%;
  right: auto;
  width: min(calc(var(--theater-h) * 9 / 16), 100%);
  transform: translateX(-50%);
}
.film-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: rgba(15, 17, 21, 0.72);
  border: 1px solid rgba(216, 226, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.film-close svg { width: 16px; height: 16px; fill: var(--accent-soft); }
.film-close:hover { background: rgba(90, 139, 240, 0.85); }
