/* ===== Palette taken from the Saleh & Nura card ===== */
:root {
  --green-900: #1f2c1c;
  --green-800: #2c3d28;
  --green-700: #3a5233;
  --green-600: #4b6a40;
  --olive:     #383b21;
  --gold:      #c9a64e;
  --gold-soft: #e0c37e;
  --gold-pale: #f1e2b8;
  --ring-dark: #4b4535;
  --cream:     #f8f6f2;
  --cream-2:   #f3efe7;
  --ink:       #2e2a22;
  --muted:     #6c6656;

  --f-script: "Great Vibes", cursive;
  --f-serif:  "Cormorant Garamond", Georgia, serif;
  --f-caps:   "Cinzel", "Times New Roman", serif;
  --f-am:     "Noto Serif Ethiopic", "Nyala", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100vh; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

section, footer {
  position: relative;
  padding: 88px 20px;
  text-align: center;
}
.section-dark  { background: radial-gradient(ellipse at top, var(--green-700), var(--green-800) 60%, var(--green-900)); color: var(--cream); }
.section-cream { background: var(--cream-2); }

.section-title {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(42px, 9vw, 64px);
  line-height: 1.1;
  color: var(--gold);
  margin: 0 0 6px;
}
.section-title.light { color: var(--gold-soft); }
.section-sub {
  font-family: var(--f-serif), var(--f-am);
  color: var(--muted);
  margin: 0 0 36px;
  font-size: 17px;
}
.section-sub.light { color: rgba(248, 246, 242, .75); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px;
  border-radius: 40px;
  font-family: var(--f-caps);
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none;
  transition: transform .25s, background .25s, color .25s, box-shadow .25s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn-green { background: var(--green-800); color: var(--gold-pale); border: 1px solid var(--gold); box-shadow: 0 8px 24px rgba(44, 61, 40, .25); }
.btn-green:hover { background: var(--green-700); }
.btn-outline-light { background: transparent; color: var(--gold-pale); border: 1px solid var(--gold-soft); margin-top: 36px; }
.btn-outline-light:hover { background: var(--gold-soft); color: var(--green-900); }

/* =========================================================
   ENVELOPE INTRO
   ========================================================= */
.envelope {
  position: fixed; inset: 0; z-index: 100;
  overflow: hidden;
  background: var(--green-800);
  perspective: 1400px;
  transition: opacity 1s ease 1.6s, visibility 0s linear 2.6s;
}
.env-texture {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 18% 82%, rgba(255,255,255,.06) 0 14%, transparent 15%),
    radial-gradient(circle at 85% 78%, rgba(255,255,255,.05) 0 10%, transparent 11%),
    radial-gradient(ellipse at center, #3d5434 0%, #2c3d28 55%, #1c2819 100%);
}
.env-texture::after { /* fine paper grain */
  content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.env-fold { position: absolute; inset: 0; }
.env-left   { background: linear-gradient(100deg, #34492f, #2b3c27); clip-path: polygon(0 0, 50% 56%, 0 100%); }
.env-right  { background: linear-gradient(260deg, #34492f, #2b3c27); clip-path: polygon(100% 0, 50% 56%, 100% 100%); }
.env-bottom { background: linear-gradient(0deg, #2a3a26, #364c31); clip-path: polygon(0 100%, 50% 52%, 100% 100%); filter: drop-shadow(0 -4px 8px rgba(0,0,0,.3)); }
.env-flap {
  position: absolute; left: 0; right: 0; top: 0; height: 58%;
  background: linear-gradient(180deg, #3f5838, #2f4429);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 1.2s cubic-bezier(.6,.05,.3,1) .35s;
  z-index: 2;
}
.env-flap::after { /* gold edge line */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 97%, rgba(224,195,126,.5));
  clip-path: inherit;
}

.env-title {
  position: absolute; z-index: 3; top: 7vh; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center;
  font-family: var(--f-serif); color: var(--gold-pale);
  text-shadow: 0 3px 12px rgba(0,0,0,.35);
  transition: opacity .6s ease, transform .8s ease;
}
.env-title-1 { font-size: clamp(46px, 11vw, 88px); font-weight: 600; line-height: 1; }
.env-title-2 { font-size: clamp(34px, 8vw, 62px); font-weight: 600; line-height: 1.1; }

.env-seal {
  position: absolute; z-index: 4;
  left: 50%; top: 58%;
  width: min(64vw, 46vh, 360px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 0; background: none; padding: 0;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,.45));
  animation: seal-pulse 3s ease-in-out infinite;
  transition: transform 1.2s cubic-bezier(.6,.05,.3,1), opacity 1s ease;
}
.env-seal img { width: 100%; height: 100%; object-fit: contain; }
@keyframes seal-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.04); }
}
.env-open-text {
  position: absolute; z-index: 4; left: 50%; bottom: 9vh; transform: translateX(-50%);
  background: none; border: 0; color: var(--gold-pale);
  font-family: var(--f-caps); font-size: 17px; letter-spacing: .2em;
  text-decoration: underline; text-underline-offset: 6px;
  animation: blink 2.2s ease-in-out infinite;
  transition: opacity .5s;
}
@keyframes blink { 50% { opacity: .45; } }
.env-names {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 3vh; margin: 0;
  text-align: center;
  font-family: var(--f-script); font-size: 28px; color: var(--gold-soft);
  transition: opacity .5s;
}

/* opening sequence */
.envelope.opening .env-seal   { animation: none; transform: translate(-50%, -50%) scale(2.6) rotate(140deg); opacity: 0; }
.envelope.opening .env-flap   { transform: rotateX(180deg); }
.envelope.opening .env-title  { opacity: 0; transform: translateY(-40px); }
.envelope.opening .env-open-text, .envelope.opening .env-names { opacity: 0; }
.envelope.opening .env-left   { transform: translateX(-100%); transition: transform 1.2s ease 1s; }
.envelope.opening .env-right  { transform: translateX(100%);  transition: transform 1.2s ease 1s; }
.envelope.opening .env-bottom { transform: translateY(100%);  transition: transform 1.2s ease 1s; }
.envelope.opening { opacity: 0; visibility: hidden; }

/* =========================================================
   MUSIC BUTTON
   ========================================================= */
.music-btn {
  position: fixed; z-index: 90; right: 16px; bottom: 16px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--cream); border: 1.5px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: opacity .6s;
}
body.opened .music-btn { opacity: 1; pointer-events: auto; }
.bars { display: flex; align-items: center; gap: 3px; height: 24px; }
.bars i { display: block; width: 3px; border-radius: 3px; background: var(--green-800); height: 30%; }
.bars i:nth-child(1){height:45%} .bars i:nth-child(2){height:85%} .bars i:nth-child(3){height:55%}
.bars i:nth-child(4){height:30%} .bars i:nth-child(5){height:55%} .bars i:nth-child(6){height:90%} .bars i:nth-child(7){height:40%}
.music-btn.playing .bars i { animation: eq 1s ease-in-out infinite; }
.music-btn.playing .bars i:nth-child(2n) { animation-delay: -.4s; }
.music-btn.playing .bars i:nth-child(3n) { animation-delay: -.7s; }
@keyframes eq { 0%,100% { transform: scaleY(.35); } 50% { transform: scaleY(1); } }
.music-btn:not(.playing)::after {
  content: ""; position: absolute; width: 34px; height: 2px; background: var(--gold); transform: rotate(-45deg);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px 90px;
  background:
    radial-gradient(circle at 50% 30%, #ffffff 0%, var(--cream) 45%, var(--cream-2) 100%);
  overflow: hidden;
}
.hero-flower {
  width: min(78vw, 400px);
  margin-bottom: 18px;
  filter: drop-shadow(0 20px 30px rgba(44, 61, 40, .25));
  animation: float 7s ease-in-out infinite;
}
body:not(.opened) .hero-flower { opacity: 0; }
body.opened .hero-flower { animation: bloom 1.6s cubic-bezier(.2,.8,.2,1) both, float 7s ease-in-out 1.6s infinite; }
@keyframes bloom { from { opacity: 0; transform: scale(.4) rotate(-60deg); } to { opacity: 1; transform: none; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.eyebrow {
  font-family: var(--f-caps); letter-spacing: .28em; text-transform: uppercase;
  font-size: 13px; color: var(--muted); margin: 0 0 6px;
}
.hero-names {
  margin: 0; font-family: var(--f-script); font-weight: 400;
  font-size: clamp(60px, 15vw, 110px); line-height: 1; color: var(--gold);
  display: flex; align-items: baseline; gap: .18em; flex-wrap: wrap; justify-content: center;
  text-shadow: 0 2px 0 rgba(255,255,255,.6);
}
.hero-names .amp { font-size: .7em; color: var(--green-700); }
.hero-am { font-family: var(--f-am); color: var(--green-700); margin: 8px 0 22px; font-size: 18px; }
.hero-date {
  display: flex; align-items: center; gap: 16px;
  font-family: var(--f-caps); color: var(--green-800);
  font-size: 14px; letter-spacing: .2em; text-transform: uppercase;
}
.hero-date strong {
  font-weight: 500; font-size: 20px; padding: 6px 18px;
  border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold);
}
.scroll-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1.5px solid var(--gold); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--gold); animation: scroll 1.8s infinite;
}
@keyframes scroll { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(16px); } }

/* falling leaves */
.hero-leaves { position: absolute; inset: 0; pointer-events: none; }
.hero-leaves i {
  position: absolute; top: -40px; width: 18px; height: 10px;
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  border-radius: 0 100% 0 100%;
  border: 1px solid rgba(201,166,78,.7);
  opacity: .75;
  animation: fall linear infinite;
}
@keyframes fall {
  0%   { transform: translate(0, -40px) rotate(0deg); }
  100% { transform: translate(var(--drift, 60px), 110vh) rotate(540deg); }
}

/* =========================================================
   COUNTDOWN
   ========================================================= */
.divider-mono { width: 120px; margin: 0 auto 18px; filter: sepia(1) saturate(2.2) hue-rotate(5deg) brightness(1.25); }
.timer {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; max-width: 620px; margin: 0 auto;
}
.t-box {
  aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid var(--gold-soft);
  background: radial-gradient(circle, rgba(255,255,255,.08), rgba(255,255,255,.02));
  box-shadow: inset 0 0 0 5px rgba(224,195,126,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.t-box span { font-family: var(--f-caps); font-size: clamp(24px, 6.4vw, 44px); color: var(--gold-pale); line-height: 1; }
.t-box small { font-family: var(--f-caps); font-size: clamp(9px, 2.2vw, 12px); letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; opacity: .85; }
.t-box em { font-family: var(--f-am); font-style: normal; font-size: clamp(9px, 2.2vw, 12px); opacity: .7; }
.timer-done { font-family: var(--f-script); font-size: 40px; color: var(--gold-soft); margin: 10px 0 0; }

/* =========================================================
   VIDEO
   ========================================================= */
.video-frame {
  position: relative; max-width: 860px; margin: 0 auto;
  border-radius: 18px; overflow: hidden;
  border: 6px solid #fff;
  box-shadow: 0 0 0 1.5px var(--gold), 0 24px 50px rgba(44,61,40,.25);
  background: #000;
}
.video-frame video { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; }
.play-btn {
  position: absolute; inset: 0; border: 0;
  background: linear-gradient(0deg, rgba(31,44,28,.55), rgba(31,44,28,.1));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: var(--cream); transition: opacity .4s;
}
.play-btn.hide { opacity: 0; pointer-events: none; }
.play-circle {
  width: 78px; height: 78px; border-radius: 50%;
  background: rgba(248,246,242,.18); border: 2px solid var(--gold-soft);
  display: grid; place-items: center; backdrop-filter: blur(4px);
  animation: ring 2.4s ease-out infinite;
}
.play-circle svg { width: 34px; height: 34px; fill: var(--gold-pale); margin-left: 4px; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(224,195,126,.55); } 100% { box-shadow: 0 0 0 26px rgba(224,195,126,0); } }
.play-label { font-family: var(--f-caps); letter-spacing: .2em; font-size: 14px; text-decoration: underline; text-underline-offset: 5px; }

/* =========================================================
   ROUND INVITATION CARD (replica of PDF page 2)
   ========================================================= */
.invite-sec { background: linear-gradient(180deg, var(--cream), var(--cream-2)); }
.round-card {
  width: min(100%, 680px); aspect-ratio: 1; margin: 0 auto;
  border-radius: 50%;
  background: #fff;
  border: 12px solid var(--ring-dark);
  box-shadow: 0 30px 60px rgba(56,59,33,.22);
  padding: 8px;
  display: flex;
}
.round-inner {
  flex: 1; border-radius: 50%;
  border: 6px solid var(--gold-soft);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6% 15% 7%;
  overflow: hidden;
}
.round-inner p { margin: 0; }
.card-mono { width: 17%; margin-bottom: 4px; }
.round-inner .caps { font-family: "Cormorant Garamond", serif; font-weight: 500; text-transform: uppercase; font-size: 14px; letter-spacing: .04em; line-height: 1.3; color: var(--ink); }
.round-inner .caps.strong { margin-top: 4px; }
.round-inner .script { font-family: var(--f-script); color: var(--gold); font-size: 34px; line-height: 1.15; }
.round-inner .amp-sm { font-size: 24px; }
.flourish { width: 60%; color: var(--gold); margin: 4px 0; }
.amharic { font-family: var(--f-am); color: var(--ink); font-size: 13.5px; line-height: 1.45; }
.amharic .gold { color: var(--gold); font-weight: 600; font-size: 1.12em; }
.amharic .am-body { margin-top: 6px; }
.blank { display: inline-block; width: 7em; border-bottom: 1px solid var(--ink); margin: 0 2px; transform: translateY(-3px); }

/* =========================================================
   DETAILS
   ========================================================= */
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
.detail {
  background: var(--cream); border-radius: 160px 160px 18px 18px;
  padding: 36px 18px 28px;
  border: 1px solid rgba(201,166,78,.5);
  box-shadow: 0 12px 30px rgba(56,59,33,.08);
}
.d-icon { width: 58px; height: 58px; margin: 0 auto 12px; border-radius: 50%; background: var(--green-800); display: grid; place-items: center; }
.d-icon svg { width: 26px; height: 26px; fill: var(--gold-soft); }
.detail h3 { font-family: var(--f-caps); font-weight: 500; letter-spacing: .18em; text-transform: uppercase; font-size: 15px; color: var(--gold); margin: 0 0 6px; }
.detail p { margin: 0; font-size: 19px; }
.detail .am { font-family: var(--f-am); font-size: 15px; color: var(--muted); margin-top: 4px; }

/* =========================================================
   LOCATION
   ========================================================= */
.map-frame {
  max-width: 860px; margin: 0 auto 30px;
  border-radius: 18px; overflow: hidden;
  border: 6px solid #fff; box-shadow: 0 0 0 1.5px var(--gold), 0 20px 40px rgba(44,61,40,.18);
}
.map-frame iframe { display: block; width: 100%; height: 380px; border: 0; filter: saturate(.75) sepia(.12); }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 180px;
  gap: 12px; max-width: 1000px; margin: 0 auto;
}
.g-item { margin: 0; overflow: hidden; border-radius: 14px; cursor: zoom-in; position: relative; box-shadow: 0 8px 22px rgba(56,59,33,.15); }
.g-item::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.6); border-radius: inherit; pointer-events: none; }
.g-wide { grid-column: span 2; }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.g-item:hover img { transform: scale(1.07); }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(20, 28, 18, .94);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 86vh; max-width: 92vw; border-radius: 10px; border: 4px solid #fff; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--gold-pale); font-size: 52px; line-height: 1; padding: 10px 16px; }
.lb-close { top: 10px; right: 12px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* =========================================================
   ENTRY PASS
   ========================================================= */
.leaf { width: min(92vw, 560px); margin: 0 auto 16px; filter: drop-shadow(0 20px 30px rgba(0,0,0,.4)); animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.leaf.reveal:not(.in) { transform: translateY(28px); }
.pass-text { font-size: 22px; margin: 0; }
.pass-text strong { color: var(--gold-soft); font-weight: 600; }
.pass-am { font-family: var(--f-am); color: var(--gold-pale); margin: 4px 0 18px; }
.pass-note { font-size: 16px; opacity: .8; margin: 0; }

/* =========================================================
   RSVP
   ========================================================= */
.contacts { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; max-width: 720px; margin: 0 auto 30px; }
.contact {
  flex: 1 1 260px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 20px; border-radius: 16px;
  text-decoration: none; color: var(--ink);
  background: var(--cream-2);
  border: 1px solid rgba(201,166,78,.55);
  transition: transform .25s, box-shadow .25s;
}
.contact:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(56,59,33,.14); }
.c-name { font-family: var(--f-caps); letter-spacing: .1em; font-size: 15px; color: var(--green-800); }
.c-phone { font-size: 22px; color: var(--gold); font-weight: 600; }
.kindly { font-style: italic; color: var(--muted); font-size: 19px; margin: 0; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { padding: 72px 20px 100px; }
.foot-mono { width: 150px; margin: 0 auto 16px; filter: sepia(1) saturate(2.2) hue-rotate(5deg) brightness(1.25); }
.foot-am { font-family: var(--f-am); font-size: 22px; color: var(--gold-pale); margin: 0; }
.foot-en { margin: 4px 0 12px; opacity: .8; font-style: italic; }
.foot-names { font-family: var(--f-script); font-size: 54px; color: var(--gold-soft); margin: 0; line-height: 1.2; }
.foot-date { font-family: var(--f-caps); letter-spacing: .3em; font-size: 14px; opacity: .8; margin: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
  section, footer { padding: 70px 16px; }
  .detail-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 8px; }
  .timer { gap: 8px; }
  .detail { border-radius: 90px 90px 18px 18px; padding: 26px 16px 22px; }
  .detail-grid { gap: 14px; }
}

/* On phones the full text no longer fits a circle: switch to a tall "pill" shape */
@media (max-width: 600px) {
  .round-card { aspect-ratio: auto; border-radius: 999px; border-width: 7px; padding: 4px; }
  .round-inner { border-radius: 999px; border-width: 3px; padding: 56px 22px 64px; }
  .card-mono { width: 96px; }
  .round-inner .caps { font-size: 12.5px; }
  .round-inner .script { font-size: 32px; }
  .round-inner .amp-sm { font-size: 22px; }
  .amharic { font-size: 13.5px; }
  .map-frame iframe { height: 300px; }
  .hero-date { gap: 8px; font-size: 11px; }
  .hero-date strong { font-size: 16px; padding: 4px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
