/* CSS Custom Properties - Design System */
:root {
  /* Color Palette */
  --color-ink: #0f0f0f;
  --color-paper: #fafaf7;
  --color-amber: #e8a020;
  --color-amber-dark: #c4881a;
  --color-muted: #6b6b6b;

  /* Typography Scale using clamp() */
  --text-hero: clamp(2.25rem, 5vw + 1rem, 5rem);
  --text-heading: clamp(1.5rem, 3vw, 2.5rem);
  --text-body: clamp(1rem, 1.5vw, 1.125rem);
  --text-small: 0.875rem;
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  background-color: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-body);
}

/* Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Header / Navigation */
header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header .logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-ink);
  text-decoration: none;
}

header a {
  color: var(--color-muted);
  text-decoration: none;
  font-size: var(--text-small);
  transition: color 150ms ease-out;
}

header a:hover {
  color: var(--color-ink);
}

/* Hero Section */
#hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

#hero .eyebrow {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

#hero h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

#hero h1 .accent {
  color: var(--color-amber);
}

#hero p {
  font-size: var(--text-body);
  opacity: 0.6;
  margin-bottom: 2rem;
  max-width: 600px;
}

/* Two-column layout on larger screens */
@media (min-width: 768px) {
  #hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }

  #hero .hero-content {
    flex: 1;
  }

  #hero figure {
    flex: 1;
  }
}

#hero figure {
  margin: 2rem 0 0 0;
}

#hero figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Email Form */
#waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  #waitlist-form {
    flex-direction: row;
  }
}

#waitlist-form input[type="email"] {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--color-ink);
  background: var(--color-paper);
  color: var(--color-ink);
  font-size: var(--text-body);
  font-family: inherit;
  border-radius: 4px;
  transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}

#waitlist-form input[type="email"]:focus {
  outline: none;
  border-color: var(--color-amber);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.1);
}

#waitlist-form input[type="email"].shake {
  animation: shake 0.5s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
  20%, 40%, 60%, 80% { transform: translateX(10px); }
}

#waitlist-form button {
  padding: 0.75rem 2rem;
  background: var(--color-amber);
  color: var(--color-ink);
  font-weight: 700;
  font-size: var(--text-body);
  font-family: inherit;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 150ms ease-out, transform 150ms ease-out;
  min-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

#waitlist-form button:hover {
  background: var(--color-amber-dark);
  transform: translateY(-2px);
}

#waitlist-form button:active {
  transform: translateY(0);
}

#waitlist-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button States */
#waitlist-form button[data-state="loading"] {
  pointer-events: none;
}

#waitlist-form button[data-state="success"] {
  background: #22c55e;
}

#waitlist-form button[data-state="error"] {
  background: #ef4444;
  animation: shake 0.5s ease-out;
}

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

/* Scroll Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Benefits Section */
#benefits {
  padding: 6rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

#benefits h2 {
  font-size: var(--text-heading);
  font-weight: 700;
  margin-bottom: 3rem;
  text-align: center;
}

#benefits article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  #benefits article {
    grid-template-columns: 100px 1fr;
  }
}

#benefits .benefit-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-amber);
  line-height: 1;
}

#benefits .benefit-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

#benefits .benefit-content p {
  color: var(--color-muted);
  line-height: 1.6;
}

/* Social Proof Section */
#social-proof {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 6rem 1.5rem;
}

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

#social-proof .counter-text {
  font-size: var(--text-heading);
  text-align: center;
  margin-bottom: 3rem;
}

#social-proof #counter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-amber);
}

.testimonials {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .testimonials {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonials blockquote {
  background: rgba(250, 250, 247, 0.05);
  padding: 2rem;
  border-radius: 8px;
  border-left: 3px solid var(--color-amber);
}

.testimonials blockquote p {
  margin-bottom: 1rem;
  font-style: italic;
  line-height: 1.6;
}

.testimonials cite {
  font-style: normal;
  font-size: var(--text-small);
  color: var(--color-muted);
  display: block;
}

/* Footer */
footer {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

footer p {
  margin-bottom: 1rem;
  color: var(--color-muted);
}

footer a {
  color: var(--color-ink);
  text-decoration: underline;
  font-weight: 600;
  transition: color 150ms ease-out;
}

footer a:hover {
  color: var(--color-amber);
}

footer .copyright {
  font-size: var(--text-small);
  color: var(--color-muted);
  margin-top: 2rem;
}

/* Focus Visible Styles */
*:focus-visible {
  outline: 2px solid var(--color-amber);
  outline-offset: 3px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Spinner SVG */
.spinner {
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

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