/* /apply router form — scoped styles */

.apply-hero {
  background: var(--near-black);
  color: var(--paper);
  padding: 160px 6vw 80px;
  position: relative;
  overflow: hidden;
}
.apply-hero .drift {
  position: absolute;
  inset: -20% -20%;
  background:
    radial-gradient(ellipse 50% 45% at 30% 50%, rgba(153, 41, 147, 0.28), transparent 65%),
    radial-gradient(ellipse 40% 35% at 75% 60%, rgba(224, 95, 184, 0.18), transparent 65%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}
.apply-hero .grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}
.apply-hero .inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.apply-hero .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 24px;
}
.apply-hero h1 {
  /* CDO sizing pass 2026-05-12: dialed back from clamp(72, 12vw, 180) so the
     form's first field peeks above the fold on typical desktop resolutions.
     Confident-but-not-overwhelming range. */
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin-bottom: 24px;
  color: var(--paper);
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}
.apply-hero .lead {
  font-size: 18px;
  color: rgba(245, 245, 240, 0.7);
  line-height: 1.5;
  margin-bottom: 16px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.apply-hero .context {
  font-size: 13px;
  color: rgba(245, 245, 240, 0.45);
  letter-spacing: 0.02em;
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

.apply-form-section {
  background: var(--bg);
  color: var(--fg);
  padding: 80px 6vw 120px;
  display: flex;
  justify-content: center;
}

#apply-form {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

#apply-form .hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.q { border: none; padding: 0; margin: 0; }

.q legend {
  display: block;
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin-bottom: 16px;
  padding: 0;
  line-height: 1.4;
}
.q legend .num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--magenta);
  background: rgba(153, 41, 147, 0.08);
  padding: 2px 8px;
  border-radius: 100px;
  margin-right: 10px;
  letter-spacing: 0.04em;
  vertical-align: 2px;
}
.q legend .optional {
  font-weight: 400;
  color: var(--fg-tertiary);
  font-size: 14px;
}

.q label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid rgba(9, 10, 11, 0.12);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 15px;
  color: var(--fg);
  line-height: 1.4;
}
.q label:hover {
  border-color: rgba(9, 10, 11, 0.25);
  background: rgba(9, 10, 11, 0.02);
}
.q label:has(input:checked) {
  border-color: var(--magenta);
  background: rgba(153, 41, 147, 0.04);
}

.q input[type="radio"] {
  accent-color: var(--magenta);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.q.q-2 .other-row { gap: 8px; flex-wrap: wrap; }
.q.q-2 .other-row input[type="text"] {
  flex: 1;
  min-width: 0;
  border: none;
  border-bottom: 1px solid rgba(9, 10, 11, 0.2);
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
  color: var(--fg);
}
.q.q-2 .other-row input[type="text"]:disabled { opacity: 0.3; }
.q.q-2 .other-row input[type="text"]:focus { border-bottom-color: var(--magenta); }

.q-contact { display: flex; flex-direction: column; gap: 10px; }

#first_name,
#email {
  width: 100%;
  border: 1px solid rgba(9, 10, 11, 0.12);
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  color: var(--fg);
  background: #fff;
}
#first_name:hover,
#email:hover { border-color: rgba(9, 10, 11, 0.25); }
#first_name:focus,
#email:focus { border-color: var(--magenta); background: rgba(153, 41, 147, 0.02); }

/* All textareas inside any .q fieldset get the same look. Used by:
   - /apply (q6_notes, .q.q-6)
   - /bootcamp/apply waitlist branches (ship_goal, .q.q-ship)
   - /course/<slug>/waitlist (ship_goal, .q.q-ship) */
.q textarea {
  width: 100%;
  border: 1px solid rgba(9, 10, 11, 0.12);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color 0.15s;
  color: var(--fg);
  min-height: 60px;
  background: #fff;
}
.q textarea:hover { border-color: rgba(9, 10, 11, 0.25); }
.q textarea:focus { border-color: var(--magenta); background: rgba(153, 41, 147, 0.02); }
.q textarea::placeholder { color: rgba(9, 10, 11, 0.35); }

.cf-turnstile { margin: 0; }

.actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  padding-top: 8px;
}

#submit-btn {
  background: var(--near-black);
  color: var(--paper);
  border: none;
  border-radius: 100px;
  padding: 18px 40px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, opacity 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  justify-content: center;
  letter-spacing: -0.005em;
}
#submit-btn:hover:not(:disabled) { background: var(--magenta); }
#submit-btn:active:not(:disabled) { transform: translateY(1px); }
#submit-btn:disabled { opacity: 0.35; cursor: not-allowed; }
#submit-btn.loading .label::after { content: '…'; margin-left: 2px; }
#submit-btn.loading .arrow { display: none; }

.actions .micro {
  font-size: 13px;
  color: var(--fg-tertiary);
  text-align: center;
  letter-spacing: 0;
}

.form-error {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  padding: 16px 20px;
  color: rgb(180, 30, 30);
}
.form-error .msg { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-error button {
  background: var(--near-black);
  color: var(--paper);
  border: none;
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.form-error .ref {
  margin-top: 8px;
  font-size: 12px;
}
.form-error .ref code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.privacy {
  font-size: 12px;
  color: var(--fg-tertiary);
  line-height: 1.6;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
  padding-top: 8px;
}
.privacy a {
  color: var(--magenta);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Result page — shares some styles with hero */

.result-hero {
  background: var(--near-black);
  color: var(--paper);
  padding: 160px 6vw 100px;
  position: relative;
  overflow: hidden;
  min-height: 70vh;
  display: flex;
  align-items: center;
}
.result-hero .drift {
  position: absolute;
  inset: -20% -20%;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(153, 41, 147, 0.25), transparent 65%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 1;
}
.result-hero .inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}
.result-hero .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 24px;
}
.result-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--paper);
}
.result-hero .why {
  font-size: 17px;
  color: rgba(245, 245, 240, 0.7);
  line-height: 1.55;
  max-width: 540px;
  margin: 0 auto 40px;
}
.result-hero .actions {
  display: flex;
  gap: 16px;
  flex-direction: column;
  align-items: center;
}
.result-hero .primary {
  background: var(--paper);
  color: var(--near-black);
  padding: 18px 40px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  min-width: 280px;
  text-align: center;
  letter-spacing: -0.005em;
}
.result-hero .primary:hover {
  background: var(--pink);
  color: var(--paper);
}
.result-hero .secondary {
  font-size: 14px;
  color: rgba(245, 245, 240, 0.55);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.result-hero .secondary:hover {
  color: var(--paper);
}
.result-hero .micro {
  font-size: 13px;
  color: rgba(245, 245, 240, 0.4);
  margin-top: 32px;
  line-height: 1.6;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .apply-hero { padding: 100px 24px 48px; }
  .apply-hero h1 { font-size: clamp(34px, 9vw, 44px); }
  .apply-hero .eyebrow { font-size: 10px; letter-spacing: 0.22em; }
  .apply-hero .lead { font-size: 16px; }
  .apply-hero .context { font-size: 12px; }
  .apply-form-section { padding: 48px 24px 80px; }
  #apply-form { gap: 36px; }
  .q label { padding: 12px 14px; font-size: 14px; }
  .q legend { font-size: 15px; }
  /* .q-contact already stacks vertically — nothing extra needed on mobile */
  .result-hero { padding: 120px 24px 80px; }
  .result-hero h1 { font-size: clamp(32px, 7vw, 44px); }
  .result-hero .primary { padding: 16px 32px; min-width: 260px; }
}
