:root {
  --ivory: #f7f1e8;
  --ivory-2: #fffaf2;
  --paper: #fffdf8;
  --champagne: #ead6a8;
  --green: #082f26;
  --deep: #031d18;
  --green-2: #15493c;
  --gold: #b88944;
  --gold-2: #d8bd86;
  --gold-3: #f0d18a;
  --ink: #10251f;
  --muted: #6c726c;
  --line: rgba(8, 47, 38, 0.16);
  --shadow: 0 22px 70px rgba(8, 47, 38, 0.12);
  --serif: "New York", "Iowan Old Style", "Georgia", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--deep);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(240, 209, 138, 0.08) 1px, transparent 1px) 0 0 / 110px 110px,
    linear-gradient(180deg, rgba(184, 137, 68, 0.08), transparent 38%);
  opacity: 0.72;
  z-index: -1;
}

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

a {
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 30;
  transform: translateY(-140%);
  background: var(--green);
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: var(--gold-3);
  mix-blend-mode: normal;
  background: linear-gradient(180deg, rgba(3, 29, 24, 0.84), rgba(3, 29, 24, 0));
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 32px);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-header a {
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 46vw) minmax(360px, 54vw);
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 26%, rgba(184, 137, 68, 0.18), transparent 28%),
    linear-gradient(145deg, #031d18 0%, #082f26 58%, #031d18 100%);
  color: var(--ivory-2);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 29, 24, 0) 0%, rgba(3, 29, 24, 0.12) 51%, rgba(3, 29, 24, 0.44) 70%, rgba(3, 29, 24, 0.16) 100%),
    linear-gradient(0deg, rgba(3, 29, 24, 0.46), transparent 30%);
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(240, 209, 138, 0.34);
}

.hero-media {
  grid-column: 2;
  min-height: 100svh;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 14%;
}

.hero-content {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  padding: 14vh clamp(26px, 6vw, 86px) 15vh;
  max-width: 760px;
}

.logo-seal {
  width: clamp(96px, 8vw, 136px);
  display: block;
  margin-bottom: clamp(30px, 7vh, 60px);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.crest {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.38));
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-family: "Didot", "Bodoni 72", "Baskerville", var(--serif);
  font-size: clamp(3.15rem, 6.8vw, 7rem);
  line-height: 0.96;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.hero-course {
  margin-top: clamp(28px, 5vw, 56px);
  text-transform: uppercase;
  letter-spacing: 0.34em;
  color: var(--gold-3);
  display: grid;
  gap: 8px;
  font-size: clamp(0.82rem, 1.4vw, 1.18rem);
}

.hero-course strong {
  font-family: var(--serif);
  color: var(--ivory-2);
  font-size: clamp(2.55rem, 6vw, 6.2rem);
  font-weight: 400;
  letter-spacing: 0;
}

.year {
  margin-top: 14px;
  color: var(--gold-3);
  font-size: clamp(1rem, 2vw, 1.5rem);
  letter-spacing: 0.56em;
}

.scroll-cue {
  position: absolute;
  z-index: 3;
  left: clamp(26px, 7vw, 108px);
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ivory-2);
  text-decoration: none;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.scroll-cue svg {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 250, 242, 0.6);
  border-radius: 50%;
  padding: 8px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}

.section-grid,
.invitation,
.message-section,
.closing-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 41vw);
  gap: clamp(28px, 6vw, 84px);
  align-items: center;
  padding: clamp(82px, 13vw, 172px) clamp(20px, 6vw, 94px);
}

.quote-section {
  background: linear-gradient(180deg, #f8f0df 0%, #fffaf2 100%);
  position: relative;
}

.quote-section::before,
.program-section::before,
.rsvp-section::before {
  content: "";
  position: absolute;
  left: clamp(20px, 6vw, 94px);
  right: clamp(20px, 6vw, 94px);
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 137, 68, 0.78), transparent);
}

.quote {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 5.5rem);
  line-height: 1.04;
  max-width: 980px;
  color: var(--deep);
}

.editorial-image,
.portrait-frame,
.message-photo,
.closing-photo,
.program-photo {
  margin: 0;
  position: relative;
}

.editorial-image img,
.portrait-frame img,
.program-photo img,
.message-photo img,
.closing-photo img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 28px 78px rgba(3, 29, 24, 0.2);
}

.editorial-image::before,
.portrait-frame::before,
.program-photo::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(240, 209, 138, 0.72);
  z-index: 1;
  pointer-events: none;
}

