:root {
  --ink: #0b100b;
  --ivory: #f4ebdd;
  --paper: #fbf5eb;
  --maroon: #861b25;
  --gold: #c8a15a;
  --brown: #6f4428;
  --text: #3c2b20;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; color: var(--text); background: var(--ink); font-family: var(--sans); line-height: 1.75; }
body.locked { overflow: hidden; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.opening { position: fixed; inset: 0; z-index: 100; display: grid; place-items: end center; min-height: 100dvh; overflow: hidden; isolation: isolate; color: white; background: var(--ink); transition: opacity .8s ease, visibility .8s ease; }
.opening::before { content: ""; position: absolute; inset: -3px; z-index: -2; background: var(--ink) url("assets/sampul-62.jpg") center 18%/auto 145% no-repeat; transform: scale(1.01); }
.opening.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.opening-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(5,8,5,.12), rgba(5,8,5,.38) 42%, rgba(5,8,5,.98)); }
.opening-card { position: relative; width: min(100%, 560px); padding: 2.5rem 1.5rem 3rem; text-align: center; }
.eyebrow, .section-kicker { margin: 0 0 .55rem; color: var(--gold); font-size: .72rem; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; }
.opening h1, .hero h2 { margin: 0; font: 600 clamp(3.5rem, 18vw, 6rem)/.9 var(--serif); letter-spacing: -.04em; }
.opening h1 span, .hero h2 span { color: var(--gold); font-style: italic; font-weight: 500; }
.opening-date { margin: 1rem 0; letter-spacing: .28em; color: var(--ivory); }
.guest-card { margin: 1.25rem auto; padding: .8rem 1rem; max-width: 360px; border-top: 1px solid rgba(200,161,90,.5); border-bottom: 1px solid rgba(200,161,90,.5); }
.guest-card p { margin: 0; font-size: .72rem; opacity: .75; }
.guest-card strong { display: block; font: 500 1.45rem var(--serif); }
.primary-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .75rem 1.45rem; border-radius: 99px; font: 600 .88rem var(--sans); text-decoration: none; cursor: pointer; }
.primary-button { color: white; border: 1px solid #a83943; background: linear-gradient(135deg, #9d2630, #70121b); box-shadow: 0 12px 32px rgba(0,0,0,.3); }
.primary-button:focus-visible, .outline-button:focus-visible, .photo:focus-visible { outline: 3px solid white; outline-offset: 4px; }

main { width: min(100%, 760px); margin: auto; overflow: hidden; background: var(--paper); box-shadow: 0 0 80px rgba(0,0,0,.35); }
.hero { position: relative; min-height: 100svh; color: white; display: grid; place-items: end center; isolation: isolate; }
.hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transform: scale(1.58); transform-origin: center top; z-index: -2; }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(5,8,5,.22) 45%, rgba(5,8,5,.92)); }
.hero-frame { position: absolute; inset: 14px; border: 1px solid rgba(200,161,90,.8); pointer-events: none; }
.hero-frame::before, .hero-frame::after { content: "✦"; position: absolute; color: var(--gold); font-size: 1rem; background: var(--ink); width: 28px; text-align: center; }
.hero-frame::before { left: -1px; top: -1px; transform: translate(-35%,-35%); }
.hero-frame::after { right: -1px; bottom: -1px; transform: translate(35%,35%); }
.hero-copy { text-align: center; padding: 2rem 1.5rem 6rem; }
.hero-copy > p:last-child { font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; }
.scroll-cue { position: absolute; bottom: 2rem; color: var(--gold); width: 38px; height: 38px; border: 1px solid var(--gold); border-radius: 50%; display: grid; place-items: center; text-decoration: none; animation: float 2s ease-in-out infinite; }

.paper-section { position: relative; padding: 5rem 1.5rem; text-align: center; background-color: var(--paper); background-image: radial-gradient(circle at 15% 15%, rgba(200,161,90,.07), transparent 20%), radial-gradient(circle at 85% 85%, rgba(134,27,37,.05), transparent 25%); }
.intro .arabic { margin: 1rem 0; font: 500 1.75rem/1.8 serif; color: var(--brown); }
.body-copy { max-width: 590px; margin: 1.5rem auto 0; }
.ornament { color: var(--gold); margin-bottom: 1rem; }
.ornament::before, .ornament::after { content: ""; display: inline-block; width: 50px; height: 1px; margin: 0 .75rem .25rem; background: var(--gold); }
.couple { padding-top: 2rem; }
.couple-photo { width: min(82%, 420px); margin: 1.5rem auto 2.5rem; border-radius: 48% 48% 12px 12px; overflow: hidden; box-shadow: 0 18px 45px rgba(58,33,18,.18); }
.couple-photo img { aspect-ratio: 4/5; width: 100%; object-fit: cover; object-position: center top; }
.person h3, .venue h3, .gallery-section h3 { margin: 0; color: var(--brown); font: 600 clamp(2.25rem, 10vw, 3.5rem)/1 var(--serif); }
.person h3 { font-size: clamp(1.9rem, 8.25vw, 3.5rem); white-space: nowrap; }
.person p { margin: .8rem 0 0; font-size: .88rem; }
.ampersand { margin: 1.25rem; color: var(--maroon); font: italic 500 3rem var(--serif); }

