:root {
  --bg: #fffdf9;
  --paper: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --accent: #05c4f9;
  --accent-2: #6b9e8b;
  --gold: #caa56a;
  --shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
  --radius: 16px;
  /* Lace tile used for the hero background (accent color) */
  --lace-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cpattern id='p' width='20' height='20' patternUnits='userSpaceOnUse'%3E%3Cpath d='M0 10h20M10 0v20' stroke='%2305c4f9' stroke-width='0.6' opacity='.35'/%3E%3Ccircle cx='10' cy='10' r='2.6' fill='none' stroke='%2305c4f9' stroke-width='0.6' opacity='.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23p)'/%3E%3Cg fill='none' stroke='%2305c4f9' stroke-width='0.8' opacity='.45'%3E%3Ccircle cx='100' cy='100' r='70'/%3E%3Ccircle cx='100' cy='100' r='40'/%3E%3Cpath d='M0 100h200M100 0v200' opacity='.5'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 120% -10%, rgba(199,125,125,.12), transparent 40%),
    radial-gradient(1000px 500px at -10% 120%, rgba(107,158,139,.12), transparent 40%),
    var(--bg);
  line-height: 1.6;
  overflow-x: auto;
}

a { color: inherit; text-decoration: none; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

/* Ensure hero content sits above the ornament */
header.hero .container {
  position: relative;
  z-index: 1;
  overflow: hidden; /* clip background to container bounds */
}

/* Hero */
header.hero {
  position: relative;
  padding: clamp(72px, 10vh, 140px) 0 72px;
  overflow: hidden;
  text-align: center;
}


/* Hide previous SVG ornament in hero (kept in HTML for easy revert) */
.ornament {
  display: none;
}

@media (min-width: 900px) {
  .ornament {
    width: min(1100px, 92%);
    height: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }
}

.badge-date {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: rgba(255,255,255,.7);
  border: solid 1px #05c4f9;
  backdrop-filter: blur(6px);
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.names {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(40px, 8vw, 88px);
  line-height: 1.05;
  margin: 6px 0 12px;
  letter-spacing: .3px;
}

.and {
  display: inline-block;
  margin: 0 .4em;
  font-weight: 600;
  color: var(--accent);
}

.subtitle {
  color: var(--muted);
  font-size: clamp(16px, 2.6vw, 20px);
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 12px;
  border: solid 1px #05c4f9;
  font-weight: 600;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  cursor: pointer;
  box-shadow: var(--shadow);
  background: var(--paper);
}

.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(17,24,39,.14); }

.btn.primary { background: linear-gradient(135deg, var(--accent), #42b6d6); color: #fff; border: none; }
.btn.outline { background: rgba(255,255,255,.75); }

/* Card row under hero */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 40px auto 0;
}

.card {
  background: var(--paper);
  border: solid 1px #05c4f9;
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: center;
}

.card .icon {
  width: 50px; height: 50px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.6), rgba(255,255,255,0)) ,
              linear-gradient(135deg, rgba(199,125,125,.18), rgba(107,158,139,.18));
}

.card h4 { margin: 0 0 4px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

/* Sections */
section { padding: 70px 0; }
section.alt { background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,1)); }

.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(28px, 4.8vw, 40px);
  margin: 0 0 24px;
  text-align: center;
}

.lead { text-align: center; color: var(--muted); margin: 0 auto 36px; max-width: 700px; }

/* Timeline */
.timeline {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}

.t-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  background: var(--paper);
  border: solid 1px #05c4f9;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.t-time { font-weight: 700; color: var(--accent); }
.t-title { margin: 2px 0; font-weight: 600; }
.t-note { margin: 2px 0; color: var(--muted); font-size: 14px; }

