/* ═══════════════════════════════════════════════════════════════
   GRANA — Website Design System
   Dark luxe aesthetic matching the mobile app
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables (Design Tokens) ── */
:root {
  /* Backgrounds */
  --bg-primary: #0C0E16;
  --bg-card: #161824;
  --bg-card-mid: #1E2033;
  --bg-surface: #252840;

  /* Text */
  --text-primary: #F0F0F5;
  --text-secondary: #8A8DA0;
  --text-muted: #555872;

  /* Accent */
  --gold: #FFCB45;
  --gold-dark: #C49A20;
  --gold-glow: rgba(255, 203, 69, 0.15);

  /* Semantic */
  --success: #34D399;
  --border: #2A2D45;

  /* Category Colors (from app) */
  --cat-food: #FF6B6B;
  --cat-transport: #4ECDC4;
  --cat-shopping: #FFE66D;
  --cat-bills: #A78BFA;
  --cat-entertainment: #FF8C42;
  --cat-health: #6BCB77;
  --cat-travel: #60A5FA;

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 7rem);
  --content-max: 1100px;

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

/* ── 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 {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* ── Canvas Background (p5.js generative art) ── */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

/* ── Typography ── */
h1,
h2,
h3,
h4 {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
}

p {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.15vw, 1.15rem);
  max-width: 60ch;
}

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

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

/* ── Layout ── */
.page-wrapper {
  position: relative;
  z-index: 1;
}

section {
  padding: var(--section-pad) clamp(1.25rem, 5vw, 3rem);
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  width: 100%;
}

/* ── Scroll Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease-out-expo),
    transform 0.8s var(--ease-out-expo);
}

.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;
}

/* ═══════════════════════════════════════════════════════════════
   SECTION 1: HERO
   ═══════════════════════════════════════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

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

.hero-logo {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  color: var(--gold);
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.hero-logo img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.hero h1 {
  margin-bottom: 1.2rem;
}

.hero h1 .highlight {
  color: var(--gold);
  position: relative;
}

.hero-sub {
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 48ch;
}

/* CTA */
.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s var(--ease-out-expo);
  text-decoration: none;
}

.cta-btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
  box-shadow: 0 4px 24px var(--gold-glow),
    0 0 0 0 var(--gold-glow);
}

.cta-btn-primary:hover {
  background: #FFD76A;
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 203, 69, 0.3),
    0 0 0 4px var(--gold-glow);
}

.cta-btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border);
}

.cta-btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.cta-micro {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Phone mockup */
.hero-phone {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-frame {
  position: relative;
  width: 280px;
  border-radius: 36px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px var(--border),
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 120px var(--gold-glow);
  animation: phoneFloat 6s ease-in-out infinite;
}

.phone-frame img {
  width: 100%;
  display: block;
}

@keyframes phoneFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Decorative glow orb behind phone */
.hero-phone::before {
  content: '';
  position: absolute;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: orbPulse 4s ease-in-out infinite;
}

@keyframes orbPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}


/* ═══════════════════════════════════════════════════════════════
   SECTION 2: PROBLEM AGITATION — Narrative Hook
   ═══════════════════════════════════════════════════════════════ */

.narrative {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-card) 50%, var(--bg-primary) 100%);
}

.narrative .container {
  max-width: 760px;
  text-align: center;
}

.narrative blockquote {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
  border: none;
  padding: 0;
  margin: 0 auto 2rem;
  max-width: 56ch;
  position: relative;
}

.narrative blockquote::before {
  content: '"';
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.3;
  position: absolute;
  top: -2.5rem;
  left: -1rem;
  font-family: 'Fraunces', serif;
}

.narrative-emphasis {
  color: var(--gold);
  font-weight: 600;
  font-style: normal;
}


/* ═══════════════════════════════════════════════════════════════
   SECTION 3: HOW IT WORKS — 3 Steps
   ═══════════════════════════════════════════════════════════════ */

.how-it-works {
  position: relative;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.step-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gold-glow);
  color: var(--gold);
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.step-card h3 {
  margin-bottom: 0.75rem;
}

.step-card p {
  margin: 0 auto;
}

.step-card .step-mockup {
  width: 160px;
  border-radius: 18px;
  margin-top: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}


