/* ═══════════════════════════════════════════════════════════════
   SANKALP AEI — Internship Application  |  style.css
   Sankalp AEI Design System v1 — Ink on Paper, neumorphic, restrained
═══════════════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────────────── */
:root {
  --ink:          #1A1A1A;
  --paper:        #F6F2E9;
  --paper-raised: #FCFAF3;
  --paper-3:      #EBE6DC;
  --shadow-rgb:   88,64,64;

  /* the one brand accent used throughout the UI */
  --sky:          #5697CF;
  --sky-rgb:      86,151,207;

  /* reserved strictly for validation / at-risk state — never decorative */
  --ember:        #F03F34;
  --ember-rgb:    240,63,52;

  --ink-90:  rgba(26,26,26,0.90);
  --ink-75:  rgba(26,26,26,0.75);
  --ink-60:  rgba(26,26,26,0.60);
  --ink-40:  rgba(26,26,26,0.40);
  --ink-15:  rgba(26,26,26,0.15);
  --ink-08:  rgba(26,26,26,0.08);

  --radius:     14px;
  --radius-sm:  10px;
  --radius-pill: 999px;

  --font-display: 'Bricolage Grotesque', sans-serif;
  --font-body:    'Inter', sans-serif;

  --transition: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);

  --neu-raised:    6px 6px 16px rgba(var(--shadow-rgb),0.14), -6px -6px 16px rgba(255,255,255,0.9);
  --neu-raised-lg: 9px 9px 22px rgba(var(--shadow-rgb),0.16), -9px -9px 22px rgba(255,255,255,0.95);
  --neu-raised-sm: 3px 3px 8px rgba(var(--shadow-rgb),0.12), -3px -3px 8px rgba(255,255,255,0.85);
  --neu-inset:     inset 3px 3px 8px rgba(var(--shadow-rgb),0.12), inset -3px -3px 8px rgba(255,255,255,0.7);
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
}

body {
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(var(--shadow-rgb),0.16) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--ink-15);
  border-radius: var(--radius-pill);
}

/* ── Nav ─────────────────────────────────────────────────────── */
#topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2.5rem;
  background: var(--paper-raised);
  box-shadow: 0 3px 12px rgba(var(--shadow-rgb),0.08);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.logo-mark-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.logo-text em {
  font-style: normal;
  color: var(--sky);
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--ink-60);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 6px rgba(var(--sky-rgb),0.5);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* ── Sections ────────────────────────────────────────────────── */
.fullscreen, .panel {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  padding: 6rem 2rem 4rem;
}

.panel-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Hero ────────────────────────────────────────────────────── */
#hero {
  flex-direction: column;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.2rem;
  background: var(--paper-raised);
  box-shadow: var(--neu-raised-sm);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-75);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pulse-ring {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 0 rgba(var(--sky-rgb),0.5);
  animation: pulseRing 2s infinite;
}

@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(var(--sky-rgb),0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(var(--sky-rgb),0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--sky-rgb),0); }
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.accent-text {
  color: var(--sky);
}

.hero-sub {
  max-width: 600px;
  font-size: 1.1rem;
  color: var(--ink-60);
  line-height: 1.7;
}

.hero-footnote {
  font-size: 0.78rem;
  color: var(--ink-40);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.cta-btn, .nav-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.cta-btn, .nav-btn.primary, .submit-btn {
  background: var(--ink);
  color: var(--paper-raised);
  box-shadow: var(--neu-raised);
}

.cta-btn:hover, .nav-btn.primary:hover, .submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--neu-raised-lg);
}

.nav-btn.secondary {
  background: var(--paper-raised);
  box-shadow: var(--neu-raised-sm);
  color: var(--ink-60);
}

.nav-btn.secondary:hover {
  color: var(--ink);
  box-shadow: var(--neu-raised);
}

.submit-btn {
  font-weight: 700;
}

/* ── Scroll indicator ────────────────────────────────────────── */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--ink-40);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ink-40), transparent);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Section tags (eyebrows) ─────────────────────────────────── */
.section-tag {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--sky);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
  color: var(--ink);
}

/* ── Neumorphic Card ─────────────────────────────────────────── */
.glass-card {
  background: var(--paper-raised);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--neu-raised);
  transition: all 0.4s var(--ease);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--neu-raised-lg);
}

/* ── About Cards ─────────────────────────────────────────────── */
.about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.about-card {
  padding: 2rem;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--ink);
}

