/* ============================================================================
   Switchy — pre-launch landing page
   Premium, dark, luxury-minimal. One accent (Tiffany #0ABAB5).
   All brand decisions live in CSS custom properties for easy extension later.
   ========================================================================== */

:root {
  /* Brand color tokens */
  --accent: #0ABAB5;          /* the single accent — sampled-brand Tiffany teal */
  --accent-bright: #2fd6d0;   /* lighter step for hover / glints */
  --accent-deep: #08807c;     /* darker step for pressed / shadow */
  --accent-glow: rgba(10, 186, 181, 0.28);

  --bg: #080A0B;              /* deep near-black */
  --bg-elev: #101315;        /* charcoal lift for inputs */
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);

  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.40);
  --danger: #ff6b6b;

  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Spacing scale */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;

  --radius: 14px;
  --maxw: 32rem;             /* hero content width */
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: max(var(--space-5), env(safe-area-inset-top))
           var(--space-4)
           max(var(--space-5), env(safe-area-inset-bottom));

  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  text-align: center;

  /* subtle vignette so the flat black gains depth */
  background-image: radial-gradient(
    120% 90% at 50% 18%,
    rgba(255, 255, 255, 0.035) 0%,
    rgba(255, 255, 255, 0) 55%
  );
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; }

/* ----- Soft Tiffany glow behind the wordmark -------------------------------- */
.glow {
  position: fixed;
  top: 32%;
  left: 50%;
  width: min(80vw, 620px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    var(--accent-glow) 0%,
    rgba(10, 186, 181, 0.10) 38%,
    rgba(10, 186, 181, 0) 70%
  );
  filter: blur(28px);
  pointer-events: none;
  z-index: 0;
  animation: glow-breathe 7s ease-in-out infinite;
}

/* ----- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.hero__logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.wordmark {
  margin: var(--space-1) 0 0;
  font-weight: 800;
  font-size: clamp(3rem, 14vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1;
}

.wordmark__accent {
  color: var(--accent);
  text-shadow: 0 0 26px var(--accent-glow);
}

.tagline {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(1.05rem, 4.5vw, 1.35rem);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.005em;
}

.status {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-faint);
}

/* ----- Waitlist form -------------------------------------------------------- */
.waitlist {
  width: 100%;
  margin-top: var(--space-3);
}

.waitlist__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.waitlist__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.95rem 1.1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.waitlist__input::placeholder { color: var(--text-faint); }

.waitlist__input:hover { border-color: var(--line-strong); }

.waitlist__input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.waitlist__input[aria-invalid="true"] {
  border-color: var(--danger);
}

.waitlist__button {
  padding: 0.95rem 1.4rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #062b2a;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.08s ease, box-shadow 0.2s ease;
  box-shadow: 0 6px 24px rgba(10, 186, 181, 0.22);
}

.waitlist__button:hover { background: var(--accent-bright); }
.waitlist__button:active { transform: translateY(1px); background: var(--accent-deep); }

.waitlist__button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}

.waitlist__button[disabled] { opacity: 0.6; cursor: default; }

.waitlist__msg {
  margin: var(--space-2) 0 0;
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: var(--danger);
}

/* honeypot: keep in DOM for Netlify, hide from people */
.waitlist__honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ----- Success state -------------------------------------------------------- */
.success {
  margin-top: var(--space-3);
}

.success__title {
  margin: 0 0 var(--space-1);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

.success__sub {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ----- Footer --------------------------------------------------------------- */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer__by {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}

.footer__awin {
  margin: 0;
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.28);
  letter-spacing: 0.06em;
}

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

/* ----- Entrance motion (staggered fade + rise) ------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.reveal--1 { animation-delay: 0.10s; }
.reveal--2 { animation-delay: 0.20s; }
.reveal--3 { animation-delay: 0.30s; }
.reveal--4 { animation-delay: 0.42s; }
.reveal--5 { animation-delay: 0.56s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes glow-breathe {
  0%, 100% { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;    transform: translate(-50%, -50%) scale(1.06); }
}

/* Respect reduced-motion: no entrance animation, no breathing glow. */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
  .glow { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ----- Larger screens: inline the form row ---------------------------------- */
@media (min-width: 30rem) {
  .waitlist__row { flex-direction: row; }
  .waitlist__button { flex: 0 0 auto; }
}