.invitation {
  background:
    linear-gradient(135deg, rgba(240, 209, 138, 0.12), transparent 34%),
    linear-gradient(180deg, var(--green) 0%, var(--deep) 100%);
  color: var(--ivory-2);
  border-top: 1px solid rgba(240, 209, 138, 0.28);
  border-bottom: 1px solid rgba(240, 209, 138, 0.28);
}

.invitation-inner {
  max-width: 850px;
}

.invitation h2,
.section-heading h2,
.rsvp-intro h2,
.closing-copy h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 5rem);
  font-weight: 400;
  line-height: 1;
  color: inherit;
}

.invitation h2::after,
.section-heading h2::after,
.rsvp-intro h2::after {
  content: "";
  display: block;
  width: 86px;
  height: 1px;
  margin-top: 20px;
  background: var(--gold);
}

.invitation p {
  margin-top: 34px;
  font-family: var(--serif);
  font-size: clamp(1.32rem, 2.8vw, 2.52rem);
  line-height: 1.28;
  color: rgba(255, 250, 242, 0.88);
}

.portrait-frame img {
  max-height: 760px;
  object-fit: cover;
}

.program-section,
.gallery-section,
.rsvp-section {
  padding: clamp(82px, 13vw, 168px) clamp(20px, 6vw, 94px);
  position: relative;
}

.section-heading,
.rsvp-intro {
  max-width: 860px;
  margin-bottom: clamp(34px, 6vw, 72px);
}

.section-heading h2,
.rsvp-intro h2 {
  color: var(--deep);
}

.section-heading p,
.rsvp-intro p {
  margin-top: 16px;
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.7;
}

.program-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: stretch;
}

.program-photo img {
  height: 100%;
  object-fit: cover;
  min-height: 600px;
}

.program-cards {
  display: grid;
  gap: 22px;
}

.event-card {
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.96), rgba(247, 241, 232, 0.82));
  border: 1px solid rgba(184, 137, 68, 0.34);
  border-radius: 4px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: 0 22px 64px rgba(8, 47, 38, 0.12);
}

.event-icon {
  width: 44px;
  height: 44px;
  color: var(--gold);
  margin-bottom: 28px;
}

.event-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.event-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--green-2);
  font-size: 0.82rem;
}

.event-card h3 {
  margin-top: 14px;
  color: var(--green);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.85rem, 3.4vw, 3.1rem);
  line-height: 1.04;
}

.event-card p:not(.event-kicker) {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.submit-button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  white-space: normal;
  text-align: center;
}

.button:hover,
.submit-button:hover {
  transform: translateY(-2px);
}

.button-dark,
.submit-button {
  background: linear-gradient(135deg, var(--green), var(--deep));
  color: white;
  border-color: rgba(240, 209, 138, 0.38);
}

.button-light {
  border-color: var(--line);
  color: var(--green);
  background: rgba(255, 255, 255, 0.45);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(220px, 25vw);
  gap: clamp(10px, 1.7vw, 22px);
}

.gallery-section {
  background:
    radial-gradient(circle at 15% 10%, rgba(240, 209, 138, 0.14), transparent 24%),
    linear-gradient(180deg, var(--deep) 0%, var(--green) 100%);
  color: var(--ivory-2);
}

.gallery-section .section-heading h2 {
  color: var(--ivory-2);
}

.gallery-section .section-heading p {
  color: rgba(255, 250, 242, 0.68);
}

.gallery-section .section-heading h2::after {
  background: var(--gold-3);
}

.gallery-item {
  border: 1px solid rgba(240, 209, 138, 0.32);
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.28);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease, filter 400ms ease;
}

