/* Gravel — Waitlist Landing Page */

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

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

/* ─── Base ───────────────────────────────────────────────────── */
body {
  background: #080808;
  color: #f0f0f0;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* Screen-reader only utility */
.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;
}

/* ─── Background layers ──────────────────────────────────────── */

/* Grid */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.042) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 42%, black 10%, rgba(0,0,0,0.6) 45%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 75% at 50% 42%, black 10%, rgba(0,0,0,0.6) 45%, transparent 75%);
}

/* Neutral spotlight — monochrome */
.center-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 42%, rgba(255, 255, 255, 0.045) 0%, transparent 70%),
    radial-gradient(ellipse 30% 20% at 50% 42%, rgba(255, 255, 255, 0.028) 0%, transparent 60%);
}

/* ─── Page layout ────────────────────────────────────────────── */
.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  width: 100%;
  max-width: 680px;
  padding: 2.25rem 0 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo-wrap {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo {
  height: 34px;
  width: auto;
  max-width: min(100%, 200px);
  display: block;
}

/* Legal pages (privacy / terms) — header lockup */
.site-logo-header {
  height: 30px;
  width: auto;
  max-width: min(100vw - 4rem, 200px);
  display: block;
}

/* ─── Hero ───────────────────────────────────────────────────── */
.hero-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 0 2.5rem;
  max-width: 680px;
  width: 100%;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 100px;
  padding: 5px 14px 5px 10px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
  user-select: none;
}

.badge-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  background: #34c759;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(52, 199, 89, 0.55);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(52, 199, 89, 0.55); }
  50%       { opacity: 0.65; box-shadow: 0 0 16px rgba(52, 199, 89, 0.35); }
}

/* Headline */
.headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.75rem, 9vw, 5.25rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

/* Subheadline */
.subheadline {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 2.5rem;
  max-width: 440px;
}

/* ─── Waitlist Form ──────────────────────────────────────────── */
.waitlist-form {
  width: 100%;
  max-width: 460px;
  margin-bottom: 2.25rem;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 5px;
  transition: border-color 0.2s ease;
}

.form-row:focus-within {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.email-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.925rem;
  padding: 10px 12px;
  min-width: 0;
}

.email-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  color: #0a0a0a;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.2s ease;
  flex-shrink: 0;
}

.submit-btn:hover {
  background: #ebebeb;
  transform: scale(0.98);
}

.submit-btn:active {
  transform: scale(0.96);
}

.submit-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  display: flex;
  align-items: center;
}

.form-note {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.22);
  margin-top: 10px;
  transition: color 0.3s ease;
  min-height: 1.1em;
}

.form-note.is-success {
  color: rgba(255, 255, 255, 0.55);
}

.form-note.is-error {
  color: #ff3b30 !important;
}

/* Success state */
.success-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 16px 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
}

/* ─── Feature pills ──────────────────────────────────────────── */
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 100px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  cursor: default;
}

.pill:hover {
  color: rgba(255, 255, 255, 0.65);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}

.pill svg {
  flex-shrink: 0;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  width: 100%;
  max-width: 680px;
  padding: 1.5rem 0 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.18);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.5);
}

.footer-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  user-select: none;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 500px) {
  .form-row {
    flex-direction: column;
    gap: 0;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .form-row:focus-within {
    box-shadow: none;
  }

  .email-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 14px 16px;
    width: 100%;
    transition: border-color 0.2s;
  }

  .email-input:focus {
    border-color: rgba(255, 255, 255, 0.22);
    outline: none;
  }

  .submit-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    border-radius: 12px;
    margin-top: 8px;
  }

  .subheadline br {
    display: none;
  }
}

/* ─── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .badge-dot { animation: none; }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* Force hidden attribute to always win over any display CSS */
[hidden] { display: none !important; }

/* ─── View animations ────────────────────────────────────────── */

@keyframes view-exit {
  from { opacity: 1; transform: translateY(0);     }
  to   { opacity: 0; transform: translateY(-14px); }
}
@keyframes view-enter {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.view-exiting {
  display: flex !important; /* keep home visible during exit animation */
  animation: view-exit 180ms ease-in forwards;
  pointer-events: none;
}
.view-entering {
  animation: view-enter 280ms ease-out forwards;
}

/* ─── Back button ────────────────────────────────────────────── */

.back-btn {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 6px 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.32);
  cursor: pointer;
  opacity: 0;
  transform: translateX(-6px);
  white-space: nowrap;
  transition: color 0.2s ease, opacity 0.25s ease, transform 0.25s ease;
}
.back-btn.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.back-btn:hover { color: rgba(255,255,255,0.75); }
.back-btn[hidden] { display: none; }

/* ─── Legal content ──────────────────────────────────────────── */

.legal-view {
  width: 100%;
  max-width: 680px;
}

.legal-wrap { padding: 3rem 0 5rem; }

.legal-wrap h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 0.4rem;
}
.legal-meta {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.25);
  margin-bottom: 2.5rem;
}
.legal-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 2rem 0;
}
.legal-wrap h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,0.8);
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
}
.legal-wrap p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.78;
  margin-bottom: 0.85rem;
}
.legal-wrap ul {
  padding-left: 1.2rem;
  margin-bottom: 0.85rem;
}
.legal-wrap li {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.78;
  margin-bottom: 0.3rem;
}
.legal-wrap strong { color: rgba(255,255,255,0.6); font-weight: 500; }
.legal-wrap a {
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.legal-wrap a:hover { color: #ffffff; }
.legal-also {
  margin-top: 2.5rem !important;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.legal-inline-btn {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: rgba(255,255,255,0.6);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.legal-inline-btn:hover { color: #ffffff; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1.5rem; }
.data-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.2);
  padding: 0.55rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.data-table td {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.35);
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
  line-height: 1.65;
}
.data-table td:first-child {
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  white-space: nowrap;
  width: 36%;
}

/* Footer as buttons */
.footer-link {
  background: none;
  border: none;
  padding: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.18);
  cursor: pointer;
  transition: color 0.2s ease;
}
.footer-link:hover { color: rgba(255,255,255,0.5); }

/* Success state (replaces form-row, no box — avoids height jump) */
.success-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.925rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  padding: 13px 0;
  width: 100%;
  text-align: center;
}

@media (max-width: 560px) {
  .data-table { display: block; overflow-x: auto; }
  .data-table th, .data-table td { padding: 0.55rem 0.5rem; }
  .data-table td:first-child { white-space: normal; width: auto; }
  .legal-wrap { padding: 2rem 0 4rem; }
}
