/* ==========================================================================
   The Biotech Committee Survey — Norml Studio
   Design tokens forked from readout.norml.studio (Foundation Readout)
   ========================================================================== */

:root {
  --background: 248 244 237;
  --foreground: 39 39 34;
  --deep-blue: 0 48 73;
  --primary: 255 93 12;
  --primary-foreground: 255 255 255;
  --accent: 204 244 9;
  --accent-foreground: 39 39 34;
  --muted: 219 207 190;
  --muted-foreground: 79 78 72;
  --border: 219 207 190;
  --ring: 10 93 255;
  --destructive: 220 38 38;

  --font-heading: 'Bricolage Grotesque', 'Inter Tight', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --container-max: 84rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: rgb(var(--background));
  color: rgb(var(--deep-blue));
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  border-bottom: 1px solid rgb(var(--border));
  padding: 1.125rem 2rem;
}

.brand {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgb(var(--deep-blue));
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand::before { content: '['; }
.brand::after { content: ']'; }

/* ==========================================================================
   Floating chartreuse sparkle (right edge of viewport)
   ========================================================================== */

.spark {
  position: fixed;
  right: 1.25rem;
  top: 45vh;
  width: 44px;
  height: 44px;
  background: rgb(var(--accent));
  border-radius: 8px;
  display: grid;
  place-items: center;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  animation: sparkPulse 3s ease-in-out infinite;
}
.spark svg { width: 22px; height: 22px; color: rgb(var(--deep-blue)); }
@keyframes sparkPulse {
  0%,100% { transform: rotate(0deg) scale(1); }
  50%     { transform: rotate(180deg) scale(1.05); }
}

/* ==========================================================================
   Layout
   ========================================================================== */

.shell {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   HERO — 2-column, RIGHT col bottom-aligned
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 4rem;
  align-items: start;
  padding: 5rem 0 4.5rem;
  min-height: 32rem;
  animation: fadeUp 0.6s ease-out;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  color: rgb(var(--deep-blue));
}
.hero-title .accent-orange {
  color: rgb(var(--primary));
}

.hero-side {
  padding-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 28rem;
}
.hero-sub {
  font-size: 1.0625rem;
  line-height: 1.45;
  color: rgb(var(--deep-blue));
  margin: 0;
}
.hero-cta-row {
  display: flex;
  gap: 0.625rem;
  flex-wrap: wrap;
}
.hero-meta {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgb(var(--deep-blue));
  margin: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.08s ease, background-color 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: rgb(var(--primary));
  color: rgb(var(--primary-foreground));
}
.btn-primary:hover { background: rgb(255 110 30); }
.btn-secondary {
  background: rgba(255 255 255 / 0.5);
  color: rgb(var(--deep-blue));
  border-color: rgb(var(--border));
}
.btn-secondary:hover { background: rgba(255 255 255 / 0.9); }
.btn .arrow {
  transition: transform 0.2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ==========================================================================
   Sections / dividers
   ========================================================================== */

.section-divider {
  border: 0;
  border-top: 1px solid rgb(var(--border));
  margin: 0;
}

.section {
  padding: 4.5rem 0 5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2.25rem, 4.5vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.022em;
  color: rgb(var(--deep-blue));
  margin: 0 0 0.75rem;
}

.section-sub {
  font-size: 1.0625rem;
  color: rgb(var(--deep-blue));
  max-width: 38rem;
  margin: 0 0 3rem;
  line-height: 1.5;
}

/* ==========================================================================
   "How it works" — 3 large cards with chartreuse gradient bottom + icons
   ========================================================================== */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.how-card {
  position: relative;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.85) 0%,
      rgba(255,255,255,0.7) 35%,
      rgba(204,244,9,0.55) 65%,
      rgba(204,244,9,1) 100%);
  border: 1px solid rgb(var(--border));
  border-radius: 18px;
  padding: 2rem 2rem 2.25rem;
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.how-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.how-card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: rgb(var(--deep-blue));
  margin: 0 0 1rem;
}

.how-card-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 1.5rem 0 2rem;
  color: rgb(var(--deep-blue));
}

.how-card-body {
  font-size: 0.9375rem;
  color: rgb(var(--deep-blue));
  line-height: 1.5;
  margin: 0;
  margin-top: auto;
}

/* ==========================================================================
   "Four gates" — large title left, vertical stack right
   ========================================================================== */

.gates-section {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
  padding: 5rem 0 5rem;
}

.gates-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.625rem);
  line-height: 1;
  letter-spacing: -0.022em;
  color: rgb(var(--deep-blue));
  margin: 0;
}

.gates-list {
  display: flex;
  flex-direction: column;
}

.gate-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgb(var(--border));
  align-items: start;
}
.gate-row:last-child { border-bottom: 1px solid rgb(var(--border)); }

.gate-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.875rem;
  line-height: 1.05;
  letter-spacing: -0.018em;
  color: rgb(var(--deep-blue));
  margin: 0;
}
.gate-desc {
  font-size: 0.9375rem;
  color: rgb(var(--deep-blue));
  line-height: 1.5;
  margin: 0;
}

.gates-right {
  display: flex;
  flex-direction: column;
}
.gates-cta {
  display: flex;
  justify-content: flex-end;
  margin-top: 1.75rem;
}
.gates-section + * { margin-top: 0; }
main.shell { padding-bottom: 4rem; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid rgb(var(--border));
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: rgb(var(--muted-foreground));
}
.site-footer a { color: rgb(var(--deep-blue)); }

/* ==========================================================================
   Anonymization notice
   ========================================================================== */

