/* ---------------------------------------------------
   Tokens

   Fonts: Square Peg (script display, closest free match to the
   invitation lettering) and Jost (geometric sans body). Swap the
   two font vars below to change typefaces site-wide.
--------------------------------------------------- */
:root {
  --paper: #F1F0EC;
  --paper-deep: #E1E4E7;
  --ink: #1C2430;
  --ink-soft: #475060;
  --stone: #9AA5B4;
  --slate: #9CADBE;
  --slate-deep: #46586F;
  --accent: #5B7392;

  --font-display: "Square Peg", cursive;
  --font-body: "Jost", sans-serif;

  --max: 74rem;
  --gutter: clamp(1.5rem, 5vw, 4rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 460;
  margin: 0;
  line-height: 1.02;
}

hr.rule {
  border: none;
  border-top: 1px solid var(--stone);
  margin: 0 var(--gutter);
  opacity: 0.55;
}

/* ---------------------------------------------------
   Splash
--------------------------------------------------- */
.splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  color: #111;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  cursor: pointer;
  transition: transform 0.95s cubic-bezier(.77,0,.18,1);
}

html.splash-active .splash {
  display: flex;
}

html.splash-active body {
  overflow: hidden;
}

.splash.leaving {
  transform: translateY(-100%);
}

.splash-stage {
  width: 50%;
  max-width: 550px;
}

.splash-stage svg {
  display: block;
  width: 100%;
  height: auto;
}

.splash-ink {
  fill: none;
  stroke: #111;
  stroke-width: 1.8px;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.splash-ink-thin {
  stroke-width: 1.5px;
}

.splash-go {
  position: absolute;
  left: 0.9rem;
  bottom: 0.8rem;
  padding: 0.2rem 0.4rem;
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #b5b5b5;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0;
  animation: splash-go-in 1s ease 2.5s forwards;
}

.splash-go:hover,
.splash-go:focus-visible {
  color: #111;
}

.splash-go:focus-visible {
  outline: 1px solid #111;
  outline-offset: 2px;
}

@keyframes splash-go-in {
  to { opacity: 1; }
}

html.splash-active:not(.splash-leaving) .hero-names .line {
  animation-play-state: paused;
}

/* ---------------------------------------------------
   Top nav
--------------------------------------------------- */
.topnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.4rem var(--gutter);
  background: var(--paper);
  position: relative;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}

.brand-heart {
  width: 0.85em;
  height: 0.77em;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.topnav-links {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
}

.topnav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.topnav-links a:hover {
  color: var(--ink);
}

/* ---------------------------------------------------
   Hero — split panel
--------------------------------------------------- */
.hero-split {
  position: relative;
  display: grid;
  grid-template-columns: 42% 58%;
  min-height: 41vh;
}

.hero-panel {
  background: var(--slate);
  color: var(--paper);
  display: flex;
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) calc(54px + 1rem) clamp(1.5rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 3rem);
}

.hero-panel-inner {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "names date"
    "names place";
  justify-content: space-between;
  align-items: center;
  column-gap: 1.5rem;
}

.hero-panel-inner .hero-names { grid-area: names; }
.hero-panel-inner .hero-date { grid-area: date; align-self: end; text-align: right; }
.hero-panel-inner .hero-place { grid-area: place; align-self: start; text-align: right; }

.hero-date {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: #22324A;
}

.hero-names {
  font-size: clamp(3.4rem, 6.2vw, 5.6rem);
  line-height: 0.92;
}

.hero-names .line {
  display: block;
  opacity: 0;
  transform: translateY(0.5em);
  animation: rise 0.9s cubic-bezier(.22,.9,.3,1) forwards;
}

.hero-names .line.amp {
  font-weight: 400;
  animation-delay: 0.15s;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.hero-place {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  color: #22324A;
}

.hero-photo {
  position: relative;
  overflow: visible;
  background: var(--slate);
}

.hero-photo-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  container-type: size;
}

.hero-photo-img {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: max(110cqw, 245cqh);
  height: auto;
  transform: translate(-52%, -78.7%);
}