.about-card p {
  font-size: 0.93rem;
  color: var(--ink-60);
  line-height: 1.65;
}

/* ── Roles Grid ──────────────────────────────────────────────── */
.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.role-card {
  padding: 1.8rem;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.role-badge {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.76rem;
  color: var(--sky);
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.role-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--ink);
}

.role-card p {
  font-size: 0.85rem;
  color: var(--ink-60);
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
}

.role-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.role-tags span {
  font-size: 0.72rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  color: var(--ink-75);
  font-family: var(--font-body);
  font-weight: 500;
}

/* ── Form Shell ──────────────────────────────────────────────── */
.form-shell {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

/* ── Progress Bar ────────────────────────────────────────────── */
.progress-bar-wrap {
  margin-bottom: 3rem;
}

.progress-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.pstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  cursor: default;
}

.pstep-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper-3);
  box-shadow: var(--neu-inset);
  transition: all 0.4s var(--ease);
}

.pstep.active .pstep-dot,
.pstep.done .pstep-dot {
  background: var(--sky);
  box-shadow: 0 0 0 3px rgba(var(--sky-rgb),0.18);
}

.pstep-label {
  font-size: 0.7rem;
  color: var(--ink-40);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.3s;
}

.pstep.active .pstep-label { color: var(--sky); }
.pstep.done .pstep-label  { color: var(--ink-60); }

.progress-track {
  height: 6px;
  background: var(--paper-3);
  box-shadow: var(--neu-inset);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--sky);
  border-radius: var(--radius-pill);
  width: 20%;
  transition: width 0.5s var(--ease);
}

/* ── Form Steps ──────────────────────────────────────────────── */
.form-step {
  display: none;
  animation: stepIn 0.5s var(--transition);
}

.form-step.active { display: block; }

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

.step-header {
  margin-bottom: 2.5rem;
}

.step-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--sky);
  letter-spacing: 0.14em;
  display: block;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.step-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.step-desc {
  color: var(--ink-60);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ── Field Group ─────────────────────────────────────────────── */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Questions are injected into a wrapper, so it repeats the group's spacing
   rather than collapsing all the fields against each other. */
#questionFields {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

/* ── Floating Label Fields ───────────────────────────────────── */
.field {
  position: relative;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--paper-3);
  border: none;
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-inset);
  padding: 1.15rem 1rem 0.6rem;
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--ink);
  outline: none;
  transition: all 0.3s var(--ease);
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  box-shadow: var(--neu-inset), 0 0 0 3px rgba(var(--sky-rgb),0.22);
}

.field:not(.question-field) label {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--ink-40);
  pointer-events: none;
  transition: all 0.25s var(--ease);
}

/* For textareas, label starts at top */
.field:not(.question-field):has(textarea) label {
  top: 1.15rem;
  transform: none;
}

.field:not(.question-field) input:not(:placeholder-shown) ~ label,
.field:not(.question-field) input:focus ~ label,
.field:not(.question-field) textarea:not(:placeholder-shown) ~ label,
.field:not(.question-field) textarea:focus ~ label {
  top: 0.4rem;
  transform: translateY(0);
  font-size: 0.7rem;
  color: var(--sky);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.field:not(.question-field):has(textarea) input:not(:placeholder-shown) ~ label,
.field:not(.question-field):has(textarea) input:focus ~ label { top: 0.4rem; }

/* Question Field Styles (non-floating static layout) */
.field.question-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.field.question-field textarea {
  padding: 0.8rem 1rem;
}

.q-prompt {
  display: block;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-line;
  font-weight: 500;
  cursor: text;
}

.q-number {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
  margin: 0;
}

.question-field .char-counter {
  position: static;
  display: block;
  text-align: right;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: var(--ink-40);
  font-family: var(--font-display);
  font-weight: 600;
}

.char-counter.near {
  color: var(--ember);
}

.avail-row.error .avail-label {
  color: var(--ember);
}

.avail-row.error .toggle-btn {
  box-shadow: var(--neu-raised-sm), 0 0 0 2px rgba(var(--ember-rgb), 0.25);
}

/* Expandable Review Card Q&A section */
.review-answers-section {
  margin-top: 1.5rem;
}

.answers-toggle-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper-raised);
  border: none;
  padding: 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--sky);
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-raised-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.answers-toggle-btn:hover {
  box-shadow: var(--neu-raised);
}

