/* ============================================================
   Orchard Landing Page — styles.css
   Mobile-first · Fluid spacing · Dark + red accent
   ============================================================ */

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  /* Colors */
  --bg:              #050505;
  --bg-surface:      #0c0c0c;
  --bg-card:         #111;
  --bg-card-hover:   #181818;
  --border:          #1a1a1a;
  --border-hover:    #222;

  --text:            #f5f5f5;
  --text-sub:        #a3a3a3;
  --text-muted:      #666;

  --accent:          #fa243c;
  --accent-mid:      #e31c31;
  --accent-glow:     rgba(250, 36, 60, 0.15);

  --grad-hero:       linear-gradient(135deg, #fa243c, #ff5e62);
  --grad-cta:        linear-gradient(135deg, #fa243c, #e31c31);

  /* Typography — fluid scale via clamp */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.8125rem);
  --text-sm:   clamp(0.8125rem,0.78rem + 0.25vw, 0.875rem);
  --text-base: clamp(0.875rem, 0.83rem + 0.3vw,  1rem);
  --text-md:   clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.5vw,  1.25rem);
  --text-xl:   clamp(1.375rem, 1.1rem  + 1vw,    1.75rem);
  --text-2xl:  clamp(1.6rem,   1.3rem  + 1.5vw,  2.2rem);
  --text-3xl:  clamp(2rem,     1.5rem  + 2.5vw,  3rem);
  --text-hero: clamp(2.25rem,  1.6rem  + 3.5vw,  4rem);

  /* Spacing — fluid */
  --sp-xs:  clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
  --sp-sm:  clamp(0.5rem,  0.4rem + 0.5vw,  0.75rem);
  --sp-md:  clamp(1rem,    0.8rem + 1vw,     1.5rem);
  --sp-lg:  clamp(1.5rem,  1.2rem + 1.5vw,   2.5rem);
  --sp-xl:  clamp(2rem,    1.5rem + 2.5vw,   4rem);
  --sp-2xl: clamp(3rem,    2rem   + 4vw,     6rem);
  --sp-sec: clamp(4rem,    3rem   + 4vw,     7rem);    /* section padding */

  /* Layout */
  --max-w:   1100px;
  --font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Radii */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-pill: 100px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 200ms var(--ease);
  --t-med:  350ms var(--ease);
  --t-slow: 500ms var(--ease);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--accent-mid); }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--sp-md);
}

/* ── Reduced Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ── Scroll Animations ──────────────────────────────────────── */
.anim {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow), transform var(--t-slow);
}
.anim.visible {
  opacity: 1;
  transform: none;
}

/* Stagger delays for grid children */
.steps-grid .anim:nth-child(1) { transition-delay: 0ms; }
.steps-grid .anim:nth-child(3) { transition-delay: 120ms; }
.steps-grid .anim:nth-child(5) { transition-delay: 240ms; }

.features-grid .anim:nth-child(1) { transition-delay: 0ms; }
.features-grid .anim:nth-child(2) { transition-delay: 80ms; }
.features-grid .anim:nth-child(3) { transition-delay: 160ms; }
.features-grid .anim:nth-child(4) { transition-delay: 240ms; }
.features-grid .anim:nth-child(5) { transition-delay: 320ms; }
.features-grid .anim:nth-child(6) { transition-delay: 400ms; }

/* ================================================================
   NAVIGATION — sticky, glassmorphic
   ================================================================ */
#nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background var(--t-med), border-color var(--t-med);
}
#nav.scrolled {
  background: rgba(5, 5, 5, 0.92);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--sp-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 700;
  font-size: var(--text-lg);
  text-decoration: none;
}
.nav-logo:hover { color: var(--text); }
.nav-logo-icon { font-size: 22px; }

