/* ============================================================
   CALL SCROLL — Dark App-Style Landing Page
   Palette: App dark green-black + teal mint accent
   ============================================================ */

/* --- TYPE SCALE --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);
}

/* --- SPACING --- */
:root {
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
}

/* --- APP-MATCHED COLOR PALETTE (dark = default / primary) --- */
:root {
  /* App background: dark desaturated forest green-black */
  --color-bg:            #161b1a;
  --color-surface:       #1e2523;
  --color-surface-2:     #252d2b;
  --color-surface-3:     #2d3735;
  --color-border:        rgba(255,255,255,0.07);
  --color-divider:       rgba(255,255,255,0.05);

  /* Text */
  --color-text:          #f0efed;
  --color-text-muted:    #8a9390;
  --color-text-faint:    #4e5856;

  /* Teal accent — exact app CTA mint */
  --color-accent:        #4ECBA0;
  --color-accent-hover:  #3db88d;
  --color-accent-dark:   #1a3d32;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-body:    'Plus Jakarta Sans', 'Inter', sans-serif;

  /* Radius */
  --radius-sm:   0.5rem;
  --radius-md:   0.875rem;
  --radius-lg:   1.25rem;
  --radius-xl:   1.75rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(78,203,160,0.12);

  /* Content widths */
  --content-narrow:  600px;
  --content-default: 960px;
  --content-wide:    1160px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light mode override — keep app style but lighter */
[data-theme="light"] {
  --color-bg:            #f2f5f4;
  --color-surface:       #ffffff;
  --color-surface-2:     #f7faf9;
  --color-surface-3:     #edf2f0;
  --color-border:        rgba(0,0,0,0.08);
  --color-divider:       rgba(0,0,0,0.05);
  --color-text:          #131917;
  --color-text-muted:    #5a6963;
  --color-text-faint:    #a8b5b1;
  --color-accent:        #2aab83;
  --color-accent-hover:  #1e9470;
  --color-accent-dark:   #d0f2e7;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12);
  --shadow-glow: 0 0 40px rgba(42,171,131,0.12);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg:            #f2f5f4;
    --color-surface:       #ffffff;
    --color-surface-2:     #f7faf9;
    --color-surface-3:     #edf2f0;
    --color-border:        rgba(0,0,0,0.08);
    --color-divider:       rgba(0,0,0,0.05);
    --color-text:          #131917;
    --color-text-muted:    #5a6963;
    --color-text-faint:    #a8b5b1;
    --color-accent:        #2aab83;
    --color-accent-hover:  #1e9470;
    --color-accent-dark:   #d0f2e7;
    --shadow-glow: 0 0 40px rgba(42,171,131,0.12);
  }
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: clamp(var(--space-6), 5vw, var(--space-16));
}

.container--wide {
  max-width: var(--content-wide);
}

.container--narrow {
  max-width: var(--content-narrow);
}

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s var(--ease-out);
}

.site-header--scrolled {
  box-shadow: var(--shadow-md);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-logo-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.btn-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: var(--color-surface);
}

.btn-theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.btn-testflight-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #161b1a;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
}

.btn-testflight-nav:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(78,203,160,0.3);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  padding-block: clamp(var(--space-16), 10vw, var(--space-24));
  overflow: hidden;
}

/* Subtle radial glow background */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    rgba(78, 203, 160, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 6vw, var(--space-20));
  align-items: center;
}

.hero-content {
  max-width: 540px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: color-mix(in oklab, var(--color-accent) 12%, transparent);
  border: 1px solid color-mix(in oklab, var(--color-accent) 25%, transparent);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.hero-title .name {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-10);
  max-width: 48ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: #0f1e1b;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 24px rgba(78,203,160,0.25);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(78,203,160,0.35);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--color-surface-2);
  border-color: color-mix(in oklab, var(--color-accent) 35%, transparent);
  color: var(--color-accent);
}

.hero-note {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* Phone mockups */
.hero-phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: clamp(420px, 55vw, 620px);
}

.phone-mockup {
  position: absolute;
  bottom: 0;
  border-radius: 44px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.08);
  transition: transform 0.4s var(--ease-out);
}

.phone-mockup img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.phone-mockup--back {
  width: clamp(160px, 20vw, 220px);
  height: clamp(320px, 42vw, 450px);
  right: 8%;
  transform: rotate(6deg) translateY(24px);
  z-index: 1;
  filter: brightness(0.7);
}

