/* ---------- Tokens ---------- */
:root {
  --night: #12143A;      /* lockdown night sky */
  --dusk: #2A2160;       /* the hour before dawn */
  --marigold: #F4B23E;   /* a lit window, the light we bring */
  --rose: #E9857A;       /* first light */
  --dawn: #F2F1FA;       /* morning, cool and clear */
  --ink: #1E1C3F;        /* text on dawn */
  --mist: #C8C7E8;       /* text on night */
  --muted-dawn: #55537A;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;

  /* Type scale, ratio ~1.333 */
  --s-1: 0.875rem;
  --s0: 1.0625rem;
  --s1: 1.375rem;
  --s2: 1.875rem;
  --s3: 2.5rem;
  --s4: clamp(2.5rem, 6.4vw, 5.25rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 38rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--s0);
  line-height: 1.6;
  color: var(--mist);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 3px solid var(--marigold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--marigold); color: var(--night); padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: .9rem var(--gutter);
  transition: background .3s, color .3s, box-shadow .3s;
  color: #fff;
}
.topbar.is-scrolled { background: rgba(18, 20, 58, .82); backdrop-filter: blur(10px); }
.topbar.is-day { background: rgba(242, 241, 250, .88); color: var(--ink); box-shadow: 0 1px 0 rgba(30, 28, 63, .08); }
.wordmark { font-family: var(--display); font-weight: 800; text-decoration: none; font-size: 1.125rem; }
.topbar nav { display: flex; gap: 1.5rem; align-items: center; }
.topbar nav a { text-decoration: none; font-size: var(--s-1); }
.topbar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.nav-cta { border: 1.5px solid currentColor; border-radius: 999px; padding: .4rem .9rem; }
@media (max-width: 640px) {
  .topbar nav a:not(.nav-cta) { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.4rem; border-radius: 999px;
  font-weight: 700; text-decoration: none; font-size: var(--s0);
  transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-lit { background: var(--marigold); color: var(--night); box-shadow: 0 0 0 0 rgba(244, 178, 62, .5); }
.btn-lit:hover { box-shadow: 0 0 32px 4px rgba(244, 178, 62, .45); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, .45); }
.btn-ghost:hover { border-color: #fff; }
.btn-ink { color: var(--ink); border: 1.5px solid var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-start;
  background: radial-gradient(120% 80% at 70% 0%, #1D2052 0%, var(--night) 60%);
}
#city { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-copy {
  position: relative; z-index: 2;
  max-width: 72rem; width: 100%; margin: 0 auto;
  padding: clamp(6.5rem, 16vh, 10rem) var(--gutter) 2rem;
  pointer-events: none;
}
.hero-copy a { pointer-events: auto; }
.hero-intro { color: var(--marigold); font-family: var(--display); font-weight: 600; font-size: var(--s1); margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); font-weight: 600; line-height: 1.15; color: #fff; max-width: 20ch; text-shadow: 0 2px 24px rgba(18, 20, 58, .6); }
.hero h1 .line { display: block; }
.hero h1 .line-lit {
  color: var(--marigold);
  text-shadow: 0 0 40px rgba(244, 178, 62, .35);
}
.hero-sub { font-size: var(--s0); line-height: 1.6; max-width: 44ch; margin-top: 1.5rem; color: #fff; text-shadow: 0 1px 12px rgba(13, 15, 46, .95), 0 0 2px rgba(13, 15, 46, .9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-hint {
  position: absolute; z-index: 2; right: var(--gutter); bottom: 1.25rem; margin: 0;
  font-size: var(--s-1); color: #fff; background: rgba(13, 15, 46, .7);
  padding: .3rem .7rem; border-radius: 999px;
}

/* One gentle fade on load, nothing more. */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { opacity: 0; animation: fade-in 1s ease forwards; }
  .hero-copy > :nth-child(2) { animation-delay: .15s; }
  .hero-copy > :nth-child(3), .hero-copy > :nth-child(4) { animation-delay: .35s; }
}
@keyframes fade-in { to { opacity: 1; } }

/* ---------- Story ---------- */
.story { padding: clamp(5rem, 12vw, 9rem) 0; background: var(--night); }
.story-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.kicker { color: var(--marigold); font-weight: 700; margin-bottom: .75rem; }
.story h2 { font-size: var(--s3); color: #fff; margin-bottom: 1.5rem; max-width: 18ch; }
.story-text p { max-width: var(--measure); }
.story-lesson { font-size: var(--s1); line-height: 1.45; color: #fff; margin-top: 1.5rem; padding-left: 1.25rem; border-left: 3px solid var(--marigold); }

.flow { list-style: none; margin: 0; padding: 0; position: relative; }
.flow::before {
  content: ""; position: absolute; left: 1.375rem; top: 1.5rem; bottom: 1.5rem; width: 2px;
  background: linear-gradient(var(--marigold), rgba(244, 178, 62, .15));
}
.flow li { position: relative; display: flex; gap: 1.25rem; align-items: center; padding: .9rem 0; }
.flow-step {
  flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--night); border: 2px solid var(--marigold); color: var(--marigold);
  font-family: var(--display); font-weight: 800;
}
.flow li:last-child .flow-step { background: var(--marigold); color: var(--night); box-shadow: 0 0 24px rgba(244, 178, 62, .5); }
.flow strong { display: block; color: #fff; font-size: 1.125rem; }
.flow span:not(.flow-step) { color: var(--mist); font-size: var(--s-1); }

/* ---------- Belief ---------- */
.belief { padding: clamp(4rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem); background: linear-gradient(var(--night), var(--dusk)); }
.belief-grid { display: grid; grid-template-columns: minmax(180px, 300px) 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.belief p { max-width: var(--measure); }
.belief-quote { font-size: var(--s2); color: #fff; margin-bottom: 1.25rem; }

.portrait { position: relative; margin: 0; aspect-ratio: 1; border-radius: 50% 50% 12px 12px; overflow: hidden; background: #2F2A6E; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 4rem; color: var(--marigold);
}
.portrait.has-photo .portrait-fallback { display: none; }
.portrait::after { /* warm window-light rim */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 2px rgba(244, 178, 62, .6);
  pointer-events: none;
}

/* ---------- Sunrise ---------- */
.sunrise {
  position: relative; height: clamp(14rem, 38vh, 22rem); overflow: hidden;
  background: linear-gradient(var(--dusk) 0%, #6A3A78 35%, var(--rose) 70%, #F6C9A8 88%, var(--dawn) 100%);
}
.sun {
  --rise: 0;
  position: absolute; left: 50%; bottom: 18%;
  width: clamp(9rem, 22vw, 15rem); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #FFE3A3 0%, var(--marigold) 55%, rgba(244, 178, 62, 0) 72%);
  transform: translate(-50%, calc((1 - var(--rise)) * 70%));
}
.horizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(rgba(242, 241, 250, 0), var(--dawn) 60%);
}

/* ---------- Day sections ---------- */
.work, .journey, .toolkit, .contact { background: var(--dawn); color: var(--ink); }
.work h2, .journey h2, .toolkit h2, .contact h2 { color: var(--ink); font-size: var(--s3); }

.work { padding: clamp(2rem, 5vw, 4rem) 0 clamp(4rem, 10vw, 7rem); }
.section-lede { font-size: var(--s1); line-height: 1.45; color: var(--muted-dawn); max-width: 36ch; margin: 1rem 0 3rem; }

.impact { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(2rem, 5vw, 4rem); }
.impact li { padding: 1.75rem 0; border-top: 1.5px solid rgba(30, 28, 63, .14); }
.impact li:first-child { grid-column: 1 / -1; }
.impact li:first-child .impact-outcome { font-size: var(--s3); max-width: 20ch; }
.impact-outcome { font-family: var(--display); font-weight: 800; font-size: var(--s1); line-height: 1.2; margin-bottom: .4rem; }
.impact-where { color: #8A4B12; font-weight: 700; font-size: var(--s-1); margin-bottom: .75rem; }
.impact li > p:last-child { color: var(--muted-dawn); max-width: var(--measure); margin: 0; }

/* Journey */
.journey { padding: clamp(4rem, 10vw, 7rem) 0; background: #E9E7F7; }
.timeline { list-style: none; margin: 2.5rem 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 4.5rem; top: .5rem; bottom: .5rem; width: 2px; background: rgba(30, 28, 63, .18); }
.timeline li { display: grid; grid-template-columns: 4.5rem 1fr; gap: 2rem; padding: 0 0 2rem; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: calc(4.5rem - 6px); top: .45rem;
  width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 3px solid #E9E7F7;
}
.timeline time { font-family: var(--display); font-weight: 800; font-size: 1.125rem; }
.timeline h3 { font-size: var(--s1); margin-bottom: .35rem; }
.timeline p { color: var(--muted-dawn); margin: 0; max-width: var(--measure); }
.timeline-next::before { background: var(--marigold) !important; box-shadow: 0 0 18px rgba(244, 178, 62, .9); }
.timeline-next time { color: #8A4B12; }

/* Toolkit */
.toolkit { padding: clamp(4rem, 10vw, 7rem) 0; }
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem clamp(2rem, 4vw, 3rem); margin: 2.5rem 0 0; }
.tools dt { font-family: var(--display); font-weight: 600; font-size: 1.125rem; margin-bottom: .35rem; }
.tools dd { margin: 0; color: var(--muted-dawn); }

/* Contact: the brightest point on the page */
.contact {
  padding: clamp(5rem, 12vw, 9rem) 0;
  background: radial-gradient(70% 90% at 50% 100%, #FBD38A 0%, #F8E6C8 35%, var(--dawn) 75%);
}
.contact-inner { text-align: center; }
.contact h2 { font-size: var(--s3); max-width: 14ch; margin: 0 auto 1.25rem; }
.contact-inner > p { font-size: var(--s1); line-height: 1.45; max-width: 34ch; margin: 0 auto 2rem; color: var(--muted-dawn); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.contact-inner .contact-email { margin: 1.25rem auto 0; font-size: var(--s0); color: var(--muted-dawn); min-height: 1.6em; }
.socials { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; gap: 1.5rem; justify-content: center; }
.socials a { font-weight: 700; text-underline-offset: 4px; }

.footer { background: var(--dawn); color: var(--muted-dawn); text-align: center; padding: 2rem var(--gutter); font-size: var(--s-1); border-top: 1px solid rgba(30, 28, 63, .08); }
.footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .story-grid, .belief-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 220px; }
  .impact { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  :root { --s3: 2rem; --s2: 1.5rem; --s1: 1.2rem; }
  .tools { grid-template-columns: 1fr; }
  .timeline::before { left: 3.25rem; }
  .timeline li { grid-template-columns: 3.25rem 1fr; gap: 1.25rem; }
  .timeline li::before { left: calc(3.25rem - 6px); }
  .hero-actions .btn, .contact-actions .btn { width: 100%; }
}