.gallery-item:hover img {
  transform: scale(1.035);
  filter: saturate(1.06);
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.message-section {
  background: linear-gradient(180deg, #fffaf2 0%, #f2e3c5 100%);
}

.message-photo img {
  max-height: 820px;
  object-fit: cover;
  object-position: center top;
}

.message-copy p {
  font-family: var(--serif);
  color: var(--green);
  font-size: clamp(2rem, 5.2vw, 5.6rem);
  line-height: 1.02;
}

.rsvp-section {
  background:
    linear-gradient(135deg, rgba(184, 137, 68, 0.16), transparent 38%),
    var(--ivory);
}

.rsvp-form {
  max-width: 680px;
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid rgba(184, 137, 68, 0.34);
  border-radius: 4px;
  padding: clamp(22px, 4vw, 48px);
  box-shadow: var(--shadow);
}

.form-row,
fieldset {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
}

label,
legend {
  color: var(--green);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

fieldset {
  border: 1px solid rgba(8, 47, 38, 0.14);
  padding: 18px;
  border-radius: 4px;
}

legend {
  padding: 0 8px;
}

.option {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  font-size: 1rem;
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(8, 47, 38, 0.18);
  background: rgba(255, 255, 255, 0.68);
  border-radius: 4px;
  color: var(--ink);
  padding: 15px 15px;
  outline: none;
  min-height: 50px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(184, 137, 68, 0.14);
}

.submit-button {
  width: min(100%, 360px);
  border: 0;
  min-height: 56px;
}

.form-feedback {
  min-height: 28px;
  margin-top: 18px;
  color: var(--green);
  line-height: 1.5;
}

.form-feedback.error {
  color: #8b2f1f;
}

.closing-section {
  min-height: 90svh;
  background: var(--green);
  color: var(--ivory-2);
}

.closing-photo img {
  max-height: 780px;
  width: 100%;
  object-fit: cover;
  object-position: center 12%;
}

.closing-copy img {
  width: 100%;
}

.logo-seal-small {
  width: 86px;
  margin-bottom: 34px;
}

.closing-copy p {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 4vw, 4.35rem);
  line-height: 1.08;
  color: rgba(255, 250, 242, 0.92);
}

.closing-copy h2 {
  margin-top: 42px;
  font-size: clamp(2rem, 4vw, 4.2rem);
}

.closing-copy span {
  display: block;
  margin-top: 12px;
  color: var(--gold-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  background: rgba(6, 24, 20, 0.88);
  padding: 24px;
}

.lightbox.is-open {
  display: grid;
}

.lightbox img {
  max-height: 86svh;
  width: auto;
  max-width: 94vw;
  border-radius: 4px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .site-header {
    padding: 12px 18px;
    mix-blend-mode: normal;
    background: linear-gradient(180deg, rgba(8, 47, 38, 0.78), rgba(8, 47, 38, 0));
    justify-content: center;
  }

  .site-header nav {
    gap: 14px;
    font-size: 0.66rem;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 100svh;
    height: 100svh;
    grid-template-rows: 58svh 42svh;
  }

  .hero-media {
    grid-column: 1;
    grid-row: 1;
    min-height: 58svh;
  }

  .hero-media img {
    object-position: center 14%;
  }

  .hero::after {
    background:
      linear-gradient(0deg, rgba(3, 29, 24, 0.42), transparent 34%);
  }

  .hero-content {
    grid-row: 2;
    align-self: start;
    height: 100%;
    padding: 16px 22px 68px;
    background:
      radial-gradient(circle at 80% 10%, rgba(240, 209, 138, 0.12), transparent 32%),
      var(--green);
    max-width: none;
  }

  .logo-seal {
    width: 64px;
    margin-bottom: 12px;
    padding: 0;
  }

  h1 {
    font-size: clamp(2.42rem, 10.2vw, 3.75rem);
    line-height: 0.98;
  }

  .hero-course {
    letter-spacing: 0.24em;
  }

  .scroll-cue {
    left: 22px;
    bottom: 22px;
  }

  .section-grid,
  .invitation,
  .message-section,
  .closing-section,
  .program-layout {
    grid-template-columns: 1fr;
  }

  .program-photo {
    order: 2;
  }

  .program-photo img {
    min-height: auto;
    max-height: 560px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(180px, 54vw);
  }
}

@media (max-width: 560px) {
  [id] {
    scroll-margin-top: 76px;
  }

  .site-header {
    padding: 11px 14px 18px;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .site-header nav a:nth-child(2) {
    display: none;
  }

  .hero-content {
    padding: 16px 22px 68px;
  }

  .hero-course {
    margin-top: 16px;
    letter-spacing: 0.2em;
    gap: 7px;
  }

  .hero-course strong {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .year {
    letter-spacing: 0.36em;
  }

  .scroll-cue {
    max-width: calc(100% - 44px);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
  }

  .section-grid,
  .invitation,
  .message-section,
  .closing-section,
  .program-section,
  .gallery-section,
  .rsvp-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .event-actions {
    display: grid;
  }

  .button,
  .submit-button {
    width: 100%;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .gallery-item,
  .gallery-item.tall,
  .gallery-item.wide {
    grid-row: auto;
    grid-column: auto;
    aspect-ratio: 4 / 5;
  }

  .gallery-item.wide {
    aspect-ratio: 5 / 4;
  }

  .option {
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .site-header nav {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
  }

  .hero-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .logo-seal {
    width: 56px;
    margin-bottom: 10px;
  }

  h1 {
    font-size: clamp(2.16rem, 10vw, 2.7rem);
  }

  .scroll-cue {
    left: 18px;
    bottom: 18px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

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