/* MatCode showcase - home page (/) and app pages (/<app>/)
   Legal hub pages under /hub/ keep using style.css */

:root {
  color-scheme: light;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --bg: #f6f5f2;
  --bg-elevated: #ffffff;
  --bg-sunken: #eceae5;
  --surface-glass: rgba(255, 255, 255, 0.72);
  --text: #0d0f14;
  --text-soft: #4a4f5c;
  --text-muted: #6e7380;
  --line: rgba(13, 15, 20, 0.09);
  --line-strong: rgba(13, 15, 20, 0.16);

  --brand: #4f46e5;
  --brand-2: #0ea5e9;
  --brand-3: #f59e0b;

  --accent: var(--brand);
  --on-accent: #ffffff;

  --shadow-sm: 0 1px 2px rgba(13, 15, 20, 0.06), 0 2px 8px rgba(13, 15, 20, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(13, 15, 20, 0.16), 0 2px 6px rgba(13, 15, 20, 0.05);
  --shadow-lg: 0 30px 60px -20px rgba(13, 15, 20, 0.28), 0 10px 20px -10px rgba(13, 15, 20, 0.12);
  --phone-shadow: 0 40px 80px -30px rgba(13, 15, 20, 0.45), 0 18px 36px -18px rgba(13, 15, 20, 0.3);

  --radius: 22px;
  --radius-lg: 32px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #07080c;
    --bg-elevated: #10121a;
    --bg-sunken: #0b0d13;
    --surface-glass: rgba(12, 14, 20, 0.7);
    --text: #f3f4f7;
    --text-soft: #b6bac6;
    --text-muted: #868b99;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
    --phone-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080c;
  --bg-elevated: #10121a;
  --bg-sunken: #0b0d13;
  --surface-glass: rgba(12, 14, 20, 0.7);
  --text: #f3f4f7;
  --text-soft: #b6bac6;
  --text-muted: #868b99;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
  --phone-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
}

/* Derived accent tokens are declared wherever --accent is overridden (app pages, tiles),
   because custom properties resolve var() on the element that declares them */
:root,
[style*="--accent"] {
  --accent-text: color-mix(in oklab, var(--accent) 70%, var(--text));
  --accent-soft: color-mix(in oklab, var(--accent) 12%, transparent);
  --accent-line: color-mix(in oklab, var(--accent) 30%, transparent);
}

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

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

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

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

html[lang="pl"] .en,
html[lang="en"] .pl {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

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

.section {
  padding: clamp(72px, 10vw, 128px) 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(32px, 5vw, 54px);
  margin-top: 14px;
}

.section-head p {
  margin-top: 16px;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--text-soft);
}

.gradient-text {
  background: linear-gradient(100deg, var(--brand) 0%, var(--brand-2) 45%, var(--brand-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================
   Buttons & chips
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 12px 30px -12px var(--accent);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--bg-elevated);
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text-soft);
}

.chip-accent {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-text);
}

/* Store badges */
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 22px 8px 16px;
  border-radius: 16px;
  background: #0d0f14;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: var(--shadow-md);
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.store-btn svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-btn small {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  opacity: 0.75;
}

.store-btn strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 650;
}

/* ==========================================
   Navigation
   ========================================== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: var(--surface-glass);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 550;
  color: var(--text-soft);
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--line);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switcher {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
}

.lang-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.lang-btn.active {
  background: var(--text);
  color: var(--bg);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
}

/* ==========================================
   Ambient background
   ========================================== */
.aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: drift 22s ease-in-out infinite alternate;
}

.aurora span:nth-child(1) {
  width: 620px;
  height: 620px;
  left: -160px;
  top: -200px;
  background: var(--a1, var(--brand));
}

.aurora span:nth-child(2) {
  width: 520px;
  height: 520px;
  right: -140px;
  top: 40px;
  background: var(--a2, var(--brand-2));
  animation-delay: -6s;
}

.aurora span:nth-child(3) {
  width: 460px;
  height: 460px;
  left: 30%;
  bottom: -260px;
  background: var(--a3, var(--brand-3));
  opacity: 0.35;
  animation-delay: -12s;
}

:root[data-theme="light"] .aurora span {
  opacity: 0.28;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  opacity: 0.6;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(60px, 40px, 0) scale(1.12);
  }
}

/* ==========================================
   Phone mockup
   ========================================== */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 18.5;
  border-radius: 14% / 6.8%;
  background: linear-gradient(145deg, #2a2d36, #0c0d11 40%, #1b1d24);
  box-shadow: var(--phone-shadow), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}

.phone img {
  /* bezel via inset: % padding would resolve against the parent's width, not the phone's */
  position: absolute;
  inset: 1.56% 3.2%;
  width: 93.6%;
  height: 96.88%;
  object-fit: cover;
  object-position: top center;
  border-radius: 11.5% / 5.5%;
  background: #000;
}