/* ═══════════════════════════════════════════════════════════════
   SECTION 4: TRAINING JOURNEY — Progression Timeline
   ═══════════════════════════════════════════════════════════════ */

.journey {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(255, 203, 69, 0.04) 0%, transparent 50%),
    var(--bg-primary);
}

.journey-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.journey-header h2 {
  margin-bottom: 0.75rem;
}

.journey-header p {
  margin: 0 auto;
}

.timeline {
  display: flex;
  gap: 0;
  position: relative;
  padding: 1rem 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.timeline::-webkit-scrollbar {
  display: none;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      var(--cat-food),
      var(--cat-entertainment),
      var(--cat-shopping),
      var(--cat-transport),
      var(--cat-health),
      var(--gold));
  transform: translateY(-50%);
  z-index: 0;
}

.timeline-stage {
  flex: 1;
  min-width: 180px;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 1rem;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
}

/* Odd stages: text in top zone (row 1), dot on midline (row 2) */
.timeline-stage:nth-child(odd) .stage-content {
  grid-row: 1;
  align-self: end;
  padding-bottom: 1.25rem;
}

.timeline-stage:nth-child(odd) .stage-dot {
  grid-row: 2;
}

/* Even stages: dot on midline (row 2), text in bottom zone (row 3) */
.timeline-stage:nth-child(even) .stage-content {
  grid-row: 3;
  align-self: start;
  padding-top: 1.25rem;
}

.timeline-stage:nth-child(even) .stage-dot {
  grid-row: 2;
}

.stage-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  justify-self: center;
  align-self: center;
  position: relative;
  flex-shrink: 0;
}

.stage-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid;
  border-color: inherit;
  opacity: 0.3;
}

.timeline-stage:nth-child(1) .stage-dot {
  background: var(--cat-food);
  border-color: var(--cat-food);
}

.timeline-stage:nth-child(2) .stage-dot {
  background: var(--cat-entertainment);
  border-color: var(--cat-entertainment);
}

.timeline-stage:nth-child(3) .stage-dot {
  background: var(--cat-shopping);
  border-color: var(--cat-shopping);
}

.timeline-stage:nth-child(4) .stage-dot {
  background: var(--cat-transport);
  border-color: var(--cat-transport);
}

.timeline-stage:nth-child(5) .stage-dot {
  background: var(--cat-health);
  border-color: var(--cat-health);
}

.timeline-stage:nth-child(6) .stage-dot {
  background: var(--gold);
  border-color: var(--gold);
}

.stage-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.stage-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.stage-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
}