.phone-mockup--front {
  width: clamp(185px, 22vw, 248px);
  height: clamp(370px, 48vw, 510px);
  left: 12%;
  z-index: 2;
}

.hero-phones:hover .phone-mockup--front {
  transform: translateY(-8px);
}

.hero-phones:hover .phone-mockup--back {
  transform: rotate(8deg) translateY(16px);
}

/* App icon floating badge */
.hero-icon-badge {
  position: absolute;
  top: 12%;
  right: 2%;
  z-index: 3;
  width: clamp(56px, 7vw, 80px);
  height: clamp(56px, 7vw, 80px);
  border-radius: 20%;
  overflow: hidden;
  box-shadow: var(--shadow-md), 0 0 0 2px rgba(78,203,160,0.2);
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ============================================================
   STATS BAR
   ============================================================ */

.stats-bar {
  padding-block: var(--space-10);
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */

.section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-5);
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.2rem + 2.5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.section-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.65;
  max-width: 52ch;
  margin-bottom: var(--space-12);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.step-card:hover::before {
  opacity: 1;
}

.step-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 900;
  color: color-mix(in oklab, var(--color-accent) 20%, transparent);
  line-height: 1;
  margin-bottom: var(--space-5);
  letter-spacing: -0.04em;
}

.step-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

.step-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ============================================================
   STORY SECTION (Founder)
   ============================================================ */

.story-section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-surface);
}

.story-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-12), 7vw, var(--space-20));
  align-items: center;
}

.story-content {
  max-width: 520px;
}

.story-quote {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 0.8rem + 2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  position: relative;
  padding-left: var(--space-8);
}

.story-quote::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.story-body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.75;
}

.story-body p + p {
  margin-top: var(--space-5);
}

.story-sig {
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.story-sig-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.story-sig-name {
  font-weight: 700;
  color: var(--color-text);
  display: block;
}

/* Founder photo */
.story-photo-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.founder-photo {
  width: clamp(240px, 32vw, 380px);
  height: clamp(240px, 32vw, 380px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  box-shadow: var(--shadow-lg);
  border: 3px solid color-mix(in oklab, var(--color-accent) 30%, transparent);
  filter: grayscale(100%) contrast(1.05);
}

.story-photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78,203,160,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ============================================================
   FEATURES / BENEFITS
   ============================================================ */

.features-section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-5);
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--color-accent) 30%, transparent);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-accent) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  color: var(--color-accent);
}

.feature-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.feature-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ============================================================
   CTA SECTION
   ============================================================ */

.cta-section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-24));
  background: var(--color-surface);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 80% at 50% 100%,
    rgba(78, 203, 160, 0.06) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.cta-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-app-icon {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  overflow: hidden;
  margin: 0 auto var(--space-8);
  box-shadow: var(--shadow-lg), 0 0 0 3px rgba(78,203,160,0.15);
}

.cta-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-5);
}

.cta-heading .name {
  color: var(--color-accent);
}

.cta-sub {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 44ch;
  margin: 0 auto var(--space-10);
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.cta-note {
  margin-top: var(--space-5);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  padding-block: var(--space-10);
  border-top: 1px solid var(--color-divider);
}

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

.footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.footer-logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
}

.footer-logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
}

.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-decoration: none;
}

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

.footer-right {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: right;
}

.footer-right a {
  color: var(--color-text-faint);
  text-decoration: none;
}

.footer-right a:hover {
  color: var(--color-accent);
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

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

  .hero-content {
    max-width: 100%;
    text-align: center;
  }

  .hero-eyebrow {
    margin-inline: auto;
  }

  .hero-subtitle {
    margin-inline: auto;
  }

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

  .hero-phones {
    height: clamp(300px, 80vw, 420px);
    order: -1;
  }

  .phone-mockup--back {
    width: clamp(120px, 30vw, 160px);
    height: clamp(240px, 60vw, 320px);
    right: 5%;
  }

  .phone-mockup--front {
    width: clamp(140px, 34vw, 185px);
    height: clamp(275px, 68vw, 375px);
    left: 8%;
  }

  .story-inner {
    grid-template-columns: 1fr;
  }

  .story-photo-wrap {
    order: -1;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .footer-right {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .nav-logo-name { display: none; }
  .btn-testflight-nav { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
}
