:root {
  --cream: #F7F4EE;
  --white: #FFFFFF;
  --navy: #0A1628;
  --navy-2: #0D1E36;
  --navy-3: #192E48;
  --gold: #C9A96E;
  --gold-light: #E8CFA0;
  --gold-dark: #7A5F38;
  --slate: #3D5070;
  --ink: #1B2A44;
  --muted: #7A8FA8;
  --muted-2: #B8C4D0;
  --line: #EDE8DF;
  --line-2: #E2DCCF;
  --field-bg: #FBFAF6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 22, 40, .04), 0 12px 32px rgba(10, 22, 40, .06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

em { font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; font-style: italic; }

/* ---------- Gate + thank-you ---------- */
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1100px 600px at 50% -10%, var(--navy-3), transparent 60%),
    var(--navy);
}
.gate-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  text-align: center;
}
.gate-eyebrow { color: var(--gold); font-size: 11px; letter-spacing: .16em; font-weight: 500; }
.gate-title { font-size: 30px; margin: 14px 0 6px; font-weight: 600; color: var(--navy); }
.gate-title em { color: var(--gold-dark); }
.gate-sub { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.gate-label { display: block; text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.gate-input {
  width: 100%; padding: 13px 14px; font-size: 16px; font-family: inherit;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--field-bg);
  margin-bottom: 18px; color: var(--ink);
}
.gate-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 169, 110, .18); }
.gate-error { color: #B4452F; font-size: 13px; margin: -8px 0 16px; }

.error-code {
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  font-size: 64px; font-weight: 700; line-height: 1; color: var(--gold);
  margin-bottom: 8px; letter-spacing: .02em;
}

.thanks-card { padding-top: 44px; }
.thanks-check {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; color: var(--navy);
  background: var(--gold); box-shadow: 0 8px 24px rgba(201, 169, 110, .4);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(900px 500px at 80% -20%, var(--navy-3), transparent 55%),
    var(--navy);
  color: var(--white);
  padding: 72px 24px 64px;
}
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .14em; font-weight: 500; }
.hero-title { font-size: clamp(34px, 6vw, 52px); line-height: 1.05; margin: 18px 0 14px; font-weight: 600; }
.hero-title em { color: var(--gold-light); }
.hero-sub { color: var(--muted-2); font-size: clamp(15px, 2.4vw, 18px); max-width: 560px; margin: 0; }

/* ---------- Layout ---------- */
.wrap { max-width: 760px; margin: -36px auto 0; padding: 0 20px 90px; position: relative; }

.form-alert, .card { border-radius: var(--radius); }

.form-alert {
  background: #FBEEEA; border: 1px solid #F0CFC4; color: #9A3A26;
  padding: 14px 18px; font-size: 14px; margin-bottom: 18px;
}

.card {
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 30px 32px;
  margin-bottom: 22px;
}
.card.identity { padding-top: 34px; }

.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-num {
  font-size: 13px; font-weight: 700; letter-spacing: .05em;
  color: var(--navy); background: var(--gold); border-radius: 8px;
  padding: 6px 10px; line-height: 1;
}
.section-title { font-size: 21px; font-weight: 600; color: var(--navy); margin: 0; letter-spacing: -.01em; }

/* ---------- Fields ---------- */
.field { margin-bottom: 22px; }
.field:last-child { margin-bottom: 0; }
.field--compact { margin-top: -8px; }
.field-label {
  display: block; font-size: 12px; letter-spacing: .09em; text-transform: uppercase;
  font-weight: 600; color: var(--slate); margin-bottom: 6px;
}
.req { color: var(--gold-dark); }
.field-help { font-size: 14px; color: var(--muted); margin: 0 0 12px; }

.input, textarea.input {
  width: 100%; padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--field-bg);
  transition: border-color .12s, box-shadow .12s;
}
textarea.input { resize: vertical; min-height: 64px; line-height: 1.55; }
.input::placeholder { color: #A9B4C2; }
.input:focus, textarea.input:focus {
  outline: none; border-color: var(--gold); background: var(--white);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, .16);
}

.input-prefixed { display: flex; align-items: center; gap: 10px; }
.input-prefix { color: var(--gold-dark); font-weight: 700; font-size: 15px; width: 18px; flex: none; }

/* Identity grid */
.identity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.identity-grid .field { margin-bottom: 0; }

/* ---------- Rating 1..10 ---------- */
.rating { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating-cap { font-size: 11px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; flex: none; }
.rating-scale {
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; flex: 1 1 360px; min-width: 0;
}
.rating-radio { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.rating-pip {
  display: grid; place-items: center; aspect-ratio: 1 / 1; min-height: 38px;
  border: 1px solid var(--line-2); border-radius: 9px; background: var(--field-bg);
  font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: transform .08s, background .12s, color .12s, border-color .12s;
}
.rating-pip:hover { border-color: var(--gold); color: var(--gold-dark); }
.rating-radio:checked + .rating-pip {
  background: var(--navy); border-color: var(--navy); color: var(--white); transform: translateY(-1px);
}
/* JS adds .is-filled to pips up to the selected value */
.rating-pip.is-filled { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.rating-radio:focus-visible + .rating-pip { box-shadow: 0 0 0 3px rgba(201, 169, 110, .35); }

/* ---------- Radio / checkbox choices ---------- */
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.choice {
  display: inline-flex; align-items: center; padding: 10px 16px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--field-bg);
  font-size: 14px; color: var(--slate); font-weight: 500;
  transition: border-color .12s, background .12s, color .12s;
}
.choice:hover { border-color: var(--gold); }
.choice-input:checked + .choice {
  background: var(--navy); border-color: var(--navy); color: var(--white);
}
.choice-input:focus-visible + .choice { box-shadow: 0 0 0 3px rgba(201, 169, 110, .35); }

/* ---------- Errors ---------- */
.field--error .input, .field--error textarea.input { border-color: #D08A74; background: #FCF3F0; }
.field-err { color: #B4452F; font-size: 13px; margin: 7px 0 0; }

/* ---------- Footer / submit ---------- */
.footnote { text-align: center; color: var(--muted); font-size: 13px; margin: 30px 0 18px; }
.btn {
  display: inline-block; border: none; cursor: pointer; font-family: inherit;
  background: var(--gold); color: var(--navy); font-weight: 700; font-size: 15px;
  padding: 14px 28px; border-radius: 11px; text-decoration: none;
  transition: transform .08s, box-shadow .12s, background .12s;
  box-shadow: 0 6px 18px rgba(201, 169, 110, .35);
}
.btn:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-submit { display: block; width: 100%; padding: 17px; font-size: 16px; letter-spacing: .02em; }

/* Honeypot — visually + programmatically hidden, off-screen for bots */
.hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  .hero { padding: 52px 20px 56px; }
  .card { padding: 24px 20px; }
  .identity-grid { grid-template-columns: 1fr; }
  .rating { gap: 8px; }
  .rating-cap { flex-basis: 100%; }
  .rating-scale { flex-basis: 100%; gap: 5px; }
  .rating-pip { min-height: 34px; border-radius: 8px; }
  .rating-cap--max { text-align: right; }
}
