/* Afterglow Talent · Recipe R3 Midnight Indigo
   Dusk-gradient hero only (no blobs, no glass); light day sections below. */

:root {
  --dusk-1: #110D45;
  --dusk-2: #1B0F5A;
  --dusk-3: #2A0B5E;
  --dusk: linear-gradient(180deg, var(--dusk-1), var(--dusk-2) 60%, var(--dusk-3));
  --day: #F7F6F2;
  --day-2: #EFEDE6;
  --card: #FFFFFF;
  --ink: #15123F;
  --ink-2: #3A3760;
  --muted: #625F7D;          /* 5.6:1 on --day (recipe's #77748F is 4.1:1, too light for body text) */
  --rule: rgba(21, 18, 63, .14);
  --rule-strong: rgba(21, 18, 63, .28);
  --link: #3B4FD8;
  --blue: #4C6EF5;
  --violet: #8B3FD9;
  --rose: #E04FB3;
  --cream: #F7F3EA;
  --on-dusk: #FFFFFF;
  --on-dusk-muted: rgba(255, 255, 255, .74);
  --accent: linear-gradient(90deg, var(--blue), var(--violet));
  --horizon: linear-gradient(90deg, var(--blue), var(--violet) 55%, var(--rose));
  --error: #B4232F;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --wrap: 1240px;
  --gutter: 20px;
  --top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 8px); }
body {
  margin: 0;
  background: var(--day);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ol, ul, dl, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(76, 110, 245, .22); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-left)) 0 max(var(--gutter), env(safe-area-inset-right)); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cream); color: var(--ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------- Pills (the only button shape) ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; user-select: none; touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 200ms var(--ease-out), border-color 200ms var(--ease-out), color 200ms var(--ease-out);
}
.pill:active { transform: scale(.97); }
.pill--sm { min-height: 40px; padding: 0 18px; font-size: .7rem; }
.pill--cream { background: var(--cream); color: var(--dusk-1); }
.pill--ghost { border-color: rgba(255, 255, 255, .7); color: var(--on-dusk); background: transparent; }
.pill--ink { background: var(--ink); color: var(--cream); }
.pill[disabled] { opacity: .6; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .pill--cream:hover { background: #FFFFFF; }
  .pill--ghost:hover { border-color: #FFFFFF; background: rgba(255, 255, 255, .08); }
  .pill--ink:hover { background: var(--dusk-2); }
}

/* ---------- Eyebrows: gradient dash + spaced caps ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: .72rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow::before { content: ""; flex: none; width: 36px; height: 2px; background: var(--horizon); border-radius: 2px; }
.eyebrow--light { color: var(--on-dusk-muted); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: var(--dusk-1); color: var(--on-dusk); padding-top: env(safe-area-inset-top); }
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--top-h); }
.logo { display: inline-flex; align-items: baseline; gap: 8px; color: inherit; text-decoration: none; }
.logo__sun { width: 30px; height: 22px; align-self: center; color: var(--cream); }
.logo__name { font-family: var(--serif); font-size: 1.6rem; line-height: 1; letter-spacing: -.01em; }
.logo__sub { font-size: .62rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; opacity: .78; }
.logo--ink { color: var(--ink); }
.logo--ink .logo__sun { color: var(--ink); }

.top__end { display: flex; align-items: center; gap: 8px; }
.top__menu {
  min-height: 40px; padding: 0 14px; border: 0; background: none; color: var(--on-dusk);
  font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; touch-action: manipulation;
}
.nav {
  position: absolute; left: 0; right: 0; top: 100%;
  display: grid; padding: 8px var(--gutter) 20px;
  background: var(--dusk-1); border-top: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 30px rgba(17, 13, 69, .35);
  opacity: 0; transform: translateY(-6px); visibility: hidden; pointer-events: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s linear 180ms;
}
.nav a { padding: 14px 0; color: var(--on-dusk); text-decoration: none; font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.top.is-open .nav { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }

@media (min-width: 1024px) {
  .top__menu { display: none; }
  .nav {
    position: static; display: flex; gap: 36px; padding: 0; background: none; border: 0; box-shadow: none;
    opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: none;
  }
  .nav a { padding: 6px 0; border: 0; font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dusk-muted); transition: color 160ms var(--ease-out); }
  .top__row { height: 76px; }
  :root { --top-h: 76px; }
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: #FFFFFF; }
}

/* ---------- Hero (dusk) ---------- */
.hero {
  position: relative;
  background: var(--dusk);
  color: var(--on-dusk);
  padding: 44px 0 0;
}
.hero::after { /* the horizon: a single gradient hairline where dusk meets day */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--horizon);
}
.hero__title {
  margin-top: 22px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3rem, 12.5vw, 8.4rem); line-height: .98; letter-spacing: -.02em;
  max-width: 13ch;
}
.hero__lead { margin-top: 24px; max-width: 38rem; color: var(--on-dusk-muted); font-size: 1rem; }
.hero__actions { margin-top: 30px; display: grid; gap: 12px; }
.horizon { margin-top: 48px; display: grid; border-top: 1px solid rgba(255, 255, 255, .16); }
.horizon li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--serif); font-size: 1.35rem; line-height: 1.2;
}
.horizon li:last-child { border-bottom: 0; padding-bottom: 22px; }
.horizon span { font-family: var(--sans); font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--on-dusk-muted); }

