:root {
  --choc-900: #1a0f08;
  --choc-800: #2a1a10;
  --choc-700: #3a2418;
  --choc-600: #4f3324;
  --champagne: #c9a96e;
  --champagne-soft: #d8bf90;
  --cream: #f4ecdc;
  --cream-soft: #faf4e8;
  --black: #0d0a08;
  --ink: #2a1a10;
  --ink-soft: rgba(42, 26, 16, 0.72);
  --line: rgba(58, 36, 24, 0.18);
  --shadow: 0 30px 60px -30px rgba(26, 15, 8, 0.45);

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', -apple-system, system-ui, sans-serif;

  --radius: 4px;
  --radius-lg: 14px;

  --section-pad: clamp(64px, 9vw, 120px);
  --container: 1100px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream-soft);
  font-feature-settings: 'liga' off, 'calt' off;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: opacity 0.2s ease; }
a:hover { opacity: 0.7; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 40px);
  background: rgba(250, 244, 232, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--choc-700);
}
.nav-links {
  display: flex;
  gap: clamp(18px, 2.5vw, 32px);
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--choc-700);
  font-weight: 400;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--choc-700);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 800px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--cream-soft);
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav-links.open { max-height: 500px; }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 18px 24px; }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px 20px 80px;
  background:
    radial-gradient(ellipse at top right, rgba(201, 169, 110, 0.18), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(201, 169, 110, 0.14), transparent 50%),
    linear-gradient(180deg, var(--cream-soft), var(--cream));
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.55;
  pointer-events: none;
}
.hero::before {
  top: -20px; left: -40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='none' stroke='%23c9a96e' stroke-width='1.2'><path d='M40 20 Q60 50 50 90 T70 170'/><circle cx='55' cy='35' r='12'/><circle cx='75' cy='55' r='9'/><circle cx='40' cy='70' r='10'/><circle cx='65' cy='95' r='14'/><circle cx='45' cy='130' r='8'/><path d='M30 100 Q10 130 30 170'/></g></svg>");
}
.hero::after {
  bottom: -30px; right: -50px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><g fill='none' stroke='%23c9a96e' stroke-width='1.2'><path d='M160 180 Q140 150 150 110 T130 30'/><circle cx='145' cy='165' r='12'/><circle cx='125' cy='145' r='9'/><circle cx='160' cy='130' r='10'/><circle cx='135' cy='105' r='14'/><circle cx='155' cy='70' r='8'/><path d='M170 100 Q190 70 170 30'/></g></svg>");
  transform: rotate(180deg);
}

.hero-frame {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: clamp(40px, 6vw, 60px) clamp(24px, 5vw, 50px);
  border: 1px solid var(--champagne);
  border-radius: 200px 200px 14px 14px;
  background: rgba(250, 244, 232, 0.4);
}
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.hero-families {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.5;
  color: var(--choc-700);
  margin-bottom: 24px;
  font-weight: 500;
}
.hero-families .amp {
  display: inline-block;
  font-style: italic;
  color: var(--champagne);
  margin: 4px 0;
}
.hero-cordially {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.hero-names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1;
  color: var(--choc-800);
  margin-bottom: 24px;
}
.hero-names span { display: block; }
.hero-names .hero-and {
  font-style: italic;
  font-size: 0.6em;
  color: var(--champagne);
  margin: 6px 0;
}
.hero-quote {
  max-width: 520px;
  margin: 0 auto 32px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.6;
  color: var(--ink-soft);
}
.hero-quote-cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--champagne);
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  margin-bottom: 28px;
}
.hero-meta > div { display: flex; flex-direction: column; gap: 4px; }
.hero-meta-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--champagne);
}
.hero-meta-value {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--choc-700);
  font-weight: 500;
}
@media (max-width: 600px) {
  .hero-meta { grid-template-columns: 1fr; gap: 14px; }
  .hero-meta > div { flex-direction: row; justify-content: space-between; align-items: baseline; }
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}
.countdown > div {
  background: rgba(58, 36, 24, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 6px;
}
.countdown strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 500;
  color: var(--choc-800);
  line-height: 1;
  margin-bottom: 4px;
}
.countdown span {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============ SECTIONS ============ */
.section { padding: var(--section-pad) 20px; }
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}
.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  color: var(--choc-800);
  margin-bottom: 18px;
}
.section-lede {
  max-width: 580px;
  margin: 0 auto 40px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
}

.section-story { background: var(--cream); }
.section-schedule { background: var(--cream-soft); }
.section-venue { background: var(--cream); }
.section-gallery { background: var(--cream-soft); }
.section-rsvp { background: var(--cream); }
.section-gifts { background: var(--cream-soft); }
.section-share {
  background: linear-gradient(180deg, var(--choc-700), var(--choc-800));
  color: var(--cream-soft);
}
.section-share .section-title { color: var(--cream-soft); }
.section-share .section-eyebrow { color: var(--champagne-soft); }
.section-share .section-lede { color: rgba(244, 236, 220, 0.78); }

