/* wedding template — romantic, elegant, serif-forward. */

:root {
  --container: 880px;
  --container-wide: 1100px;
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;
  --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --radius: 6px; --radius-lg: 12px;
  --transition: 180ms ease;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif Pro", "Iowan Old Style", "Georgia", serif;
}

[data-density="compact"]     { --section-pad: var(--space-7); --hero-pad: var(--space-8); }
[data-density="comfortable"] { --section-pad: var(--space-8); --hero-pad: var(--space-9); }
[data-density="airy"]        { --section-pad: var(--space-9); --hero-pad: 128px; }

[data-theme="light"] { --bg: #fdfcf9; --fg: #1a1814; --muted: #6b6458; --surface: #f5f1ea; --border: #e6dfd0; --on-primary: #fdfcf9; }
[data-theme="dark"]  { --bg: #12110d; --fg: #f0ece0; --muted: #a09988; --surface: #1c1a14; --border: #2a2620; --on-primary: #12110d; }
[data-theme="ai"]    { --bg: #0a0c10; --fg: #ecf0fa; --muted: #94a3bd; --surface: #11141a; --border: #1c2235; --on-primary: #0a0c10; }

[data-palette="slate"]   { --primary: #57534e; --primary-hover: #44403c; --accent: #a8a29e; }
[data-palette="indigo"]  { --primary: #6366f1; --primary-hover: #4f46e5; --accent: #a5b4fc; }
[data-palette="emerald"] { --primary: #059669; --primary-hover: #047857; --accent: #6ee7b7; }
[data-palette="rose"]    { --primary: #be123c; --primary-hover: #9f1239; --accent: #fda4af; }
[data-palette="amber"]   { --primary: #b45309; --primary-hover: #92400e; --accent: #fbbf24; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); font-family: var(--font-sans); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }

/* HEADER */
.hdr { border-bottom: 1px solid var(--border); }
.hdr-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-3) 0; max-width: var(--container-wide); }
.brand { display: flex; align-items: center; gap: var(--space-2); color: var(--fg); font-family: var(--font-serif); font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.brand img { width: auto; height: 28px; }
.hdr-nav { display: flex; gap: var(--space-5); }
.hdr-nav a { color: var(--muted); font-size: 0.95rem; text-decoration: none; letter-spacing: 0.04em; }
.hdr-nav a:hover { color: var(--fg); }
@media (max-width: 720px) { .hdr-nav { display: none; } }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: 10px 18px; border-radius: var(--radius); font-weight: 600; transition: var(--transition); border: 1px solid transparent; text-decoration: none; letter-spacing: 0.02em; }
.btn-sm { padding: 6px 12px; font-size: 0.9rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover, .btn-primary:focus-visible { background: var(--primary-hover); text-decoration: none; }

/* HERO */
.hero { position: relative; padding: var(--hero-pad) 0; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, color-mix(in oklab, var(--bg) 50%, transparent), color-mix(in oklab, var(--bg) 85%, transparent)); }
.hero-inner { position: relative; z-index: 1; }
.hero-pre { color: var(--muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.2em; margin: 0 0 var(--space-4); font-weight: 500; }
.hero-names { font-family: var(--font-serif); font-weight: 700; font-size: clamp(2.8rem, 7vw, 4.8rem); line-height: 1.05; margin: 0 0 var(--space-3); letter-spacing: -0.02em; }
.hero-invite { color: var(--muted); font-family: var(--font-serif); font-style: italic; font-size: clamp(1rem, 1.5vw, 1.2rem); margin: 0 0 var(--space-6); }
.hero-meta { display: inline-flex; flex-wrap: wrap; gap: var(--space-6); margin: 0 0 var(--space-6); padding: var(--space-4) var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-lg); background: color-mix(in oklab, var(--surface) 80%, transparent); }
.hero-meta div { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.hero-meta dt { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; }
.hero-meta dd { font-family: var(--font-serif); font-weight: 700; font-size: 1.05rem; margin: 0; }

/* SECTION HEADINGS */
.section-heading { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 var(--space-6); text-align: center; letter-spacing: -0.01em; }

/* STORY */
.story { padding: var(--section-pad) 0; }
.story-inner { max-width: 640px; }
.story .section-heading { text-align: center; }
.story-body { font-family: var(--font-serif); font-size: 1.1rem; color: var(--fg); line-height: 1.8; text-align: center; }
.story-body p { margin: 0 0 var(--space-4); }
.story-body strong { font-weight: 700; }

/* SCHEDULE / TIMELINE */
.schedule { padding: var(--section-pad) 0; background: var(--surface); }
.timeline { list-style: none; padding: 0; margin: 0; max-width: 560px; margin-left: auto; margin-right: auto; position: relative; }
.timeline::before { content: ""; position: absolute; left: 80px; top: var(--space-3); bottom: var(--space-3); width: 2px; background: var(--border); }
.timeline-item { display: grid; grid-template-columns: 80px 1fr; gap: var(--space-5); padding: var(--space-4) 0; position: relative; }
.timeline-item::after { content: ""; position: absolute; left: 75px; top: calc(var(--space-4) + 6px); width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); z-index: 1; }
.timeline-time { font-variant-numeric: tabular-nums; color: var(--primary); font-weight: 700; font-size: 0.95rem; text-align: right; padding-top: 2px; }
.timeline-body { padding-left: var(--space-4); }
.timeline-title { font-family: var(--font-serif); font-weight: 700; font-size: 1.15rem; margin: 0 0 var(--space-1); }
.timeline-note { color: var(--muted); font-size: 0.9rem; margin: 0; font-style: italic; }

@media (max-width: 520px) {
  .timeline::before { left: 0; }
  .timeline-item { grid-template-columns: 1fr; gap: var(--space-2); padding-left: var(--space-5); }
  .timeline-item::after { left: -5px; top: calc(var(--space-4) + 2px); width: 10px; height: 10px; }
  .timeline-time { text-align: left; }
}

/* VENUE */
.venue { padding: var(--section-pad) 0; }
.venue-inner { max-width: 640px; }
.venue-address { font-family: var(--font-serif); font-style: normal; font-size: 1.15rem; font-weight: 600; text-align: center; margin: 0 0 var(--space-5); color: var(--fg); }
.venue-body { color: var(--muted); font-size: 1rem; line-height: 1.7; text-align: center; }
.venue-body p { margin: 0 0 var(--space-4); }

/* GALLERY */
.gallery { padding: var(--section-pad) 0; background: var(--surface); }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); list-style: none; padding: 0; margin: 0; max-width: var(--container-wide); margin-left: auto; margin-right: auto; }
.gallery-item { overflow: hidden; border-radius: var(--radius-lg); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform 400ms ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-caption { color: var(--muted); font-size: 0.85rem; text-align: center; margin: var(--space-2) 0 0; padding: 0 var(--space-2); }

/* REGISTRY */
.registry { padding: var(--section-pad) 0; }
.registry-list { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); list-style: none; padding: 0; margin: 0; }
.registry-card { flex: 0 1 auto; }
.registry-link { display: inline-flex; align-items: center; justify-content: center; padding: var(--space-3) var(--space-6); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-serif); font-weight: 600; font-size: 1rem; color: var(--fg); text-decoration: none; transition: var(--transition); min-width: 180px; text-align: center; }
.registry-link:hover { border-color: var(--primary); color: var(--primary); background: var(--surface); }

/* TRAVEL */
.travel { padding: var(--section-pad) 0; background: var(--surface); }
.travel-inner { max-width: 700px; }
.travel-body { color: var(--fg); font-size: 1rem; line-height: 1.7; }
.travel-body p { margin: 0 0 var(--space-4); }
.travel-body strong { font-weight: 700; }

/* CTA / RSVP */
.cta { padding: var(--section-pad) 0; background: var(--primary); color: var(--on-primary); text-align: center; }
.cta-inner { max-width: 600px; }
.cta-heading { font-family: var(--font-serif); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0 0 var(--space-3); letter-spacing: -0.02em; }
.cta-body { font-size: 1.05rem; opacity: 0.9; margin: 0 0 var(--space-5); }
.cta .btn-primary { background: var(--bg); color: var(--fg); }
.cta .btn-primary:hover { background: var(--surface); }

/* FOOTER + WATERMARK */
.ddv-footer { padding: var(--space-6) 0; border-top: 1px solid var(--border); margin-top: 0; text-align: center; color: var(--muted); }
.ddv-footer-inner small { font-size: 0.85rem; }
.ddv-watermark { position: fixed; bottom: 12px; right: 12px; z-index: 50; }
.ddv-watermark a { display: inline-flex; align-items: center; padding: 6px 10px; background: var(--bg); color: var(--muted); border: 1px solid var(--border); border-radius: 999px; font-size: 0.78rem; box-shadow: 0 1px 4px rgba(0,0,0,0.06); text-decoration: none; }
.ddv-watermark a:hover { color: var(--fg); }
