/* CopyBook "Lavender" style, the same colors as the app (prop-platform
   src/app/globals.css). Phone first; wider screens below. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/geist-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #f7f5fb;
  --surface: #ffffff;
  --raised: #f5f0fb;
  --line: #ebe6f2;
  --text: #1f1d2b;
  --muted: #6b6880;
  --accent: #7d30a6;
  --accent-fill: #eccaff;
  --accent-soft: #f6e9ff;
  --on-accent: #2e1440;
  --in: #3a7661;
  --in-soft: #e3f2e6;
  --in-fill: #aed4b4;
  --out: #ab4a3c;
  --out-soft: #fde6e2;
  --warn: #866021;
  --warn-soft: #faeed6;
  --shadow: 0 1px 2px rgb(31 29 43 / 0.04), 0 6px 20px -6px rgb(125 48 166 / 0.12);
  --shadow-lg: 0 2px 4px rgb(31 29 43 / 0.05), 0 16px 32px -8px rgb(125 48 166 / 0.2);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
/* `hidden` always wins over display rules below. */
[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: radial-gradient(ellipse 90% 520px at 20% -80px, var(--accent-soft), transparent 70%), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
p {
  margin: 0;
}
a {
  color: var(--accent);
}
.accent {
  color: var(--accent);
}
.muted {
  color: var(--muted);
}
.strong {
  font-weight: 600;
}
.small-text {
  font-size: 13px;
}
.num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}
.in {
  color: var(--in);
}
.out {
  color: var(--out);
}
.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* Page width with a 16px gutter on phones. */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill {
  display: inline-block;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
}
.tag {
  display: inline-block;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  white-space: nowrap;
  vertical-align: middle;
  letter-spacing: 0;
}
.tag.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}

/* Buttons, like the app's. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 0.15s, filter 0.15s, background 0.15s, border-color 0.15s;
}
.button .icon {
  width: 16px;
  height: 16px;
}
.button.primary {
  background: var(--accent-fill);
  color: var(--on-accent);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 4px 14px -4px rgb(125 48 166 / 0.45);
}
.button.primary:hover {
  filter: brightness(1.03);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 8px 20px -6px rgb(125 48 166 / 0.5);
}
.button.primary:disabled {
  cursor: wait;
  opacity: 0.7;
}
.button.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgb(31 29 43 / 0.05);
}
.button.secondary:hover {
  border-color: var(--accent-fill);
  background: var(--raised);
}
.button.small {
  min-height: 36px;
  padding: 6px 14px;
  font-size: 14px;
  border-radius: 10px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Header */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.logo-tile {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eccaff, #b77fe0 55%, #7d30a6);
  box-shadow: 0 4px 12px -4px rgb(125 48 166 / 0.6);
}
.logo-tile svg {
  width: 18px;
  height: 18px;
}

/* Hero: text and form, then the preview (side by side on wide screens). */
.hero {
  display: grid;
  gap: 32px;
  padding-block: 24px 48px;
}
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
h1 {
  font-size: clamp(32px, 8vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
}
.lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 60ch;
}
.lead.center {
  margin-inline: auto;
  text-align: center;
}

/* Waitlist form */
.form-card {
  width: 100%;
  max-width: 480px;
  padding: 20px;
  margin-top: 8px;
  scroll-margin-top: 24px;
}
.form-card h2 {
  font-size: 18px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
form .label {
  margin-top: 6px;
}
input[type="email"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
input[type="email"]:hover {
  background: var(--raised);
}
input[type="email"]:focus {
  outline: 2px solid var(--accent-fill);
  border-color: var(--accent);
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin: 6px 0 8px;
}
.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.choices {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.choices label {
  position: relative;
}
.choices input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.choices span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 500;
  font-size: 15px;
  transition: background 0.15s, border-color 0.15s;
}
.choices label:hover span {
  border-color: var(--accent-fill);
  background: var(--raised);
}
.choices input:checked + span {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: var(--on-accent);
  font-weight: 600;
}
.choices input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
#turnstile:empty {
  display: none;
}
form .button.primary {
  margin-top: 6px;
  width: 100%;
}
.form-message {
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: var(--raised);
}
.form-message.error {
  background: var(--out-soft);
  color: var(--out);
}
.done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 16px 8px;
  outline: none;
}
.done-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--in-soft);
  color: var(--in);
}
.done h2 {
  font-size: 22px;
}

/* Dashboard preview (made-up numbers) */
.preview {
  margin: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
  box-shadow: var(--shadow-lg);
  min-width: 0;
  /* Below the two-column layout, don't stretch the example chart. */
  width: 100%;
  max-width: 560px;
  justify-self: start;
}
.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-title {
  font-weight: 700;
  font-size: 17px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  min-width: 0;
}
.stat .num {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart,
.countdown {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.chart-head {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.chart-head .muted {
  font-weight: 400;
}
.chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.chart text {
  font-size: 10px;
  fill: var(--muted);
  font-family: inherit;
}
.countdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.countdown-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
}
.bar {
  height: 8px;
  border-radius: 999px;
  background: var(--raised);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #eccaff, #b77fe0);
}

/* Features */
.features {
  padding-block: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.features > h2,
.closing h2 {
  font-size: clamp(26px, 6vw, 36px);
  text-align: center;
}
.grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.feature {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature h3 {
  font-size: 17px;
}
.feature p,
.auto p {
  color: var(--muted);
  font-size: 15px;
}

.auto {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  margin-block: 24px;
  /* .wrap's side padding would shrink the card; use the margin instead. */
  width: calc(100% - 32px);
  max-width: calc(1120px - 32px);
}
.auto h2 {
  font-size: 20px;
  margin-bottom: 6px;
}

.closing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-block: 48px;
  text-align: center;
}

.footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.footer p {
  max-width: 80ch;
}
.footer strong {
  color: var(--text);
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-card {
    padding: 24px;
  }
  .stat .num {
    font-size: 15px;
  }
  .stat {
    padding: 10px;
  }
  .auto {
    flex-direction: row;
    align-items: flex-start;
    padding: 24px;
  }
}

@media (min-width: 960px) {
  .wrap {
    padding-inline: 24px;
  }
  .auto {
    width: calc(100% - 48px);
    max-width: calc(1120px - 48px);
  }
  .hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 48px;
    padding-block: 40px 64px;
  }
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .preview {
    padding: 20px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
