/* ==========================================================================
   Clarissa & Jaylord Kyle — Wedding Website
   ========================================================================== */

:root {
  --bg: #FAF8F3;
  --text: #33302A;
  --text-secondary: #7A7568;
  --text-secondary-2: #4A463D;
  --accent: #9C7A3C;
  --accent-hover: #7A5E2C;
  --border: rgba(51, 48, 42, 0.1);
  --border-strong: rgba(51, 48, 42, 0.15);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'EB Garamond', serif;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

::selection { background: #EDE6D6; }

img { max-width: 100%; }

/* ---- decorative background layer ---- */
.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--bg);
  z-index: 0;
}

.fl-corner { position: absolute; pointer-events: none; opacity: 0.5; }
.fl-corner.top-left { top: 0; left: 0; width: 220px; height: 220px; }
.fl-corner.bottom-right { bottom: 0; right: 0; width: 220px; height: 220px; }
.fl-corner div { position: absolute; }

.petal { position: absolute; pointer-events: none; border-radius: 0 50% 50% 50%; }

.flower { position: absolute; pointer-events: none; }
.flower .fl-petal {
  position: absolute; top: 0; left: 35%; width: 30%; height: 50%;
  border-radius: 50% 50% 50% 50%;
  transform-origin: bottom center;
}
.flower .fl-petal:nth-child(2) { transform: rotate(72deg); }
.flower .fl-petal:nth-child(3) { transform: rotate(144deg); }
.flower .fl-petal:nth-child(4) { transform: rotate(216deg); }
.flower .fl-petal:nth-child(5) { transform: rotate(288deg); }
.flower .fl-center {
  position: absolute; top: 40%; left: 40%; width: 20%; height: 20%; border-radius: 50%;
}

