:root {
  --paper: #faf6ef;
  --paper-deep: #f3ecdf;
  --ink: #2f2618;
  --ink-soft: #6b5d47;
  --gold: #c9a96a;
  --gold-soft: rgba(201, 169, 106, 0.45);
  --gold-muted: #a08a5f;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  --script: 'Great Vibes', 'Snell Roundhand', cursive;
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  background: radial-gradient(120% 70% at 50% 0%, #fffcf4 0%, var(--paper) 60%);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-align: center;
}

/* Signature: fixed double gold frame — content scrolls inside it like a printed card */
.frame {
  position: fixed;
  inset: 10px;
  border: 1px solid var(--gold);
  pointer-events: none;
  z-index: 10;
}
.frame::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--gold-soft);
}
.corner { position: absolute; width: 42px; height: 42px; color: var(--gold); }
.corner-tl { top: 8px; left: 8px; }
.corner-tr { top: 8px; right: 8px; transform: rotate(90deg); }
.corner-br { bottom: 8px; right: 8px; transform: rotate(180deg); }
.corner-bl { bottom: 8px; left: 8px; transform: rotate(270deg); }

.card {
  max-width: 480px;
  margin: 0 auto;
  padding: 44px 30px 72px;
}

/* language pills */
.lang { display: flex; justify-content: center; gap: 8px; }
.lang button {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-muted);
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s;
}
.lang button.on { background: var(--gold); color: var(--paper); }
.lang button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* hero */
.hero {
  min-height: calc(100vh - 300px);
  min-height: calc(100dvh - 300px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 40px;
}
.monogram {
  width: 84px;
  height: 84px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--script);
  font-size: 27px;
  line-height: 1;
  color: var(--gold-muted);
  margin-bottom: 22px;
  position: relative;
}
.monogram::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid var(--gold-soft);
  border-radius: 50%;
}
.eyebrow {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 22px;
}
.names {
  font-family: var(--serif);
  font-size: clamp(44px, 13vw, 58px);
  font-weight: 500;
  line-height: 1.06;
}
.names span { display: block; }
.names .amp {
  font-style: italic;
  font-size: 0.55em;
  font-weight: 400;
  color: var(--gold);
  margin: 4px 0;
}
.flourish { width: 150px; margin: 22px auto 18px; color: var(--gold); }
.date-block { margin-top: 6px; }
.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.date-side {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 12px 0;
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
  min-width: 96px;
}
.date-day {
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}
.date-monthyear {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 12px;
}
.greeting {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.guest-name { color: var(--ink); font-weight: 600; }

/* shared section rhythm */
.invite, .countdown, .venue { margin-top: 52px; }

/* bouquet photo in an arch frame */
.photo { margin-top: 56px; }
.photo-frame {
  display: inline-block;
  padding: 9px;
  border: 1px solid var(--gold);
  border-radius: 999px 999px 12px 12px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 40px rgba(63, 50, 30, 0.1);
}
.photo-frame img {
  display: block;
  width: min(62vw, 264px);
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 999px 999px 6px 6px;
  filter: saturate(0.94) brightness(1.02);
}
.divider { display: block; width: 110px; margin: 0 auto 16px; color: var(--gold); }
.section-title {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: 22px;
}
.invite-text {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
}

/* countdown */
.tiles { display: flex; justify-content: center; gap: 10px; }
.tile {
  min-width: 64px;
  padding: 12px 6px 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 2px 10px rgba(63, 50, 30, 0.05);
}
.tile b {
  display: block;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.tile i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-muted);
}
.married {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--gold-muted);
}

/* venue */
.venue-name { font-family: var(--serif); font-size: 27px; font-weight: 600; }
.venue-address { font-size: 14px; font-weight: 300; color: var(--ink-soft); margin-top: 6px; }
.venue-city { font-size: 12px; font-weight: 300; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-muted); margin-top: 10px; }
.seat {
  display: table;
  margin: 16px auto 0;
  padding: 9px 20px;
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-muted);
}
.seat b {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-left: 8px;
}
.btn {
  display: inline-block;
  margin-top: 24px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  background: var(--ink);
  padding: 14px 36px;
  border-radius: 999px;
  transition: background-color 0.25s;
}
.btn:hover { background: #4a3d2a; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* hero load sequence */
.hero > * { opacity: 0; animation: rise 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) forwards; }
.hero .monogram { animation-delay: 0.1s; }
.hero .eyebrow { animation-delay: 0.25s; }
.hero .names { animation-delay: 0.4s; }
.hero .flourish { animation-delay: 0.6s; }
.hero .date-block { animation-delay: 0.75s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.shown { opacity: 1; transform: none; }

/* load error */
.load-error { padding: 40vh 24px 0; font-size: 14px; color: var(--ink-soft); }

/* admin panel */
.admin { max-width: 420px; margin: 0 auto; padding: 80px 24px; text-align: left; }
.admin h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; margin-bottom: 28px; }
.admin label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.admin input, .admin select {
  display: block;
  width: 100%;
  margin-top: 6px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--gold-soft);
  border-radius: 6px;
  padding: 10px 12px;
}
.admin-preview { font-family: var(--serif); font-style: italic; font-size: 20px; margin: 10px 0 22px; }
.admin-link-row { display: flex; gap: 8px; }
.admin-link-row input { flex: 1; margin-top: 0; font-size: 13px; color: var(--ink-soft); }
.admin-link-row button {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  cursor: pointer;
}

/* desktop: the invitation floats as a card on deeper paper */
@media (min-width: 700px) {
  body {
    background: var(--paper-deep);
    background: radial-gradient(100% 80% at 50% 0%, #f8f1e3 0%, var(--paper-deep) 65%);
  }
  .card {
    background: var(--paper);
    margin: 56px auto 72px;
    padding: 52px 48px 76px;
    border: 1px solid var(--gold-soft);
    border-radius: 4px;
    box-shadow: 0 24px 60px rgba(63, 50, 30, 0.12);
  }
  .hero { min-height: 0; padding: 30px 0 10px; }
}

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