/* ===================================================
   4Spares – Scroll Animation Landing Page
   =================================================== */

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

:root {
  --orange: #FF6B00;
  --orange-d: #E55A00;
  --orange-l: #FF8C38;
  --sky: #BFE4EE;
  --dark: #0D0D0D;
  --text: #1A1A1A;
  --muted: #6B7280;
  --white: #FFFFFF;
  --card-bg: #F9FAFB;
  --border: rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ===== NAV ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition), padding var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.08);
  padding: 14px 40px;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
  transition: color var(--transition);
}

.nav.scrolled .nav-logo {
  color: var(--dark);
}

.nav-logo span {
  color: var(--orange);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin-left: auto;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav.scrolled .nav-links a {
  color: var(--muted);
}

.nav-links a:hover,
.nav.scrolled .nav-links a:hover {
  color: var(--orange);
}

.btn-nav {
  background: var(--orange);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-nav:hover {
  background: var(--orange-d);
  transform: translateY(-1px);
}


/* ===== HERO SCROLL SECTION ===== */
.hero-scroll-section {
  /* Tall section: scroll distance drives animation */
  height: calc(300vh);
  position: relative;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dark gradient overlay at top and bottom for text legibility */
.hero-sticky::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, transparent 30%, transparent 70%, rgba(0, 0, 0, 0.15) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ===== HERO OVERLAY ===== */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 8% 0 8%;
}

.hero-text {
  max-width: 560px;
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
  transform: translateY(18px);
}

.hero-text.hidden {
  display: none;
}

.hero-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 107, 0, 0.18);
  border: 1px solid rgba(255, 107, 0, 0.35);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.08;
  color: var(--white);
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-text h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-text p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 32px;
  line-height: 1.65;
}

.accent {
  color: var(--orange);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.35);
}

.btn-primary:hover {
  background: var(--orange-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 107, 0, 0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}


/* ===== SCROLL HINT ===== */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity 0.4s ease;
}

.scroll-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
  animation: chevron-bounce 1.4s ease infinite;
}

.chevron:nth-child(2) {
  animation-delay: 0.2s;
  opacity: 0.5;
}

@keyframes chevron-bounce {

  0%,
  100% {
    transform: rotate(45deg) translateY(0);
    opacity: 1;
  }

  50% {
    transform: rotate(45deg) translateY(4px);
    opacity: 0.4;
  }
}


/* ===== PROGRESS DOTS ===== */
.progress-dots {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.35s ease, transform 0.35s ease;
}

.dot.active {
  background: var(--orange);
  transform: scale(1.4);
}


/* ===== SECTIONS ===== */
.section {
  padding: 100px 40px;
}

.alt-bg {
  background: var(--card-bg);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.15;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 56px;
}


/* ===== STEPS GRID ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.step-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.step-num {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.7;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.step-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}


/* ===== STATS BAND ===== */
.stats-band {
  background: var(--dark);
  padding: 64px 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  text-align: center;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-val {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-unit {
  font-size: 1.2rem;
  color: var(--orange);
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 6px;
}


/* ===== BENEFITS ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.benefit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 30px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.07);
}

.benefit-icon {
  font-size: 2.2rem;
  margin-bottom: 18px;
}

.benefit-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text);
}

.benefit-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefit-card li {
  font-size: 0.9rem;
  color: var(--muted);
  padding-left: 20px;
  position: relative;
}

.benefit-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--orange);
  font-weight: 700;
}


/* ===== CTA SECTION ===== */
.cta-section {
  padding: 120px 40px;
  background: linear-gradient(135deg, #FF6B00 0%, #FF8C38 60%, #FFB347 100%);
  text-align: center;
}

.cta-inner h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1px;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
}

.cta-inner h2 .accent {
  color: var(--dark);
}

.cta-inner p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-buttons .btn-primary {
  background: var(--dark);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.cta-buttons .btn-primary:hover {
  background: #222;
}

.cta-buttons .btn-ghost {
  border-color: rgba(255, 255, 255, 0.6);
}


/* ===== FOOTER ===== */
.footer {
  padding: 32px 40px;
  background: var(--dark);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer .nav-logo {
  color: var(--white);
}

.footer p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: color var(--transition);
}

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


/* ===== PLAY BUTTON ===== */
.play-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--white);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.play-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.08);
}