/* ==========================================
   Home hero
   ========================================== */
.hero {
  position: relative;
  padding: clamp(40px, 7vw, 96px) 0 clamp(64px, 8vw, 112px);
  overflow: hidden;
  isolation: isolate;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 550;
  color: var(--text-soft);
}

.hero-badge b {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
}

.hero h1 {
  margin-top: 24px;
  font-size: clamp(44px, 7.4vw, 92px);
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.hero-lead {
  margin-top: 24px;
  max-width: 560px;
  font-size: clamp(18px, 1.8vw, 21px);
  color: var(--text-soft);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-stats strong {
  display: block;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-stats span {
  font-size: 14px;
  color: var(--text-muted);
}

.hero-phones {
  position: relative;
  height: clamp(440px, 52vw, 640px);
}

.hero-phones .phone {
  position: absolute;
  width: clamp(170px, 19vw, 250px);
  top: 50%;
  left: 50%;
}

.hero-phones .phone:nth-child(1) {
  transform: translate(-128%, -46%) rotate(-9deg);
  animation: float-a 9s ease-in-out infinite;
}

.hero-phones .phone:nth-child(2) {
  z-index: 2;
  transform: translate(-50%, -54%);
  animation: float-b 8s ease-in-out infinite;
}

.hero-phones .phone:nth-child(3) {
  transform: translate(28%, -42%) rotate(9deg);
  animation: float-c 10s ease-in-out infinite;
}

@keyframes float-a {
  50% {
    transform: translate(-128%, -50%) rotate(-7deg);
  }
}

@keyframes float-b {
  50% {
    transform: translate(-50%, -58%);
  }
}

@keyframes float-c {
  50% {
    transform: translate(28%, -38%) rotate(11deg);
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-phones {
    height: clamp(380px, 100vw, 520px);
  }

  .hero-phones .phone {
    width: clamp(120px, 30vw, 220px);
  }
}

/* ==========================================
   Logo marquee
   ========================================== */
.marquee {
  position: relative;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-soft);
  white-space: nowrap;
}

.marquee-item img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}

@keyframes marquee {
  to {
    transform: translateX(calc(-50% - 24px));
  }
}

/* ==========================================
   App grid (home)
   ========================================== */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.filter-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.filter-btn:hover {
  color: var(--text);
}

.filter-btn[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Featured tiles: GymPad spans two columns, MotoMate too on wide screens (13 apps fill 5 rows) */
.app-grid {
  grid-auto-flow: dense;
}

.tile-wide {
  grid-column: span 2;
}

.tile-wide .tile-visual .phone:first-child {
  transform: translateX(-90%) rotate(-4deg);
}

.tile-wide .tile-visual .phone+.phone {
  transform: translateX(-6%) rotate(5deg);
  opacity: 1;
}

.app-tile.tile-wide:hover .tile-visual .phone:first-child {
  transform: translateX(-96%) translateY(-10px) rotate(-6deg);
}

.app-tile.tile-wide:hover .tile-visual .phone+.phone {
  transform: translateX(0) translateY(-10px) rotate(7deg);
}

@media (max-width: 1000px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile-wide:not(:first-child) {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .tile-wide {
    grid-column: auto;
  }
}

.app-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.3s;
}

.app-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-line);
}

.app-tile[hidden] {
  display: none;
}

.tile-visual {
  position: relative;
  height: 280px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in oklab, var(--accent) 55%, transparent) 0%, transparent 70%),
    linear-gradient(180deg, var(--accent-soft), transparent);
}

.tile-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 70px;
  background: linear-gradient(transparent, var(--bg-elevated));
  z-index: 2;
}

.tile-visual .phone {
  position: absolute;
  width: 170px;
  left: 50%;
  top: 36px;
  transform: translateX(-50%) rotate(-4deg);
  transition: transform 0.7s var(--ease);
}

.tile-visual .phone+.phone {
  left: 50%;
  top: 64px;
  transform: translateX(-2%) rotate(6deg);
  z-index: -1;
  opacity: 0.85;
}

.app-tile:hover .tile-visual .phone:first-child {
  transform: translateX(-62%) translateY(-10px) rotate(-7deg);
}

.app-tile:hover .tile-visual .phone+.phone {
  transform: translateX(6%) translateY(-6px) rotate(9deg);
}

.tile-visual-icon {
  display: grid;
  place-items: center;
  height: 100%;
}

.tile-visual-icon img {
  width: 128px;
  height: 128px;
  border-radius: 30px;
  box-shadow: 0 30px 60px -20px var(--accent), var(--shadow-md);
  transition: transform 0.7s var(--ease);
}

