:root {
  --ink: #071433;
  --navy: #0b2a6b;
  --signal: #1d6fe8;
  --ice: #e7f0fc;
  --paper: #f7f9fc;
  --line: #c5d4ea;
  --white: #ffffff;
  --muted: #3d4f73;
  --shadow: 0 18px 40px rgba(7, 20, 51, 0.12);
  --display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --space: 8px;
  --wrap: 1120px;
  --radius: 2px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--signal);
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 1000;
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.label {
  display: block;
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-optical-sizing: auto;
}

h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
}

h3 {
  font-size: 1.45rem;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 180ms ease, transform 180ms ease, border-color 180ms ease, color 180ms ease;
}

.btn:hover {
  background: #0f3a8c;
  color: var(--white);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--navy);
}

.btn--nav {
  min-height: 42px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Header */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.nav.is-scrolled {
  box-shadow: 0 8px 24px rgba(7, 20, 51, 0.06);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.nav__logo {
  display: block;
  width: 40px;
  height: 62px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.nav__brand small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav__date {
  margin: 0 auto 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav__links a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.nav__links a:not(.btn):hover {
  color: var(--signal);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 20px 36px;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--ice) 42%, var(--paper) 100%);
}

.hero__planes {
  position: absolute;
  inset: 8% -8% auto;
  height: 72%;
  background:
    linear-gradient(115deg, transparent 0 18%, var(--navy) 18% 34%, transparent 34% 66%, var(--signal) 66% 82%, transparent 82%),
    linear-gradient(180deg, transparent, rgba(7, 20, 51, 0.04));
  clip-path: polygon(0 22%, 100% 0, 100% 78%, 0 100%);
  opacity: 0.12;
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  gap: 24px;
  width: min(1240px, 100%);
  margin: 0 auto;
}

.portrait {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.portrait img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 12%;
  background: var(--white);
  border: 1px solid var(--line);
}

.portrait figcaption {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  padding: 12px 16px 14px;
  background: var(--navy);
  color: var(--white);
}

.portrait figcaption .label {
  color: #9ec0f5;
  margin-bottom: 2px;
}

.portrait figcaption strong {
  font-family: var(--display);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.2;
}

.invite {
  text-align: center;
  padding: 12px 8px 8px;
}

.invite__org {
  margin-bottom: 18px;
}

.invite h1 {
  margin: 0;
  color: var(--ink);
}

.invite h1 em {
  display: block;
  color: var(--signal);
  font-style: italic;
  font-weight: 500;
}

.invite__for {
  margin: 14px 0 22px;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 600;
}

.badge {
  display: inline-block;
  margin: 0 0 14px;
  padding: 10px 28px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.invite__strict {
  max-width: 34ch;
  margin: 0 auto 22px;
  color: var(--muted);
  font-size: 0.95rem;
}

.invite__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.countdown {
  margin: 8px 0 0;
  color: var(--navy);
}

.countdown strong {
  display: block;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.chairs {
  list-style: none;
  margin: 28px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: min(640px, 100%);
}

.chairs li,
.chair__body {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.chairs strong {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
}

/* Ticket rail */

.ticket {
  display: grid;
  gap: 0;
  width: min(1080px, calc(100% - 24px));
  margin: -8px auto 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}

.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 1px var(--line);
}

.ticket::before {
  left: -9px;
}

.ticket::after {
  right: -9px;
}

.ticket__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-top: 1px dashed var(--line);
}

.ticket__item:first-child {
  border-top: 0;
}

.ticket__item strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.icon {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  color: var(--signal);
}

/* Thesis */

.thesis {
  padding: 88px 0 48px;
}

.thesis__grid {
  display: grid;
  gap: 28px;
  margin-bottom: 40px;
}

.thesis__copy {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 58ch;
}

.split {
  display: grid;
  gap: 16px;
}

.place-card {
  padding: 28px 26px;
  background: var(--white);
  border-left: 3px solid var(--navy);
  box-shadow: 0 1px 0 var(--line);
}

.place-card h3 {
  margin-bottom: 10px;
}

.place-card p {
  color: var(--muted);
}

.not-for {
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 70ch;
}

/* Speakers */

.speakers {
  padding: 40px 0 88px;
}

.section-head {
  margin-bottom: 36px;
  max-width: 28ch;
}

.speakers__grid {
  display: grid;
  gap: 20px;
}

.speaker {
  display: grid;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--line);
}

.speaker img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: center 10%;
}

.speaker > div {
  padding: 4px 22px 24px;
}

.speaker p:not(.label) {
  color: var(--muted);
}

/* Evening / map */

.evening {
  padding: 80px 0;
  background: var(--ink);
  color: var(--white);
}

.evening .label {
  color: #9ec0f5;
}

.evening h2 {
  color: var(--white);
}

.evening__lede,
.facts dd {
  color: #d5e2f6;
}

.evening__grid {
  display: grid;
  gap: 32px;
}

.facts {
  display: grid;
  gap: 18px;
  margin: 28px 0 32px;
}

.facts dt {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9ec0f5;
}

.facts dd {
  margin: 4px 0 0;
}

.evening .btn--primary {
  background: var(--white);
  color: var(--ink);
}

.evening .btn--primary:hover {
  background: var(--ice);
  color: var(--ink);
}

.map {
  min-height: 320px;
  background: #0a1c44;
  border: 1px solid rgba(197, 212, 234, 0.25);
  display: flex;
  flex-direction: column;
}

.map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  filter: grayscale(0.25) contrast(1.04);
}