@media (min-width: 640px) {
  .hero__actions { display: flex; flex-wrap: wrap; }
}
@media (min-width: 1024px) {
  .hero { padding-top: 96px; }
  .hero__title { margin-top: 30px; font-size: clamp(5.5rem, 8.2vw, 9.25rem); max-width: 12ch; }
  .hero__lead { margin-top: 32px; font-size: 1.08rem; }
  .hero__actions { margin-top: 40px; }
  .horizon { margin-top: 96px; grid-template-columns: repeat(3, 1fr); }
  .horizon li { flex-direction: column; gap: 10px; padding: 26px 32px 34px; border-bottom: 0; border-left: 1px solid rgba(255, 255, 255, .12); font-size: 1.7rem; }
  .horizon li:first-child { padding-left: 0; border-left: 0; }
  .horizon li:last-child { padding-bottom: 34px; }
}

/* One entrance on load (hero only). Nothing animates on scroll. */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.enter { animation: rise 640ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .enter { animation-name: fade; animation-duration: 300ms; }
  .nav { transform: none !important; }
  .pill:active { transform: none; }
}

/* ---------- Sections (day) ---------- */
.section { padding: 72px 0; }
.section--tint { background: var(--day-2); }
.sec-head { display: grid; gap: 16px; max-width: 44rem; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 8vw, 4.2rem); line-height: 1.02; letter-spacing: -.015em; }
.sec-head p:not(.eyebrow) { color: var(--muted); }
@media (min-width: 1024px) {
  .section { padding: 120px 0; }
}

/* Services: a list with thin oversized numerals */
.services { margin-top: 44px; border-top: 1px solid var(--rule-strong); }
.services li {
  display: grid; grid-template-columns: 64px 1fr; column-gap: 16px; row-gap: 6px;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.services__no {
  grid-row: span 2;
  font-family: var(--serif); font-size: 4.4rem; line-height: .8; font-weight: 400;
  background: var(--accent); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.services h3 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; line-height: 1.1; }
.services p { color: var(--muted); }
@media (min-width: 768px) {
  .services li { grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.4fr); column-gap: 32px; align-items: start; padding: 34px 0; }
  .services__no { grid-row: auto; font-size: 7rem; margin-top: -4px; }
  .services h3 { font-size: 2.2rem; padding-top: 6px; }
  .services p { padding-top: 10px; }
}
@media (min-width: 1280px) {
  .services { margin-top: 64px; }
  .services li { grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 48px; }
  .services__no { font-size: 8.5rem; }
  .services h3 { font-size: 2.6rem; }
}

/* Timeline: vertical on phones, horizontal from 1024px */
.timeline { margin-top: 44px; position: relative; display: grid; gap: 34px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--blue), var(--violet) 55%, var(--rose)); border-radius: 2px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -30px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--day-2); border: 2px solid var(--violet); }
.timeline__day { font-size: .72rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase; color: var(--violet); }
.timeline h3 { margin-top: 6px; font-family: var(--serif); font-weight: 400; font-size: 1.7rem; line-height: 1.15; }
.timeline li > p:last-child { margin-top: 8px; color: var(--muted); font-size: .95rem; }
@media (min-width: 1024px) {
  .timeline { margin-top: 72px; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; padding: 34px 0 0; }
  .timeline::before { left: 0; right: 0; top: 5px; bottom: auto; width: auto; height: 2px; background: var(--horizon); }
  .timeline li::before { left: 0; top: -34px; }
  .timeline h3 { font-size: 1.65rem; }
}
@media (min-width: 1440px) {
  .timeline { gap: 44px; }
  .timeline h3 { font-size: 1.9rem; }
  .timeline li > p:last-child { font-size: 1rem; }
}

/* Terms: a plain two-column table */
.terms { margin-top: 44px; width: 100%; border-collapse: collapse; border-top: 1px solid var(--rule-strong); }
.terms th, .terms td { padding: 20px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.terms th {
  width: 36%; padding-right: 16px;
  font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); line-height: 1.6; padding-top: 24px;
}
.terms td { color: var(--ink-2); }
@media (min-width: 768px) {
  .terms { margin-top: 56px; }
  .terms th { width: 30%; padding-top: 30px; }
  .terms td { padding: 24px 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.3; color: var(--ink); }
}
@media (min-width: 1280px) {
  .terms th { width: 28%; }
  .terms td { font-size: 1.85rem; }
}

