:root {
  --cream: #efe9dd;
  --cream-deep: #e6dfce;
  --ink: #2b2b24;
  --ink-soft: #4d4a3f;
  --blue: #2f4858;
  --lavender: #a9a1c9;
  --green: #7c9473;
  --blush: #e3a9a0;

  --display: "Fraunces", serif;
  --body: "Work Sans", sans-serif;

  --max: 780px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  color: var(--blue);
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 0.8em;
}

p { margin: 0 0 1em; }

a { color: var(--blue); }

code {
  background: rgba(47,72,88,0.08);
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* ---------- background brushstrokes ---------- */

.brushfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  mix-blend-mode: multiply;
}

.blob--blue {
  width: 42vw; height: 42vw;
  top: -10vw; left: -8vw;
  background: var(--blue);
  opacity: 0.22;
}
.blob--lavender {
  width: 30vw; height: 30vw;
  top: 30vh; right: -10vw;
  background: var(--lavender);
  opacity: 0.30;
}
.blob--green {
  width: 34vw; height: 34vw;
  bottom: 5vh; left: -6vw;
  background: var(--green);
  opacity: 0.22;
}
.blob--blush {
  width: 26vw; height: 26vw;
  bottom: -8vh; right: 6vw;
  background: var(--blush);
  opacity: 0.28;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 5vw, 3rem);
  background: rgba(239,233,221,0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(43,43,36,0.08);
}

.nav__mark {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--blue);
  text-decoration: none;
  font-style: italic;
}

.nav__links {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.8rem);
}

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

.nav__links a:hover { color: var(--blue); }

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

.hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 4rem clamp(1.5rem, 8vw, 6rem);
  max-width: 900px;
}

.hero__date {
  font-family: var(--body);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.hero__names {
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 1;
  margin-bottom: 0.6rem;
}

.hero__amp {
  font-style: italic;
  color: var(--blush);
  padding: 0 0.15em;
}

.hero__sub {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-bottom: 1.8rem;
}

.button {
  display: inline-block;
  background: var(--blue);
  color: var(--cream);
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: 4px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.button:hover { background: #253a47; }

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

section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.gallery { max-width: 1000px; }

/* ---------- details ---------- */

.details__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.detail-card {
  padding: 1.6rem;
  background: rgba(255,255,255,0.4);
  border-left: 3px solid var(--green);
}

.detail-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.4em;
}

.detail-card__time {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* ---------- gallery ---------- */

.gallery__hint {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.gallery__grid {
  columns: 4 220px;
  column-gap: 0.9rem;
  margin-top: 1.5rem;
}

.gallery__grid figure {
  margin: 0 0 0.9rem;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 3px;
}

.gallery__grid img {
  width: 100%;
  display: block;
  filter: saturate(1.08) contrast(0.97);
  transition: transform 0.4s ease;
}

.gallery__grid figure:hover img {
  transform: scale(1.04);
}

/* ---------- rsvp ---------- */

.rsvp__form {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-top: 1.5rem;
}

.rsvp__form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.rsvp__form input,
.rsvp__form textarea {
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(43,43,36,0.25);
  border-radius: 4px;
  background: rgba(255,255,255,0.55);
  color: var(--ink);
}

.rsvp__form input:focus,
.rsvp__form textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.rsvp__attending {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rsvp__attending legend {
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding: 0 0 0.35rem;
}

.radio {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem !important;
}

.radio input { width: auto; }

.rsvp__note {
  font-size: 0.9rem;
  color: var(--green);
  min-height: 1.2em;
}

.rsvp__form .button {
  align-self: flex-start;
}

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

.footer {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ---------- accessibility & motion ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery__grid figure:hover img { transform: none; }
}

@media (max-width: 640px) {
  .nav__links { gap: 0.9rem; }
  .nav__links a { font-size: 0.82rem; }
  .hero { min-height: 60vh; }
  .gallery__grid { columns: 2 150px; }
}
