/* Palette drawn from the printed invitation: parchment, deep red, antique gold. */
:root {
  --cream: #f7f0dd;
  --cream-deep: #f1e6c8;
  --red: #8b1e1e;
  --red-dark: #6e1414;
  --gold: #b08d3e;
  --gold-soft: #cbb476;
  --ink: #3a2f24;
  --serif: "Cormorant Garamond", Georgia, serif;
  --zh: "Noto Serif SC", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-variant-numeric: lining-nums;
}

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

h1, h2, h3 { font-weight: 500; color: var(--red); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.25rem;
  background: rgba(247, 240, 221, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--gold-soft);
}

.nav-seal {
  font-family: var(--zh);
  font-size: 1.4rem;
  color: var(--cream);
  background: var(--red);
  border-radius: 6px;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.nav-links a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 1.4rem;
  letter-spacing: 0.08em;
  font-size: 1rem;
}

.nav-links a:hover { color: var(--red); }

/* ---------- Hero ---------- */
.hero { padding: 2.5rem 1rem 3.5rem; }

.hero-frame {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold-soft);
  outline-offset: 5px;
  padding: 3rem 1.5rem 2.5rem;
  background:
    radial-gradient(ellipse at top left, rgba(176, 141, 62, 0.08), transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(139, 30, 30, 0.06), transparent 40%),
    var(--cream);
}

.hero-zh {
  font-family: var(--zh);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3rem);
  color: var(--red);
  letter-spacing: 0.35em;
  margin-left: 0.35em; /* balance the letter-spacing */
}

.hero-kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.95rem;
  margin: 0.75rem 0 1.5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 600;
}

.hero .amp { color: var(--gold); font-style: italic; }

.hero-invite { font-style: italic; margin-top: 0.4rem; }

.hero-divider {
  color: var(--gold);
  margin: 1.4rem 0;
  letter-spacing: 0.5em;
  font-family: var(--zh);
}

.hero-date { font-size: 1.6rem; color: var(--red); }

.hero-badi { font-size: 1.2rem; font-style: italic; color: var(--gold); margin-bottom: 0.3rem; }

.hero-venue { font-size: 1.2rem; letter-spacing: 0.06em; }

.hero-photo {
  margin: 1.8rem auto;
  max-width: 420px;
  padding: 10px;
  border: 1px solid var(--gold);
  background: #fff;
}

.hero-rsvp-note { font-style: italic; margin-bottom: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--cream);
  background: var(--red);
  border: 1px solid var(--red-dark);
  padding: 0.6rem 2.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn:hover { background: var(--red-dark); }

/* ---------- Sections ---------- */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 3.5rem 1.25rem;
}

.section-alt {
  max-width: none;
  background: var(--cream-deep);
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
}

.section-alt > * { max-width: 900px; margin-left: auto; margin-right: auto; }

.section-head { text-align: center; margin-bottom: 2.5rem; }

.zh-label {
  display: inline-block;
  font-family: var(--zh);
  color: var(--cream);
  background: var(--red);
  border-radius: 4px;
  padding: 0.15rem 0.6rem;
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  margin-bottom: 0.6rem;
}

.section-head h2 { font-size: clamp(1.9rem, 5vw, 2.6rem); }

.section-sub { font-style: italic; color: var(--gold); margin-top: 0.3rem; }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  max-width: 620px;
  margin: 0 auto;
  border-left: 1px solid var(--gold);
  padding-left: 0;
}

.timeline li {
  display: flex;
  gap: 1.5rem;
  padding: 1.1rem 0 1.1rem 1.75rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 1.75rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  border: 1px solid var(--gold);
}

.timeline .time {
  flex: 0 0 4rem;
  font-size: 1.3rem;
  color: var(--red);
}

.timeline h3 { font-size: 1.25rem; }

/* ---------- Blessing quote ---------- */
.blessing {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 0.5rem;
  text-align: center;
}

.blessing blockquote p {
  font-size: 1.35rem;
  font-style: italic;
  color: var(--ink);
}

.blessing cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  color: var(--gold);
  letter-spacing: 0.08em;
  font-size: 1.1rem;
}

/* ---------- Weather card ---------- */
.weather-card {
  max-width: 620px;
  margin: 2.5rem auto 0;
  text-align: center;
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold-soft);
  outline-offset: 4px;
  padding: 1.8rem 1.5rem;
  background: #fffdf6;
}

.weather-card h3 { font-size: 1.3rem; margin-top: 0.5rem; }

.weather-main { font-size: 1.35rem; margin-top: 0.5rem; }

.weather-detail { font-style: italic; }

.weather-source { font-size: 0.9rem; color: var(--gold); margin-top: 0.6rem; }

.weather-source a { color: var(--gold); }

