/* ============================================
   LEGASY Landing Page Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --color-primary: #8C7851;
  --color-primary-dark: #6B5A3E;
  --color-accent: #B85C50;
  --color-background: #FDFBF9;
  --color-surface: #FFFFFF;
  --color-surface-secondary: #F2ECE4;
  --color-text: #1E293B;
  --color-text-secondary: #64748B;
  --color-text-tertiary: #94A3B8;
  --color-border: rgba(140, 120, 81, 0.12);
  --color-footer-bg: #1E293B;

  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-section: 100px;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --max-width: 1100px;
  --nav-height: 72px;
}

/* --- 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-serif);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-text);
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* --- Section --- */
.section {
  padding: var(--space-section) 0;
}

.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: 32px;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 17px;
  color: var(--color-text-secondary);
  max-width: 560px;
}

.section--alt {
  background: var(--color-surface-secondary);
}

/* ============================================
   NAVIGATION
   ============================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 100;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-nav.scrolled {
  background: rgba(253, 251, 249, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--color-primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--color-primary);
  color: #fff !important;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background: var(--color-primary-dark);
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-text);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: calc(var(--nav-height) + 80px) 0 var(--space-section);
  text-align: center;
}

.hero .section-label {
  margin-bottom: var(--space-lg);
}

.hero-title {
  font-size: 44px;
  line-height: 1.2;
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--color-text-secondary);
  max-width: 580px;
  margin: 0 auto var(--space-xxl);
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.hero-trust {
  font-size: 14px;
  color: var(--color-text-tertiary);
  letter-spacing: 0.5px;
}

/* --- Store Badges --- */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -8px rgba(140, 120, 81, 0.3);
}

.store-badge svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.store-badge--primary {
  background: var(--color-primary);
  color: #fff;
}

.store-badge--primary:hover {
  color: #fff;
}

.store-badge--secondary {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
}

/* ============================================
   FEATURES
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xxl);
}

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

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -8px rgba(140, 120, 81, 0.12);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 19px;
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ============================================
   SCREENSHOTS
   ============================================ */
.screenshots {
  text-align: center;
}

.screenshots-row {
  display: flex;
  gap: var(--space-xl);
  justify-content: center;
  align-items: flex-start;
  margin-top: var(--space-xxl);
  overflow-x: auto;
  padding: var(--space-lg) var(--space-md);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.screenshot-item {
  flex-shrink: 0;
  scroll-snap-align: center;
  text-align: center;
}

.screenshot-label {
  margin-top: var(--space-md);
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* Phone Mockup */
.phone-mockup {
  position: relative;
  width: 220px;
  aspect-ratio: 9 / 19.5;
  background: #1a1816;
  border-radius: 36px;
  padding: 10px;
  box-shadow:
    0 25px 60px -12px rgba(0, 0, 0, 0.18),
    0 0 0 1px rgba(140, 120, 81, 0.08),
    inset 0 0 0 1.5px #2a2723;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 22px;
  background: #1a1816;
  border-radius: 11px;
  z-index: 2;
}

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

/* ============================================
   TIMELINE (7 Phases)
   ============================================ */
.timeline {
  position: relative;
  padding-left: 56px;
  margin-top: var(--space-xxl);
  max-width: 640px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-surface-secondary);
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -56px;
  top: 2px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
}

.timeline-item h3 {
  font-size: 18px;
  margin-bottom: 2px;
}

.timeline-badge {
  display: inline-block;
  font-size: 13px;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.timeline-item p {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* ============================================
   TRUST SECTION
   ============================================ */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xxl);
}

.trust-item {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.trust-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.trust-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-primary);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trust-item h3 {
  font-size: 18px;
  margin-bottom: var(--space-sm);
}

.trust-item p {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================
   MISSION
   ============================================ */
.mission {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.mission-quote {
  font-size: 28px;
  font-style: italic;
  color: var(--color-primary);
  line-height: 1.4;
  margin-bottom: var(--space-lg);
}

.mission p {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ============================================
   BOTTOM CTA
   ============================================ */
.bottom-cta {
  text-align: center;
  padding: var(--space-section) 0;
}

.bottom-cta h2 {
  font-size: 28px;
  margin-bottom: var(--space-sm);
}

.bottom-cta .subtitle {
  font-size: 17px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--color-footer-bg);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-xxl) 0 var(--space-xl);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

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

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-disclaimer {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-lg);
  line-height: 1.6;
  max-width: 700px;
}

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-page {
  padding: calc(var(--nav-height) + var(--space-xxl)) 0 var(--space-section);
  min-height: 60vh;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

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

.legal-content h1 {
  font-size: 32px;
  margin-bottom: var(--space-xl);
}

.legal-content h2 {
  font-size: 22px;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  color: var(--color-primary);
}

.legal-content p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  line-height: 1.75;
}

.legal-content ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
  color: var(--color-text-secondary);
}

.legal-content li {
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.legal-content strong {
  color: var(--color-text);
}

.legal-meta {
  font-size: 14px;
  color: var(--color-text-tertiary);
  margin-top: var(--space-xxl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .phone-mockup {
    width: 200px;
  }
}

@media (min-width: 768px) {
  .section-title {
    font-size: 36px;
  }

  .hero-title {
    font-size: 48px;
  }

  .phone-mockup {
    width: 230px;
  }

  .screenshots-row {
    overflow-x: visible;
    flex-wrap: wrap;
  }
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 40px;
  }

  .hero-title {
    font-size: 52px;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 100px);
    padding-bottom: 120px;
  }

  .phone-mockup {
    width: 240px;
  }

  .screenshots-row {
    flex-wrap: nowrap;
    gap: var(--space-xl);
  }

  .screenshot-item:nth-child(2),
  .screenshot-item:nth-child(4) {
    margin-top: 40px;
  }
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(253, 251, 249, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    font-size: 17px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .mission-quote {
    font-size: 22px;
  }

  .phone-mockup {
    width: 200px;
  }

  .screenshots-row {
    justify-content: flex-start;
    gap: var(--space-md);
    padding-left: var(--space-lg);
    padding-right: var(--space-lg);
  }
}