/* Desktop links — hidden on mobile (mobile-first) */
.nav-links { display: none; align-items: center; gap: 32px; }
.nav-links a { color: var(--text-sub); font-size: var(--text-sm); font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.nav-cta {
  background: var(--grad-cta);
  color: #000;
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--text-xs);
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #000;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text-sub);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px var(--sp-md) 24px;
  gap: 4px;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.mobile-menu[data-open="true"] { display: flex; }
.mobile-menu a {
  color: var(--text-sub);
  font-size: var(--text-base);
  font-weight: 500;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  min-height: 48px;
  display: flex;
  align-items: center;
}
.mobile-menu a:last-child {
  border-bottom: none;
  margin-top: 8px;
  justify-content: center;
  background: var(--grad-cta);
  color: #000;
  padding: 14px;
  border-radius: var(--r-md);
  font-weight: 600;
}

/* ─ Desktop nav (≥ 768px) ─ */
@media (min-width: 768px) {
  .nav-inner { height: 64px; }
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none; }
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  position: relative;
  padding: calc(100px + var(--sp-2xl)) 0 var(--sp-2xl);
  text-align: center;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, 100vw);
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(250,36,60,0.08), rgba(200,20,40,0.04) 40%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 6s ease-in-out infinite alternate;
}
@keyframes pulse-glow {
  0%   { opacity: 0.6; transform: translateX(-50%) scale(1); }
  100% { opacity: 1;   transform: translateX(-50%) scale(1.1); }
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(250,36,60,0.08);
  border: 1px solid rgba(250,36,60,0.2);
  color: var(--accent);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 6px 16px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-lg);
  letter-spacing: 0.02em;
}
.hero-badge-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.hero h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-md);
}

.hero-gradient {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-md);
  color: var(--text-sub);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto var(--sp-xl);
}

.hero-cta-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}

.cta-appstore {
  display: inline-block;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
  border-radius: 10px;
}
.cta-appstore:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 30px rgba(250,36,60,0.15);
}
.cta-appstore svg { display: block; border-radius: 10px; }

.hero-cta-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.hero-trust {
  font-size: var(--text-sm);
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}
.hero-trust strong { color: var(--text-sub); }

/* ================================================================
   SECTION SHARED
   ================================================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-2xl);
}

.section-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--sp-sm);
}

.section-header h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-sm);
}

.section-desc {
  font-size: var(--text-base);
  color: var(--text-sub);
  max-width: 560px;
  margin: 0 auto;
}

/* ================================================================
   APP PREVIEW
   ================================================================ */
.app-preview {
  padding: var(--sp-sec) 0;
  background: var(--bg);
  overflow: hidden;
}

.preview-gallery {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  justify-content: center;
  align-items: flex-end;
  margin-top: var(--sp-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-sm);
}

.preview-phone {
  flex: 0 0 auto;
  width: clamp(180px, 28vw, 240px);
  scroll-snap-align: center;
  text-align: center;
}

.preview-phone img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 2px solid var(--border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.preview-phone:hover img {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.preview-phone figcaption {
  margin-top: var(--sp-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Center screenshot is the hero — larger */
.preview-phone--hero {
  width: clamp(220px, 34vw, 300px);
}

.preview-phone--hero img {
  border-color: var(--accent);
  box-shadow: 0 8px 40px rgba(250,36,60,0.12);
}

@media (min-width: 640px) {
  .preview-gallery {
    overflow-x: visible;
    padding-bottom: 0;
  }
}

/* ================================================================
   HOW IT WORKS
   ================================================================ */
.how-it-works {
  padding: var(--sp-sec) 0;
  background: var(--bg-surface);
}

/* Mobile: stack vertically */
.steps-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.step-card {
  width: 100%;
  max-width: 340px;
  text-align: center;
  padding: var(--sp-lg) var(--sp-md);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(250,36,60,0.1);
  border: 1px solid rgba(250,36,60,0.3);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--sp-sm);
}

.step-icon {
  font-size: 36px;
  margin-bottom: var(--sp-sm);
  filter: grayscale(0.1);
}

.step-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--sp-xs);
  letter-spacing: -0.01em;
}

.step-card p {
  font-size: var(--text-sm);
  color: var(--text-sub);
  line-height: 1.7;
}

.step-connector {
  display: flex;
  align-items: center;
  transform: rotate(90deg);
  padding: 0;
}

/* Desktop steps: horizontal */
@media (min-width: 768px) {
  .steps-grid {
    flex-direction: row;
    justify-content: center;
  }
  .step-card {
    flex: 0 1 280px;
    width: auto;
  }
  .step-connector {
    transform: none;
    padding-top: 88px;
  }
}

/* ================================================================
   FEATURES
   ================================================================ */
.features {
  padding: var(--sp-sec) 0;
}

/* Mobile: single column */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-sm);
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg) var(--sp-md);
  transition: background var(--t-med), border-color var(--t-med), box-shadow var(--t-med), transform var(--t-med);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  opacity: 0;
  transition: opacity var(--t-med);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px var(--border-hover);
  transform: translateY(-2px);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  font-size: 28px;
  margin-bottom: var(--sp-sm);
  filter: grayscale(0.1);
}

