/* ============================================================
   WalkAura Landing Page — style.css
   Design tokens + full layout. Dark fantasy RPG aesthetic.
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --bg: #101218;
  --surface: #1C1E28;
  --border: rgba(255, 255, 255, 0.12);
  --gold: #FFC842;
  --offense: #FF785A;
  --defense: #40B4FF;
  --text: #e0ddd5;
  --text-muted: #8a8a8a;
  --panel-gray: #6E6060;
  --strength: #E664A0;
  --success-green: #3CC850;
  --intellect: #963CF0;

  --font-heading: 'Cinzel', serif;
  --font-body: system-ui, -apple-system, sans-serif;
  --section-padding: 80px 24px;
  --radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  text-align: center;
  margin-bottom: 48px;
  color: var(--gold);
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Focus-visible: gold outline on interactive elements */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  position: relative;
  background:
    linear-gradient(180deg, rgba(16, 18, 24, 0.55) 0%, rgba(16, 18, 24, 0.7) 50%, rgba(16, 18, 24, 0.95) 100%),
    url('images/background.png') center center / cover no-repeat;
}

.hero-content {
  max-width: 600px;
  width: 100%;
}

/* Logo icon */
.logo-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  color: var(--text);
  margin-bottom: 24px;
}

/* --- Step Counter Animation --- */
.step-counter-wrapper {
  margin-bottom: 32px;
  min-height: 80px;
}

.step-counter {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  color: var(--gold);
  transition: opacity 0.4s ease;
}

.counter-number {
  display: inline-block;
  min-width: 2ch;
}

.counter-label {
  font-size: 0.7em;
  color: var(--text-muted);
}

/* Gold pulse when counter reaches 25 */
.step-counter.pulse {
  animation: gold-pulse 0.6s ease-out;
}

@keyframes gold-pulse {
  0% { text-shadow: 0 0 0 rgba(255, 200, 66, 0); }
  50% { text-shadow: 0 0 30px rgba(255, 200, 66, 0.8), 0 0 60px rgba(255, 200, 66, 0.4); }
  100% { text-shadow: 0 0 0 rgba(255, 200, 66, 0); }
}

/* Tagline — hidden until counter finishes */
.tagline {
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  margin-top: 8px;
}

.tagline.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Static fallback for reduced motion — hidden by default */
.tagline-static {
  display: none;
  font-size: clamp(1rem, 3vw, 1.25rem);
  color: var(--text);
  margin-top: 8px;
}

/* Hero motivation line */
.hero-motivation {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* --- Signup Form --- */
.signup-form {
  max-width: 480px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 8px;
}

.signup-form input[type="email"] {
  flex: 1;
  min-height: 48px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-body);
}

.signup-form input[type="email"]::placeholder {
  color: var(--text-muted);
}

/* CTA button: filled gold, no gradient */
.cta-button {
  min-height: 48px;
  padding: 12px 24px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.cta-button:hover {
  background: #e6b438;
}

.cta-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Spinner inside button */
.cta-button .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--bg);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.form-status {
  font-size: 0.9rem;
  margin-top: 8px;
  min-height: 1.4em;
}

.form-status.success {
  color: var(--success-green);
}

.form-status.error {
  color: var(--offense);
}

.privacy-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* --- FEATURES SECTION --- */
.features {
  padding: var(--section-padding);
}

/* Feature strip: horizontal scroll with scroll-snap */
.feature-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;

  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.feature-strip::-webkit-scrollbar {
  display: none;
}

.feature-panel {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  /* Visible by default (progressive enhancement) */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* JS adds .animate class, then .visible triggers the transition */
.feature-panel.animate {
  opacity: 0;
  transform: translateY(20px);
}

.feature-panel.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-panel h3 {
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.feature-panel p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Desktop: center the panels in a row */
@media (min-width: 601px) {
  .feature-strip {
    justify-content: center;
    overflow-x: visible;
    flex-wrap: nowrap;
  }

  .feature-panel {
    flex: 0 0 auto;
    max-width: 260px;
  }
}

/* --- VISUAL SHOWCASE SECTION --- */
.showcase {
  padding: var(--section-padding);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}

.showcase-item {
  /* Visible by default (progressive enhancement) */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.showcase-item.animate {
  opacity: 0;
  transform: translateY(20px);
}

.showcase-item.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Image placeholder: dark panel with dashed gold border */
.showcase-placeholder {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface);
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.showcase-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Hide broken images so fallback label shows through */
.showcase-placeholder img.broken {
  display: none;
}

.showcase-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 0;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold);
  text-align: center;
  background: linear-gradient(transparent, rgba(16, 18, 24, 0.85));
  z-index: 1;
}

/* --- HOW IT WORKS SECTION --- */
.how-it-works {
  padding: var(--section-padding);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.step-item h3 {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.step-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.bottom-cta-desc {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.platform-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* --- FOOTER --- */
.site-footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-links a svg {
  flex-shrink: 0;
}

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

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

/* --- MOBILE BREAKPOINT (<=600px) --- */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
  }

  .cta-button {
    width: 100%;
  }

  .feature-strip {
    /* Horizontal scroll on mobile, peek next panel */
    padding-left: 24px;
    padding-right: 24px;
  }

  .feature-panel {
    flex: 0 0 280px;
  }
}

/* --- PREFERS REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  /* Hide animated counter, show static tagline */
  .step-counter {
    display: none;
  }

  .tagline {
    display: none;
  }

  .tagline-static {
    display: block;
  }

  /* All cards visible immediately */
  .feature-panel.animate,
  .showcase-item.animate {
    opacity: 1;
    transform: none;
  }
}