@keyframes petal-drift-a {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(18px, -26px) rotate(20deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes petal-drift-b {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-22px, -18px) rotate(-16deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
/* ---- page wrapper ---- */
.page {
  font-family: 'EB Garamond', serif;
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  z-index: 1;
}

/* ---- nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border-strong);
  display: flex; align-items: center;
  padding: 20px 44px;
}
.nav-logo { font-size: 15px; letter-spacing: 0.3em; color: var(--text); margin-right: auto; }
.nav-logo-heart { vertical-align: -1px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a {
  text-decoration: none; font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text);
}
.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; background: none; border: none; }
.nav-burger span { width: 22px; height: 2px; background: var(--text); display: block; }
.nav-spacer { height: 76px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border-strong); padding: 8px 0;
  }
  .nav-links.open a { padding: 14px 24px; width: 100%; }
  .nav-burger { display: flex; }
}
@media (max-width: 500px) {
  .nav { padding: 18px 20px; }
}

/* ---- section heading ---- */
.eyebrow {
  font-size: 13px; letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-title {
  font-family: 'Parisienne', cursive; font-weight: 400; font-size: 46px; margin: 0; color: var(--text);
}
.section-head { text-align: center; margin-bottom: 56px; }

/* ---- hero ---- */
.hero {
  position: relative; min-height: 92vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 80px 24px;
  border-bottom: 1px solid var(--border);
}
.hero-eyebrow { font-size: 13px; letter-spacing: 0.5em; text-transform: uppercase; color: var(--accent); margin-bottom: 34px; }
.hero-name { font-family: 'Parisienne', cursive; font-weight: 400; font-size: clamp(48px, 8vw, 104px); line-height: 1.1; margin: 0; color: var(--text); }
.hero-divider { width: 60px; height: 1px; background: var(--accent); margin: 36px 0; }
.hero-date { font-size: 20px; letter-spacing: 0.3em; color: var(--text); margin-bottom: 44px; }
.hero-quote { font-size: 20px; line-height: 1.85; color: var(--text); font-style: italic; max-width: 600px; margin: 56px 0 0; }

.countdown { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 22px; }
.countdown-unit { text-align: center; min-width: 70px; }
.countdown-num { font-size: 34px; font-weight: 500; }
.countdown-label { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-top: 4px; }
.countdown-divider { width: 1px; background: var(--border-strong); align-self: stretch; }

.countdown-footer { display: flex; flex-wrap: wrap; gap: 16px 18px; justify-content: center; }
.countdown-footer .countdown-unit { min-width: 56px; }
.countdown-footer .countdown-num { font-size: 22px; font-weight: 400; }
.countdown-footer .countdown-label { font-size: 10px; letter-spacing: 0.18em; margin-top: 3px; }

@media (max-width: 480px) {
  .countdown { gap: 20px 16px; }
  .countdown-unit { min-width: 60px; }
  .countdown-num { font-size: 28px; }
  .countdown-divider { display: none; }
  .hero { padding: 64px 20px; }
  .hero-quote { margin-top: 40px; }
}

/* ---- story ---- */
.story {
  scroll-margin-top: 84px; padding: 20px 24px 110px; max-width: 1000px; margin: 0 auto;
}
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 60px; align-items: start; }
.story-photo {
  position: relative; width: 100%; height: 620px; min-width: 0; border-radius: 2px; overflow: hidden;
}
.story-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1.2s ease;
}
.story-photo img.active { opacity: 1; }
.story-copy { font-size: 18px; line-height: 1.9; color: var(--text-secondary-2); min-width: 0; }
.story-copy p { margin: 0 0 20px; }
.story-copy p:last-child { margin-bottom: 0; }
.story-toggle {
  cursor: pointer; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); text-decoration: underline; margin-top: 6px; display: inline-block; background: none; border: none; padding: 0; font-family: inherit;
}

@media (max-width: 760px) {
  .story-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .attire-grid { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ---- details ---- */
.details {
  scroll-margin-top: 84px; padding: 100px 24px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.details-inner { max-width: 960px; margin: 0 auto; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.details-col { text-align: center; }
.details-label { font-size: 13px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--accent); }
.details-time { font-size: 28px; margin: 14px 0 2px; }
.details-date { font-size: 16px; color: var(--text-secondary); margin-bottom: 20px; }
.details-divider { width: 36px; height: 1px; background: var(--border-strong); margin: 0 auto 20px; }
.details-venue { font-size: 22px; }
.details-address { font-size: 16px; color: var(--text-secondary); margin-top: 8px; }
.details-map { display: inline-block; margin-top: 22px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); text-decoration: underline; }

@media (max-width: 640px) {
  .details-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ---- timeline ---- */
.timeline { scroll-margin-top: 84px; padding: 110px 24px; max-width: 680px; margin: 0 auto; }
.timeline-item { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 26px 0; border-top: 1px solid var(--border-strong); }
.timeline-time { font-size: 16px; letter-spacing: 0.06em; color: var(--accent); }
.timeline-label { font-size: 22px; }
.timeline-sub { margin: 10px 0 0; padding-left: 18px; font-size: 16px; color: var(--text-secondary); line-height: 1.8; }

@media (max-width: 420px) {
  .timeline-item { grid-template-columns: 78px 1fr; gap: 14px; }
  .timeline-label { font-size: 20px; }
}

/* ---- entourage ---- */
.entourage { scroll-margin-top: 84px; padding: 110px 24px; border-top: 1px solid var(--border); }
.entourage-inner { max-width: 820px; margin: 0 auto; text-align: center; }
.entourage-title { margin: 0 0 60px; }
.entourage-group { margin-bottom: 44px; }
.entourage-group-title { font-size: 13px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.entourage-names { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; font-size: 18px; line-height: 1.6; color: var(--text); }
.entourage-divider { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; }
.entourage-divider .line { width: 20px; height: 1px; background: rgba(156, 122, 60, 0.4); }
.entourage-divider .dot { width: 5px; height: 5px; border-radius: 50%; }
.entourage-divider .dot.pink { background: #E8B4B8; }
.entourage-divider .dot.blue { background: #A8C4E0; }

/* ---- attire ---- */
.attire { scroll-margin-top: 84px; padding: 110px 24px; border-top: 1px solid var(--border); text-align: center; }
.attire-intro { font-size: 18px; color: var(--text-secondary); max-width: 520px; margin: 0 auto 30px; }
.attire-swatches { display: flex; gap: 0; justify-content: center; margin-bottom: 50px; }
.attire-swatches div { width: 70px; height: 70px; }
.attire-rows { max-width: 520px; margin: 0 auto; text-align: left; }
.attire-row { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border-strong); }
.attire-row.last { border-bottom: 1px solid var(--border-strong); }
.attire-row-label { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); min-width: 110px; }
.attire-row-value { font-size: 18px; color: var(--text); }
.attire-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 900px; margin: 50px auto 0;
}
.attire-grid img { width: 100%; height: 340px; object-fit: cover; object-position: top; border-radius: 2px; }

/* ---- gift ---- */
.gift { padding: 100px 24px; border-top: 1px solid var(--border); text-align: center; }
.gift-inner { max-width: 560px; margin: 0 auto; }
.gift-title { font-family: 'Parisienne', cursive; font-weight: 400; font-size: 40px; margin: 0 0 20px; color: var(--text); }
.gift-text { font-size: 19px; line-height: 1.9; color: var(--text-secondary-2); }

/* ---- gallery ---- */
.gallery { scroll-margin-top: 84px; padding: 110px 24px; border-top: 1px solid var(--border); max-width: 1100px; margin: 0 auto; }
.gallery-masonry { column-count: 3; column-gap: 12px; }
.gallery-item {
  background-size: cover; background-position: center; width: 100%; display: block;
  margin-bottom: 12px; break-inside: avoid; cursor: pointer; border-radius: 2px; border: none; padding: 0;
}
@media (max-width: 720px) { .gallery-masonry { column-count: 2; } }
@media (max-width: 480px) { .gallery-masonry { column-count: 1; } }

/* ---- lightbox ---- */
.lightbox {
  position: fixed; inset: 0; background: rgba(20, 17, 12, 0.92); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 40px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox-img {
  background-size: contain; background-repeat: no-repeat; background-position: center;
  width: 90vw; height: 90vh; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}
.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.12); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer;
  border: none;
}
.lightbox-arrow.prev { left: 24px; }
.lightbox-arrow.next { right: 24px; }

@media (max-width: 560px) {
  .lightbox { padding: 8px; }
  .lightbox-img { width: 92vw; height: 78vh; }
  .lightbox-arrow { width: 38px; height: 38px; font-size: 18px; }
  .lightbox-arrow.prev { left: 6px; }
  .lightbox-arrow.next { right: 6px; }
}

/* ---- faq ---- */
.faq { scroll-margin-top: 84px; padding: 110px 24px; border-top: 1px solid var(--border); }
.faq-inner { max-width: 700px; margin: 0 auto; }
.faq-item { padding: 24px 0; border-top: 1px solid var(--border-strong); }
.faq-q { font-size: 20px; margin-bottom: 8px; }
.faq-a { font-size: 17px; color: var(--text-secondary); line-height: 1.75; }

/* ---- footer ---- */
.footer { text-align: center; padding: 64px 24px; border-top: 1px solid var(--border); }
.footer-name { font-family: 'Parisienne', cursive; font-size: 32px; color: var(--text); }
.footer-date { font-size: 12px; letter-spacing: 0.2em; color: var(--accent); margin-top: 12px; margin-bottom: 28px; }

/* ---- audio bar (fixed player) ---- */
.audio-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  height: 40px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 24px;
  background: rgba(250, 248, 243, 0.96);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  font-family: 'EB Garamond', serif;
}
.audio-bar-spacer { height: 40px; }

.audio-bar-toggle {
  flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--bg); border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.audio-bar-toggle .icon-play { margin-left: 1px; }

.audio-time {
  flex: 0 0 auto; min-width: 32px; text-align: center;
  font-size: 11px; color: var(--text-secondary); font-variant-numeric: tabular-nums;
}

.audio-bar-volume { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; color: var(--text-secondary); }

/* shared custom range-slider look, used by both seek and volume */
.range-track { position: relative; flex: 1 1 auto; height: 16px; display: flex; align-items: center; cursor: pointer; }
.range-track-volume { flex: 0 0 auto; width: 70px; }
.range-base, .range-fill {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  height: 4px; border-radius: 2px; pointer-events: none;
}
.range-base { right: 0; background: var(--border-strong); }
.range-fill { width: 0%; background: var(--accent); }
.range-input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer;
}
.range-input::-webkit-slider-runnable-track { background: transparent; height: 100%; }
.range-input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(250, 248, 243, 0.9); cursor: pointer;
}
.range-input::-moz-range-track { background: transparent; height: 100%; border: none; }
.range-input::-moz-range-progress { background: transparent; }
.range-input::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: none;
  box-shadow: 0 0 0 3px rgba(250, 248, 243, 0.9); cursor: pointer;
}

