/* ─────────────────────────────────────────────────────────────────────────
   Hero phone mockup styles.
   Standalone — the phone UI is composed of small data widgets so the screen
   can mirror real app states.
   ───────────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-top: clamp(40px, 6vw, 88px);
  padding-bottom: clamp(64px, 8vw, 120px);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 78% 25%, rgba(201,168,76,0.08), transparent 60%),
    radial-gradient(700px 400px at 8% 80%, rgba(110,39,181,0.05), transparent 60%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--sp-10);
  align-items: center;
}
@media (max-width: 1024px) {
  /* minmax(0,1fr) + min-width:0 lets the single column shrink to the container
     width instead of inheriting the 360px phone's intrinsic min-width (which
     pushed hero content 5px past the viewport). */
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-9); }
  .hero__grid > * { min-width: 0; }
  /* single-column: center the whole hero text block so it aligns with the phone below */
  .hero__grid > div:first-child { text-align: center; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__qr-row { justify-content: center; }
  /* higher specificity than the base .hero__phone-wrap{justify-content:flex-end} which appears later in source */
  .hero__grid .hero__phone-wrap { display: flex; justify-content: center; }
  .hero__grid .hero__phone-wrap::after { right: auto; left: 50%; transform: translateX(-50%); }
}
@media (max-width: 560px) {
  /* QR row: stack the three store entries vertically so nothing overflows
     the viewport on narrow phones (3-up horizontal does not fit at 375px). */
  .hero__qr-row { flex-direction: column; align-items: center; gap: var(--sp-5); }
  .hero__qr { width: 100%; max-width: 280px; justify-content: flex-start; }
}