.map__caption {
  margin: 0;
  padding: 12px 14px;
  background: #0a1c44;
  border-top: 1px solid rgba(197, 212, 234, 0.2);
  font-size: 0.92rem;
}

.map__caption a {
  color: #d5e2f6;
}

/* FAQ */

.faq {
  padding: 72px 0 24px;
}

.faq .section-head {
  margin-bottom: 28px;
}

.faq__list {
  margin: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.faq__item {
  margin: 0;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.faq__item dt {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}

.faq__item dd {
  margin: 10px 0 0;
  max-width: 62ch;
  color: var(--muted);
}

/* RSVP */

.rsvp {
  padding: 88px 0 96px;
  background:
    linear-gradient(180deg, var(--ice) 0, var(--paper) 28%);
}

.rsvp__grid {
  display: grid;
  gap: 40px;
}

.rsvp__points {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.rsvp__points li {
  padding: 8px 0 8px 18px;
  border-top: 1px solid var(--line);
  position: relative;
}

.rsvp__points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  width: 7px;
  height: 7px;
  background: var(--signal);
}

.form {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px 22px 24px;
  box-shadow: var(--shadow);
}

.honey {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.field {
  margin-bottom: 18px;
}

.field label,
.chairs-field legend {
  display: block;
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}

.chairs-field {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

.field-row {
  display: grid;
  gap: 14px;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.field input:focus {
  outline: none;
  border-color: var(--signal);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(29, 111, 232, 0.18);
}

.field input.is-invalid {
  border-color: #b42318;
}

.error {
  margin: 6px 0 0;
  color: #b42318;
  font-size: 0.88rem;
}

#form-error:not([hidden]) {
  margin: 0 0 16px;
}

.chairs--form {
  width: 100%;
  margin: 8px 0 0;
}

.chair {
  cursor: pointer;
}

.chair input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chair__body {
  display: block;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.chair input:focus-visible + .chair__body {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.chair input:checked + .chair__body {
  border-color: var(--navy);
  box-shadow: inset 0 0 0 1px var(--navy);
  background: var(--ice);
}

.chair small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.form__note {
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Thanks */

.thanks {
  min-height: calc(100dvh - 72px);
  display: grid;
  place-items: center;
  padding: 48px 0 80px;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--ice) 48%, var(--paper) 100%);
}

.thanks__card {
  max-width: 36rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(28px, 5vw, 48px);
  box-shadow: var(--shadow);
}

.thanks__card h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.thanks__actions .btn {
  margin-top: 0;
}

/* Footer */

.footer {
  background: var(--navy);
  color: #d5e2f6;
  padding: 48px 0 96px;
}

.footer .label {
  color: #9ec0f5;
}

.footer a {
  color: var(--white);
}

.footer__grid {
  display: grid;
  gap: 28px;
}

/* Mobile dock */

.dock {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
  padding-bottom: env(safe-area-inset-bottom);
}

.dock.is-hidden {
  display: none;
}

/* Load moment */

.invite,
.portrait,
.chairs--hero {
  animation: rise 700ms ease both;
}

.portrait--left {
  animation-delay: 80ms;
}

.portrait--right {
  animation-delay: 140ms;
}

.chairs--hero {
  animation-delay: 220ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .invite,
  .portrait,
  .chairs--hero,
  .btn {
    animation: none;
    transition: none;
  }
}

@media (max-width: 899px) {
  .nav {
    gap: 10px;
    min-height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .nav__date,
  .nav__links a:not(.btn) {
    display: none;
  }

  .nav__logo {
    width: 30px;
    height: 46px;
  }

  .nav__brand {
    gap: 8px;
    font-size: 0.92rem;
  }

  .nav__brand small {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
  }

  .nav__links {
    margin-left: auto;
    flex-shrink: 0;
  }

  .btn--nav {
    min-height: 40px;
    padding: 0 12px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .hero {
    padding: 16px 12px 40px;
  }

  .hero__planes {
    opacity: 0.07;
  }

  html {
    scroll-padding-bottom: 76px;
  }

  .hero__grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .invite {
    order: -1;
    grid-column: 1 / -1;
    padding: 4px 4px 12px;
  }

  .invite h1 {
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .invite__actions .btn {
    width: 100%;
  }

  .portrait {
    min-width: 0;
  }

  .portrait img {
    aspect-ratio: 4 / 5;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
  }

  .portrait figcaption {
    min-height: 58px;
    padding: 8px 10px 10px;
  }

  .portrait figcaption strong {
    font-size: 0.95rem;
  }

  .chairs--hero {
    margin-top: 16px;
    gap: 8px;
  }

  .chairs li,
  .chair__body {
    padding: 12px 12px;
  }

  .chairs strong {
    font-size: 1.2rem;
  }

  .ticket {
    width: min(1080px, calc(100% - 16px));
  }

  .ticket__item {
    padding: 14px 14px;
    gap: 10px;
  }

  .thesis,
  .speakers,
  .faq {
    padding-top: 56px;
  }

  .thesis {
    padding-bottom: 32px;
  }

  .speakers {
    padding-bottom: 56px;
  }

  .evening {
    padding: 56px 0;
  }

  .rsvp {
    padding: 56px 0 120px;
  }

  .speaker img {
    height: 220px;
  }

  .speaker > div {
    padding: 4px 16px 20px;
  }

  .place-card {
    padding: 20px 18px;
  }

  .map iframe {
    min-height: 240px;
  }

  .footer {
    padding: 40px 0 108px;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(var(--wrap), calc(100% - 24px));
  }

  .btn--nav {
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .invite__for {
    font-size: 1.02rem;
  }

  .invite__strict {
    font-size: 0.9rem;
  }

  .form {
    padding: 22px 16px 20px;
  }

  .thanks__actions .btn {
    width: 100%;
  }
}

@media (min-width: 900px) {
  .dock {
    display: none;
  }

  .footer {
    padding-bottom: 48px;
  }

  .hero {
    padding: 20px 28px 56px;
  }

  .hero__grid {
    grid-template-columns: 1fr 1.05fr 1fr;
    align-items: stretch;
    gap: 18px;
  }

  .portrait img {
    height: min(68vh, 640px);
    aspect-ratio: auto;
  }

  .invite {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 12px 16px;
    order: 0;
    grid-column: auto;
  }

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

  .ticket__item {
    border-top: 0;
    border-left: 1px dashed var(--line);
  }

  .ticket__item:first-child {
    border-left: 0;
  }

  .thesis__grid,
  .split,
  .speakers__grid,
  .evening__grid,
  .rsvp__grid,
  .field-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer__grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }

  .speaker {
    grid-template-columns: 200px 1fr;
    align-items: stretch;
  }

  .speaker img {
    height: 100%;
    min-height: 220px;
  }

  .form {
    padding: 36px;
  }
}
