/* ========================================
   Preludio Landing Page
   Base: App aesthetic (Leather theme)
   ======================================== */

:root {
  /* Colors - Leather theme as base */
  --color-background: #1A1614;
  --color-surface: #252220;
  --color-surface-hover: #2d2a28;
  --color-accent: #C9A227;
  --color-accent-hover: #D4B030;
  --color-foreground: #F5F2EE;
  --color-muted: #9A9490;
  --color-border: #3A3634;

  /* Typography */
  --font-sans: 'Geist', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Border radius */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Container */
  --container-max: 1080px;
  --container-padding: 1.5rem;
}

/* ========================================
   Reset & Base
   ======================================== */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-foreground);
  background-color: var(--color-background);
}

::selection {
  background-color: rgba(201, 162, 39, 0.3);
  color: var(--color-foreground);
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ========================================
   Layout
   ======================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 150ms ease;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-background);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-surface-hover);
  border-color: var(--color-muted);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-muted);
}

.btn-ghost:hover {
  color: var(--color-foreground);
  background-color: var(--color-surface);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* ========================================
   Header
   ======================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(26, 22, 20, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-foreground);
  letter-spacing: -0.02em;
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  padding: calc(64px + var(--space-4xl)) 0 var(--space-4xl);
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
  color: var(--color-foreground);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.5;
}

/* ========================================
   Demo
   ======================================== */

.demo {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.demo-window {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.demo-image,
.demo-video {
  width: 100%;
  height: auto;
  display: block;
}

.demo-mobile {
  display: none;
}

.demo-caption {
  text-align: center;
  color: var(--color-muted);
  font-size: 0.875rem;
  margin-top: var(--space-lg);
}

@media (max-width: 768px) {
  .demo-desktop {
    display: none;
  }

  .demo-mobile {
    display: block;
  }
}

/* ========================================
   Problem / Solution
   ======================================== */

.problem-solution {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--color-border);
}

.problem-solution .container {
  max-width: 720px;
}

.problem {
  margin-bottom: var(--space-xl);
}

.problem p {
  font-size: 1.125rem;
  color: var(--color-muted);
  line-height: 1.7;
}

.solution p {
  font-size: 1.125rem;
  color: var(--color-foreground);
  line-height: 1.7;
}

.solution strong {
  color: var(--color-accent);
}

/* ========================================
   Section Styles
   ======================================== */

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* ========================================
   How It Works
   ======================================== */

.how-it-works {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.step {
  text-align: center;
  padding: var(--space-lg);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background-color: var(--color-accent);
  color: var(--color-background);
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 50%;
  margin-bottom: var(--space-lg);
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.step-description {
  color: var(--color-muted);
  line-height: 1.6;
}

/* ========================================
   Pricing
   ======================================== */

.pricing {
  padding: var(--space-4xl) 0;
}

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  max-width: 800px;
  margin: 0 auto;
}

.tier {
  position: relative;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
}

.tier-founder {
  border-color: var(--color-accent);
  border-width: 2px;
}

.tier-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-accent);
  color: var(--color-background);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tier-beta .tier-badge {
  background-color: var(--color-surface-hover);
  color: var(--color-foreground);
  border: 1px solid var(--color-border);
}

/* Coming Soon tiers - greyed out */
.tier-coming-soon {
  opacity: 0.6;
  border-style: dashed;
}

.tier-coming-soon .tier-badge {
  background-color: var(--color-border);
  color: var(--color-muted);
}

.tier-coming-soon .tier-name,
.tier-coming-soon .price-amount {
  color: var(--color-muted);
}

.tier-coming-soon .tier-features li::before {
  background-color: var(--color-muted);
}

.tier-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  margin-top: var(--space-sm);
}

.tier-headline {
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
}

.tier-price {
  margin-bottom: var(--space-lg);
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-term {
  font-size: 1rem;
  color: var(--color-muted);
  margin-left: var(--space-xs);
}

.tier-features {
  flex: 1;
  margin-bottom: var(--space-xl);
}

.tier-features li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-muted);
}

.tier-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

.tier-founder .tier-features li {
  color: var(--color-foreground);
}

/* Sold out state */
.tier-sold-out {
  text-align: center;
}

.sold-out-badge {
  display: inline-block;
  background-color: var(--color-border);
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

/* Toggle states - hide soldout by default */
.tier-cta-soldout {
  display: none;
}

/* When tier has .is-sold-out class, swap visibility */
.tier.is-sold-out .tier-cta-active {
  display: none;
}

.tier.is-sold-out .tier-cta-soldout {
  display: block;
}

.tier.is-sold-out .tier-badge {
  background-color: var(--color-border);
  color: var(--color-muted);
}

/* Waitlist form */
.waitlist-form {
  width: 100%;
}

.waitlist-input-group {
  display: flex;
  gap: var(--space-sm);
}

.waitlist-input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-foreground);
  min-width: 0;
}

.waitlist-input::placeholder {
  color: var(--color-muted);
}

.waitlist-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
}

.waitlist-submit {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Honeypot - hidden from users, visible to bots */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* Standalone waitlist section */
.waitlist-section {
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.waitlist-label {
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
}

.waitlist-form-standalone {
  max-width: 480px;
  margin: 0 auto;
}

/* Mobile: stack form */
@media (max-width: 480px) {
  .waitlist-input-group {
    flex-direction: column;
  }

  .waitlist-submit {
    width: 100%;
  }
}

/* ========================================
   Story
   ======================================== */

.story {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
}

.story-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.story-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: var(--space-xl);
  letter-spacing: -0.02em;
}

.story-content p {
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}

.story-content em {
  color: var(--color-foreground);
  font-style: italic;
}

.story-signature {
  margin-top: var(--space-xl);
  color: var(--color-foreground);
  font-weight: 500;
}

.story-location {
  color: var(--color-muted);
  font-weight: 400;
  font-size: 0.875rem;
}

/* ========================================
   FAQ
   ======================================== */

.faq {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-question {
  display: block;
  width: 100%;
  padding: var(--space-lg) 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-foreground);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}

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

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--color-muted);
  transition: transform 200ms ease;
}

.faq-item[open] .faq-question::after {
  content: '-';
}

.faq-answer {
  padding-bottom: var(--space-lg);
  color: var(--color-muted);
  line-height: 1.7;
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.footer-left {
  color: var(--color-muted);
  font-size: 0.875rem;
}

.copyright {
  margin-bottom: var(--space-xs);
}

.made-in {
  font-size: 0.8125rem;
}

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

.footer-links a {
  font-size: 0.875rem;
  color: var(--color-muted);
  transition: color 150ms ease;
}

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

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
  }

  .hero {
    padding: calc(64px + var(--space-3xl)) 0 var(--space-3xl);
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
  }

  .steps {
    gap: var(--space-lg);
  }

  .step {
    padding: var(--space-md);
  }

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

  .tier {
    padding: var(--space-xl);
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 56px;
  }

  .hero {
    padding-top: calc(56px + var(--space-2xl));
  }

  .btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }

  .price-amount {
    font-size: 2rem;
  }
}