/* ============ SCHEDULE ============ */
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}
.schedule-card {
  padding: 36px 28px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  text-align: left;
  box-shadow: var(--shadow);
}
.schedule-time {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--champagne);
  margin-bottom: 10px;
}
.schedule-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--choc-800);
  margin-bottom: 8px;
}
.schedule-card p { color: var(--ink-soft); margin-bottom: 6px; }
.schedule-loc {
  font-size: 14px;
  color: var(--choc-600);
  margin: 12px 0 18px;
}

.colors-row {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.colors-label {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--champagne);
}
.colors-swatches { display: flex; gap: 10px; }
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--line);
}
.colors-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--choc-700);
}

/* ============ VENUE ============ */
.venue-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.venue-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}
.venue-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============ GALLERY ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery-grid figure {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--cream);
  cursor: zoom-in;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-grid figure:hover img { transform: scale(1.05); }
@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(13, 10, 8, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius);
}

/* ============ RSVP FORM ============ */
.rsvp-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--choc-700);
}
.field .hint {
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  font-size: 11px;
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.18);
}
.field textarea { resize: vertical; min-height: 90px; }
@media (max-width: 600px) {
  .rsvp-form { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
}

.form-status {
  margin-top: 14px;
  font-size: 14px;
  min-height: 22px;
}
.form-status.success { color: #2d6a4f; }
.form-status.error { color: #9b2c2c; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--choc-700);
  border-radius: var(--radius);
  transition: all 0.25s ease;
  background: transparent;
  color: var(--choc-700);
}
.btn-solid {
  background: var(--choc-700);
  color: var(--cream-soft);
}
.btn-solid:hover {
  background: var(--choc-800);
  border-color: var(--choc-800);
  opacity: 1;
}
.btn-ghost:hover {
  background: var(--choc-700);
  color: var(--cream-soft);
  opacity: 1;
}
.btn-block { width: 100%; }
.section-share .btn { border-color: var(--champagne); color: var(--cream-soft); }
.section-share .btn:hover { background: var(--champagne); color: var(--choc-900); }

/* ============ GIFTS ============ */
.gift-card {
  max-width: 480px;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: left;
  box-shadow: var(--shadow);
}
.gift-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.gift-row:last-child { border-bottom: none; }
.gift-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--champagne);
}
.gift-value {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--choc-800);
  font-weight: 500;
}
.gift-mono {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
}
.copy-btn {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--choc-700);
  cursor: pointer;
  transition: all 0.2s;
}
.copy-btn:hover { background: var(--choc-700); color: var(--cream-soft); border-color: var(--choc-700); }
.copy-btn.copied { background: var(--champagne); border-color: var(--champagne); color: var(--choc-900); }
@media (max-width: 500px) {
  .gift-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ============ UPLOAD ============ */
.upload-zone {
  max-width: 560px;
  margin: 0 auto 24px;
  border: 2px dashed rgba(201, 169, 110, 0.5);
  border-radius: var(--radius-lg);
  background: rgba(13, 10, 8, 0.25);
  transition: all 0.25s;
}
.upload-zone.dragover {
  background: rgba(201, 169, 110, 0.14);
  border-color: var(--champagne);
}
.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 48px 24px;
  cursor: pointer;
  color: var(--cream-soft);
}
.upload-icon {
  font-size: 32px;
  color: var(--champagne);
  margin-bottom: 4px;
}
.upload-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
}
.upload-sub {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 236, 220, 0.6);
}
.upload-list {
  list-style: none;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.upload-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  background: rgba(244, 236, 220, 0.06);
  border: 1px solid rgba(201, 169, 110, 0.18);
  border-radius: var(--radius);
  font-size: 13px;
}
.upload-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-item .status { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--champagne-soft); }
.upload-item.done .status { color: #6dbf95; }
.upload-item.error .status { color: #e08585; }
.upload-progress {
  grid-column: 1 / -1;
  height: 3px;
  background: rgba(244, 236, 220, 0.1);
  border-radius: 999px;
  overflow: hidden;
}
.upload-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--champagne);
  transition: width 0.25s;
}

/* ============ FOOTER ============ */
.footer {
  background: var(--choc-900);
  color: var(--cream-soft);
  text-align: center;
  padding: 48px 20px;
}
.footer-names {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.footer-date {
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--champagne);
  margin-bottom: 24px;
}
.footer-credit {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 236, 220, 0.5);
}
.footer-credit a { color: var(--champagne); }

/* ============ REVEAL ON SCROLL ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
