:root {
  --ink: #f4efe6;
  --muted: #b9afa1;
  --night: #17130f;
  --night-soft: #211b16;
  --gold: #b89a6a;
  --line: rgba(244, 239, 230, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--night);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.config-loading > :not(.ambient) { visibility: hidden; }
.load-error { min-height: 100svh; display: grid; place-items: center; color: var(--muted); }
button, a { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 78% 20%, rgba(139, 104, 62, .13), transparent 30%),
    radial-gradient(circle at 15% 72%, rgba(93, 72, 52, .12), transparent 34%),
    var(--night);
}

.site-header {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px clamp(24px, 5vw, 76px);
}
.brand {
  color: var(--ink);
  font-family: "Italiana", serif;
  font-size: 1.1rem;
  letter-spacing: .08em;
  text-decoration: none;
}
.menu-link {
  color: var(--ink);
  font-size: .7rem;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-image {
  position: absolute;
  inset: 0;
  transform: scale(1.02);
  background:
    linear-gradient(110deg, rgba(29, 23, 18, .3), rgba(29, 23, 18, .04)),
    linear-gradient(135deg, #5e5145, #b4a28d 48%, #4a4138);
  animation: reveal 1.7s cubic-bezier(.2,.7,.2,1) both;
}
.hero-image picture,
.hero-image img { display: block; width: 100%; height: 100%; }
.hero-image img { object-fit: cover; object-position: center 42%; }
@keyframes reveal { from { opacity: 0; transform: scale(1.08); } }
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(16,13,10,.45), rgba(16,13,10,.05) 38%, rgba(16,13,10,.68));
}
.hero-copy { position: relative; z-index: 1; padding: 120px 24px 100px; text-align: center; }
.eyebrow { margin: 0 0 18px; color: #d8c8b2; font-size: .68rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; }
.hero h1 { margin: 0; font-family: "Italiana", serif; font-size: clamp(4.4rem, 12vw, 10.8rem); font-weight: 400; line-height: .73; letter-spacing: -.04em; text-shadow: 0 2px 24px rgba(0,0,0,.22); }
.hero h1 span { display: block; }
.hero h1 em { display: block; margin: .12em 0 .05em; color: #e1c69c; font-size: .38em; font-weight: 400; }
[data-default-hero-title][hidden] { display: none !important; }
.hero-title-hidden [data-default-hero-title] { display: none !important; }
.wedding-meta { margin: 32px 0; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; }
.wedding-meta b { margin: 0 7px; color: var(--gold); }
.play-primary {
  display: inline-flex;
  gap: 13px;
  align-items: center;
  padding: 15px 22px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 100px;
  background: rgba(16,13,10,.2);
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  transition: .3s ease;
}
.play-primary:hover { color: var(--night); background: var(--ink); transform: translateY(-2px); }
.play-icon { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }
.play-icon.large { border-top-width: 10px; border-bottom-width: 10px; border-left-width: 16px; }
.scroll-cue { position: absolute; z-index: 2; bottom: 30px; left: 50%; display: flex; gap: 12px; color: var(--ink); font-size: .65rem; letter-spacing: .16em; text-decoration: none; text-transform: uppercase; transform: translateX(-50%); }

.chapters { padding: 120px clamp(24px, 6vw, 96px) 140px; }
.section-heading { max-width: 1320px; margin: 0 auto 48px; display: flex; align-items: end; justify-content: space-between; gap: 40px; }
.section-heading h2, .keepsake h2 { margin: 0; font-family: "Italiana", serif; font-size: clamp(2.6rem, 5vw, 5rem); font-weight: 400; line-height: 1; }
.section-heading > p { max-width: 370px; margin: 0 0 7px; color: var(--muted); font-family: "Italiana", serif; font-size: 1.25rem; line-height: 1.45; }
.chapter-grid { max-width: 1320px; margin: auto; display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.chapter-card { position: relative; min-height: 400px; grid-column: span 4; border: 0; overflow: hidden; background: #302820; cursor: pointer; text-align: left; }
.chapter-grid[data-count="1"] .chapter-card { min-height: 70vh; grid-column: span 12; }
.chapter-grid[data-count="2"] .chapter-card { grid-column: span 6; }
.chapter-grid[data-count="3"] .chapter-card:first-child { grid-column: span 7; }
.chapter-grid[data-count="3"] .chapter-card:nth-child(2) { grid-column: span 5; }
.chapter-grid[data-count="3"] .chapter-card:nth-child(3) { min-height: 520px; grid-column: span 12; }
.chapter-grid[data-count="4"] .chapter-card { grid-column: span 6; }
.chapter-grid[data-count="5"] .chapter-card:first-child { grid-column: span 7; }
.chapter-grid[data-count="5"] .chapter-card:nth-child(2) { grid-column: span 5; }
.chapter-card img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.6,.2,1), filter .4s; }
.chapter-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(12,10,8,.9), transparent 65%); }
.chapter-card:hover img { transform: scale(1.045); filter: brightness(.78); }
.card-play { position: absolute; z-index: 2; top: 24px; right: 24px; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; opacity: 0; transform: translateY(8px); transition: .3s; }
.chapter-card:hover .card-play { opacity: 1; transform: none; }
.card-copy { position: absolute; z-index: 2; right: 25px; bottom: 24px; left: 25px; }
.card-copy small { color: #d2c3ae; font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; }
.card-copy h3 { margin: 7px 0 0; font-family: "Italiana", serif; font-size: 2rem; font-weight: 400; }

.quote-section { min-height: 70vh; padding: 100px 24px; display: grid; place-content: center; text-align: center; background: #e8e0d4; color: #2c241d; }
.quote-section p { max-width: 920px; margin: 0; font-family: "Italiana", serif; font-size: clamp(2.5rem, 5.5vw, 5.5rem); line-height: 1.08; }
.quote-section span { margin-top: 28px; color: #756757; font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; }
.keepsake { min-height: 54vh; padding: 90px clamp(24px, 8vw, 130px); display: flex; align-items: center; justify-content: space-between; gap: 50px; }
.keepsake[hidden], .quote-section[hidden] { display: none !important; }
.share-invitation { padding: 110px clamp(24px, 8vw, 130px); text-align: center; background: #e8e0d4; color: #2c241d; }
.share-invitation[hidden], .copy-notice[hidden], .social-surprise[hidden] { display: none !important; }
.share-invitation h2 { max-width: 900px; margin: 0 auto 35px; font-family: "Italiana", serif; font-size: clamp(2.7rem, 5vw, 5rem); font-weight: 400; }
.share-message { max-width: 760px; margin: auto; padding: 28px; border: 1px solid rgba(44,36,29,.25); line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }
.copy-share, .instagram-next a { display: inline-block; margin-top: 28px; padding: 17px 28px; border: 0; border-radius: 100px; color: #fff; background: #2c241d; cursor: pointer; text-decoration: none; text-transform: uppercase; letter-spacing: .12em; }
.copy-notice { margin: 80px 0 0; font-size: clamp(2rem, 5vw, 4rem); font-weight: 600; letter-spacing: .08em; animation: pop-in .55s cubic-bezier(.2,.9,.25,1.25); }
.confetti-layer { position: fixed; z-index: 9999; inset: 0; overflow: hidden; pointer-events: none; }
.confetti-piece { position: absolute; width: 9px; height: 15px; border-radius: 2px; opacity: 0; animation: confetti-burst var(--confetti-duration) cubic-bezier(.18,.72,.3,1) var(--confetti-delay) forwards; }
.social-surprise { min-height: 65vh; padding-top: 110px; animation: reveal-up .7s ease both; }
.social-surprise h3 { margin: 0 0 24px; font-family: "Italiana",serif; font-size: clamp(2.3rem,4vw,4rem); font-weight: 400; }
.referral-copy { max-width: 680px; margin: 0 auto 30px; color: #5f5449; font-size: clamp(1rem, 1.7vw, 1.2rem); line-height: 1.75; }
.referral-cards-button { padding: 18px 28px; border: 0; border-radius: 100px; color: #fff; background: #2c241d; cursor: pointer; font: 600 .82rem "DM Sans",sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.referral-cards-button[hidden] { display: none !important; }
.referral-cards-button:disabled { cursor: wait; opacity: .65; }
.referral-offer { margin: 24px auto 44px; display: grid; gap: 10px; }
.referral-offer small { font-size: clamp(1rem, 1.8vw, 1.35rem); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.referral-offer strong { color: #9b341f; font-family: "DM Sans",sans-serif; font-size: clamp(4rem,10vw,8rem); font-weight: 700; line-height: .9; letter-spacing: -.05em; }
.referral-offer span { font-size: clamp(1rem,2vw,1.35rem); letter-spacing: .08em; text-transform: uppercase; }
.referral-offer b { padding: 5px 10px; border: 1px solid currentColor; }
.social-choices[hidden] { display: none !important; }
.social-choices { display: flex; justify-content: center; gap: 34px; flex-wrap: wrap; }
.social-choice { width: min(300px,100%); min-height: 240px; display: grid; place-content: center; gap: 20px; border-radius: 28px; color: white; text-decoration: none; font-size: 1.25rem; font-weight: 600; }
.social-choice svg { width: 92px; height: 92px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.social-choice.facebook svg { fill: currentColor; stroke: none; }
.social-choice.instagram { background: linear-gradient(135deg,#833ab4,#fd1d1d,#fcb045); }
.social-choice.facebook { background: #1877f2; }
@keyframes pop-in { from { opacity: 0; transform: scale(.75); } }
@keyframes reveal-up { from { opacity: 0; transform: translateY(50px); } }
@keyframes confetti-burst {
  0% { opacity: 1; transform: translate(-50%,-50%) rotate(0); animation-timing-function: cubic-bezier(.12,.62,.25,1); }
  38% { opacity: 1; transform: translate(calc(-50% + var(--confetti-peak-x)),calc(-50% + var(--confetti-peak-y))) rotate(var(--confetti-peak-rotate)); animation-timing-function: cubic-bezier(.38,0,.82,.42); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--confetti-x)),calc(-50% + var(--confetti-y))) rotate(var(--confetti-rotate)); }
}
.text-button { padding: 12px 0; border: 0; border-bottom: 1px solid var(--gold); background: transparent; cursor: pointer; font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; }
.text-button span { margin-left: 22px; }
footer { padding: 30px clamp(24px, 5vw, 76px); display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; }
.portfolio-link { color: #d8c8b2; text-decoration: none; }
.share-mode .hero { min-height: 92svh; }
.share-mode .hero-shade { background: linear-gradient(to bottom,rgba(16,13,10,.6),rgba(16,13,10,.18) 42%,rgba(16,13,10,.82)); }
.share-mode .chapters { padding-top: 100px; }
.share-mode .chapter-grid { max-width: 1100px; }
.share-mode .chapter-grid[data-count="1"] .chapter-card { min-height: min(70vh,720px); }
.share-mode footer { padding-block: 48px; }

.player-modal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(9,7,6,.97); color: var(--ink); }
.player-modal::backdrop { background: #090706; }
.player-shell { min-height: 100%; display: grid; align-content: center; padding: clamp(20px, 5vw, 70px); }
.close-player { position: fixed; z-index: 2; top: 22px; right: 28px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; font-size: 1.8rem; font-weight: 200; }
.video-frame { width: min(1180px, 100%); aspect-ratio: 16/9; margin: auto; background: #0e0c0a; box-shadow: 0 28px 80px rgba(0,0,0,.5); }
.video-frame iframe { width: 100%; height: 100%; border: 0; }
.video-placeholder { height: 100%; display: grid; place-content: center; justify-items: center; gap: 20px; color: var(--muted); background: radial-gradient(circle, #29231d, #100e0c 70%); }
.video-placeholder p { margin: 0; }
.player-caption { width: min(1180px, 100%); margin: 24px auto 0; display: flex; justify-content: space-between; align-items: end; }
.player-caption .eyebrow { margin-bottom: 7px; }
.player-caption h2 { margin: 0; font-family: "Italiana", serif; font-size: 2rem; font-weight: 400; }
.player-caption > span { color: var(--muted); font-size: .72rem; letter-spacing: .12em; }

@media (max-width: 760px) {
  .site-header { padding: 22px; }
  .hero h1 { font-size: clamp(4.2rem, 25vw, 7rem); }
  .scroll-cue { white-space: nowrap; }
  .chapters { padding-top: 85px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 24px; }
  .chapter-grid { display: block; }
  .chapter-card { width: 100%; min-height: 58vh; margin-bottom: 16px; }
  .card-play { opacity: 1; transform: none; }
  .keepsake { min-height: 58vh; align-items: start; flex-direction: column; justify-content: center; }
  footer { gap: 15px; align-items: center; flex-direction: column; text-align: center; }
  .player-shell { padding: 70px 14px 24px; }
  .video-placeholder p { padding: 0 22px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
