/* ============================================================
   Igor & Vanessa — 28.11.26
   Palette and type sampled from the printed invitation suite:
   cream main invite, olive suede detail cards, blush RSVP oval.
   ============================================================ */

:root {
  --cream:       #f4eee1;
  --cream-deep:  #ece4d1;
  --olive:       #666146;
  --olive-deep:  #5b563e;
  --olive-text:  #efe7ce;
  --olive-head:  #f2ead2;
  --blush:       #f0c3b8;
  --blush-deep:  #e8b4a8;
  --ink:         #40382b;
  --ink-soft:    #6f654f;
  --gold:        #a98f5f;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "EB Garamond", Georgia, serif;
  color: var(--ink);
  background: var(--cream);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.script {
  font-family: "Imperial Script", "Great Vibes", cursive;
  font-weight: 400;
  line-height: 1.1;
  word-spacing: 0.18em; /* Imperial Script's space glyph is nearly zero-width */
}
.script .amp { margin: 0 0.07em; }
/* Imperial Script ships Vietnamese glyphs (verified), Great Vibes is the fallback */

/* ---------- top bar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 12%, transparent);
}

.monogram {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  letter-spacing: 0.28em;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.topnav {
  margin-left: auto;
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
  align-items: center;
}

.topnav a {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
}
.topnav a:hover { color: var(--ink); }

.topnav .nav-rsvp {
  border: 1px solid var(--ink);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  color: var(--ink);
}
.topnav .nav-rsvp:hover { background: var(--ink); color: var(--cream); }

.lang {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}
.lang button {
  border: none;
  background: none;
  font: inherit;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0.15rem 0.2rem;
  white-space: nowrap;
}
.lang button[aria-pressed="true"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 540px) {
  .topnav a:not(.nav-rsvp) { display: none; }
  .topbar { gap: 0.8rem; }
  .lang { font-size: 0.78rem; }
}

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

.sec {
  position: relative;
  padding: clamp(4.5rem, 9vw, 7.5rem) clamp(1.25rem, 5vw, 2.5rem);
  scroll-margin-top: 3.2rem;
  overflow: hidden;
}

/* subtle paper grain, like the suede card stock */
.sec::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  margin: 0 auto;
}
.wrap.narrow { max-width: 38rem; }

.sec--cream { background: var(--cream); color: var(--ink); }
.sec--blush { background: var(--blush); color: var(--ink); }

.sec--olive {
  background: var(--olive);
  color: var(--olive-text);
}
.sec--olive-deep { background: var(--olive-deep); }

.sec-title {
  text-align: center;
  font-size: clamp(3rem, 8vw, 4.5rem);
  margin-bottom: clamp(2.25rem, 5vw, 3.5rem);
}
.sec--olive .sec-title { color: var(--olive-head); }

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

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 6rem;
}

.lotus {
  position: absolute;
  right: clamp(-3rem, 2vw, 6rem);
  bottom: 6%;
  width: clamp(200px, 34vw, 380px);
  color: var(--ink);
  opacity: 0.28;
  z-index: 0;
}

.hero-wrap { max-width: 42rem; }

.eyebrow {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.8rem, 2.4vw, 0.95rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.names {
  font-size: clamp(3.4rem, 12vw, 6.5rem);
  margin: 1.2rem 0 0.8rem;
}

.lede {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-style: italic;
  color: var(--ink-soft);
  max-width: 30rem;
  margin: 0 auto;
}

.orn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin: 2rem auto;
  max-width: 16rem;
}
.orn span {
  flex: 1;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}
.diamond {
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  display: inline-block;
}

.bigdate {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  letter-spacing: 0.12em;
}

.venue {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.85rem, 2.6vw, 1rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0.7rem 0 2.4rem;
  color: var(--ink-soft);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  text-wrap: balance;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.88rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.8rem 1.9rem;
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--ink); color: var(--cream); }