.review-answers-list {
  margin-top: 1rem;
  padding: 1.2rem;
  background: var(--paper-3);
  border-radius: var(--radius-sm);
  box-shadow: var(--neu-inset);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-height: 400px;
  overflow-y: auto;
}

.review-answers-list.hidden {
  display: none;
}

.review-qa-item {
  border-bottom: 1px solid var(--ink-08);
  padding-bottom: 0.8rem;
}

.review-qa-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.review-qa-q {
  font-size: 0.85rem;
  color: var(--ink-60);
  margin-bottom: 0.4rem;
  line-height: 1.4;
  /* Prompts carry their own line breaks, same as on the question card */
  white-space: pre-line;
}

.review-qa-a {
  font-size: 0.93rem;
  color: var(--ink);
  line-height: 1.5;
  white-space: pre-line;
}

.optional {
  font-size: 0.75em;
  color: var(--ink-40);
}

.char-counter {
  position: absolute;
  bottom: 0.5rem;
  right: 0.8rem;
  font-size: 0.7rem;
  color: var(--ink-40);
  font-family: var(--font-display);
  font-weight: 600;
  pointer-events: none;
}

/* ── Role Picker ─────────────────────────────────────────────── */
.role-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 1.6rem 1rem;
  background: var(--paper-raised);
  box-shadow: var(--neu-raised);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.35s var(--ease);
  text-align: center;
  overflow: hidden;
}

.pick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--neu-raised-lg);
}

.pick-card.selected {
  background: var(--paper-3);
  box-shadow: var(--neu-inset), 0 0 0 2px var(--sky);
  transform: translateY(0);
}

.pick-icon { font-size: 2rem; position: relative; z-index: 1; }
.pick-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  position: relative; z-index: 1;
}

.pick-check {
  position: absolute;
  top: 0.6rem; right: 0.6rem;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--sky);
  color: var(--paper-raised);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.3s var(--transition);
}

.pick-card.selected .pick-check {
  opacity: 1;
  transform: scale(1);
}

/* Already taken as the first choice — still legible, clearly not pickable */
.pick-card.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

.pick-card.disabled:hover {
  transform: none;
  box-shadow: var(--neu-raised);
}

/* ── Picker headings (first / second choice) ─────────────────── */
.picker-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-75);
}

.picker-heading.second { margin-top: 2.2rem; }

.picker-req,
.picker-opt {
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.picker-req { background: var(--ink-08); color: var(--ink-60); }
.picker-opt { background: rgba(var(--sky-rgb), 0.14); color: var(--sky); }

.picker-hint {
  flex-basis: 100%;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-40);
}

/* The optional picker sits visually subordinate to the required one */
.role-picker.secondary .pick-card { padding: 1.15rem 0.9rem; }
.role-picker.secondary .pick-icon { font-size: 1.5rem; }
.role-picker.secondary .pick-label { font-size: 0.82rem; }

/* ── Group headings inside steps 3 and 4 ─────────────────────── */
.q-group-heading {
  margin: 0.4rem 0 -0.4rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-60);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink-08);
}

.q-group-heading + .field,
.q-group-heading + .skill-row { margin-top: 0.4rem; }

/* ── Skill Sliders ───────────────────────────────────────────── */
.skill-sliders {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.skill-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.skill-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.skill-val {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--sky);
  min-width: 70px;
  text-align: right;
}

.skill-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--paper-3);
  box-shadow: var(--neu-inset);
  outline: none;
  cursor: pointer;
}

.skill-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: var(--neu-raised-sm);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.skill-slider::-webkit-slider-thumb:hover {
  box-shadow: var(--neu-raised);
}

.skill-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: var(--neu-raised-sm);
  cursor: pointer;
}

/* ── Availability Toggles ────────────────────────────────────── */
.avail-row { display: flex; flex-direction: column; gap: 0.8rem; }
.avail-label {
  font-size: 0.78rem;
  color: var(--ink-40);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.toggle-btn {
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--paper-raised);
  box-shadow: var(--neu-raised-sm);
  border: none;
  color: var(--ink-60);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.toggle-btn.active {
  background: var(--paper-3);
  box-shadow: var(--neu-inset), 0 0 0 2px var(--sky);
  color: var(--sky);
  font-weight: 600;
}

/* ── Review Card ─────────────────────────────────────────────── */
.review-card {
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.review-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--ink-08);
}

.review-row:last-child { border-bottom: none; }

