:root {
  --bg: #faf3e8;
  --ink: #2a2018;
  --muted: #9a8467;
  --accent: #c07a4c;
  --line: #e6d9c4;
  --max: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Jost", system-ui, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle film grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(5rem, 14vh, 11rem) clamp(1.5rem, 6vw, 5rem);
}

.section__label {
  font-size: .78rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.4rem;
}

.section__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -.01em;
}

.section__body { color: var(--muted); font-size: 1.1rem; margin-top: 1rem; }
.section__note { color: var(--muted); font-size: .98rem; margin-top: 1.4rem; max-width: 34ch; }
.section__note em, .section__body em { font-style: italic; color: var(--ink); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
  position: relative;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 3.5rem);
  max-width: 1150px;
  width: 100%;
}
.hero__text { text-align: left; }

.hero__eyebrow {
  font-size: clamp(.8rem, 2vw, 1rem);
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.6rem;
}

.hero__names {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: .92;
  letter-spacing: -.02em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero__names em {
  font-style: italic;
  color: var(--accent);
  font-size: .5em;
  margin: .05em 0;
}

.hero__date {
  margin-top: 2rem;
  letter-spacing: .3em;
  font-size: clamp(.85rem, 2.2vw, 1.15rem);
  color: var(--muted);
}

.hero__portrait { margin: 0; }
.hero__portrait img {
  width: 100%;
  max-height: 86svh;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 22px 40px rgba(80, 50, 20, .14));
}

.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.4rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(8px);} }

/* ---------- COUNTDOWN ---------- */
.countdown { text-align: center; }
.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(.5rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
}
.cd { display: flex; flex-direction: column; align-items: center; }
.cd__num {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 9vw, 6rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.cd__lbl {
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .6rem;
}

/* ---------- DRESS CODE ---------- */
.dresscode {
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-top: clamp(4rem, 10vh, 7rem);
  padding-bottom: clamp(4rem, 10vh, 7rem);
}
.dresscode__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: .01em;
  margin-top: .3rem;
}
.dresscode__note {
  color: var(--muted);
  margin: 1.4rem auto 0;
  max-width: 34ch;
  font-size: 1.05rem;
}

/* ---------- SPLIT SECTIONS ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  border-top: 1px solid var(--line);
}
.split--reverse .split__text { order: 2; }
.photo {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 24px 60px -30px rgba(80, 50, 20, .45);
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s ease;
}
.photo:hover img { transform: scale(1.04); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  margin-top: 2rem;
  padding: .85rem 1.8rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-size: .8rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background .35s ease, color .35s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- GIFT ---------- */
.gift { text-align: center; border-top: 1px solid var(--line); }
.gift .section__body { margin-left: auto; margin-right: auto; max-width: 46ch; }
.iban {
  margin-top: 3rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 2rem clamp(1.5rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  background: #fbf8f2;
}
.iban__label { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.iban code {
  font-family: "Jost", monospace;
  font-size: clamp(.95rem, 3.5vw, 1.4rem);
  letter-spacing: .08em;
  word-break: break-all;
}
.iban__copy {
  background: none;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: .5rem 1.4rem;
  font-family: inherit;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .3s, color .3s;
}
.iban__copy:hover { background: var(--ink); color: var(--bg); }
.iban__holder { font-size: .85rem; color: var(--muted); }

/* ---------- RSVP ---------- */
.rsvp {
  text-align: center;
  background: var(--ink);
  color: var(--bg);
  max-width: none;
}
.rsvp__title {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: clamp(2.6rem, 9vw, 6rem);
  line-height: 1;
}
.rsvp__sub { color: #cdbfa8; margin-top: 1.4rem; letter-spacing: .1em; }
.rsvp .btn--solid { background: var(--bg); color: var(--ink); border-color: var(--bg); }
.rsvp .btn--solid:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* ---------- RSVP FORM ---------- */
.rsvp-form {
  max-width: 540px;
  margin: 3.5rem auto 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}
.rsvp-form .field { display: flex; flex-direction: column; gap: .6rem; border: 0; padding: 0; margin: 0; }
.rsvp-form label, .rsvp-form legend {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #e7dcc9;
}
.rsvp-form label span, .rsvp-form legend span { text-transform: none; letter-spacing: 0; color: #b0a48f; font-size: .8rem; }
.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form input[type="number"],
.rsvp-form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #5a4d40;
  color: var(--bg);
  font-family: inherit;
  font-size: 1rem;
  padding: .55rem .1rem;
  transition: border-color .3s ease;
}
.rsvp-form textarea { resize: vertical; }
.rsvp-form input:focus, .rsvp-form textarea:focus { outline: none; border-color: var(--accent); }
.rsvp-form input::placeholder, .rsvp-form textarea::placeholder { color: #8a7f6d; }

.radios, .checks { display: flex; flex-wrap: wrap; gap: .8rem 1.8rem; }
.checks { gap: .8rem 1.6rem; }
.radios label, .checks label {
  text-transform: none;
  letter-spacing: 0;
  color: var(--bg);
  font-size: .98rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}
.rsvp-form input[type="radio"], .rsvp-form input[type="checkbox"] { accent-color: var(--accent); width: auto; }

.rsvp-form .btn--solid { align-self: start; margin-top: .6rem; cursor: pointer; }
.rsvp-form__status { min-height: 1.2em; font-size: .9rem; letter-spacing: .05em; color: var(--accent); margin: 0; }
.rsvp-form__status.error { color: #e6a07c; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  .hero__inner { grid-template-columns: 1fr; gap: 1.2rem; text-align: center; }
  .hero__text { order: 2; text-align: center; }
  .hero__names { align-items: center; }
  .hero__eyebrow { margin-bottom: 1rem; }
  .hero__portrait { order: 1; }
  .hero__portrait img { max-height: 42svh; margin: 0 auto; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__text { order: 0; }
  .photo { aspect-ratio: 16 / 11; }
  .countdown__grid { gap: .8rem; }
}