.play-btn.playing {
  background: var(--orange);
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.45);
}

/* ===== ENTRANCE ANIMATIONS ===== */
.animate-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-in.in-view {
  opacity: 1;
  transform: translateY(0);
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav {
    padding: 16px 20px;
  }

  .nav.scrolled {
    padding: 12px 20px;
  }

  .nav-links {
    display: none;
  }

  .nav-inner {
    gap: 16px;
  }

  .section {
    padding: 72px 20px;
  }

  .stats-band {
    padding: 48px 20px;
  }

  .cta-section {
    padding: 80px 20px;
  }

  .footer {
    padding: 24px 20px;
  }

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

  .hero-overlay {
    padding: 0 6% 0 6%;
    /* On portrait (mobile) centre text at bottom third so animation is visible */
    align-items: flex-end;
    padding-bottom: 14vh;
  }

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

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

  .hero-badge {
    /* Keep badge centred */
    margin-left: auto;
    margin-right: auto;
  }

  .progress-dots {
    right: 16px;
  }

  .scroll-hint {
    bottom: 24px;
  }
}


/* ===== ANIMATION-END OVERLAY ===== */
.anim-end-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.anim-end-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.anim-end-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 20px 24px;
  transform: translateY(24px);
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.anim-end-overlay.visible .anim-end-card {
  transform: translateY(0);
}

.anim-end-logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
}

.anim-end-logo span {
  color: var(--orange);
}

.anim-end-tagline {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.anim-end-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 14px;
  text-decoration: none;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  line-height: 1.25;
}

.store-btn small {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  opacity: 0.75;
  text-transform: uppercase;
}

.store-btn.playstore {
  background: rgba(255, 255, 255, 0.1);
}

.store-btn.appstore {
  background: rgba(255, 255, 255, 0.1);
}

.store-btn.browser {
  background: rgba(255, 107, 0, 0.25);
  border-color: rgba(255, 107, 0, 0.55);
}

.store-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.store-btn.playstore:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.38);
}

.store-btn.appstore:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.38);
}

.store-btn.browser:hover {
  background: rgba(255, 107, 0, 0.45);
  border-color: var(--orange);
  box-shadow: 0 10px 32px rgba(255, 107, 0, 0.35);
}

@media (max-width: 768px) {
  .anim-end-btns {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 280px;
  }

  .store-btn {
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.95rem;
    border-radius: 16px;
  }
}


/* ===== FAQ SECTION ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.faq-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border-color: rgba(255, 107, 0, 0.2);
}

.faq-item[open] {
  border-color: rgba(255, 107, 0, 0.3);
  box-shadow: 0 4px 24px rgba(255, 107, 0, 0.08);
}

.faq-q {
  list-style: none;
  padding: 22px 28px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color var(--transition);
  user-select: none;
  line-height: 1.4;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::marker {
  display: none;
}

.faq-q::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--orange);
  flex-shrink: 0;
  transition: transform 0.3s ease;
  line-height: 1;
}

.faq-item[open] .faq-q::after {
  transform: rotate(45deg);
}

.faq-item[open] .faq-q {
  color: var(--orange);
}

.faq-a {
  padding: 0 28px 22px;
  border-top: 1px solid var(--border);
  animation: faq-open 0.25s ease;
}

@keyframes faq-open {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-a p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  padding-top: 18px;
}

.faq-a a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
}

.faq-a a:hover {
  color: var(--orange-d);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .faq-q {
    padding: 18px 20px;
    font-size: 0.95rem;
  }

  .faq-a {
    padding: 0 20px 18px;
  }
}


/* ===== PAGE LOADER ===== */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.55s ease;
}

.page-loader.loader-done {
  opacity: 0;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.loader-logo {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -1px;
}

.loader-logo span {
  color: var(--orange);
}

.loader-bar-wrap {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--orange-l));
  border-radius: 100px;
  transition: width 0.3s ease;
}

.loader-text {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ===== SERVING KOZHIKODE SECTION ===== */
.serving-section {
  background: var(--card-bg);
}

.serving-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.serving-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.serving-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.07);
  border-color: rgba(255, 107, 0, 0.2);
}

.serving-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.serving-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.serving-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .serving-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .serving-card {
    padding: 22px 18px;
  }

  .serving-icon {
    font-size: 1.6rem;
  }
}