:root {
  --bg-dark: #0b1210;
  --bg-deep: #101a16;
  --accent-gold: #d6c08a;
  --accent-gold-soft: rgba(214, 192, 138, 0.2);
  --accent-emerald: #2f5d3a;
  --accent-emerald-soft: rgba(47, 93, 58, 0.5);
  --text-main: #f8f5e9;
  --text-muted: #c7c0a2;
  --border-soft: rgba(255, 255, 255, 0.08);
  --glow: rgba(214, 192, 138, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Crimson Text", serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, #28382d 0, transparent 55%),
    radial-gradient(circle at bottom, #18221c 0, transparent 60%),
    linear-gradient(180deg, #050806, #090f0c 40%, #030504 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

/* subtle film grain */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 0;
}

/* MAIN CARD (with Rivendell-style double border) */
.page {
  position: relative;
  z-index: 1;
  max-width: 960px;
  width: 100%;
  border-radius: 24px;
  padding: 2px;
  background:
    linear-gradient(145deg, rgba(219, 198, 144, 0.35),
                          rgba(92, 130, 97, 0.2),
                          rgba(13, 26, 20, 0.95));
  box-shadow:
    0 0 60px rgba(0, 0, 0, 0.85),
    0 0 32px rgba(13, 33, 20, 0.7);
}

/* outer glowing line */
.page::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 22px;
  border: 1px solid rgba(214, 192, 138, 0.5);
  box-shadow: 0 0 18px rgba(214, 192, 138, 0.45);
  pointer-events: none;
}

/* inner decorative arcs, Rivendell-style */
.page::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 20px;
  border: 1px solid rgba(214, 192, 138, 0.16);
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0,
      rgba(214,192,138,0.4) 0,
      transparent 60%),
    radial-gradient(circle at 100% 0,
      rgba(214,192,138,0.35) 0,
      transparent 60%),
    radial-gradient(circle at 0 100%,
      rgba(214,192,138,0.3) 0,
      transparent 60%),
    radial-gradient(circle at 100% 100%,
      rgba(214,192,138,0.35) 0,
      transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.55;
}

/* inner content container */
.page-inner {
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 55%),
    radial-gradient(circle at bottom right, rgba(33, 84, 54, 0.44), rgba(6, 12, 9, 0.98));
  border: 1px solid var(--border-soft);
  padding: 2.5rem 2.25rem 2.75rem;
  position: relative;
  overflow: hidden;
}

/* faint forest / elven arches */
.forest {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background:
    radial-gradient(circle at 10% 100%, rgba(10, 50, 26, 0.9) 0, transparent 60%),
    radial-gradient(circle at 90% 100%, rgba(10, 50, 26, 0.9) 0, transparent 60%);
  mask-image: radial-gradient(circle at 50% 120%, black 30%, transparent 75%);
  pointer-events: none;
}

/* top ornamental arc */
.ornament {
  position: absolute;
  inset: 1.5rem 2rem auto;
  height: 60px;
  border-radius: 50%;
  border-top: 1px solid var(--accent-gold-soft);
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  opacity: 0.7;
}

.ornament::before,
.ornament::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--accent-gold-soft);
  top: -18px;
}

.ornament::before { left: 18%; }
.ornament::after  { right: 18%; }

header {
  text-align: center;
  margin-bottom: 2.25rem;
  position: relative;
  z-index: 1;
}

.tagline {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

.names {
  font-family: "Marcellus", serif;
  font-size: clamp(2rem, 6vw, 3.6rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.names span { white-space: nowrap; }

.names .ampersand {
  font-size: 1.6rem;
  opacity: 0.85;
  color: var(--accent-gold);
}

.divider {
  margin: 1.1rem auto 0.9rem;
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--accent-gold-soft);
  background: rgba(6, 12, 9, 0.8);
}

.divider::before { left: 0; }
.divider::after  { right: 0; }

.subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

/* LAYOUT */
.content {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr);
  gap: 2.2rem;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .page-inner {
    padding: 2rem 1.5rem 2.25rem;
  }
  .content {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* PANELS */
.panel {
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  padding: 1.75rem 1.6rem;
  background:
    radial-gradient(circle at top, rgba(88, 80, 60, 0.04), transparent 55%),
    linear-gradient(135deg, rgba(27, 44, 33, 0.96), rgba(11, 22, 17, 0.98));
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: -60%;
  opacity: 0.08;
  background-image: radial-gradient(circle, #355a3b 0, transparent 60%);
  mix-blend-mode: screen;
}

.panel h2 {
  font-family: "Marcellus", serif;
  font-size: 1.2rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.panel h3 {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.panel p {
  line-height: 1.6;
  font-size: 0.98rem;
  color: var(--text-main);
}

.panel p + p {
  margin-top: 0.75rem;
}

/* DETAILS */
.date-main {
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-sub {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.location {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.location span {
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.15rem;
}

/* leaf-style footer border in panel */
.leaf-border {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.leaf-border::before,
.leaf-border::after {
  content: "";
  position: absolute;
  top: -1px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(76, 122, 85, 0.7);
  background: radial-gradient(circle, rgba(117, 169, 120, 0.2) 0, transparent 70%);
}

.leaf-border::before {
  left: 0;
  transform: translateY(-45%);
}

.leaf-border::after {
  right: 0;
  transform: translateY(-45%);
}

.elven-script {
  margin-top: 0.4rem;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* COUNTDOWN */
.countdown-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.countdown-intro {
  font-size: 0.96rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

@media (max-width: 520px) {
  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.time-box {
  padding: 0.75rem 0.6rem 0.8rem;
  border-radius: 14px;
  background:
    radial-gradient(circle at top, rgba(214, 192, 138, 0.22), rgba(14, 28, 20, 0.96));
  border: 1px solid rgba(214, 192, 138, 0.35);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.9),
    0 16px 30px rgba(0, 0, 0, 0.7);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.time-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.08), transparent 55%);
  opacity: 1;
  pointer-events: none;
}

.time-value {
  font-family: "Marcellus", serif;
  font-size: 1.75rem;
  letter-spacing: 0.06em;
  text-shadow: 0 0 12px var(--glow);
}

.time-label {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.countdown-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.5rem;
}

/* RSVP button */
.rsvp-button {
  margin-top: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--accent-gold);
  background:
    radial-gradient(circle at 30% 0, rgba(255, 255, 255, 0.08), transparent 60%),
    linear-gradient(135deg, rgba(34, 69, 44, 0.95), rgba(19, 36, 27, 0.98));
  color: var(--text-main);
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease-out,
              box-shadow 0.16s ease-out,
              border-color 0.16s ease-out;
  box-shadow:
    0 14px 18px rgba(0, 0, 0, 0.8),
    0 0 18px rgba(214, 192, 138, 0.4);
}

.rsvp-button:hover {
  transform: translateY(-1px);
  border-color: #f2e3af;
  box-shadow:
    0 18px 26px rgba(0, 0, 0, 0.9),
    0 0 24px rgba(214, 192, 138, 0.65);
}

.rsvp-button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 10px 14px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(214, 192, 138, 0.4);
}

/* FOOTER */
.footer-note {
  margin-top: 1.6rem;
  font-size: 1.rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-note span {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 1rem;
  color: var(--text-muted);
}