.app-tile:hover .tile-visual-icon img {
  transform: scale(1.06) rotate(-4deg);
}

.tile-body {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px 24px;
  margin-top: -18px;
  flex: 1;
}

.tile-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tile-title img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.tile-title h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.tile-title small {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 550;
}

.tile-body p {
  color: var(--text-soft);
  font-size: 15.5px;
  line-height: 1.5;
}

.tile-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.tile-foot .chip {
  font-size: 12px;
  padding: 4px 10px;
}

.tile-arrow {
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  transition: transform 0.4s var(--ease);
}

.app-tile:hover .tile-arrow {
  transform: rotate(-45deg);
}

.tile-link {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
}

.tile-link span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================
   Values / approach
   ========================================== */
.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 1000px) {
  .values {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .values {
    grid-template-columns: 1fr;
  }
}

.value {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.value-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 24px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  margin-bottom: 20px;
}

.value h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.value p {
  font-size: 15.5px;
  color: var(--text-soft);
  line-height: 1.55;
}

/* ==========================================
   CTA panel
   ========================================== */
.cta-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 7vw, 88px);
  border-radius: var(--radius-lg);
  background: #0b0c12;
  color: #f3f4f7;
  text-align: center;
}

.cta-panel .aurora span {
  opacity: 0.6;
}

.cta-panel>* {
  position: relative;
  z-index: 1;
}

.cta-panel h2 {
  font-size: clamp(32px, 5vw, 60px);
  max-width: 820px;
  margin: 0 auto;
}

.cta-panel p {
  margin: 18px auto 0;
  max-width: 560px;
  color: rgba(243, 244, 247, 0.75);
  font-size: 18px;
}

.cta-panel .hero-cta {
  justify-content: center;
}

.cta-panel .btn-primary {
  background: #ffffff;
  color: #0b0c12;
}

.cta-panel .btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.cta-panel .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--text-muted);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}

