/* ============================================================
   Aruha — Landing Page Stylesheet
   Design tokens mirrored from the Aruha mobile app
   ============================================================ */

/* === TOKENS ================================================ */
:root {
  --bg:          #F5F0EB;
  --surface:     #FBF8F4;
  --surface-hi:  #EDE8E2;
  --border:      #E8E3DC;
  --text:        #1A1A1A;
  --text-muted:  #6B6560;
  --cta:         #1E1E1E;
  --green:       #2E7D52;
  --warning:     #B06000;

  --r-xl:  20px;
  --r-lg:  16px;
  --r-md:  12px;
  --r-sm:  8px;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

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

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

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

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* === LAYOUT ================================================ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }

/* === TYPOGRAPHY ============================================ */
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); }
h3 { font-size: 1.0625rem; font-weight: 600; }

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.section-title { margin-bottom: 12px; }

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 48px;
  line-height: 1.7;
}

/* === BUTTONS ============================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all 0.2s var(--ease);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary { background: var(--cta); color: #fff; }
.btn-primary:hover { background: #2d2d2d; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.18); }

.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--surface-hi); border-color: #ccc; }

.btn-sm { padding: 8px 18px; font-size: 0.875rem; }

/* === BADGE ================================================ */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.badge-green { background: #E8F5EE; color: var(--green); }

/* === NAV ================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.25s var(--ease);
}

.nav-scrolled {
  background: rgba(245, 240, 235, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}

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

.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

.nav-logo img {
  height: 52px;
  width: auto;
}

/* === HERO ================================================= */
.hero {
  padding-top: calc(72px + 56px);
  padding-bottom: 96px;
  background: var(--bg);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
}

.hero-copy { max-width: 560px; }
.hero-h1 { margin-bottom: 20px; }
.hero-subtitle { font-size: 1.0625rem; color: var(--text-muted); margin-bottom: 40px; line-height: 1.7; }

.cta-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* === HERO SCREENSHOT ====================================== */
.hero-visual { display: flex; justify-content: center; align-items: center; }

.app-preview {
  width: clamp(240px, 21vw, 305px);
  aspect-ratio: 9 / 19.5;
  border-radius: 40px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background: #F8F4EF;
  box-shadow: 0 28px 80px rgba(0,0,0,0.16);
  flex-shrink: 0;
}

.app-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.phone-receipt-badge {
  position: absolute;
  bottom: 56px;
  right: -68px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 7px 13px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.phone-receipt-badge svg { color: var(--green); }

/* === PROBLEMS ============================================= */
.problems { background: var(--surface); }

.problems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.problem-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.problem-card:nth-child(2) { transition-delay: 0.08s; }
.problem-card:nth-child(3) { transition-delay: 0.12s; }
.problem-card:nth-child(4) { transition-delay: 0.18s; }

.problem-card.visible { opacity: 1; transform: none; }

.problem-icon { font-size: 1.375rem; margin-bottom: 14px; line-height: 1; }
.problem-card h3 { margin-bottom: 6px; }
.problem-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* === SOLUTION ============================================= */
.solution { background: var(--bg); }

.solution-steps { display: flex; flex-direction: column; max-width: 580px; }

.solution-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.solution-step:nth-child(3) { transition-delay: 0.1s; }
.solution-step:nth-child(5) { transition-delay: 0.2s; }
.solution-step.visible { opacity: 1; transform: none; }

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cta);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content { padding-bottom: 36px; }
.step-content h3 { margin-bottom: 6px; }
.step-content p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.65; }

.solution-connector {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin-left: 17px;
}

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

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

.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.step-card:nth-child(2) { transition-delay: 0.1s; }
.step-card:nth-child(3) { transition-delay: 0.2s; }
.step-card.visible { opacity: 1; transform: none; }

.step-card-num { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 20px; }

.step-card-visual {
  width: 52px;
  height: 52px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step-scan  { background: var(--surface-hi); color: var(--text); }
.step-review { background: #E8F5EE; color: var(--green); }
.step-track { background: var(--surface-hi); color: var(--text); }

.step-card h3 { margin-bottom: 8px; }
.step-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; }

/* === FEATURES ============================================= */
.features { background: var(--bg); }

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.feature-card:nth-child(2) { transition-delay: 0.08s; }
.feature-card:nth-child(3) { transition-delay: 0.16s; }
.feature-card:nth-child(4) { transition-delay: 0.08s; }
.feature-card:nth-child(5) { transition-delay: 0.16s; }

.feature-card.visible { opacity: 1; transform: none; }

.feature-card-soon {
  border-style: dashed;
}

.feature-card-soon.visible { opacity: 0.72; }

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: 6px;
}

