/* ===== Design tokens — GymTemper v2 (dark only, mirrors the app's Color.kt / Type.kt) ===== */
:root {
  --color-lime:       #CCFF00;
  --color-orange:     #FF5C00;
  --color-cyan:       #00F0FF;
  --color-accent:     var(--color-lime);

  --color-bg:         #121212;
  --color-surface-lo: #0E0E0E;
  --color-surface:    #1A1A1A;
  --color-surface-2:  #1E1E1E;
  --color-surface-3:  #2C2C2C;
  --color-text:       #E5E2E1;
  --color-text-muted: #A8A8A8;
  --color-outline:    rgba(255, 255, 255, 0.10);
  --color-outline-2:  rgba(255, 255, 255, 0.20);
  --color-navbar-bg:  rgba(18, 18, 18, 0.85);
  --color-img-border: rgba(255, 255, 255, 0.08);

  --font-display: 'Anybody', 'Arial Black', sans-serif;
  --font-body:    'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --radius-card:      12px;
  --radius-btn:       8px;
  --spacing-section:  clamp(3rem, 8vw, 6rem);
  --max-width:        1140px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--color-lime); color: #000; }

/* ===== Layout utilities ===== */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

section { padding-block: var(--spacing-section); }

/* ===== Brand pieces ===== */
.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 115%;
  letter-spacing: -0.01em;
  color: #fff;
}
.wordmark em { font-style: normal; color: var(--color-lime); }

.kicker {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.9rem;
  border: 1.5px solid rgba(204, 255, 0, 0.4);
  border-radius: 999px;
  background: rgba(204, 255, 0, 0.06);
  font: 600 0.75rem/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-text);
}
.kicker::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-lime);
}

.section-label {
  font: 600 0.75rem/1 var(--font-mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-lime);
  margin-bottom: 0.9rem;
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-outline);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.875rem;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.15rem;
}
.navbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-cta {
  background: var(--color-lime);
  color: #000;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-btn);
  white-space: nowrap;
  transition: box-shadow 0.2s, transform 0.2s;
}
@media (max-width: 420px) {
  .navbar-brand { font-size: 1rem; }
  .navbar-cta { font-size: 0.7rem; padding: 0.5rem 0.8rem; }
}
.navbar-cta:hover {
  box-shadow: 0 0 24px rgba(204, 255, 0, 0.35);
  transform: translateY(-1px);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: var(--spacing-section);
  background:
    radial-gradient(ellipse 60% 70% at 0% 100%, rgba(204, 255, 0, 0.22), transparent 70%),
    radial-gradient(ellipse 45% 55% at 78% 50%, rgba(204, 255, 0, 0.08), transparent 70%),
    var(--color-bg);
}
.hero-lines {
  position: absolute;
  inset: -50%;
  transform: rotate(-30deg);
  background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(204, 255, 0, 0.045) 38px 40px);
  pointer-events: none;
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}
@media (min-width: 880px) {
  .hero .container { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}
.hero-content { display: flex; flex-direction: column; gap: 1.5rem; }
.hero-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 115%;
  font-size: clamp(2.75rem, 7.5vw, 4.75rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #fff;
}
.hero-headline em,
.accent {
  font-style: normal;
  color: var(--color-lime);
  text-shadow: 0 0 30px rgba(204, 255, 0, 0.35);
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--color-text-muted);
  max-width: 46ch;
}
.hero-sub strong { color: var(--color-text); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-btn);
  background: var(--color-surface-2);
  border: 1px solid #2f2f2f;
  font-size: 0.9rem;
  font-weight: 500;
}
.chip svg { width: 16px; height: 16px; color: var(--color-lime); }