/* Venue */
.venue {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.venue .map, .venue .details {

  background: var(--paper);
  border: solid 1px #05c4f9;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.venue .details { padding: 22px; }
.venue .details p { margin: 0 0 12px; color: var(--muted); }

.map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; filter: grayscale(1); }

/* Gallery */
.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.gallery img {
  height: clamp(140px, 22vw, 220px);
  width: auto;
  aspect-ratio: auto;
  border-radius: 12px;
  filter: saturate(1.05) contrast(1.02);
  display: block;
  vertical-align: middle;
}

.g-1, .g-2, .g-3, .g-4, .g-5, .g-6 { grid-column: span 4; aspect-ratio: 4/3; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  background: var(--paper);
  border: solid 1px #05c4f9;
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0; /* summary will handle padding */
}
.faq-item[open] { border-color: #42b6d6; }
.faq-q { list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 600; position: relative; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: '+'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 800; }
.faq-item[open] .faq-q::after { content: '−'; }
.faq-a { padding: 0 18px 16px; color: var(--muted); }

/* Registry */
.registry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.registry a {
  display: grid; place-items: center; text-align: center;
  padding: 18px; background: var(--paper);
  border: 1px solid rgba(17,24,39,.06);
  border-radius: 12px; box-shadow: var(--shadow);
  font-weight: 600;
}

/* Footer */
footer {
  padding: 36px 0 60px;
  text-align: center;
  color: var(--muted);
}

.countdown {
  display: inline-flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: rgba(255,255,255,.7);
  border: solid 1px #05c4f9;
  padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow);
  margin-top: 14px;
}

.countdown .unit { text-align: center; }
.countdown .num { font-weight: 800; font-size: 20px; }
.countdown .lbl { color: var(--muted); font-size: 12px; margin-top: -2px; }

/* Responsive */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .venue { grid-template-columns: 1fr; }
  .registry { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .g-1, .g-2, .g-3, .g-4, .g-5, .g-6 { grid-column: span 12; }
  .registry { grid-template-columns: 1fr; }
}

/* Modal */
/* Ensure modal stack is above any header/card z-indexes */
.modal { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal.open { display: flex; }
/* Backdrop sits under the dialog but above page content */
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,24,39,.5); backdrop-filter: blur(2px); z-index: 0; }
/* Dialog sits above the backdrop */
.modal-dialog { position: relative; z-index: 1; width: min(520px, 92%); background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(17,24,39,.08); padding: 22px; animation: pop .16s ease-out; }
.modal-close { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border: none; border-radius: 8px; background: rgba(0,0,0,.04); cursor: pointer; font-size: 22px; line-height: 1; }
.modal-title { margin: 0 0 6px; font-family: "Playfair Display", Georgia, serif; }
.modal-desc { margin: 0 0 14px; color: var(--muted); }
.modal-label { display: block; font-weight: 600; margin: 8px 0 6px; }
.modal-input { width: 100%; padding: 12px 12px; border-radius: 10px; border: 1px solid rgba(17,24,39,.1); font-size: 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: .6; } to { transform: none; opacity: 1; } }

/* Photo lightbox modal */
.photo-dialog { width: min(96vw, 1100px); padding: 0; background: transparent; border: none; box-shadow: none; }
.photo-figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--paper); border: 1px solid rgba(17,24,39,.08); box-shadow: var(--shadow); }
.photo-figure img { display: block; width: 100%; height: auto; max-height: calc(90vh - 120px); object-fit: contain; background: #000; }
.photo-caption { padding: 12px 14px; color: var(--muted); font-size: 14px; background: var(--paper); }

/* Ensure close button visible on dark/light images */
#photo-modal .modal-close {
  color: #fff;
  background: rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  z-index: 2; /* above image within the dialog */
}
#photo-modal .modal-close:hover { background: rgba(0,0,0,.75); }
#photo-modal .modal-close:focus { outline: 2px solid #fff; outline-offset: 2px; }

.gallery img { cursor: zoom-in; }

/* Corner swirl ornaments */
html::before, html::after, body::before, body::after {
  content: "";
  position: fixed;
  width: 260px;
  height: 260px;
  pointer-events: none;
  z-index: 2; /* below modal (1000) and above page background */
  opacity: .40;
  background-repeat: no-repeat;
  background-size: contain;
}

/* Swirl ornament options
   - Toggle by changing the --swirl-uri line to any of the commented options below.
   - Kept previous versions commented so you can revert easily. */