.anon-notice {
  margin-top: 2.5rem;
  padding: 1.5rem 1.75rem;
  background: rgba(255 255 255 / 0.55);
  border: 1px solid rgb(var(--border));
  border-radius: 12px;
}
.anon-notice-text {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: rgb(var(--deep-blue));
  margin: 0;
}
.anon-notice-text strong {
  font-weight: 600;
}

/* ==========================================================================
   Survey — progress bar (4 steps)
   ========================================================================== */

.progress-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid rgb(var(--border));
  background: rgb(var(--background));
}

.progress-step {
  padding: 1rem 1.25rem 0.875rem;
  border-top: 3px solid transparent;
  transition: all 0.2s ease;
}
.progress-step .step-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(var(--muted-foreground));
  margin-bottom: 0.25rem;
}
.progress-step .step-name {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(var(--muted-foreground));
}

.progress-step.active {
  border-top-color: rgb(var(--deep-blue));
}
.progress-step.active .step-num,
.progress-step.active .step-name {
  color: rgb(var(--deep-blue));
}
.progress-step.active .step-name { font-weight: 600; }

.progress-step.done {
  border-top-color: rgb(var(--accent));
}

/* ==========================================================================
   Survey questions
   ========================================================================== */

.survey-shell {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
  animation: fadeUp 0.5s ease-out;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(var(--muted-foreground));
  margin: 0 0 0.875rem;
}

.survey-section-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2.25rem, 4.5vw, 4.25rem);
  line-height: 1;
  letter-spacing: -0.022em;
  color: rgb(var(--deep-blue));
  margin: 0 0 1rem;
}

.survey-section-sub {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgb(var(--deep-blue));
  margin: 0 0 3rem;
  max-width: 42rem;
}

/* Question card — white rounded container */
.q-card {
  background: rgba(255 255 255 / 0.55);
  border: 1px solid rgb(var(--border));
  border-radius: 16px;
  padding: 1.75rem 1.75rem 1.75rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s ease;
  animation: fadeUp 0.4s ease-out;
}
.q-card:hover { border-color: rgba(0 48 73 / 0.25); }

.q-head {
  display: flex;
  gap: 0.875rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.q-num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: rgb(var(--primary));
  font-weight: 500;
  flex-shrink: 0;
}
.q-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: rgb(var(--deep-blue));
  margin: 0;
}
.q-helper {
  font-size: 0.8125rem;
  color: rgb(var(--muted-foreground));
  margin: 0 0 1.125rem;
  padding-left: 1.875rem;
}
.q-helper.error {
  color: rgb(var(--destructive));
  font-weight: 500;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.875rem;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgb(var(--border));
  border-radius: 10px;
  background: rgb(var(--background));
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
  user-select: none;
}
.option:hover {
  background: rgba(255 255 255 / 0.85);
  border-color: rgba(0 48 73 / 0.35);
}
.option.selected {
  background: rgb(var(--accent));
  border-color: rgb(var(--deep-blue));
}
.option:focus-visible {
  outline: 2px solid rgb(var(--ring));
  outline-offset: 2px;
}

.option .checkbox,
.option .radio {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgb(var(--deep-blue));
  margin-top: 2px;
  display: grid;
  place-items: center;
  background: rgba(255 255 255 / 0.7);
  transition: background 0.15s ease;
}
.option .checkbox { border-radius: 4px; }
.option .radio    { border-radius: 50%; }

.option.selected .checkbox::after {
  content: '';
  width: 9px; height: 9px;
  background: rgb(var(--deep-blue));
  border-radius: 2px;
}
.option.selected .radio::after {
  content: '';
  width: 9px; height: 9px;
  background: rgb(var(--deep-blue));
  border-radius: 50%;
}

.option-text {
  font-size: 0.9375rem;
  line-height: 1.4;
  color: rgb(var(--deep-blue));
}

.text-input,
.email-input,
.textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: rgb(var(--deep-blue));
  background: rgb(var(--background));
  border: 1px solid rgb(var(--border));
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease;
}
.text-input:focus,
.email-input:focus,
.textarea:focus {
  border-color: rgb(var(--deep-blue));
  background: rgba(255 255 255 / 0.7);
}
.textarea {
  min-height: 6rem;
  resize: vertical;
  font-family: var(--font-body);
}

/* Section nav */
.section-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
}
.section-nav .btn-secondary[hidden] { visibility: hidden; }

/* ==========================================================================
   Thanks
   ========================================================================== */

.thanks {
  max-width: 48rem;
  margin: 0 auto;
  padding: 6rem 2rem;
  animation: fadeUp 0.6s ease-out;
}
.thanks-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(var(--primary));
  margin: 0 0 1rem;
}
.thanks-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(2.25rem, 5.5vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: rgb(var(--deep-blue));
  margin: 0 0 1.5rem;
}
.thanks-body {
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgb(var(--deep-blue));
  margin: 0 0 1.25rem;
}
.thanks-meta {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: rgb(var(--muted-foreground));
  margin: 0.5rem 0 0;
}
.thanks-meta .check {
  color: rgb(var(--primary));
  margin-right: 0.5rem;
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .gates-section { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 2.5rem; min-height: 0; align-items: start; }
  .how-grid { grid-template-columns: 1fr; }
  .progress-step { padding: 0.75rem 0.5rem; }
  .progress-step .step-name { font-size: 0.75rem; }
  .spark { right: 0.75rem; top: auto; bottom: 1.25rem; }
}

@media (max-width: 640px) {
  .progress-step .step-name { display: none; }
  .shell, .survey-shell, .thanks { padding-left: 1.25rem; padding-right: 1.25rem; }
  .gate-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .q-card { padding: 1.25rem; }
}