/* seek thumb: heart-shaped, distinct from the plain circular volume thumb */
#audio-seek::-webkit-slider-thumb {
  border-radius: 0; background-color: transparent; box-shadow: none;
  width: 16px; height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='%239C7A3C'%20d='M12%2021.35l-1.45-1.32C5.4%2015.36%202%2012.28%202%208.5%202%205.42%204.42%203%207.5%203c1.74%200%203.41.81%204.5%202.09C13.09%203.81%2014.76%203%2016.5%203%2019.58%203%2022%205.42%2022%208.5c0%203.78-3.4%206.86-8.55%2011.54L12%2021.35z'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: center;
  filter: drop-shadow(0 1px 1px rgba(51, 48, 42, 0.35));
}
#audio-seek::-moz-range-thumb {
  border-radius: 0; background-color: transparent; box-shadow: none; border: none;
  width: 16px; height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='%239C7A3C'%20d='M12%2021.35l-1.45-1.32C5.4%2015.36%202%2012.28%202%208.5%202%205.42%204.42%203%207.5%203c1.74%200%203.41.81%204.5%202.09C13.09%203.81%2014.76%203%2016.5%203%2019.58%203%2022%205.42%2022%208.5c0%203.78-3.4%206.86-8.55%2011.54L12%2021.35z'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; background-position: center;
  filter: drop-shadow(0 1px 1px rgba(51, 48, 42, 0.35));
}

@media (max-width: 480px) {
  .audio-bar { padding: 0 14px; gap: 8px; }
  .range-track-volume { width: 44px; }
  .audio-time { min-width: 26px; font-size: 10px; }
}