:root {
  /* Clipart-style classic corner flourish (active) */
  --swirl-uri: url("images/wedding_corner_flourish_detailed.svg");

  /* Previous options for quick revert/examples */
  /* Accent spiral flourish */
  /* --swirl-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%2305c4f9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M80 80c24-24 54-10 56 14 2 26-26 42-48 32-20-10-22-36-6-50 18-16 46-8 52 12' stroke-width='2.4'/%3E%3Cpath d='M76 84c-18 18-10 38 8 46 22 10 46-4 50-24' stroke-width='1.6' opacity='.7'/%3E%3Ccircle cx='128' cy='52' r='3' stroke-width='1.8' opacity='.5'/%3E%3Ccircle cx='112' cy='36' r='2.4' stroke-width='1.4' opacity='.4'/%3E%3C/g%3E%3C/svg%3E"); */

  /* Filigree gold-green gradient */
  /* --swirl-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0%25' stop-color='%23caa56a'/%3E%3Cstop offset='100%25' stop-color='%236b9e8b'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' stroke='url(%23g)' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 142c22-22 40-30 62-52 18-18 28-34 22-48-9-20-40-14-48 1-9 18 4 30 20 28 18-3 29-18 36-28' stroke-width='2.4'/%3E%3Cpath d='M32 136c14-10 32-26 46-40' stroke-width='1.8' opacity='.8'/%3E%3Ccircle cx='118' cy='32' r='6' stroke-width='2' opacity='.5'/%3E%3C/g%3E%3C/svg%3E"); */

  /* Elaborate accent curls with decorative dots */
  /* --swirl-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%2305c4f9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 142c24-22 44-32 66-54 20-20 30-36 24-50-10-20-42-14-50 2-10 18 6 32 24 30 20-2 34-18 40-30' stroke-width='2.3'/%3E%3Cpath d='M30 138c16-10 36-28 52-44' stroke-width='1.6' opacity='.85'/%3E%3Cpath d='M54 126c8-6 18-14 26-22' stroke-width='1.2' opacity='.6'/%3E%3Cpath d='M92 42c8 8 6 20-6 26-12 6-26 0-28-12' stroke-width='1.4' opacity='.6'/%3E%3Cpath d='M116 30c-6 4-10 8-14 14' stroke-width='1.2' opacity='.45'/%3E%3Ccircle cx='122' cy='28' r='3.5' stroke-width='2' opacity='.5'/%3E%3Ccircle cx='136' cy='44' r='2.5' stroke-width='1.4' opacity='.4'/%3E%3Ccircle cx='108' cy='50' r='2' stroke-width='1.4' opacity='.35'/%3E%3C/g%3E%3C/svg%3E"); */

  /* Original simple accent version */
  /* --swirl-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%2305c4f9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M24 140c26-20 44-30 64-52 18-18 26-34 18-48-12-20-44-12-50 6-8 22 14 34 32 28 16-6 26-18 34-30' stroke-width='2.2'/%3E%3C/g%3E%3C/svg%3E"); */
}

/* Top-left */
body::before {
  top: 0; left: 0;
  transform: translate(-14px, -12px);
  background-image: var(--swirl-uri);
}
/* Top-right (mirror horizontally) */
body::after {
  top: 0; right: 0;
  transform: translate(14px, -12px) scaleX(-1);
  background-image: var(--swirl-uri);
}
/* Bottom-left (mirror vertically) */
html::before {
  bottom: 0; left: 0;
  transform: translate(-14px, 12px) scaleY(-1);
  background-image: var(--swirl-uri);
}
/* Bottom-right (mirror both axes) */
html::after {
  bottom: 0; right: 0;
  transform: translate(14px, 12px) scale(-1, -1);
  background-image: var(--swirl-uri);
}

@media (max-width: 640px) {
  html::before, html::after, body::before, body::after { width: 190px; height: 190px; opacity: .32; }
}

:root {
  /* --swirl-uri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%2305c4f9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 142c24-22 44-32 66-54 20-20 30-36 24-50-10-20-42-14-50 2-10 18 6 32 24 30 20-2 34-18 40-30' stroke-width='2.3'/%3E%3Cpath d='M30 138c16-10 36-28 52-44' stroke-width='1.6' opacity='.85'/%3E%3Cpath d='M54 126c8-6 18-14 26-22' stroke-width='1.2' opacity='.6'/%3E%3Cpath d='M92 42c8 8 6 20-6 26-12 6-26 0-28-12' stroke-width='1.4' opacity='.6'/%3E%3Cpath d='M116 30c-6 4-10 8-14 14' stroke-width='1.2' opacity='.45'/%3E%3Ccircle cx='122' cy='28' r='3.5' stroke-width='2' opacity='.5'/%3E%3Ccircle cx='136' cy='44' r='2.5' stroke-width='1.4' opacity='.4'/%3E%3Ccircle cx='108' cy='50' r='2' stroke-width='1.4' opacity='.35'/%3E%3C/g%3E%3C/svg%3E"); */
}
