/* ============ Tokens ============ */
:root{
  --ink: #12151C;
  --ink-soft: #1B202B;
  --parchment: #FBF7EE;
  --parchment-soft: #F1E9D6;
  --parchment-line: #E4D9BE;
  --brass: #B8863B;
  --brass-dark: #8F6A2C;
  --text: #201B12;
  --text-soft: #6B6355;
  --success: #3F7D58;
  --error: #B23A2F;

  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --radius: 6px;
  --shadow-card: 0 40px 80px -30px rgba(0,0,0,0.55), 0 2px 0 rgba(255,255,255,0.03) inset;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }

body{
  font-family: var(--font-body);
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}

a{ color: var(--brass); }

/* ============ Canvas ============ */
.canvas{
  min-height: 100vh;
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  padding: 48px 20px 24px;
  position: relative;
  background:
    radial-gradient(circle at 50% 0%, #232A38 0%, var(--ink) 55%);
}

/* ============ Card ============ */
.card{
  width:100%;
  max-width: 560px;
  background: var(--parchment);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px 40px 36px;
  position: relative;
  overflow: hidden;
}

@media (max-width: 600px){
  .card{ padding: 28px 22px 26px; }
}

/* ============ Gauge (signature element) ============ */
.gauge{ margin-bottom: 28px; }
.gauge__label{
  display:flex;
  justify-content: space-between;
  align-items:baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.gauge__tag{ font-weight:600; }
.gauge__count{ font-weight: 500; }
.gauge__track{
  position:relative;
  height: 6px;
  background: var(--parchment-line);
  border-radius: 3px;
  overflow: hidden;
}
.gauge__fill{
  position:absolute;
  top:0; left:0; bottom:0;
  width: 0%;
  background: linear-gradient(90deg, var(--brass-dark), var(--brass));
  transition: width 0.5s cubic-bezier(.65,0,.35,1);
  border-radius: 3px;
}
.gauge__ticks{
  position:absolute;
  inset:0;
  display:flex;
  justify-content: space-between;
}
.gauge__ticks span{
  width:1px;
  height:100%;
  background: rgba(251,247,238,0.6);
}
.gauge__ticks span:first-child,
.gauge__ticks span:last-child{ background: transparent; }

/* ============ Panels ============ */
.panel{
  display:none;
  animation: rise 0.45s cubic-bezier(.2,.7,.3,1);
}
.panel--active{ display:block; }

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

.eyebrow{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-dark);
  margin: 0 0 14px;
  font-weight: 600;
}

.headline{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 42px;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}
.headline em{
  font-style: italic;
  font-weight: 500;
  color: var(--brass-dark);
}

.sub{
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-soft);
  margin: 0 0 28px;
  max-width: 46ch;
}
.sub--tight{ margin-bottom: 22px; }

.q-num{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--brass-dark);
  font-weight: 600;
  margin: 0 0 10px;
}

.q-title{
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.28;
  margin: 0 0 24px;
  max-width: 32ch;
}

/* ============ Buttons ============ */
.btn{
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn--primary{
  background: var(--text);
  color: var(--parchment);
  padding: 14px 26px;
}
.btn--primary:hover{ background: #35301F; transform: translateY(-1px); }
.btn--primary:active{ transform: translateY(0); }
.btn--block{ width:100%; }

/* ============ Options (quiz answers) ============ */
.options{
  display:flex;
  flex-direction: column;
  gap: 10px;
}
.option{
  text-align:left;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--parchment-soft);
  border: 1px solid var(--parchment-line);
  border-radius: var(--radius);
  padding: 15px 18px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
  position: relative;
}
.option:hover{
  border-color: var(--brass);
  background: #ECE1C6;
}
.option:active{ transform: scale(0.99); }
.option.is-selected{
  border-color: var(--brass-dark);
  background: var(--brass);
  color: var(--parchment);
}

/* ============ Form ============ */
.field{ margin-bottom: 16px; }
.field label{
  display:block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-soft);
}
.field input{
  width:100%;
  font-family: var(--font-body);
  font-size: 15.5px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--parchment-line);
  background: #fff;
  color: var(--text);
}
.field input:focus{
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}
.field input.is-invalid{ border-color: var(--error); }
.field__error{
  display:block;
  font-size: 12.5px;
  color: var(--error);
  margin-top: 5px;
  min-height: 1em;
}

.consent{
  display:flex;
  gap: 10px;
  align-items:flex-start;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
  margin: 18px 0 20px;
  cursor: pointer;
}
.consent input{ margin-top: 3px; }

.form-note{
  text-align:center;
  font-size: 12.5px;
  color: var(--text-soft);
  margin: 12px 0 0;
}

/* ============ Thank you ============ */
.check{
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display:flex; align-items:center; justify-content:center;
  font-size: 26px;
  margin-bottom: 20px;
}

/* ============ Footer ============ */
.site-footer{
  margin-top: 28px;
  max-width: 560px;
  width:100%;
  text-align:center;
}
.site-footer__inner{
  padding: 18px 12px 6px;
}
.site-footer__brand{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #C9C2B2;
  margin: 0 0 6px;
  font-weight: 600;
}
.site-footer__line{
  font-size: 12.5px;
  color: #8B8676;
  margin: 0 0 6px;
  line-height: 1.6;
}
.site-footer__line a{ color: #C9C2B2; }
.site-footer__legal{
  font-size: 11.5px;
  color: #63604F;
  margin: 10px 0 0;
  line-height: 1.6;
}

/* ============ Accessibility ============ */
:focus-visible{
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
  .panel{ animation: none; }
  .gauge__fill{ transition: none; }
}