.event-section { padding: 1.25rem; background: var(--ink); }
.event-card { padding: 3.5rem 1rem; text-align: center; color: var(--ivory); border: 1px solid var(--gold); background: linear-gradient(145deg, #75141d, #421013); box-shadow: inset 0 0 60px rgba(0,0,0,.18); }
.event-card h3 { margin: 0; font: 500 2rem var(--serif); }
.date-lockup { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: .5rem 0 1.5rem; }
.date-lockup span { width: 72px; padding: .5rem 0; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; border-top: 1px solid rgba(200,161,90,.55); border-bottom: 1px solid rgba(200,161,90,.55); }
.date-lockup strong { color: var(--gold); font: 500 5rem/.9 var(--serif); }
.time strong { color: var(--gold); font-size: 1.15rem; }
.countdown { display: grid; grid-template-columns: repeat(4,1fr); gap: .5rem; max-width: 480px; margin: 2rem auto 0; }
.countdown div { padding: .75rem .25rem; border: 1px solid rgba(200,161,90,.35); background: rgba(0,0,0,.15); }
.countdown strong, .countdown span { display: block; }
.countdown strong { color: var(--gold); font: 600 1.45rem var(--serif); }
.countdown span { font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; }
.venue h3 { font-size: clamp(2rem, 9vw, 3.25rem); }
.outline-button { margin-top: 1.5rem; color: var(--maroon); border: 1px solid var(--gold); background: transparent; }

.gallery-section { padding: 5rem 1rem; color: var(--ivory); text-align: center; background: var(--ink); }
.gallery-section h3 { color: var(--ivory); margin-bottom: 2rem; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.photo { padding: 0; overflow: hidden; border: 1px solid rgba(200,161,90,.55); border-radius: 4px; background: none; cursor: zoom-in; }
.photo img { width: 100%; height: 100%; aspect-ratio: 3/4; object-fit: cover; object-position: center top; transition: transform .7s ease; }
.photo:hover img { transform: scale(1.04); }
.photo-wide { grid-column: 1/-1; }
.photo-wide img { aspect-ratio: 16/10; object-position: center 28%; }
.closing p { max-width: 570px; margin: 0 auto 1rem; }
.closing span { display: block; margin-top: 2rem; font-size: .75rem; }
.closing h2 { margin: .25rem 0 0; color: var(--brown); font: 600 clamp(3rem, 13vw, 5rem)/1 var(--serif); }
.closing h2 em { color: var(--maroon); font-weight: 500; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .85s ease, transform .85s cubic-bezier(.2,.7,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.lightbox { width: min(92vw, 640px); padding: 0; border: 0; background: transparent; }
.lightbox::backdrop { background: rgba(5,8,5,.94); backdrop-filter: blur(8px); }
.lightbox img { max-height: 86vh; margin: auto; border: 1px solid var(--gold); }
.lightbox button { position: fixed; top: 1rem; right: 1rem; width: 44px; height: 44px; color: white; border: 1px solid var(--gold); border-radius: 50%; background: rgba(0,0,0,.55); font-size: 1.5rem; }
.sound-toggle { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; width: 46px; height: 46px; display: grid; place-items: center; color: var(--ivory); border: 1px solid var(--gold); border-radius: 50%; background: rgba(11,16,11,.88); box-shadow: 0 8px 24px rgba(0,0,0,.28); font-size: 1.15rem; cursor: pointer; }
body.locked .sound-toggle { opacity: 0; visibility: hidden; pointer-events: none; }
.sound-toggle.is-playing { animation: musicPulse 2.4s ease-in-out infinite; }
.sound-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

@keyframes float { 50% { transform: translateY(7px); } }
@keyframes musicPulse { 50% { transform: scale(1.08); box-shadow: 0 8px 28px rgba(200,161,90,.3); } }
@media (min-width: 640px) {
  .paper-section { padding-inline: 4rem; }
  .gallery { gap: 1rem; }
  .hero > img { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

.admin-body { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 50% 0, #3a2519, transparent 38%), var(--ink); }
.admin-shell { width: min(100%, 620px); background: transparent; box-shadow: none; overflow: visible; }
.admin-card { position: relative; padding: clamp(2rem, 7vw, 4rem); overflow: hidden; color: var(--text); background: var(--paper); border: 1px solid var(--gold); box-shadow: 0 24px 80px rgba(0,0,0,.38); }
.admin-card::before, .admin-card::after { content: "✦"; position: absolute; color: var(--gold); font-size: 1.2rem; }
.admin-card::before { top: .75rem; left: .9rem; }
.admin-card::after { right: .9rem; bottom: .75rem; }
.admin-card h1 { margin: 0; color: var(--brown); font: 600 clamp(2.6rem, 10vw, 4rem)/.95 var(--serif); }
.admin-intro { margin: 1rem 0 2rem; }
.admin-card label { display: block; margin-bottom: .55rem; font-weight: 600; }
.admin-card input { width: 100%; min-height: 52px; padding: .85rem 1rem; color: var(--text); border: 1px solid rgba(111,68,40,.35); border-radius: 4px; background: #fffdf8; font: 500 1rem var(--sans); }
.admin-card input:focus { outline: 3px solid rgba(200,161,90,.28); border-color: var(--gold); }
.field-help { margin: .5rem 0 1.25rem; color: #715f52; font-size: .75rem; }
.admin-primary { width: 100%; border: 0; }
.link-result { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(200,161,90,.55); }
.link-result > p { margin: 0 0 .5rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; }
.link-result output { display: block; padding: .85rem; overflow-wrap: anywhere; color: #4d3728; background: #eee2d2; border-radius: 4px; font-size: .8rem; line-height: 1.5; }
.admin-actions { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: 1rem; }
.admin-actions .outline-button { margin: 0; cursor: pointer; }
.preview-link { display: inline-block; margin-top: 1.25rem; color: var(--maroon); font-weight: 600; font-size: .82rem; }
.status-message { min-height: 1.6em; margin: 1rem 0 0; color: var(--maroon); font-size: .78rem; }
@media (min-width: 520px) { .admin-actions { grid-template-columns: 1fr 1.25fr; } }