.rsvp-badge {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 1px solid var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(28, 36, 48, 0.28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: background 0.25s ease, color 0.25s ease;
}

.rsvp-badge:hover {
  background: var(--paper);
  color: var(--slate-deep);
}

/* ---------------------------------------------------
   Party details
--------------------------------------------------- */
.venue {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 4.5vw, 3rem) var(--gutter);
}

.venue-copy h2 {
  font-size: clamp(3.4rem, 7.5vw, 5.2rem);
  margin-bottom: 0.6rem;
}

.h2-sub {
  display: block;
  margin-top: 1.5rem;
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  line-height: 1.1;
  color: var(--accent);
}

.venue-note {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.venue-note a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.venue-portrait {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: 50% 35%;
  align-self: start;
  margin-top: 0.4rem;
  border-radius: 10px;
}

.venue-date {
  margin: 1.4rem 0 0;
  font-weight: 500;
  font-size: 1.05rem;
}

.venue-time,
.venue-name {
  margin: 0.15rem 0 0;
  font-weight: 500;
  font-size: 1.05rem;
}

.map-link {
  display: inline-block;
  margin-top: 0.15rem;
  font-weight: 500;
  text-decoration-color: var(--stone);
  text-underline-offset: 3px;
}

.map-link:hover {
  text-decoration-color: var(--ink);
}

/* ---------------------------------------------------
   Food & drink
--------------------------------------------------- */
.food {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 4.5vw, 3rem) var(--gutter);
}

.food h2 {
  font-size: clamp(3.4rem, 7.5vw, 5.2rem);
  margin-bottom: 1.2rem;
}

.food p {
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.food-photo {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.7;
  border-radius: 10px;
}

/* ---------------------------------------------------
   Stay
--------------------------------------------------- */
.stay,
.todo {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 4.5vw, 3rem) var(--gutter);
}

.stay h2,
.todo h2 {
  font-size: clamp(3.4rem, 7.5vw, 5.2rem);
  margin-bottom: 1.5rem;
}

.stay-intro {
  margin: 0 0 2rem;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.todo-intro {
  margin-bottom: 2rem;
}

.todo-intro h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  line-height: 1.1;
  color: var(--accent);
}

.todo-intro p {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(2rem, 6vw, 4rem);
  border-top: 1px solid var(--stone);
}

.info-item {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--stone);
}

.info-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.info-item p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 30rem;
}

.info-item .info-meta {
  margin-bottom: 0.6rem;
  color: var(--ink);
  font-size: 0.95rem;
}

.info-item .info-link {
  display: flex;
  gap: 1.4rem;
  margin-top: 0.6rem;
  font-size: 0.95rem;
}

.info-item a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* ---------------------------------------------------
   Gallery
--------------------------------------------------- */
.gallery {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 4.5vw, 3rem) var(--gutter);
}

.gallery h2 {
  font-size: clamp(3.4rem, 7.5vw, 5.2rem);
  margin-bottom: 1.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  width: 50%;
}

.gallery-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gallery-col img.fit-left {
  object-position: 0 50%;
}

.gallery-col figure {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
}

.gallery-col img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: cover;
}

.gallery-col figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.2rem 0.5rem 0.4rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 0.7rem;
  line-height: 1.25;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.gallery-col:nth-child(2) figure {
  aspect-ratio: 6 / 5;
}

/* ---------------------------------------------------
   FAQ
--------------------------------------------------- */
.faq {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(1.75rem, 4.5vw, 3rem) var(--gutter);
}

.faq h2 {
  font-size: clamp(3.4rem, 7.5vw, 5.2rem);
  margin-bottom: 1.5rem;
}

.faq-list {
  max-width: 42rem;
  border-top: 1px solid var(--stone);
}