.review-label {
  font-size: 0.72rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-40);
  min-width: 120px;
  padding-top: 0.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.review-value {
  font-size: 0.93rem;
  color: var(--ink);
  flex: 1;
  line-height: 1.5;
}

/* ── Checkbox ────────────────────────────────────────────────── */
.consent-row { margin-bottom: 1.2rem; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink-60);
  line-height: 1.5;
}

.checkbox-label input[type="checkbox"] { display: none; }

.checkbox-custom {
  width: 20px; height: 20px;
  min-width: 20px;
  border-radius: 6px;
  background: var(--paper-3);
  box-shadow: var(--neu-inset);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
  margin-top: 0.1rem;
}

.checkbox-custom::after {
  content: '✓';
  font-size: 0.8rem;
  color: var(--paper-raised);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s var(--ease);
}

.checkbox-label:has(input:checked) .checkbox-custom {
  background: var(--sky);
  box-shadow: var(--neu-raised-sm);
}

.checkbox-label:has(input:checked) .checkbox-custom::after {
  opacity: 1;
  transform: scale(1);
}

/* ── Form Nav ────────────────────────────────────────────────── */
.form-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  justify-content: flex-end;
  align-items: center;
}

/* ── Reveal Animation ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Success Overlay ─────────────────────────────────────────── */
#successOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(246,242,233,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 1;
  transition: opacity 0.4s;
}

#successOverlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.success-box {
  text-align: center;
  padding: 3.5rem 2.5rem;
  max-width: 500px;
  width: 90%;
  position: relative;
  overflow: hidden;
}

.success-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin: 0 auto 1.2rem;
  display: block;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1.2rem;
  animation: rocketLaunch 1s var(--transition) forwards;
  display: block;
}

@keyframes rocketLaunch {
  0%   { transform: translateY(0) rotate(0deg); }
  30%  { transform: translateY(10px) rotate(-10deg); }
  100% { transform: translateY(-20px) rotate(45deg); opacity: 0.8; }
}

.success-box h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
  color: var(--ink);
}

.success-box p {
  color: var(--ink-60);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ── Confetti ────────────────────────────────────────────────── */
.confetti-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti-particle {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 2px;
  animation: confettiFall var(--dur, 1.5s) var(--delay, 0s) var(--ease) forwards;
}

@keyframes confettiFall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(300px) rotate(720deg); opacity: 0; }
}

/* ── Shake (validation error) ────────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}

.shake { animation: shake 0.4s var(--ease); }

.field.error input,
.field.error textarea {
  box-shadow: var(--neu-inset), 0 0 0 3px rgba(var(--ember-rgb),0.25);
}

/* ── Referral row ────────────────────────────────────────────── */
.referral-row { margin-top: 1rem; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .role-picker { grid-template-columns: 1fr 1fr; }
  .hero-headline { font-size: 2.4rem; }
  #topnav { padding: 1rem 1.2rem; }
  .form-nav { flex-wrap: wrap; justify-content: center; }
  .nav-btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
  .role-picker { grid-template-columns: 1fr; }
  .progress-steps { gap: 0.2rem; }
  .pstep-label { font-size: 0.6rem; }
}

/* ── Submit failure notice (Firestore write errors) ─────────── */
.submit-error {
  margin: 0 0 1rem;
  padding: 0.85rem 1.1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ember);
  background: rgba(var(--ember-rgb), 0.08);
  border-radius: var(--radius-sm);
  text-align: center;
}

/* ── Applicant auth gate (welcome → verify → apply) ─────────── */
.apply-gate {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 2.5rem;
  text-align: center;
  background: var(--paper-raised);
  border-radius: var(--radius);
  box-shadow: var(--neu-raised-lg);
}

.apply-gate .gate-mark {
  font-size: 2.25rem;
  color: var(--sky);
  margin-bottom: 1rem;
}

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.gate-copy {
  color: var(--ink-60);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}

.gate-error {
  margin-top: 1.25rem;
  color: var(--ember);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ── Signed-in applicant bar ────────────────────────────────── */
.applicant-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
  padding: 0.6rem 0.9rem;
  background: var(--paper-3);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  color: var(--ink-60);
}

.applicant-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  /* Google avatars are arbitrary photos — a hairline keeps light ones
     from bleeding into the pill behind them. */
  box-shadow: 0 0 0 1px var(--ink-15);
}

.applicant-meta strong { color: var(--ink); font-weight: 600; }