.btn--solid {
  background: var(--ink);
  color: var(--blush);
  border-color: var(--ink);
  width: 100%;
  margin-top: 0.5rem;
}
.btn--solid:hover { background: #2e2820; color: var(--blush); }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- timeline (itinerary) ---------- */

.timeline {
  list-style: none;
  max-width: 34rem;
  margin: 0 auto;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 0.4rem; bottom: 0.4rem;
  left: 7.2rem;
  width: 1px;
  background: color-mix(in srgb, var(--olive-text) 45%, transparent);
}

.timeline li {
  display: grid;
  grid-template-columns: 5.6rem 3.2rem 1fr;
  align-items: start;
  margin-bottom: 2.4rem;
}
.timeline li:last-child { margin-bottom: 0; }

.tl-date {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-align: right;
  padding-top: 0.15rem;
  color: var(--olive-head);
}

.tl-mark {
  justify-self: center;
  width: 3.2rem;
  display: flex;
  justify-content: center;
  padding-top: 0.38rem;
}
.tl-mark svg {
  width: 11px; height: 11px;
  fill: var(--olive-head);
  background: var(--olive);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--olive);
}
.sec--olive-deep .tl-mark svg { background: var(--olive-deep); box-shadow: 0 0 0 5px var(--olive-deep); }

.tl-body h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 1.06rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-head);
}
.tl-body .place {
  font-style: italic;
  font-size: 1rem;
  color: color-mix(in srgb, var(--olive-text) 85%, transparent);
}

@media (max-width: 480px) {
  .timeline::before { left: 5.7rem; }
  .timeline li { grid-template-columns: 4.4rem 2.6rem 1fr; }
  .tl-date { font-size: 0.95rem; }
  .tl-mark { width: 2.6rem; }
}

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

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3rem) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
@media (max-width: 640px) {
  .details-grid { grid-template-columns: 1fr; }
}

.detail h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--olive-head);
  margin-bottom: 0.6rem;
}
.detail p { color: var(--olive-text); }

/* ---------- traditions ---------- */

.prose { text-align: left; }
.prose.center, .wrap.narrow .prose { text-align: center; }

.soon {
  text-align: center;
  margin-top: 1.6rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- RSVP form ---------- */

#rsvp .prose { margin-bottom: 2.5rem; }

#rsvp-form {
  max-width: 30rem;
  margin: 0 auto;
}

.hp { position: absolute; left: -9999px; top: -9999px; }

.field { margin-bottom: 1.35rem; }

.field label,
.field legend {
  display: block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  color: var(--ink);
}
.field label em, .field legend em {
  text-transform: none;
  letter-spacing: 0.05em;
  font-style: italic;
  color: var(--ink-soft);
}

fieldset.field { border: none; }

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="date"],
.field textarea {
  width: 100%;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 1.05rem;
  color: var(--ink);
  background: color-mix(in srgb, #ffffff 42%, transparent);
  border: 1px solid color-mix(in srgb, var(--ink) 38%, transparent);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
}
.field input:focus-visible,
.field textarea:focus-visible,
.pill input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.field input::placeholder, .field textarea::placeholder {
  color: color-mix(in srgb, var(--ink) 45%, transparent);
  font-style: italic;
}

.field-row {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}
.field-row .field { flex: 0 0 auto; margin-bottom: 1.35rem; }
.field-row .field.grow { flex: 1 1 auto; }
.field-row .field:first-child:not(.grow) { width: 7.5rem; }

.pills { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; }
.pill span {
  display: inline-block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.pill input:checked + span { background: var(--ink); color: var(--blush); }

.checks label {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  font-size: 1.02rem;
}
.checks input { accent-color: var(--ink); width: 1rem; height: 1rem; }

#rsvp-form.is-declining .logistics { display: none; }

.form-error {
  color: #7a2f22;
  font-style: italic;
  margin: 0.8rem 0;
  text-align: center;
}

.success {
  text-align: center;
  padding: 2.5rem 0 1rem;
}
.success-h { font-size: clamp(2.6rem, 8vw, 3.6rem); margin-bottom: 1rem; }

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

.footer {
  background: var(--cream);
  text-align: center;
  padding: 3.5rem 1.5rem 3rem;
  border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.foot-script { font-size: 2.2rem; }
.foot-line {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.6rem;
}

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.in { opacity: 1; transform: none; }

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