.hero-cta-group { display: flex; flex-direction: column; gap: 0.75rem; }
.play-badge-link { display: inline-block; align-self: flex-start; }
.play-badge-link img { display: block; height: 60px; width: auto; transition: transform 0.15s, opacity 0.15s; }
.play-badge-link:hover img { transform: translateY(-2px); opacity: 0.9; }
.hero-micro {
  font: 500 0.75rem/1.4 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Two tilted phones + record badge, same composition as the Play Store feature graphic */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 480 / 560;
  margin-inline: auto;
}
.phone {
  position: absolute;
  width: 50%;
  aspect-ratio: 1344 / 2992;
  padding: 1.6%;
  border-radius: 13% / 6%;
  background: linear-gradient(145deg, #2c2c2c, #0d0d0d);
  box-shadow: 0 0 0 1.5px #3a3a3a, 0 30px 60px rgba(0, 0, 0, 0.7);
  transform: rotate(-10deg);
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 11% / 5%;
  background: var(--color-bg);
}
.phone-back  { left: 4%;  top: 10%; filter: brightness(0.75); }
.phone-front {
  left: 42%;
  top: 2%;
  z-index: 2;
  box-shadow: 0 0 0 1.5px #3a3a3a, 0 30px 60px rgba(0, 0, 0, 0.7), 0 0 60px rgba(204, 255, 0, 0.15);
}
.record-badge {
  position: absolute;
  left: 0;
  top: 4%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  background: var(--color-orange);
  color: #fff;
  transform: rotate(-6deg);
  box-shadow: 0 10px 30px rgba(255, 92, 0, 0.45);
  font: 800 clamp(0.75rem, 1.6vw, 0.95rem)/1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.record-badge svg { width: 18px; height: 18px; }

/* ===== Features ===== */
.features {
  background: var(--color-surface-lo);
  border-block: 1px solid var(--color-outline);
}
.section-header { text-align: center; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.2vw, 3rem);
  font-weight: 900;
  font-stretch: 110%;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.9rem;
}
.section-header p { color: var(--color-text-muted); font-size: 1.05rem; }
.section-header .section-label { color: var(--color-lime); font-size: 0.75rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
}
.feature-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: rgba(204, 255, 0, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 0 32px rgba(204, 255, 0, 0.07);
}
.feature-icon {
  width: 44px;
  height: 44px;
  background: #2A3300;
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-lime);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card--record .feature-icon { background: #3A1A08; color: var(--color-orange); }
.feature-card--record:hover { border-color: rgba(255, 92, 0, 0.6); box-shadow: 0 0 32px rgba(255, 92, 0, 0.1); }
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #fff;
}
.feature-card p { font-size: 0.92rem; color: var(--color-text-muted); line-height: 1.55; }

/* ===== Screenshots ===== */
.screenshots-section .section-header { margin-bottom: 2rem; }
.carousel-wrapper { position: relative; }

.carousel-track {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-block: 1rem;
  padding-inline: clamp(1rem, 5vw, 2rem);
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide {
  flex-shrink: 0;
  width: 240px;
  scroll-snap-align: center;
}
.carousel-slide img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--color-img-border);
  cursor: zoom-in;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.carousel-slide img:hover {
  transform: scale(1.03);
  border-color: rgba(204, 255, 0, 0.45);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 30px rgba(204, 255, 0, 0.12);
}
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.carousel-btn {
  background: var(--color-surface-2);
  border: 1px solid var(--color-outline-2);
  color: var(--color-text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.carousel-btn:hover { background: var(--color-surface-3); border-color: var(--color-lime); }
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-dots { display: flex; gap: 0.5rem; align-items: center; }
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-surface-3);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--color-lime);
  transform: scale(1.3);
}

/* Desktop: replace carousel with a flat grid of all 7 screenshots */
@media (min-width: 900px) {
  .carousel-wrapper {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 5vw, 2rem);
  }
  .carousel-track {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.9rem;
    overflow: visible;
    scroll-snap-type: none;
    padding-inline: 0;
    padding-block: 1rem;
  }
  .carousel-slide {
    width: 100%;
    scroll-snap-align: none;
  }
  .carousel-controls { display: none; }
}

/* ===== Lightbox ===== */
@keyframes lightbox-in {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  background: transparent;
  border: none;
  outline: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: min(480px, 90vw);
  max-height: 92dvh;
  overflow: visible;
}
/* Only flex when open — avoids overriding the browser's dialog:not([open]){display:none} */
.lightbox[open] {
  display: flex;
  animation: lightbox-in 0.2s ease;
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: backdrop-in 0.2s ease;
}
#lightbox-img {
  display: block;
  max-width: min(420px, 84vw);
  max-height: 84dvh;
  width: auto;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
  object-fit: contain;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
}
.lightbox-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }
.lightbox-close svg { width: 18px; height: 18px; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav svg { width: 20px; height: 20px; }
.lightbox-prev { left: -3.25rem; }
.lightbox-next { right: -3.25rem; }

@media (max-width: 560px) {
  .lightbox-prev { left: -2.75rem; }
  .lightbox-next { right: -2.75rem; }
  .lightbox-nav { width: 34px; height: 34px; }
}

/* ===== Privacy callout ===== */
.privacy-section {
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(0, 240, 255, 0.07), transparent 70%),
    var(--color-surface-lo);
  border-block: 1px solid rgba(0, 240, 255, 0.15);
}
.privacy-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  max-width: 680px;
  margin-inline: auto;
}
.privacy-icon {
  width: 64px;
  height: 64px;
  background: #00363A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.15);
}
.privacy-icon svg { width: 30px; height: 30px; }
.privacy-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  font-weight: 900;
  font-stretch: 110%;
  line-height: 1.05;
  text-transform: uppercase;
  color: #fff;
}
.privacy-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: left;
  width: 100%;
  max-width: 440px;
}
.privacy-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.privacy-bullets li::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-cyan);
  margin-top: 0.5em;
  flex-shrink: 0;
}
.privacy-link {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.privacy-link:hover { color: var(--color-cyan); }

/* ===== CTA Banner ===== */
.cta-section {
  background: radial-gradient(ellipse 50% 70% at 50% 100%, rgba(204, 255, 0, 0.14), transparent 70%);
}
.cta-banner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  font-stretch: 115%;
  line-height: 1;
  text-transform: uppercase;
  color: #fff;
}
.cta-banner p { color: var(--color-text-muted); max-width: 44ch; }
.cta-banner .play-badge-link { align-self: center; }

/* ===== Footer ===== */
footer {
  background: var(--color-surface-lo);
  border-top: 1px solid var(--color-outline);
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { color: var(--color-text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--color-lime); }
.footer-copy { font-size: 0.78rem; color: var(--color-text-muted); max-width: 52ch; }
.footer-disclaimer { font-size: 0.72rem; color: var(--color-text-muted); opacity: 0.6; max-width: 52ch; }

/* ===== Scroll-in animation ===== */
@media (prefers-reduced-motion: no-preference) {
  .fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  .fade-in.visible {
    opacity: 1;
    transform: none;
  }
}