.faq-list details {
  border-bottom: 1px solid var(--stone);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 500;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.25s ease;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-map-wrap {
  display: block;
  max-width: 17rem;
  margin: 0 0 0.6rem;
}

.faq-map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.faq-list details p.faq-map-link {
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.faq-map-link a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.faq-list details p a {
  color: var(--accent);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.faq-list details p {
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

/* ---------------------------------------------------
   RSVP
--------------------------------------------------- */
.rsvp {
  background: var(--slate-deep);
  color: var(--paper);
  padding: clamp(2.25rem, 5.5vw, 3.75rem) var(--gutter);
}

.rsvp-inner {
  max-width: 32rem;
  margin: 0 auto;
}

.rsvp h2 {
  font-size: clamp(3.8rem, 8.5vw, 5.8rem);
  color: var(--paper);
}

.rsvp-lede {
  color: #C5CEDB;
  margin-top: 0.6rem;
  margin-bottom: 2.2rem;
}

.field {
  margin-bottom: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field label, .attending legend {
  font-size: 0.88rem;
  color: #C5CEDB;
}

.attending {
  border: none;
  padding: 0;
  margin: 0 0 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.attending legend {
  padding: 0;
  margin-bottom: 0.3rem;
}

.attending.guests {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
}

.attending.guests legend {
  width: 100%;
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.98rem;
  color: var(--paper);
}

.radio input {
  accent-color: var(--paper);
  width: 1rem;
  height: 1rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid #6F819A;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.5rem 0.1rem;
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.rsvp :focus-visible,
.hero-panel :focus-visible,
.rsvp-badge:focus-visible {
  outline-color: var(--paper);
}

input::placeholder, textarea::placeholder {
  color: #8494AB;
}

button[type="submit"] {
  margin-top: 0.6rem;
  background: var(--paper);
  color: var(--slate-deep);
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.85rem 1.8rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

button[type="submit"]:hover {
  background: var(--stone);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: default;
}

.form-error {
  margin-top: 1rem;
  color: #E3B99C;
  font-size: 0.92rem;
}

.rsvp-success p {
  margin: 0;
}

.rsvp-success p:first-child {
  font-family: var(--font-display);
  font-size: 3.2rem;
}

.rsvp-success-sub {
  margin-top: 0.5rem;
  color: #C5CEDB;
}

/* ---------------------------------------------------
   Thank-you window
--------------------------------------------------- */
body.thanks {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
  background: var(--slate-deep);
  color: var(--paper);
  text-align: center;
}

.thanks-box {
  max-width: 26rem;
}

.thanks-heart {
  display: block;
  width: 3.2rem;
  height: 2.9rem;
  margin: 0 auto 1.2rem;
  stroke: var(--paper);
}

.thanks-title {
  margin: 0 0 1rem;
  font-size: clamp(3rem, 12vw, 4.6rem);
  line-height: 1;
}

.thanks-sub {
  margin: 0;
  color: #C5CEDB;
  font-size: 1.05rem;
}

/* ---------------------------------------------------
   Footer
--------------------------------------------------- */
footer {
  padding: 2.5rem var(--gutter) 3rem;
  max-width: var(--max);
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

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

.footer-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer-meta {
  margin: 1.2rem 0 0;
  color: var(--stone);
  font-size: 0.85rem;
}

/* ---------------------------------------------------
   Responsive
--------------------------------------------------- */
@media (max-width: 780px) {
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-panel {
    padding: 1.75rem clamp(1.5rem, 5vw, 2rem) 2.75rem;
  }
  .hero-panel-inner {
    grid-template-columns: auto auto;
    grid-template-areas:
      "names date"
      "names place";
    column-gap: 1rem;
  }
  .hero-names {
    font-size: clamp(3rem, 12vw, 4.2rem);
  }
  .hero-photo {
    aspect-ratio: 4 / 3;
  }
  .rsvp-badge {
    left: 50%;
    top: 0;
    width: 90px;
    height: 90px;
  }
  .venue,
  .food,
  .info-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
  }
  .gallery-col {
    display: contents;
  }
  .gallery-col figure,
  .gallery-col:nth-child(2) figure {
    aspect-ratio: 1 / 1;
    flex: none;
  }
}
