/* style.css — The Boring Club Design Tokens & Components */

/* ============================================
   CUSTOM PALETTE: The Boring Club
   Warm off-white, warm charcoal, dusty sage accent.
   Light mode only — the paper background IS the brand.
   ============================================ */

:root {
  /* --- Type Scale (fluid) --- */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.9rem  + 0.5vw,  1.125rem);
  --text-lg:   clamp(1.125rem, 0.95rem + 0.85vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1rem    + 1.5vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);
  --text-hero: clamp(3rem,     0.5rem  + 7vw,    8rem);

  /* --- 4px Spacing System --- */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* --- Surfaces (Aged Paper) --- */
  --color-bg:             #F5F0E8;
  --color-surface:        #EDE8DE;
  --color-surface-2:      #E5E0D6;
  --color-divider:        #D4CFC5;
  --color-border:         #C8C3B9;

  /* --- Text --- */
  --color-text:           #2C2C2C;
  --color-text-muted:     #8A8578;
  --color-text-faint:     #B5B0A5;
  --color-text-inverse:   #F5F0E8;

  /* --- Accent (Dusty Sage) --- */
  --color-accent:         #7D8C6E;
  --color-accent-hover:   #6B7A5D;
  --color-accent-active:  #5A694E;

  /* --- Radius --- */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;

  /* --- Transitions --- */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Shadows (warm-tinted, subtle) --- */
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 70 / 0.06);
  --shadow-md: 0 4px 12px oklch(0.25 0.02 70 / 0.08);

  /* --- Content widths --- */
  --content-narrow: 600px;
  --content-default: 720px;
  --content-wide: 960px;

  /* --- Font families --- */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--wide {
  max-width: var(--content-default);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section + .section {
  border-top: 1px solid var(--color-divider);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.1;
  color: var(--color-text);
  text-align: center;
}

.logo--sm {
  font-size: var(--text-sm);
  letter-spacing: 0.2em;
}

.logo-rule {
  width: 100%;
  max-width: 280px;
  height: 1px;
  background: var(--color-text);
  border: none;
  margin-inline: auto;
}

.logo-rule--sm {
  max-width: 140px;
}

.tagline {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  font-style: italic;
  line-height: 1.3;
  color: var(--color-text);
  text-align: center;
  max-width: 50ch;
  margin-inline: auto;
}

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-8);
}

.body-text {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 60ch;
}

.body-text--center {
  text-align: center;
  margin-inline: auto;
}

.small-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

.fine-print {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  text-align: center;
  margin-top: var(--space-3);
}

/* ============================================
   FORM / CTA
   ============================================ */

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 400px;
  margin-inline: auto;
  margin-top: var(--space-8);
}

@media (min-width: 480px) {
  .waitlist-form {
    flex-direction: row;
    align-items: stretch;
  }
}

.waitlist-form input[type="email"] {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: border-color var(--transition-interactive);
  min-height: 48px;
}

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

.waitlist-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              transform var(--transition-interactive);
}

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

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

.btn--primary:active {
  background: var(--color-accent-active);
  transform: translateY(1px);
}

/* Success state */
.waitlist-form .success-msg {
  display: none;
  text-align: center;
  font-size: var(--text-base);
  color: var(--color-accent);
  font-family: var(--font-display);
  font-style: italic;
  padding: var(--space-6) var(--space-4);
  line-height: 1.6;
  animation: fade-in-msg 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  width: 100%;
}

@keyframes fade-in-msg {
  from { opacity: 0; }
  to { opacity: 1; }
}

.waitlist-form.is-success {
  flex-direction: column;
  align-items: center;
}

.waitlist-form.is-success .success-msg {
  display: block;
}

.waitlist-form.is-success input,
.waitlist-form.is-success .btn {
  display: none;
}

/* ============================================
   FEATURE LIST (What You Get)
   ============================================ */

.feature-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.feature-item {
  padding-left: 0;
}

.feature-item__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.feature-item__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  max-width: 55ch;
}

/* ============================================
   STEPS (How It Works)
   ============================================ */

.steps-list {
  list-style: none;
  padding: 0;
  counter-reset: steps;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.steps-list li {
  counter-increment: steps;
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
  padding-left: var(--space-8);
  position: relative;
}

.steps-list li::before {
  content: counter(steps) ".";
  position: absolute;
  left: 0;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text-muted);
}

.steps-coda {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  font-style: italic;
}

/* ============================================
   PRICING
   ============================================ */

.pricing-text {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.8;
  max-width: 55ch;
}

.pricing-text--founding {
  margin-top: var(--space-4);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--color-accent);
}

.pricing-fine-print {
  text-align: center;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding-block: var(--space-12);
  text-align: center;
  border-top: 1px solid var(--color-divider);
}

.footer-tagline {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-style: italic;
  margin-top: var(--space-4);
  letter-spacing: 0.02em;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-2);
}

/* ============================================
   SCROLL REVEAL (opacity only, no CLS)
   ============================================ */

.reveal {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .reveal {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* Stagger children */
.reveal-stagger > * {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .reveal-stagger > *:nth-child(1) {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 70%;
  }
  .reveal-stagger > *:nth-child(2) {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 5% entry 75%;
  }
  .reveal-stagger > *:nth-child(3) {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 10% entry 80%;
  }
}

/* ============================================
   HERO SECTION SPECIFIC
   ============================================ */

.hero {
  padding-block: clamp(var(--space-16), 12vw, var(--space-32));
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  border-bottom: none;
}

.hero .body-text {
  margin-top: var(--space-2);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
  .logo {
    font-size: var(--text-xl);
    letter-spacing: 0.1em;
  }

  .tagline {
    font-size: var(--text-lg);
  }

  .logo-rule {
    max-width: 200px;
  }
}