.journey-phone {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.journey-phone .phone-frame {
  width: 240px;
}


/* ═══════════════════════════════════════════════════════════════
   SECTION 5: FEATURE SHOWCASES
   ═══════════════════════════════════════════════════════════════ */

.features {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.feature-block {
  padding: var(--section-pad) clamp(1.25rem, 5vw, 3rem);
}

.feature-block .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.feature-block:nth-child(even) .container {
  direction: rtl;
}

.feature-block:nth-child(even) .container>* {
  direction: ltr;
}

.feature-text {
  position: relative;
}

.feature-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.feature-block:nth-child(1) .feature-tag {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
}

.feature-block:nth-child(2) .feature-tag {
  background: rgba(255, 107, 107, 0.15);
  color: #FF6B6B;
}

.feature-block:nth-child(3) .feature-tag {
  background: rgba(52, 211, 153, 0.15);
  color: #34D399;
}

.feature-block:nth-child(4) .feature-tag {
  background: rgba(255, 203, 69, 0.15);
  color: #FFCB45;
}

.feature-text h2 {
  margin-bottom: 1rem;
}

.feature-text p {
  margin-bottom: 0.5rem;
}

.feature-text ul {
  list-style: none;
  margin-top: 1.25rem;
}

.feature-text ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-text ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

.feature-phone {
  display: flex;
  justify-content: center;
}

.feature-phone .phone-frame {
  width: 260px;
}


/* ═══════════════════════════════════════════════════════════════
   SECTION 6: DIFFERENTIATION — What Makes Grana Different
   ═══════════════════════════════════════════════════════════════ */

.differentiation {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(167, 139, 250, 0.06) 0%, transparent 50%),
    var(--bg-primary);
}

.diff-header {
  text-align: center;
  margin-bottom: 3rem;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.diff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.diff-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.diff-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.diff-card:nth-child(1)::before {
  background: var(--cat-travel);
}

.diff-card:nth-child(2)::before {
  background: var(--cat-health);
}

.diff-card:nth-child(3)::before {
  background: var(--cat-bills);
}

.diff-card:nth-child(4)::before {
  background: var(--cat-entertainment);
}

.diff-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.diff-card h3 {
  margin-bottom: 0.65rem;
  font-size: 1.2rem;
}

.diff-card p {
  font-size: 0.95rem;
}


/* ═══════════════════════════════════════════════════════════════
   SECTION 7: SOCIAL PROOF (placeholder)
   ═══════════════════════════════════════════════════════════════ */

.social-proof {
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-proof .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold-glow);
  color: var(--gold);
  padding: 0.6rem 1.5rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.social-proof h2 {
  margin-bottom: 0.75rem;
}


/* ═══════════════════════════════════════════════════════════════
   SECTION 8: FINAL CTA
   ═══════════════════════════════════════════════════════════════ */

.final-cta {
  text-align: center;
  position: relative;
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.5;
}

.final-cta h2 {
  position: relative;
  margin-bottom: 0.75rem;
}

.final-cta .hero-sub {
  margin: 0 auto 2.5rem;
}

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

.final-cta .cta-micro {
  margin-top: 1.25rem;
}

.final-cta .cta-micro a {
  color: var(--text-muted);
}

.final-cta .cta-micro a:hover {
  color: var(--gold);
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem);
}

footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-logo {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--gold);
}

.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════════
   PRIVACY POLICY PAGE
   ═══════════════════════════════════════════════════════════════ */

.privacy-page {
  padding-top: 4rem;
}

.privacy-page h1 {
  margin-bottom: 0.5rem;
}

.privacy-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 3rem;
}

.privacy-content h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--gold);
}

.privacy-content p {
  margin-bottom: 1rem;
}

.privacy-content ul {
  list-style: none;
  margin-bottom: 1.5rem;
  padding-left: 0;
}

.privacy-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.privacy-content ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

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

.privacy-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 2rem;
}

.privacy-back:hover {
  color: var(--gold-dark);
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content {
    order: 1;
  }

  .hero-phone {
    order: 0;
    margin-bottom: 2rem;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

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

  .phone-frame {
    width: 220px;
    border-radius: 28px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-block .container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .feature-text ul {
    display: inline-block;
    text-align: left;
    margin: 1.25rem auto 0;
  }

  .feature-block:nth-child(even) .container {
    direction: ltr;
  }

  .feature-phone {
    order: -1;
  }

  .feature-phone .phone-frame {
    width: 200px;
  }

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

  /* Vertical timeline on mobile */
  .timeline {
    flex-direction: column;
    gap: 0;
    padding: 0 0 0 2rem;
    overflow-x: visible;
  }

  .timeline::before {
    top: 0 !important;
    bottom: 0;
    left: 8px;
    right: auto;
    width: 2px;
    height: 100% !important;
    background: linear-gradient(180deg,
        var(--cat-food),
        var(--cat-entertainment),
        var(--cat-shopping),
        var(--cat-transport),
        var(--cat-health),
        var(--gold)) !important;
    transform: none !important;
  }

  .timeline-stage {
    min-width: unset;
    text-align: left;
    padding: 0 0 1.75rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0.6rem;
  }

  .timeline-stage:nth-child(odd) {
    padding: 0 0 1.75rem 1.5rem;
  }

  .stage-dot {
    position: absolute;
    left: -2rem;
    top: 0.15rem;
    margin: 0;
    width: 14px;
    height: 14px;
  }

  .stage-label {
    font-size: 1rem;
    margin-bottom: 0;
  }

  .stage-time {
    font-size: 0.82rem;
  }

  .stage-desc {
    width: 100%;
    margin-top: 0.15rem;
  }
}

@media (max-width: 480px) {
  .cta-btn {
    width: 100%;
    justify-content: center;
  }

  .phone-frame {
    width: 200px;
    border-radius: 26px;
  }

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

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}