.hero__chip { display: inline-flex; margin-bottom: var(--sp-6); }
.hero__title { font-size: clamp(44px, 6vw, 88px); line-height: 0.98; }
.hero__title em { font-style: normal; color: var(--gold); }
.hero__sub {
  margin-top: var(--sp-6);
  max-width: 540px;
  color: var(--fg-dim);
  font-size: var(--fs-lead);
  line-height: 1.45;
}
.hero__actions {
  margin-top: var(--sp-8);
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
}
.hero__qr-row {
  margin-top: var(--sp-9);
  display: flex; gap: var(--sp-7); flex-wrap: wrap;
}
.hero__qr {
  display: flex; align-items: center; gap: var(--sp-4);
}
.hero__qr-thumb {
  width: 56px; height: 56px;
  border-radius: var(--r-2);
  background: #fff;
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  padding: 6px;
  gap: 1px;
}
/* fake QR pattern via inline cells */
.hero__qr-thumb::before, .hero__qr-thumb::after,
.hero__qr-thumb i {
  content: '';
  background:
    radial-gradient(circle at 12% 12%, #000 25%, transparent 26%),
    radial-gradient(circle at 88% 12%, #000 25%, transparent 26%),
    radial-gradient(circle at 12% 88%, #000 25%, transparent 26%);
  width: 100%; height: 100%;
  position: absolute; inset: 0;
  pointer-events: none;
}
.hero__qr-thumb svg { width: 100%; height: 100%; display: block; }
/* Real QR image fills the white thumb (overrides the CSS dot-grid placeholder) */
.hero__qr-thumb:has(img)::before, .hero__qr-thumb:has(img)::after { display: none; }
.hero__qr-thumb img { grid-column: 1 / -1; grid-row: 1 / -1; width: 100%; height: 100%; object-fit: contain; display: block; }
.hero__qr-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim-2);
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
}
.hero__qr-label strong { display: block; color: var(--fg); font-weight: 600; font-size: 13px; letter-spacing: -0.02em; text-transform: none; margin-bottom: 2px; }

/* ── Phone (hero) ────────────────────────────────────────────────────────── */
.hero__phone-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
}
.hero__phone-wrap::after {
  content: '';
  position: absolute;
  width: 460px; height: 460px;
  right: -60px; top: 20%;
  background: radial-gradient(closest-side, rgba(201,168,76,0.16), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}

/* App screen content */
.app {
  padding: 62px 18px 22px;
  height: 100%;
  font-size: 12px;
  color: var(--fg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.app__header { display: flex; align-items: center; justify-content: space-between; }
.app__header-title { font-size: 18px; font-weight: 700; letter-spacing: var(--ls-snug); }
.app__chip-row { display: flex; gap: 6px; }

.app__match {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.app__team { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.app__team-badge {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold-soft); border: 1.5px solid var(--gold);
}
.app__team-badge--away { background: var(--purple-soft); border-color: var(--purple); }
.app__team-name { font-size: 11px; font-weight: 600; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.app__vs { font-family: var(--font-mono); font-size: 11px; color: var(--fg-dim-2); letter-spacing: 0.1em; }

.app__section { display: flex; flex-direction: column; gap: 8px; }
.app__section-title {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--fg-dim-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.app__section-title-row { display: flex; justify-content: space-between; align-items: baseline; }
.app__section-title-row > :last-child { color: var(--gold); }

.app__stats-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.app__stat {
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.app__stat-label {
  font-family: var(--font-mono); font-size: 9px;
  color: var(--fg-dim-2); letter-spacing: 0.1em; text-transform: uppercase;
}
.app__stat-value {
  font-family: var(--font-mono); font-size: 14px; font-weight: 600;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.app__stat--gold .app__stat-value { color: var(--gold); }

/* xG sparkline */
.app__xg {
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.app__xg-svg { width: 100%; height: 64px; display: block; margin-top: 8px; }

/* Phone shine overlay */
.phone::before {
  content: '';
  position: absolute; inset: 1px;
  border-radius: 51px;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 30%);
  pointer-events: none;
  z-index: 2;
}

/* Hero video inside phone screen (autoplay, muted, loops).
   object-fit: contain shows the ENTIRE 9:16 video frame with no cropping,
   so the in-video tactiq logo (top) and probability bar (bottom) are never
   clipped by the phone bezel/rounded corners. The phone screen is dark, so
   the few px of letterbox are invisible. */
.phone__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: var(--bg);
  z-index: 1;
}

/* When a video lives inside the phone screen, override the default
   9:19 aspect ratio to match the video's 9:16 frame. Hide the simulated
   iOS status bar AND the notch: the video is a full-bleed designed screen
   with its own top logo, so a notch overlay would clip/obscure it. */
.hero__phone-wrap .phone { aspect-ratio: 9 / 16; }
.hero__phone-wrap .phone__statusbar { display: none; }
.hero__phone-wrap .phone__notch { display: none; }

/* ── Tweaks panel (feature grid density) ─────────────────────────────────── */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: var(--z-tweaks);
  background: rgba(15,15,15,0.96);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-3);
  padding: var(--sp-4) var(--sp-5);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column;
  gap: var(--sp-3);
  box-shadow: var(--shadow-3);
  min-width: 260px;
}
.tweaks.is-open { display: flex; }
.tweaks__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
}
.tweaks__title { font-size: 13px; font-weight: 600; }
.tweaks__close {
  width: 22px; height: 22px; border-radius: 50%;
  background: transparent; border: 1px solid var(--line-strong);
  color: var(--fg-dim); cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.tweaks__close:hover { color: var(--fg); border-color: var(--line-bright); }
.tweaks__label {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--fg-dim-2); letter-spacing: var(--ls-mono); text-transform: uppercase;
}
.tweaks__seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  border-radius: var(--r-2);
}
.tweaks__seg button {
  padding: 8px 10px;
  background: transparent;
  border: 0;
  color: var(--fg-dim);
  font-family: var(--font-sans);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: background var(--d-fast), color var(--d-fast);
}
.tweaks__seg button[aria-pressed="true"] {
  background: var(--gold);
  color: var(--gold-on);
}