/* ---------- Stockholm tips ---------- */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.tip {
  border: 1px solid var(--gold-soft);
  background: #fffdf6;
  padding: 1.3rem 1.2rem;
}

.tip h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }

.tip p { font-size: 1.05rem; }

.goodtoknow {
  margin-top: 2rem;
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold-soft);
  outline-offset: 4px;
  background: var(--cream-deep);
  padding: 1.8rem 1.8rem;
}

.goodtoknow h3 { font-size: 1.35rem; margin-bottom: 0.7rem; }

.goodtoknow ul { list-style: none; }

.goodtoknow li { padding: 0.35rem 0; }

.goodtoknow li strong { color: var(--red); }

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.gallery img {
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--gold-soft);
  padding: 4px;
  background: #fff;
}

/* ---------- Location ---------- */
.location-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.map-wrap {
  border: 1px solid var(--gold);
  padding: 8px;
  background: #fff;
}

.map-wrap iframe {
  width: 100%;
  height: 420px;
  display: block;
}

.directions-intro { font-size: 1.1rem; margin-bottom: 1.4rem; }

.direction {
  border: 1px solid var(--gold-soft);
  background: #fffdf6;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1rem;
}

.direction:last-child { margin-bottom: 0; }

.direction h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }

.direction p { font-size: 1.02rem; }

.direction-help {
  border-color: var(--gold);
  background: var(--cream-deep);
}

/* ---------- RSVP form ---------- */
.rsvp-form { max-width: 620px; }

.field { margin-bottom: 1.3rem; }

.field label, .field .label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--red);
  letter-spacing: 0.04em;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  background: #fffdf6;
  border: 1px solid var(--gold-soft);
  padding: 0.6rem 0.8rem;
}

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

.field-small input { max-width: 8rem; }

.radio-row { display: flex; gap: 2rem; flex-wrap: wrap; }

.radio { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }

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

.form-status { min-height: 1.6rem; font-style: italic; }

.form-status.error { color: var(--red); }

.form-status.success { color: #2f6b2f; }

.btn-submit { border: none; }

/* ---------- Gift registry ---------- */
.gift-grid {
  display: flex;
  flex-direction: column;
  margin-top: 2.5rem;
}

.gift-loading { text-align: center; font-style: italic; color: var(--gold); }

.gift-card {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  padding: 0.9rem 0.2rem;
  border-bottom: 1px solid var(--gold-soft);
  transition: opacity 0.4s ease;
}

.gift-card h3 { font-size: 1.1rem; flex: 1 1 auto; }

/* Pill + claim action travel together so they never wrap onto separate lines. */
.gift-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gift-card .gift-action { padding-top: 0; }

.gift-card .btn {
  font-size: 0.95rem;
  padding: 0.5rem 1.2rem;
  color: var(--red);
  background: transparent;
  border: 1px solid var(--gold-soft);
}

.gift-card .btn:hover { background: var(--gold-soft); color: var(--red-dark); }

.gift-card.is-claimed { opacity: 0.6; }

.gift-seal {
  display: inline-block;
  font-family: var(--zh);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  transform: rotate(-4deg);
}

.gift-mine {
  display: inline-block;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  font-style: italic;
  color: var(--gold);
}

.gift-card .btn-remove { color: var(--red); border-color: var(--red); }

.gift-card .btn-remove:hover { background: var(--red); color: var(--cream); }

.gift-claim-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.gift-claim-form input {
  flex: 1 1 8rem;
  min-width: 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: var(--cream);
  border: 1px solid var(--gold-soft);
  padding: 0.45rem 0.6rem;
}

.gift-claim-form input:focus { outline: 2px solid var(--gold); outline-offset: -1px; }

.gift-error { color: var(--red); font-style: italic; font-size: 0.95rem; }

/* Admin-only: claimer names, shown when the page is opened with ?key=… */
.gift-claimers {
  flex-basis: 100%;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  border-top: 1px dashed var(--gold-soft);
  padding-top: 0.5rem;
}

.gift-claimers span { display: block; }

.gift-note {
  margin-top: 2.5rem;
  text-align: center;
  font-style: italic;
  font-size: 1.02rem;
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 3rem 1rem;
  border-top: 1px solid var(--gold-soft);
}

.footer-seal {
  font-family: var(--zh);
  font-size: 2rem;
  color: var(--cream);
  background: var(--red);
  border-radius: 8px;
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
}

.footer-zh { font-family: var(--zh); color: var(--gold); margin-top: 0.4rem; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .location-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .gift-card { align-items: flex-start; }
  .gift-status { margin-left: 0; flex-basis: 100%; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .map-wrap iframe { height: 320px; }
  .nav-links a { margin-left: 0.9rem; font-size: 0.95rem; }
  .timeline li { gap: 1rem; }
}

.email {
  display: none;
}