.feature-card-soon .feature-icon { color: var(--text-muted); }

.feature-card h3 { font-size: 1rem; margin: 0; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; flex: 1; }

.feature-status {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  align-self: flex-start;
  margin-top: 6px;
}

.feature-status-live { background: #E8F5EE; color: var(--green); }
.feature-status-soon { background: var(--surface-hi); color: var(--text-muted); }
.feature-status-planned { background: var(--surface-hi); color: var(--text-muted); }

/* === TRUST ================================================ */
.trust { background: var(--surface); }

.trust-box {
  max-width: 660px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 48px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
}

.trust-icon {
  width: 48px;
  height: 48px;
  background: var(--surface-hi);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin: 0 auto 20px;
}

.trust-box h2 { font-size: 1.375rem; margin-bottom: 16px; }
.trust-box p { color: var(--text-muted); line-height: 1.75; margin-bottom: 12px; font-size: 0.9375rem; }
.trust-box p:last-child { margin-bottom: 0; }

/* === WAITLIST ============================================= */
.waitlist { background: var(--cta); color: white; }
.waitlist .section-label { color: rgba(255,255,255,0.45); }

.waitlist-inner { max-width: 480px; margin: 0 auto; text-align: center; }
.waitlist .section-title { color: white; }
.waitlist .section-subtitle { color: rgba(255,255,255,0.6); margin-bottom: 36px; max-width: none; }

.waitlist-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
  margin: 0 auto 14px;
}

.waitlist-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--r-md);
  border: 1.5px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: white;
  font-family: var(--font);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  min-width: 0;
}

.waitlist-input::placeholder { color: rgba(255,255,255,0.35); }
.waitlist-input:focus { border-color: rgba(255,255,255,0.38); background: rgba(255,255,255,0.11); }

.waitlist .btn-primary { background: white; color: var(--cta); flex-shrink: 0; }
.waitlist .btn-primary:hover { background: #f0ebe5; box-shadow: none; transform: none; }
.waitlist .btn-primary:disabled { opacity: 0.7; cursor: default; transform: none; }

.waitlist-note { font-size: 0.8125rem; color: rgba(255,255,255,0.38); }

/* === FOOTER =============================================== */
.footer { background: #111; padding: 48px 0 28px; }

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 24px;
  gap: 40px;
}

.footer-brand .nav-logo { color: white; display: block; margin-bottom: 6px; }
.footer-tagline { font-size: 0.875rem; color: rgba(255,255,255,0.35); }

.footer-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.footer-links a { font-size: 0.875rem; color: rgba(255,255,255,0.45); transition: color 0.2s var(--ease); }
.footer-links a:hover { color: rgba(255,255,255,0.9); }

.footer-bottom p { font-size: 0.8125rem; color: rgba(255,255,255,0.22); }

/* === LEGAL PAGES ========================================== */
.legal-nav {
  position: sticky;
  top: 0;
  background: rgba(245, 240, 235, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  z-index: 100;
}

.legal-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.legal-page h1 { font-size: 1.875rem; margin-bottom: 8px; }

.legal-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-page h2 { font-size: 1.0625rem; font-weight: 600; margin-top: 36px; margin-bottom: 8px; }
.legal-page p { color: var(--text-muted); line-height: 1.8; margin-bottom: 14px; font-size: 0.9375rem; }
.legal-page ul { color: var(--text-muted); line-height: 1.8; margin-bottom: 14px; padding-left: 24px; font-size: 0.9375rem; }
.legal-page ul li { margin-bottom: 4px; }
.legal-page a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

/* === LANGUAGE SWITCHER ==================================== */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-lang {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.nav-lang:hover {
  background: var(--surface-hi);
  color: var(--text);
  border-color: rgba(0,0,0,0.15);
}

/* === REDUCED MOTION FALLBACK ============================== */
@media (prefers-reduced-motion: reduce) {
  .problem-card,
  .step-card,
  .feature-card,
  .solution-step {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* === RESPONSIVE =========================================== */
@media (max-width: 920px) {
  .hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 40px; }
  .hero-copy { max-width: 100%; order: 1; }
  .hero-visual { order: 2; }
  .cta-group { justify-content: center; }
  .app-preview { width: min(100%, 320px); }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .problems-grid { grid-template-columns: 1fr; }
  .solution-steps { max-width: 100%; }
}

@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .hero { padding-top: calc(64px + 32px); }
  .features-grid { grid-template-columns: 1fr; }
  .waitlist-form { flex-direction: column; }
  .app-preview { width: min(100%, 260px); border-radius: 32px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { align-items: flex-start; }
  .trust-box { padding: 28px 24px; }
}