.feature-card h3 {
  font-size: var(--text-md);
  font-weight: 700;
  margin-bottom: var(--sp-xs);
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--text-sub);
  line-height: 1.7;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
  }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ================================================================
   FAQ
   ================================================================ */
.faq {
  padding: var(--sp-sec) 0;
  background: var(--bg-surface);
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item[open] { border-color: rgba(250,36,60,0.2); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md);
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 56px;
  transition: background var(--t-fast);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { display: none; content: ''; }
.faq-item summary:hover { background: rgba(255,255,255,0.02); }

.faq-item summary h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  flex: 1;
  padding-right: var(--sp-md);
  line-height: 1.5;
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--t-fast), color var(--t-fast);
}
.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer { padding: 0 var(--sp-md) var(--sp-md); }
.faq-answer p {
  font-size: var(--text-sm);
  color: var(--text-sub);
  line-height: 1.8;
}

@media (min-width: 640px) {
  .faq-item summary h3 { font-size: var(--text-base); }
}

/* ================================================================
   FINAL CTA
   ================================================================ */
.final-cta {
  padding: var(--sp-sec) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 90vw);
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(250,36,60,0.06), transparent 70%);
  pointer-events: none;
}

.final-cta h2 {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-md);
  position: relative;
  z-index: 1;
}

.cta-desc {
  font-size: var(--text-base);
  color: var(--text-sub);
  max-width: 500px;
  margin: 0 auto var(--sp-xl);
  position: relative;
  z-index: 1;
}

.cta-button {
  display: inline-block;
  background: var(--grad-cta);
  color: #000;
  font-size: var(--text-base);
  font-weight: 700;
  padding: 16px 40px;
  border-radius: var(--r-pill);
  transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
  position: relative;
  z-index: 1;
  max-width: 100%;
}
.cta-button:hover {
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(250,36,60,0.3);
  opacity: 0.95;
}

.cta-note {
  margin-top: var(--sp-md);
  font-size: var(--text-xs);
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ================================================================
   FOOTER
   ================================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-2xl) 0 var(--sp-lg);
  background: var(--bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}

.footer-brand { max-width: 320px; }
.footer-logo { font-size: var(--text-lg); font-weight: 700; color: var(--text); }
.footer-tagline {
  margin-top: var(--sp-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-links-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
}

.footer-col h4 {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: var(--sp-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: var(--text-sm); color: var(--text-muted); }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--sp-md);
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

/* Desktop footer: horizontal */
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--sp-2xl);
  }
  .footer-links-group { gap: 56px; }
}

/* ================================================================
   PRINT
   ================================================================ */
@media print {
  nav, .hero-bg-glow, .cta-glow, .step-connector { display: none; }
  body { background: #fff; color: #000; }
  .hero-gradient { -webkit-text-fill-color: #000; }
}