.footer-grid .nav-brand {
  color: var(--text);
  margin-bottom: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: flex-start;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

/* ==========================================
   App page hero
   ========================================== */
.app-hero {
  position: relative;
  padding: clamp(32px, 6vw, 80px) 0 clamp(56px, 8vw, 104px);
  overflow: hidden;
  isolation: isolate;
}

.app-hero .aurora span:nth-child(1),
.app-hero .aurora span:nth-child(3) {
  background: var(--accent);
}

.app-hero .aurora span:nth-child(2) {
  background: color-mix(in oklab, var(--accent) 60%, var(--brand-2));
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 32px;
  transition: color 0.2s, gap 0.25s var(--ease);
}

.back-link:hover {
  color: var(--text);
  gap: 12px;
}

.app-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.app-id {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.app-id img {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: 0 20px 40px -18px var(--accent), var(--shadow-md);
}

.app-id .eyebrow {
  margin-bottom: 4px;
}

.app-id .app-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.app-hero .hero-lead {
  max-width: 600px;
}

.app-hero .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.app-hero .store-row {
  margin-top: 32px;
}

.app-hero-phones {
  position: relative;
  height: clamp(460px, 50vw, 620px);
}

.app-hero-phones .phone {
  position: absolute;
  width: clamp(190px, 21vw, 270px);
  top: 50%;
  left: 50%;
}

.app-hero-phones .phone:nth-child(1) {
  z-index: 2;
  transform: translate(-78%, -50%) rotate(-5deg);
  animation: float-hero-a 9s ease-in-out infinite;
}

.app-hero-phones .phone:nth-child(2) {
  transform: translate(-12%, -44%) rotate(6deg);
  animation: float-hero-b 10s ease-in-out infinite;
}

@keyframes float-hero-a {
  50% {
    transform: translate(-78%, -54%) rotate(-4deg);
  }
}

@keyframes float-hero-b {
  50% {
    transform: translate(-12%, -40%) rotate(7deg);
  }
}

.app-hero-icon {
  display: grid;
  place-items: center;
  height: clamp(320px, 40vw, 520px);
}

.app-hero-icon img {
  width: clamp(180px, 22vw, 280px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 24%;
  box-shadow: 0 50px 100px -30px var(--accent), var(--shadow-lg);
  animation: float-icon 8s ease-in-out infinite;
}

@keyframes float-icon {
  50% {
    transform: translateY(-14px) rotate(-3deg);
  }
}

@media (max-width: 960px) {
  .app-hero-grid {
    grid-template-columns: 1fr;
  }

  .app-hero-phones {
    height: clamp(400px, 110vw, 540px);
  }

  .app-hero-phones .phone {
    width: clamp(160px, 42vw, 240px);
  }
}

/* ==========================================
   Features
   ========================================== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Keep rows full: 4 features sit in one row, with 5 the first one spans two columns */
.features-4 {
  grid-template-columns: repeat(4, 1fr);
}

.features-5 .feature:first-child {
  grid-column: span 2;
}

@media (max-width: 960px) {

  .features,
  .features-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {

  .features,
  .features-4 {
    grid-template-columns: 1fr;
  }

  .features-5 .feature:first-child {
    grid-column: auto;
  }
}

.feature {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, -20%), var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--accent-line);
}

.feature:hover::before {
  opacity: 1;
}

.feature .value-icon {
  position: relative;
}

.feature h3 {
  position: relative;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.feature p {
  position: relative;
  font-size: 15.5px;
  color: var(--text-soft);
  line-height: 1.55;
}

/* ==========================================
   Gallery
   ========================================== */
.gallery-section {
  background:
    radial-gradient(80% 60% at 50% 0%, var(--accent-soft), transparent 70%),
    var(--bg-sunken);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.gallery-controls {
  display: flex;
  gap: 8px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.gallery-controls button {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.gallery-controls button:hover {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.gallery-controls[hidden] {
  display: none;
}

.gallery-controls button:disabled {
  opacity: 0.35;
  pointer-events: none;
}

.gallery {
  --gallery-pad: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  display: flex;
  gap: clamp(18px, 3vw, 32px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gallery-pad);
  padding: 12px var(--gallery-pad) 48px;
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.shot {
  flex: 0 0 clamp(200px, 24vw, 270px);
  margin: 0;
  scroll-snap-align: start;
}

.shot button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: inherit;
  transition: transform 0.5s var(--ease);
}

.shot button:hover {
  transform: translateY(-8px);
}

.shot figcaption {
  margin-top: 18px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-soft);
}

/* Lightbox */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: rgba(5, 6, 10, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: #ffffff;
}

.lightbox[open] {
  display: grid;
  place-items: center;
  animation: fade-in 0.25s ease;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox img {
  max-height: calc(100vh - 120px);
  width: auto;
  max-width: 100%;
  border-radius: 28px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.lightbox-close,
.lightbox-nav {
  position: fixed;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
}

.lightbox-close {
  top: 20px;
  right: 20px;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

@media (max-width: 640px) {
  .lightbox-nav {
    top: auto;
    bottom: 20px;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* ==========================================
   Game cards (apps without screenshots)
   ========================================== */
.deck {
  position: relative;
  height: clamp(380px, 44vw, 520px);
}

.deck-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(220px, 24vw, 300px);
  aspect-ratio: 3 / 4;
  padding: 26px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-lg);
}

.deck-card small {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.deck-card strong {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.deck-card .deck-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
}

.deck-card .deck-foot img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.deck-card:nth-child(1) {
  transform: translate(-92%, -46%) rotate(-12deg);
}

.deck-card:nth-child(2) {
  transform: translate(-8%, -50%) rotate(10deg);
}

.deck-card:nth-child(3) {
  z-index: 2;
  transform: translate(-50%, -54%) rotate(-2deg);
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  box-shadow: 0 40px 80px -30px var(--accent), var(--shadow-lg);
  animation: float-deck 8s ease-in-out infinite;
}

.deck-card:nth-child(3) small,
.deck-card:nth-child(3) .deck-foot {
  color: inherit;
  opacity: 0.8;
}

@keyframes float-deck {
  50% {
    transform: translate(-50%, -58%) rotate(-1deg);
  }
}

.pill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill-cloud .chip {
  font-size: 15px;
  padding: 10px 16px;
}

/* ==========================================
   Privacy & docs
   ========================================== */
.privacy-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

@media (max-width: 860px) {
  .privacy-panel {
    grid-template-columns: 1fr;
  }
}

.privacy-panel h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  margin: 14px 0 16px;
}

.privacy-panel p {
  color: var(--text-soft);
}

.doc-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-weight: 600;
  transition: border-color 0.2s, transform 0.3s var(--ease);
}

.doc-link:hover {
  border-color: var(--accent-line);
  transform: translateX(4px);
}

.doc-link span:first-child {
  font-size: 20px;
}

.doc-link .arrow {
  margin-left: auto;
  color: var(--text-muted);
}

/* More apps strip */
.more-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.more-app {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-weight: 650;
  font-size: 15px;
  transition: transform 0.3s var(--ease), border-color 0.2s;
}

.more-app:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.more-app img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

/* More apps: hover preview card (positioned by site.js) */
.app-preview {
  position: fixed;
  z-index: 60;
  width: 220px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.app-preview[hidden] {
  display: none;
}

.app-preview strong {
  color: var(--text);
  font-size: 15px;
}

.app-preview-shot {
  width: 100%;
  height: auto;
  aspect-ratio: 600 / 1304;
  max-height: 300px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
}

.app-preview-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
}

/* ==========================================
   Reveal on scroll (enabled by site.js)
   ========================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}