/* =========================================================
   POPSTRAP — landing page
   Mobile-first (designed at 375px), scales up via min-width.
   Visual match to popstrap.shop: cream bg, Archivo Black headline,
   bordered countdown box, side-by-side email + button.
   ========================================================= */

:root {
  --bg: #f5f2ec;          /* warm cream */
  --fg: #0a0a0a;          /* near-black ink */
  --fg-soft: rgba(10, 10, 10, 0.62);
  --border: #0a0a0a;
  --hairline: rgba(10, 10, 10, 0.18);
  --accent: #0a0a0a;      /* overridden by CONFIG.ACCENT_COLOR on load */
  --cta-hover: #e0301e;   /* red hover state on the primary CTA */
  --max-w: 640px;
  --pad-x: 24px;
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Archivo Black", Impact, "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px var(--pad-x) 48px;
  text-align: center;
}

/* ---------- Brand / logo ---------- */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 8px 0 56px;
}
.mark {
  width: 44px;
  height: 44px;
  color: var(--fg);
  flex-shrink: 0;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 540px;
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
}
.eyebrow.live {
  background: var(--fg);
  color: var(--bg);
  display: inline-block;
  padding: 6px 12px;
  letter-spacing: 0.18em;
}
.headline {
  font-family: var(--font-display);
  font-size: 44px;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  font-weight: 400; /* Archivo Black is already black at 400 */
}
.subhead {
  margin: 0 auto 28px;
  max-width: 32ch;
  font-size: 16px;
  color: var(--fg);
}

/* ---------- Countdown ---------- */
.countdown {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(56px, 1fr));
  align-items: center;
  border: 1.5px solid var(--border);
  padding: 14px 8px;
  margin: 8px auto 32px;
  font-variant-numeric: tabular-nums;
  gap: 0;
}
.countdown .unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 12px;
  border-right: 1px solid var(--hairline);
}
.countdown .unit:last-child {
  border-right: none;
}
.countdown .num {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.countdown .label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-soft);
  margin-top: 8px;
}

/* ---------- Waitlist form ---------- */
.waitlist-form {
  margin: 0 auto;
  max-width: 460px;
}
.row-primary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.row-secondary { margin-bottom: 8px; }

.waitlist-form input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--fg);
  border: 1.5px solid var(--border);
  border-radius: 0;
  outline: none;
  transition: box-shadow 0.15s ease;
}
.waitlist-form input::placeholder {
  color: var(--fg-soft);
}
.waitlist-form input:focus {
  box-shadow: inset 0 0 0 1px var(--fg);
}

.cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 52px;
  padding: 0 22px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1.5px solid var(--fg);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
  -webkit-appearance: none;
}
.cta:hover {
  background: var(--cta-hover);
  border-color: var(--cta-hover);
}
.cta:active { transform: translateY(1px); }
.cta:disabled {
  opacity: 0.55;
  cursor: progress;
}

.form-help {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--fg-soft);
}
.form-status {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 13px;
  color: var(--fg-soft);
}
.form-status.success { color: var(--fg); font-weight: 700; }
.form-status.error   { color: #b41f1f; }

/* ---------- Social proof ---------- */
.social-proof {
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--fg);
}
.social-proof strong {
  font-weight: 700;
}

/* ---------- Built-for badge ---------- */
.built-for {
  display: inline-block;
  margin: 40px auto 0;
  padding: 12px 22px;
  border: 1.5px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Footer line ---------- */
.footer-line {
  margin: 56px auto 0;
  padding-top: 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg);
}

/* ---------- Live state ---------- */
.hero-live { padding: 32px 0 0; }
.cta-live {
  width: auto;
  display: inline-flex;
  padding: 0 32px;
  margin-top: 8px;
}

/* ---------- Scroll-in animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.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;
}

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  :root { --pad-x: 32px; }
  .brand { margin: 24px 0 64px; gap: 18px; }
  .mark { width: 56px; height: 56px; }
  .wordmark { font-size: 42px; }
  .headline { font-size: 64px; }
  .subhead { font-size: 17px; }
  .countdown {
    padding: 16px 10px;
  }
  .countdown .num { font-size: 36px; }
  .countdown .unit { padding: 0 18px; }

  /* Email + button side-by-side on >=600px to match popstrap.shop */
  .row-primary {
    grid-template-columns: 1fr auto;
    gap: 0;
  }
  .row-primary input {
    border-right: none;
  }
  .row-primary .cta {
    width: auto;
    padding: 0 28px;
    margin-left: -1.5px;
  }
}

@media (min-width: 900px) {
  :root { --max-w: 760px; }
  .headline { font-size: 72px; }
}
