/* ============================================
   PNK Design Tokens (from iOS Tokens.swift)
   ============================================ */
:root {
  --color-primary: #151400;
  --color-accent: #863DFF;
  --color-green: #7FFE44;
  --color-pink: #DA48FF;
  --color-deep-purple: #1F0151;
  --color-destructive: #FF5252;
  --color-surface: #1A1A1A;
  --color-secondary: #111111;
  --color-text: #FFFFFF;
  --color-text-secondary: #999999;
  --color-border: rgba(255, 255, 255, 0.12);

  --cta-start: #FDFC47;
  --cta-end: #24FE41;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'DM Sans', sans-serif;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --radius-full: 40px;

  --space-xs: 8px;
  --space-s: 12px;
  --space-m: 16px;
  --space-l: 24px;
  --space-xl: 40px;
  --space-xxl: 64px;
  --space-hero: 120px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--color-primary);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h1 { font-size: clamp(3rem, 8vw, 6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.text-secondary { color: var(--color-text-secondary); }
.text-accent { color: var(--color-accent); }
.text-green { color: var(--color-green); }

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-l);
}

section {
  padding: var(--space-hero) 0;
}

/* ============================================
   Noise overlay (texture)
   ============================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: var(--space-xxl) var(--space-l);
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(134, 61, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(127, 254, 68, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

.hero-logo {
  width: clamp(180px, 40vw, 320px);
  margin-bottom: var(--space-xl);
  animation: fadeUp 0.8s ease-out both;
}

.hero-logo svg {
  width: 100%;
  height: auto;
  fill: var(--color-text);
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  animation: fadeUp 0.8s ease-out 0.15s both;
}

.hero-headline {
  margin-bottom: var(--space-xl);
  animation: fadeUp 0.8s ease-out 0.3s both;
}

.hero-headline .accent-line {
  display: block;
  background: linear-gradient(135deg, var(--color-accent), var(--color-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-cta {
  margin-top: var(--space-xl);
  animation: fadeUp 0.8s ease-out 0.45s both;
}

/* ============================================
   Buttons
   ============================================ */
.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-m) var(--space-l);
  background: var(--color-text);
  color: var(--color-primary);
  border-radius: var(--radius-m);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-appstore:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15);
}

.btn-appstore:active {
  transform: translateY(0);
}

.btn-appstore svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  position: relative;
  top: -1px;
}

.btn-appstore span {
  font-weight: 700;
}

.hero-note {
  margin-top: var(--space-m);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  animation: fadeUp 0.8s ease-out 0.6s both;
}

/* ============================================
   How it works
   ============================================ */
.how-it-works {
  background: var(--color-secondary);
  position: relative;
}

.how-it-works .section-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-m);
}

.how-it-works h2 {
  margin-bottom: var(--space-xxl);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}

.step {
  position: relative;
  padding: var(--space-xl);
  border-radius: var(--radius-l);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.step:hover {
  transform: translateY(-4px);
  border-color: rgba(134, 61, 255, 0.3);
}

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-l);
  font-size: 1.5rem;
  background: rgba(134, 61, 255, 0.12);
  color: var(--color-accent);
}

.step-number {
  position: absolute;
  top: var(--space-l);
  right: var(--space-l);
  font-family: var(--font-heading);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.04);
  line-height: 1;
}

.step h3 {
  margin-bottom: var(--space-xs);
}

.step p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ============================================
   Features
   ============================================ */
.features {
  position: relative;
}

.features .section-label {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: var(--space-m);
}

.features h2 {
  margin-bottom: var(--space-xxl);
  max-width: 600px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-l);
}

.feature-card {
  padding: var(--space-xl);
  border-radius: var(--radius-l);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(127, 254, 68, 0.2);
}

.feature-card.highlight {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(134, 61, 255, 0.08), rgba(218, 72, 255, 0.05));
  border-color: rgba(134, 61, 255, 0.2);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--space-m);
}

.feature-card h3 {
  margin-bottom: var(--space-xs);
}

.feature-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   Download CTA
   ============================================ */
.download-cta {
  text-align: center;
  background: var(--color-secondary);
  position: relative;
  overflow: hidden;
}

.download-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(134, 61, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

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

.download-cta h2 {
  margin-bottom: var(--space-m);
}

.download-cta .subtitle {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-bottom: var(--space-xl);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.download-cta .availability {
  margin-top: var(--space-l);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

/* ============================================
   Footer
   ============================================ */
footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-m);
}

.footer-logo svg {
  width: 80px;
  height: auto;
  fill: var(--color-text-secondary);
}

.footer-links {
  display: flex;
  gap: var(--space-l);
}

.footer-links a {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

/* ============================================
   Legal pages
   ============================================ */
.legal {
  padding-top: var(--space-hero);
  padding-bottom: var(--space-xxl);
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-xl);
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-m);
}

.legal p, .legal li {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-m);
  max-width: 720px;
}

.legal ul {
  padding-left: var(--space-l);
  margin-bottom: var(--space-m);
}

.legal a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal a:hover {
  color: var(--color-pink);
}

.legal .back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-xl);
  text-decoration: none;
  transition: color 0.2s;
}

.legal .back-link:hover {
  color: var(--color-text);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Countdown pill (hero detail)
   ============================================ */
.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(134, 61, 255, 0.12);
  border: 1px solid rgba(134, 61, 255, 0.25);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-l);
  animation: fadeUp 0.8s ease-out 0.1s both;
}

.countdown-pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card.highlight {
    grid-column: span 1;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  section {
    padding: var(--space-xxl) 0;
  }

  .hero {
    padding: var(--space-xxl) var(--space-m);
  }
}
