/* ============================================
   $prouting Landing Page — style.css
   ============================================ */

/* --- Design Tokens --- */
:root {
  --bg: #FAFAF5;
  --text: #1A1A1A;
  --text-muted: #6B7280;
  --green: #16A34A;
  --green-hover: #15803D;
  --amber: #F59E0B;
  --card-bg: #FFFFFF;
  --card-border: #E5E7EB;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius-card: 12px;
  --radius-btn: 8px;
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-stack);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
}

/* Subtle CSS grain / noise texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* Ensure all page content sits above the grain overlay */
body > * {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover {
  text-decoration: underline;
}

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

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.hero-content {
  max-width: 640px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

/* Logo */
.logo {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

.logo-dollar {
  color: var(--green);
}

/* Tagline */
.tagline {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Subtext */
.subtext {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.5;
}

/* ============================================
   WAITLIST FORM
   ============================================ */
.waitlist-form {
  width: 100%;
  max-width: 480px;
  margin-top: 0.5rem;
}

.form-row {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.waitlist-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem; /* 16px — prevents iOS zoom */
  font-family: var(--font-stack);
  color: var(--text);
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-btn);
  outline: none;
  transition: border-color 0.15s ease;
}

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

.waitlist-form input[type="email"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.waitlist-form button[type="submit"] {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-stack);
  color: #FFFFFF;
  background-color: var(--green);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.waitlist-form button[type="submit"]:hover {
  background-color: var(--amber);
}

.waitlist-form button[type="submit"]:active {
  transform: scale(0.98);
}

.waitlist-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: var(--text-muted);
}

.waitlist-form button[type="submit"]:disabled:hover {
  background-color: var(--text-muted);
}

.waitlist-form button[type="submit"]:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

/* Form message (success / error) */
.form-message {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  min-height: 1.4em;
  text-align: center;
}

.form-message:empty {
  display: none;
}

.form-message--success {
  color: var(--green);
  font-weight: 500;
}

.form-message--error {
  color: #DC2626;
  font-weight: 500;
}

/* Fine print */
.fine-print {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   FEATURES
   ============================================ */
.features {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.feature-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.75rem;
  line-height: 1;
}

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

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

/* ============================================
   SOCIAL PROOF
   ============================================ */
.social-proof {
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  max-width: 600px;
  margin: 0 auto;
}

.social-proof h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.waitlist-counter {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.waitlist-counter span {
  font-weight: 700;
  color: var(--green);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--card-border);
}

/* ============================================
   NOSCRIPT
   ============================================ */
noscript p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ============================================
   RESPONSIVE — Mobile (max-width: 640px)
   ============================================ */
@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding: 3rem 1rem 2rem;
  }

  .logo {
    font-size: 2.5rem;
  }

  .tagline {
    font-size: 1.75rem;
  }

  .subtext {
    font-size: 1.1rem;
  }

  .form-row {
    flex-direction: column;
  }

  .waitlist-form button[type="submit"] {
    width: 100%;
  }

  .features {
    padding: 2rem 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .social-proof {
    padding: 2rem 1rem 3rem;
  }

  .social-proof h2 {
    font-size: 1.25rem;
  }

  footer {
    padding: 1.5rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feature-card,
  .waitlist-form button[type="submit"],
  .waitlist-form input[type="email"] {
    transition: none;
  }
}
