:root {
  --bg: #0a0a0c;           /* deep noir */
  --card: #121217ee;       /* glass card */
  --text: #f3f4f6;         /* gray-100 */
  --muted: #b7b9c3;        /* soft gray */
  --brand: #ef4444;        /* red-500 */
  --brand-2: #b91c1c;      /* red-700 */
  --ok: #22c55e;           /* success green */
  --err: #f87171;          /* light error red */
  --ring: 0 0 0 3px rgba(239, 68, 68, .35);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text);
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(239, 68, 68, .20), transparent 60%),
    radial-gradient(900px 480px at 120% 10%, rgba(185, 28, 28, .25), transparent 60%),
    linear-gradient(180deg, #0b0b0e 0%, var(--bg) 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: #fca5a5; text-decoration: none; }
a:hover { text-decoration: underline; }
.dot { opacity: .4; margin: 0 10px; }

.container { max-width: 1120px; margin: 0 auto; padding: 24px; }

header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: conic-gradient(from 210deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 0 2px #ffffff10 inset, 0 2px 14px rgba(185, 28, 28, .55);
}
.brand h1 { font-size: 18px; margin: 0; letter-spacing: 0.2px; }
.badge {
  font-size: 12px; padding: 4px 8px; border-radius: 999px;
  background: #ef444422; border: 1px solid #ef444455; color: #fecaca;
}

/* ===== Hero layout ===== */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  padding: 40px 0 24px;
}

/* ===== Typography ===== */
.title { font-size: clamp(28px, 4.5vw, 56px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.02em; }
.gradient-text { background: linear-gradient(120deg,var(--brand),var(--brand-2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.subtitle { font-size: clamp(16px, 2.1vw, 20px); color: var(--muted); margin: 0 0 24px; }

/* ===== Cards / Form ===== */
.card { background: var(--card); border: 1px solid #ffffff14; backdrop-filter: blur(10px); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-card { padding: 22px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.form-title { margin: 0 0 8px; }
.form-subtitle { margin: 0 0 16px; color: var(--muted); }

label { display: block; font-size: 14px; color: #e5e7eb; margin: 6px 0; }

input[type="text"], input[type="email"], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #3f3f46; background: #0f0f13; color: var(--text);
  outline: none; transition: box-shadow .15s, border-color .15s, transform .06s ease-in-out;
}
input:focus, textarea:focus, select:focus { box-shadow: var(--ring); border-color: #ef4444; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--err); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mt-6 { margin-top: 6px; }

.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: #e5e7eb; }
.consent input { margin-top: 2px; }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 6px; }

.btn {
  appearance: none; border: 0; padding: 12px 16px; border-radius: 12px; cursor: pointer; font-weight: 600; color: white;
  background: linear-gradient(145deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(185, 28, 28, .35), inset 0 1px 0 rgb(255 255 255 / .06);
  transition: transform .06s ease-in-out, filter .15s ease-in-out; transform: translateY(0);
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn.ghost { background: #ffffff10; border: 1px solid #ffffff22; }
.btn.small { padding: 8px 10px; font-size: 13px; }

.legal { font-size: 12px; color: #a3a3a3; margin-top: 10px; }

/* ===== Content blocks ===== */
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 16px; }
.kpi { padding: 16px; border: 1px dashed #3f3f46; border-radius: 12px; text-align: center; }
.kpi strong { display: block; font-size: 20px; }

.features { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 18px; border-radius: 14px; border: 1px solid #ffffff14; background: #16161caa; }
.feature h3 { margin: 8px 0 6px; font-size: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; padding: 6px 10px; border-radius: 999px;
  background: #1a1a1f; border: 1px solid #2b2b31; color: #f3f4f6;
}

/* ===== Success / Errors ===== */
.success {
  display: none; padding: 22px; border: 1px solid #166534; background: #052e16cc; color: #d1fae5; border-radius: var(--radius);
}
.success-title { margin: 0 0 6px; font-weight: 600; }

.error { color: var(--err); font-size: 14px; margin-top: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===== Footer ===== */
footer { margin: 48px 0 24px; color: #a3a3a3; font-size: 14px; text-align: center; }

/* ===== Modal (native <dialog>) ===== */
#modal {
  border: 1px solid #27272a; border-radius: 16px; background: #0f0f13; color: #f3f4f6; padding: 0;
  max-width: 720px; width: min(92vw, 720px); box-shadow: var(--shadow);
}
.modal-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #1f1f23; }
.modal-body { padding: 20px; max-height: 65vh; overflow: auto; }

/* ===== Confetti ===== */
.confetti { position: fixed; inset: 0; pointer-events: none; }
.confetti i {
  position: absolute; width: 8px; height: 14px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
  opacity: 0; transform: translateY(-20px) rotate(0deg); border-radius: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  /* Make the sign-up form appear right after the description (chip/title/subtitle) */
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "chip"
      "title"
      "subtitle"
      "form"
      "kpis"
      "features";
    align-items: start;
  }
  /* Flatten the first section so its children become direct grid items */
  .hero > section:first-child { display: contents; }

  /* Map elements to areas */
  .chip { grid-area: chip; }
  .title { grid-area: title; }
  .subtitle { grid-area: subtitle; }
  /* The sign-up section (second section) */
  #signup, .form-card { grid-area: form; }
  .kpis { grid-area: kpis; }
  .features { grid-area: features; }

  /* Tweak spacing on mobile */
  .form-card { margin-top: 8px; }
  .kpis, .features { margin-top: 16px; }

  /* Grids collapse to single column */
  .form-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* Keep single-column grids at smaller breakpoint as well */
  .form-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
}



/* Phone: "Features • Sign" on first line, "up" directly under "Sign" */
@media (max-width: 430px) {
  header nav { white-space: nowrap; }            /* prevent nav wrap */
  .nav-sign {
    display: inline-grid;
    grid-auto-flow: row;
    line-height: 1;
    vertical-align: baseline;
  }
  .nav-sign .sp { display: none; }
  .nav-sign .w1 { grid-row: 1; }
  .nav-sign .w2 { grid-row: 2; }
}


/* Phone: align the Beta pill text with the nav text */
@media (max-width: 430px) {
  header { align-items: baseline; }         /* align brand + nav on the same text baseline */
  .brand { align-items: baseline; }
  .brand h1 { line-height: 1; }

  /* Nudge the Beta pill so its text lines up visually with the nav text */
  .badge {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform: translateY(2px); /* tweak ±1px if needed */
  }
}