.applicant-signout {
  margin-left: auto;
  font: inherit;
  color: var(--sky);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.2rem;
}

/* A verified field is displayed, not edited. */
.field.locked input {
  color: var(--ink-60);
  cursor: default;
}
.field.locked::after {
  content: '✓ verified';
  position: absolute;
  right: 0;
  top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sky);
}

/* ═══════════════════════════════════════════════════════════════
   LANDING REFINEMENTS
   Layered after the base rules so the originals stay readable.
═══════════════════════════════════════════════════════════════ */

/* ── Hero ───────────────────────────────────────────────────── */
.hero-headline {
  /* Three deliberate lines: the turn lands on "We measure it." */
  text-wrap: balance;
  margin-bottom: 1.5rem;
}

.hero-sub {
  max-width: 34ch;
  margin-inline: auto;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
}

.cta-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-60);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink-15);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.cta-link:hover { color: var(--sky); border-color: var(--sky); }

.hero-facts {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  list-style: none;
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--ink-60);
}

.hero-facts strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  /* Figures sit next to each other across the row — keep them even. */
  font-variant-numeric: tabular-nums;
}

/* ── Section lede ───────────────────────────────────────────── */
.section-title { margin-bottom: 1rem; }

.section-lede {
  max-width: 56ch;
  margin-bottom: 2.75rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-60);
  text-wrap: pretty;
}

/* ── About cards ────────────────────────────────────────────── */
.card-index {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--sky);
  margin-bottom: 1.25rem;
}

/* ── Roles grid ─────────────────────────────────────────────── */
/* Five cards in a 3-up grid leave an orphan row. Flex with a fixed basis
   centres the remainder instead of stretching two cards across the width. */
.roles-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.roles-grid .role-card {
  flex: 1 1 300px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

.role-card h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  margin-bottom: 0.7rem;
}

.role-card p {
  font-weight: 400;
  line-height: 1.65;
  /* Push the tags to the bottom so they align across uneven copy. */
  flex: 1 1 auto;
  margin-bottom: 1.25rem;
}

/* ── How-it-works strip ─────────────────────────────────────── */
.how-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  list-style: none;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--ink-08);
}

.how-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-bottom: 0.9rem;
  border-radius: 50%;
  background: var(--paper-3);
  box-shadow: var(--neu-raised-sm);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sky);
}

.how-strip h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.how-strip p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-60);
  text-wrap: pretty;
}

@media (max-width: 640px) {
  .hero-actions { gap: 1rem; }
  .hero-facts   { gap: 0.4rem 1.25rem; }
  .how-strip    { margin-top: 3rem; gap: 1.75rem; }
}

/* ── Anchor + hero spacing corrections ──────────────────────── */

/* The nav is fixed, so an anchor jump (#roles, #apply) would otherwise
   land with the section title tucked underneath it. */
#hero, #roles, #apply { scroll-margin-top: 88px; }

.hero-sub { max-width: 48ch; }

/* Keep the facts row clear of the scroll indicator pinned to the bottom. */
.hero-facts { margin-bottom: 3.5rem; }

@media (max-width: 640px) {
  #hero, #roles, #apply { scroll-margin-top: 72px; }
  .hero-facts { margin-bottom: 2.5rem; }
}

/* ── /registrations ─────────────────────────────────────────── */

/* The form page has no hero to snap through. */
.registrations-body { scroll-snap-type: none; }
html:has(.registrations-body) { scroll-snap-type: none; }

.registrations-body [hidden] { display: none !important; }

.reg-loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1.25rem;
  color: var(--ink-60);
  font-size: 0.9rem;
}

.reg-spinner {
  width: 26px;
  height: 26px;
  border: 2px solid var(--ink-15);
  border-top-color: var(--sky);
  border-radius: 50%;
  animation: regSpin 0.7s linear infinite;
}

@keyframes regSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .reg-spinner { animation-duration: 2s; }
}

/* The nav logo is a link on /registrations — keep it looking like text. */
a.nav-logo { text-decoration: none; color: inherit; }

/* ── Landing "welcome back" card ────────────────────────────── */
.gate-alt {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--ink-60);
}

.linklike {
  font: inherit;
  color: var(--sky);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

/* An <a> styled as the primary button needs the inline-flex box back. */
a.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* The hero paragraph is a full sentence pair now — a narrow column would
   stack it into a tall block and cost the headline its impact. */
.hero-sub { max-width: 62ch; }