/* Questions: always open */
.qa { margin-top: 44px; display: grid; border-top: 1px solid var(--rule-strong); }
.qa__item { padding: 24px 0; border-bottom: 1px solid var(--rule); }
.qa__item h3 { font-family: var(--serif); font-weight: 400; font-size: 1.55rem; line-height: 1.15; }
.qa__item p { margin-top: 8px; color: var(--muted); }
@media (min-width: 768px) {
  .qa { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .qa__item { padding: 30px 0; }
}
@media (min-width: 1280px) {
  .qa { column-gap: 96px; }
  .qa__item h3 { font-size: 1.8rem; }
}

/* ---------- Apply ---------- */
.apply__grid { display: grid; gap: 36px; }
.apply__intro { display: grid; gap: 16px; align-content: start; }
.apply__intro h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 8vw, 4.2rem); line-height: 1.02; letter-spacing: -.015em; }
.apply__intro p:not(.eyebrow) { color: var(--muted); max-width: 30rem; }
.apply__alt { font-size: .92rem; overflow-wrap: anywhere; }

.form { background: var(--card); border: 1px solid var(--rule); padding: 24px 20px; }
.form__grid { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.field .opt { letter-spacing: .04em; text-transform: none; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font-size: 16px; line-height: 1.4; background: var(--day); border: 1px solid var(--rule-strong); border-radius: 0;
  transition: border-color 160ms var(--ease-out), background-color 160ms var(--ease-out);
  -webkit-appearance: none; appearance: none;
}
.field select {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); background-color: #FFFFFF; box-shadow: 0 0 0 3px rgba(76, 110, 245, .18); }
.field [aria-invalid="true"] { border-color: var(--error); }
.tel { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }

.checks { margin-top: 22px; display: grid; gap: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--violet); }
.check.is-invalid span { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form__error { margin-top: 18px; padding: 12px 14px; border-left: 3px solid var(--error); background: #FBEFF0; color: var(--error); font-size: .92rem; font-weight: 500; }
.form__submit { margin-top: 22px; display: grid; gap: 12px; }
.form__submit .pill { width: 100%; }
.form__submit p { font-size: .82rem; color: var(--muted); }

.form.is-sent .form__grid, .form.is-sent .checks, .form.is-sent .form__error, .form.is-sent .form__submit { display: none; }
.form__done { display: grid; gap: 10px; justify-items: start; padding: 12px 0; outline: none; }
.form__done svg { width: 48px; height: 36px; color: var(--ink); }
.form__done h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.form__done p { color: var(--muted); }

@media (min-width: 640px) {
  .form { padding: 32px; }
  .form__grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .field--wide { grid-column: 1 / -1; }
  .form__submit { grid-template-columns: auto 1fr; align-items: center; gap: 20px; }
  .form__submit .pill { width: auto; }
}
@media (min-width: 1024px) {
  .apply__grid { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 64px; }
  .apply__intro { position: sticky; top: calc(var(--top-h) + 32px); }
  .form { padding: 40px; }
}
@media (min-width: 1440px) {
  .apply__grid { gap: 120px; }
}

/* ---------- Footer (day) ---------- */
.foot { padding: 56px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule-strong); }
.foot__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot__cols { margin-top: 40px; display: grid; gap: 28px; }
.foot__cols div { display: grid; gap: 8px; justify-items: start; align-content: start; }
.foot__cols h2 { font-size: .68rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.foot__cols a { color: var(--ink); text-decoration: none; font-size: .95rem; overflow-wrap: anywhere; }
.foot__legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule); font-size: .82rem; color: var(--muted); }
@media (min-width: 768px) {
  .foot__cols { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 96px; }
}
@media (min-width: 1024px) {
  .foot { padding-top: 80px; }
}
@media (hover: hover) and (pointer: fine) {
  .foot__cols a:hover { color: var(--link); text-decoration: underline; }
}

/* ---------- Legal pages + 404 ---------- */
.legal { padding: 56px 0 96px; }
.legal__body { max-width: 44rem; }
.legal h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 10vw, 4.8rem); line-height: 1; letter-spacing: -.015em; }
.legal .updated { margin-top: 12px; font-size: .85rem; color: var(--muted); }
.legal h2 { margin-top: 40px; font-family: var(--serif); font-weight: 400; font-size: 1.8rem; line-height: 1.15; }
.legal p, .legal li { margin-top: 12px; color: var(--ink-2); }
.legal ul { padding-left: 1.2em; list-style: disc; }

.lost { min-height: 100svh; display: grid; align-content: center; gap: 22px; padding: 48px max(var(--gutter), 6vw); background: var(--dusk); color: var(--on-dusk); }
.lost h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(5rem, 22vw, 14rem); line-height: .9; }
.lost p { max-width: 32rem; color: var(--on-dusk-muted); }

/* Small phones (360px): tighten the header so logo, Apply and Menu fit on one row */
@media (max-width: 399px) {
  .top__row { gap: 8px; }
  .logo { gap: 6px; }
  .logo__sun { width: 26px; height: 19px; }
  .logo__name { font-size: 1.4rem; }
  .logo__sub { letter-spacing: .2em; }
  .top__end { gap: 2px; }
  .top .pill--sm { padding: 0 14px; letter-spacing: .16em; }
  .top__menu { padding: 0 8px; letter-spacing: .16em; }
}

[hidden] { display: none !important; }
