:root {
  --ink: #FFF;
  --paper: #113156;
  --accent: #FFF;
  --sun: #F1BC55;
  --sun-deep: #C9922F;
  --measure: 34rem;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--sun);
  color: var(--paper);
}

/* ---------- nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem var(--pad);
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.9375rem;
}

.nav-mark {
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.mark {
  width: 30px;
  height: auto;
}

.nav-links {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
}

/* underline animation */
.nav-links a,
.footer-meta a,
.chapter-next a {
  position: relative;
}

.nav-links a::after,
.footer-meta a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1.5px;
  background: currentcolor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.footer-meta a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad);
  padding-bottom: clamp(2rem, 6vh, 5rem);
}

.chapter-hero {
  min-height: 58vh;
}

.hero-crest {
  position: absolute;
  top: clamp(5rem, 14vh, 8rem);
  right: var(--pad);
  width: clamp(130px, 16vw, 200px);
  height: auto;
}

.hero-headline {
  font-size: clamp(3rem, 9.5vw, 11rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 700;
  max-width: 12em;
}

.hero-subline {
  margin-top: 2.2rem;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  color: var(--ink);
  max-width: var(--measure);
}

.hero-subline span {
  color: var(--sun);
  font-weight: 600;
}

/* ---------- schematic strip ---------- */

.strip {
  overflow: hidden;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  padding: 1.5rem 0;
}

.strip-track {
  display: flex;
  gap: clamp(2rem, 6vw, 6rem);
  width: max-content;
  will-change: transform;
}

.schematic {
  width: clamp(140px, 16vw, 210px);
  height: auto;
  color: var(--accent);
  flex-shrink: 0;
}

.dim-label {
  font-family: inherit;
  font-size: 9px;
  fill: var(--sun);
  letter-spacing: 0.08em;
}

/* ---------- sections ---------- */

section {
  padding: clamp(5rem, 14vh, 10rem) var(--pad);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

/* mission */

.mission-line {
  font-size: clamp(1.6rem, 3.4vw, 3.2rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 24em;
}

/* what we do */

.what-item {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1rem 4rem;
  padding: clamp(1.75rem, 4vh, 3rem) 0;
  border-top: 1px solid var(--accent);
}

.what-item:last-of-type {
  border-bottom: 1px solid var(--accent);
}

.what-item h2 {
  font-size: clamp(1.8rem, 3.6vw, 3.4rem);
  letter-spacing: -0.03em;
  font-weight: 700;
  line-height: 1;
}

.what-item p {
  max-width: var(--measure);
  align-self: center;
}

/* chapters */

.world-map {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.map-grid path {
  stroke: rgb(255 255 255 / 8%);
  stroke-width: 1;
}

.map-grid .map-equator {
  stroke: rgb(255 255 255 / 16%);
}

.map-land path {
  fill: rgb(255 255 255 / 4.5%);
  stroke: rgb(255 255 255 / 85%);
  stroke-width: 1;
  stroke-linejoin: round;
}

.map-pin .pin-dot {
  fill: var(--sun);
}

.map-pin .pin-ring {
  fill: none;
  stroke: var(--sun);
  stroke-width: 1.2;
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.map-pin text {
  fill: var(--accent);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 5px;
  stroke-linejoin: round;
  transition: fill 0.25s ease;
}

.map-pin:hover text {
  fill: var(--sun);
}

.map-pin:hover .pin-ring {
  opacity: 1;
}

.chapter-list {
  list-style: none;
}

.chapter-list li {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(0.8rem, 2vh, 1.4rem) 0;
  border-top: 1px solid var(--accent);
}

.chapter-list li:last-child {
  border-bottom: 1px solid var(--accent);
}

.chapter-index {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--sun);
  letter-spacing: 0.08em;
}

.chapter-locale {
  margin-left: auto;
  font-size: clamp(0.875rem, 1.3vw, 1.0625rem);
  opacity: 0.75;
  white-space: nowrap;
}

.chapter-city {
  font-size: clamp(2.2rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  text-decoration: none;
}

.chapter-next .chapter-city {
  color: var(--sun);
}

a.chapter-city {
  position: relative;
}

a.chapter-city::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: var(--sun);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

a.chapter-city:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.chapter-next a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.chapter-next a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* team */

.team-list {
  list-style: none;
  max-width: 60rem;
}

.team-list li {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 1rem 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--accent);
}

.team-list li:last-child {
  border-bottom: 1px solid var(--accent);
}

.team-name {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.team-role a,
.team-name a {
  color: inherit;
  text-decoration: none;
}

.team-role a:hover,
.team-name a:hover {
  text-decoration: underline;
  text-decoration-color: var(--sun);
}

.team-more {
  margin-top: 2rem;
}

.team-more a {
  color: var(--sun);
  text-decoration: none;
}

.team-more a:hover {
  text-decoration: underline;
}

/* photo slots */

.photo-slot {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border: 1px solid rgb(255 255 255 / 60%);
}

.photo-slot svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.photo-slot svg path {
  stroke: rgb(255 255 255 / 25%);
  stroke-width: 1;
  fill: none;
  vector-effect: non-scaling-stroke;
}

.photo-tag {
  position: absolute;
  left: 0.6rem;
  bottom: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
}

img.photo-slot {
  object-fit: cover;
}

/* founders grid (team page) */

.founder-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.founder {
  display: block;
  color: var(--ink);
  text-decoration: none;
}

.founder .photo-slot {
  margin-bottom: 1.1rem;
  transition: border-color 0.25s ease;
}

.founder:hover .photo-slot {
  border-color: var(--sun);
}

.founder-name {
  display: block;
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.founder:hover .founder-name {
  color: var(--sun);
}

.founder-role {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9375rem;
}

.founder-city {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.9375rem;
  color: var(--sun);
}

/* team photography */

.team-story,
.mentorship {
  border-top: 1px solid var(--accent);
}

.team-photo {
  margin: 0;
}

.team-photo img {
  display: block;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgb(255 255 255 / 60%);
}

.team-photo figcaption {
  margin-top: 0.7rem;
  font-size: 0.875rem;
  color: var(--sun);
}

.mentorship-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.75fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

/* role hierarchy (team page) */

.city-teams .mission-line {
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

.role-list {
  list-style: none;
}

.role-list li {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr auto;
  gap: 1rem 3rem;
  align-items: baseline;
  padding: clamp(1.1rem, 2.5vh, 1.8rem) 0;
  border-top: 1px solid var(--accent);
}

.role-list li:last-child {
  border-bottom: 1px solid var(--accent);
}

.role-list h2 {
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.role-list .role-tier-1 h2 {
  font-size: clamp(1.7rem, 3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.role-list .role-tier-2 h2 {
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.role-list p {
  max-width: var(--measure);
}

.role-open {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sun);
  border: 1px solid var(--sun);
  padding: 0.25rem 0.6rem;
  white-space: nowrap;
}

.board-apply {
  margin-top: clamp(2rem, 5vh, 3.5rem);
}

.application-form {
  max-width: 760px;
  display: grid;
  gap: 1.5rem;
}

iframe.application-form {
  width: 100%;
  min-height: 1180px;
  border: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.application-form label {
  display: grid;
  gap: 0.55rem;
  font-weight: 600;
}

.application-form input,
.application-form select,
.application-form textarea {
  width: 100%;
  padding: 0.85rem 0;
  border: 0;
  border-bottom: 1px solid var(--accent);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.application-form select option { color: #113156; }
.application-form textarea { resize: vertical; }

.form-note {
  font-size: 0.875rem;
  color: var(--sun);
}

/* founders letter */

.letter-body .mission-line + .mission-line {
  margin-top: 1em;
}

.letter-sign {
  margin-top: 2.5rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--sun);
}

/* member profile pages */

.profile {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.profile-bio .mission-line a {
  color: var(--sun);
  text-decoration: none;
}

.profile-bio .mission-line a:hover {
  text-decoration: underline;
}

.team-city {
  color: var(--sun);
}

/* join */

.join-lines p {
  font-size: clamp(1.4rem, 2.6vw, 2.4rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 22em;
}

.join-lines p + p {
  margin-top: 0.6em;
}

.join-lines a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--sun);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.join-lines a:hover {
  color: var(--sun);
}

.join-lines .join-contact {
  font-size: 1.0625rem;
  font-weight: 400;
  margin-top: 1.8rem;
}

.join-contact a {
  color: var(--sun);
  text-decoration: none;
}

.join-contact a:hover {
  text-decoration: underline;
}

.cta-button {
  display: inline-block;
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding: 1.1rem 2.2rem;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.0625rem;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.cta-button:hover {
  background: var(--sun);
  border-color: var(--sun);
  color: var(--paper);
}

/* ---------- footer ---------- */

.footer {
  background: var(--accent);
  color: var(--paper);
  padding: clamp(5rem, 14vh, 10rem) var(--pad) clamp(2rem, 5vh, 3.5rem);
}

.footer-cta {
  display: block;
  font-size: clamp(3.4rem, 13vw, 14rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 700;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.25s ease;
}

.footer-cta:hover {
  color: var(--sun-deep);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  margin-top: clamp(4rem, 10vh, 7rem);
  font-size: 0.9375rem;
}

.footer-meta a {
  color: var(--paper);
  text-decoration: none;
}

.footer-meta span {
  opacity: 0.8;
}

/* ---------- reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav-links a::after,
  .footer-meta a::after,
  a.chapter-city::after,
  .cta-button,
  .footer-cta {
    transition: none;
  }
}

/* ---------- mobile ---------- */

@media (width <= 640px) {
  .hero-headline {
    font-size: clamp(2.6rem, 10vw, 4rem);
  }

  .what-item,
  .team-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .strip-track {
    gap: 1.5rem;
  }

  .founder-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .role-list li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .profile {
    grid-template-columns: 1fr;
  }

  .mentorship-grid {
    grid-template-columns: 1fr;
  }

  .form-grid { grid-template-columns: 1fr; }

  .profile .photo-slot {
    max-width: 260px;
  }

  .map-pin text {
    font-size: 26px;
  }
}
