/* ═══════════════════════════════════════════════════
   NIKA & NIKA — Bridgerton-inspired wedding invitation
   ═══════════════════════════════════════════════════ */

:root{
  --gold:#c4a563;
  --gold-dk:#8a7340;
  --gold-lt:#e6d3a3;
  --ink:#3a4a36;        /* deep sage / forest */
  --ink-soft:#5b6a52;
  --cream:#f4ecd8;
  --paper:#fbf6e8;
  --rule:rgba(196,165,99,0.45);
  --shadow:0 8px 30px rgba(86,67,30,0.10);

  --f-display:'Cinzel',serif;
  --f-script:'Italianno',cursive;
  --f-serif:'Cormorant Garamond',serif;
  --f-sans:'Montserrat',sans-serif;

  /* unified responsive content width */
  --content-w:720px;
  --content-pad:20px;
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}

body{
  font-family:var(--f-serif);
  font-weight:400;
  color:var(--ink);
  background:url('../images/bg.png') center/cover no-repeat;
  background-attachment:fixed;
  background-color:#f1e8d2;
  line-height:1.6;
  min-height:100vh;
  overflow-x:hidden;
}

body.env-locked{overflow:hidden;height:100vh}

img{max-width:100%;display:block}

/* ═══ MUSIC TOGGLE BUTTON ═══ */
.mus-btn{
  position:fixed;
  top:18px;right:18px;
  width:42px;height:42px;
  border-radius:50%;
  border:1px solid var(--rule);
  background:rgba(251,246,232,0.85);
  backdrop-filter:blur(4px);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  z-index:100;
  color:var(--gold-dk);
  box-shadow:0 4px 12px rgba(120,90,40,0.15);
  transition:transform .25s ease, box-shadow .25s ease;
}
.mus-btn:hover{transform:scale(1.05);box-shadow:0 6px 16px rgba(120,90,40,0.22)}
.mus-btn.on{color:var(--gold)}
.mus-btn svg{stroke:currentColor}
@media (max-width:480px){
  .mus-btn{top:12px;right:12px;width:38px;height:38px}
  .mus-btn svg{width:18px;height:18px}
}

/* ═══ ENVELOPE INTRO ═══ */
.env-screen{
  position:fixed;inset:0;z-index:9999;
  background:url('../images/bg.png') center/cover no-repeat;
  display:flex;align-items:center;justify-content:center;flex-direction:column;
  cursor:pointer;
  transition:opacity 0.7s ease;
}
.env-screen.opened{opacity:0;pointer-events:none}
.env-banner{
  width:min(85vw,520px);
  max-height:85vh;
  display:flex;align-items:center;justify-content:center;
  transition:transform 1.6s cubic-bezier(.6,0,.3,1), opacity 0.6s 1s ease;
}
.env-banner img{
  width:100%;height:auto;
  filter:drop-shadow(0 12px 30px rgba(120,90,40,0.18));
}
.env-banner.zooming{
  transform:scale(3);
  opacity:0;
}
.env-hint{
  margin-top:24px;
  text-align:center;
  font-family:var(--f-script);font-size:30px;color:var(--gold-dk);
  letter-spacing:.5px;
  animation:envPulse 2s ease-in-out infinite;
  transition:opacity .2s ease;
}
.env-hint.hide{opacity:0;animation:none;pointer-events:none}
@keyframes envPulse{0%,100%{opacity:.55;transform:translateY(0)}50%{opacity:1;transform:translateY(-6px)}}

/* ═══ HERO SCROLL HINT ═══ */
.hero-scroll-hint{
  position:fixed;
  left:50%;
  bottom:calc(18px + env(safe-area-inset-bottom,0px));
  transform:translateX(-50%);
  display:flex;flex-direction:column;align-items:center;gap:4px;
  font-family:var(--f-sans);
  font-size:11px;letter-spacing:.32em;text-transform:uppercase;
  color:var(--gold-dk);
  opacity:0;
  pointer-events:none;
  transition:opacity .6s ease;
  animation:heroBounce 2s ease-in-out infinite;
  z-index:50;
  text-shadow:0 1px 6px rgba(251,246,232,0.9);
}
.hero-scroll-hint.show{opacity:.9}
.hero-scroll-hint.fade{opacity:0!important;animation:none}
.hero-scroll-hint svg{stroke:var(--gold-dk);filter:drop-shadow(0 1px 4px rgba(251,246,232,0.8))}
@keyframes heroBounce{
  0%,100%{transform:translate(-50%,0)}
  50%{transform:translate(-50%,6px)}
}
@media (max-width:480px){
  .hero-scroll-hint{
    bottom:calc(14px + env(safe-area-inset-bottom,0px));
    font-size:10px;letter-spacing:.28em;
  }
  .hero-scroll-hint svg{width:16px;height:16px}
}

.env-heart{
  position:absolute;left:50%;top:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
  animation:envHeartFly 1.9s cubic-bezier(.4,.1,.3,1) forwards;
}
@keyframes envHeartFly{
  0%{transform:translate(-50%,-50%) scale(.4) rotate(0);opacity:0}
  20%{opacity:1}
  100%{transform:translate(calc(-50% + var(--hx)),calc(-50% + var(--hy))) scale(1.2) rotate(var(--hr));opacity:0}
}

/* ═══ TYPOGRAPHY HELPERS ═══ */
.t-script{
  font-family:var(--f-script);
  font-size:clamp(34px,5vw,46px);
  color:var(--gold);
  text-align:center;
  font-weight:400;
  margin-bottom:6px;
  letter-spacing:.5px;
}
.t-h{
  font-family:var(--f-display);
  font-size:clamp(28px,4.4vw,42px);
  color:var(--ink);
  text-align:center;
  font-weight:500;
  letter-spacing:.18em;
  text-transform:uppercase;
  margin-bottom:16px;
}
.dv{
  display:flex;align-items:center;justify-content:center;gap:14px;
  margin:0 auto 36px;max-width:240px;
  color:var(--gold);
}
.dv span{flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--gold),transparent)}

/* ═══ SECTION BASE ═══ */
.sec{
  width:100%;
  max-width:var(--content-w);
  margin:0 auto;
  padding:80px var(--content-pad);
  position:relative;
}
.sec::before{
  content:'';
  position:absolute;inset:32px 28px;
  background:rgba(251,246,232,0.55);
  backdrop-filter:blur(2px);
  border:1px solid var(--rule);
  border-radius:2px;
  z-index:-1;
  box-shadow:var(--shadow);
}

/* ═══ REVEAL ═══ */
.reveal{opacity:0;transform:translateY(24px);transition:opacity .9s ease, transform .9s ease}
.reveal.on{opacity:1;transform:none}

/* ═══ HERO ═══ */
.hero{
  width:100%;
  max-width:var(--content-w);
  margin:0 auto;
  min-height:100vh;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  padding:0 var(--content-pad) 40px;
  position:relative;
}
.hero-frame-wrap{
  /* size box to frame's natural aspect ratio (1261×1451), so absolute-% padding
     of the inner text always corresponds to the frame's inner safe area. */
  width:min(100%, calc(100vh * (1261/1451)));
  aspect-ratio:1261/1451;
  max-height:100vh;
  position:relative;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto;
}

/* stack of multiple hero photos */
.hero .hero-photo + .hero-photo{margin-top:24px}
.hero-frame{
  width:100%;height:100%;
  object-fit:contain;
  pointer-events:none;
  filter:drop-shadow(0 6px 16px rgba(120,90,40,0.12));
}
.hero-frame-text{
  position:absolute;
  inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;
  padding:18% 18%;
}
.hero-pre{
  font-family:var(--f-sans);
  font-size:clamp(10px,1.4vw,12px);
  color:var(--ink-soft);
  letter-spacing:.3em;
  text-transform:uppercase;
  margin-bottom:14px;
}
.hero-names{
  font-family:var(--f-display);
  font-size:clamp(26px,4.4vw,44px);
  color:var(--ink);
  font-weight:500;
  letter-spacing:.06em;
  text-transform:uppercase;
  line-height:1.2;
  white-space:nowrap;
}
.hero-names .amp{
  font-family:var(--f-script);
  font-size:1.5em;
  color:var(--gold);
  font-weight:400;
  letter-spacing:0;
  text-transform:none;
  margin:0 .15em;
  vertical-align:-.05em;
}
.hero-names--small{
  font-size:clamp(22px,3.6vw,34px);
  text-transform:none;
  font-style:italic;
  font-family:var(--f-serif);
  letter-spacing:.04em;
}
.hero-line{
  font-family:var(--f-serif);
  font-style:italic;
  font-size:clamp(13px,1.7vw,16px);
  color:var(--ink-soft);
  margin:10px auto;
  max-width:34ch;
  line-height:1.5;
}
.hero-rule{
  display:flex;align-items:center;justify-content:center;gap:12px;
  margin:18px auto;
  width:60%;max-width:240px;
  color:var(--gold);
}
.hero-rule span{flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--gold),transparent)}
.hero-date{
  font-family:var(--f-display);
  font-size:clamp(15px,2vw,18px);
  color:var(--ink);
  letter-spacing:.22em;
  text-transform:uppercase;
}
.hero-time{
  font-family:var(--f-display);
  font-size:clamp(13px,1.7vw,16px);
  color:var(--gold);
  letter-spacing:.25em;
  margin-top:4px;
}
.hero-place{
  font-family:var(--f-serif);
  font-style:italic;
  font-size:clamp(12px,1.6vw,15px);
  color:var(--ink-soft);
  margin-top:8px;
  line-height:1.5;
}

.hero-photo{
  width:100%;
  margin:0 auto;
}
.hero-photo img{
  width:100%;height:auto;
  -webkit-mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
          mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
}

/* ═══ INVITATION ═══ */
.invite,
.location{text-align:center}
.invite::before{display:none}
.location{margin-top:60px}
#dinner-location{margin-top:-40px;padding-top:40px}
.invite-lead{
  font-family:var(--f-serif);
  font-style:italic;
  font-size:clamp(16px,2vw,19px);
  color:var(--ink);
  max-width:46ch;
  margin:0 auto 28px;
  line-height:1.6;
}
.invite-meta{
  margin:24px 0 30px;
}
.invite-date{
  font-family:var(--f-display);
  font-size:clamp(20px,2.6vw,26px);
  color:var(--ink);
  letter-spacing:.22em;
  text-transform:uppercase;
  margin-bottom:6px;
}
.invite-time{
  font-family:var(--f-display);
  font-size:clamp(16px,2vw,19px);
  color:var(--gold);
  letter-spacing:.3em;
  margin-bottom:14px;
}
.invite-place{
  font-family:var(--f-serif);
  font-style:italic;
  font-size:clamp(15px,1.9vw,17px);
  color:var(--ink-soft);
  line-height:1.5;
}
/* photos sized to match the plate (.sec::before) width
   plate inset 28px desktop / 14px mobile, content padding 20/16 → 8px gap each side on desktop, ~-2px on mobile */
.invite-img{
  margin:30px auto 0;
  width:calc(100% - 16px);
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
}
.sec > .invite-img:last-child{margin-bottom:-40px}
.invite > .invite-img:last-child{margin-bottom:-40px}
.invite-img img{
  width:100%;height:auto;display:block;
  -webkit-mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
          mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
}

.map-btn-wrap{display:flex;justify-content:center;margin-top:18px}
.map-btn{
  display:inline-flex;align-items:center;gap:10px;
  padding:14px 32px;
  background:transparent;
  border:1.5px solid var(--gold);
  color:var(--ink);
  font-family:var(--f-display);
  font-size:12px;
  letter-spacing:.3em;
  text-transform:uppercase;
  text-decoration:none;
  transition:all .35s ease;
  cursor:pointer;
}
.map-btn:hover{
  background:var(--gold);
  color:#fff;
  letter-spacing:.36em;
}
.map-btn svg{stroke:currentColor;flex-shrink:0}

/* ═══ DRESS CODE ═══ */
.dresscode{text-align:center}
.dresscode::before{display:none}
.dc-text{
  font-family:var(--f-serif);
  font-style:italic;
  font-size:clamp(15px,1.9vw,18px);
  color:var(--ink);
  max-width:50ch;
  margin:0 auto 36px;
  line-height:1.6;
}
.dc-block{margin:32px 0}
.dc-h{
  font-family:var(--f-display);
  font-size:clamp(15px,2vw,18px);
  color:var(--gold-dk);
  letter-spacing:.3em;
  text-transform:uppercase;
  font-weight:500;
  margin-bottom:14px;
}
.dc-img{
  width:calc(100% - 16px);
  margin:0 auto;
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
}
.dc-img img{
  width:100%;height:auto;display:block;
  -webkit-mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
          mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
}

/* ═══ TIMING (max-katy-style route, gold palette) ═══ */
.timing{text-align:center;padding:80px var(--content-pad)}
.timing::before{display:none}
.schedule-timeline{
  position:relative;
  width:100%;
  max-width:380px;
  height:860px;
  margin:30px auto 0;
}
.schedule-path{
  position:absolute;inset:0;
  width:100%;height:100%;
  pointer-events:none;
  z-index:0;
}
.schedule-stop{
  position:absolute;
  width:0;height:0;
  z-index:2;
}
.schedule-stop__dot{
  position:absolute;
  top:0;left:0;
  width:16px;height:16px;
  border-radius:50%;
  transform:translate(-50%,-50%);
  background:linear-gradient(180deg,var(--gold),var(--gold-dk));
  box-shadow:0 0 0 5px rgba(196,165,99,.18),0 0 0 6px rgba(196,165,99,.35);
}
.schedule-stop__text{
  position:absolute;
  width:120px;
  text-align:center;
}
.schedule-stop__icon{
  display:flex;justify-content:center;
  margin-bottom:10px;
}
.schedule-stop__icon--img{
  justify-content:center!important;
  align-items:center;
  width:clamp(80px,24vw,110px);
  height:clamp(60px,17vw,78px);
  margin:0 auto 8px;
}
/* welcome-drink (stop--1) is 10% larger across all breakpoints */
.schedule-stop--1 .schedule-stop__icon--img{
  width:clamp(88px,26.4vw,121px);
  height:clamp(66px,18.7vw,86px);
}
.schedule-stop__icon--img img{
  width:100%;height:100%;
  object-fit:contain;
  object-position:center;
  opacity:.95;
  display:block;
  /* tint to match var(--gold) #c4a563 — same color as "order of the day" text */
  filter:brightness(0) saturate(100%) invert(73%) sepia(36%) saturate(569%) hue-rotate(2deg) brightness(86%) contrast(86%);
}
.schedule-traveler{
  position:absolute;top:0;left:0;
  width:33px;height:33px;
  z-index:4;
  pointer-events:none;
  will-change:transform;
  transform:translate(-1000px,-1000px);
  filter:drop-shadow(0 0 8px rgba(196,165,99,.5));
}
.schedule-traveler svg{
  width:100%;height:100%;
  animation:travelerBeat 1.3s ease-in-out infinite;
  transform-origin:center;
}
@keyframes travelerBeat{
  0%,100%{transform:scale(1)}
  25%{transform:scale(1.18)}
  50%{transform:scale(1)}
  75%{transform:scale(1.1)}
}
.schedule-stop__pre{
  font-family:var(--f-sans);
  font-size:9px;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--gold-dk);
  margin:0 0 6px;
  font-weight:600;
  white-space:nowrap;
}
.schedule-stop__time{
  font-family:var(--f-serif);
  font-size:34px;
  font-weight:500;
  color:var(--gold);
  margin:0;
  letter-spacing:.04em;
  line-height:1;
}
.schedule-stop__name{
  font-family:var(--f-serif);
  font-size:20px;
  color:var(--ink);
  margin:8px 0 0;
  line-height:1.3;
}
.schedule-stop--1{top:40px;left:30%}
.schedule-stop--1 .schedule-stop__text{right:22px;left:auto;top:-70px;text-align:center}
.schedule-stop--2{top:210px;left:70%}
.schedule-stop--2 .schedule-stop__text{left:22px;top:-70px;text-align:center}
.schedule-stop--3{top:380px;left:30%}
.schedule-stop--3 .schedule-stop__text{right:22px;left:auto;top:-70px;text-align:center}
.schedule-stop--4{top:550px;left:70%}
.schedule-stop--4 .schedule-stop__text{left:22px;top:-70px;text-align:center}
.schedule-stop--5{top:720px;left:30%}
.schedule-stop--5 .schedule-stop__text{right:22px;left:auto;top:-70px;text-align:center}

@media (max-width:700px){
  .schedule-stop__pre{font-size:8px;letter-spacing:.08em}
  .schedule-stop__time{font-size:32px}
  .schedule-stop__name{font-size:19px}
  .schedule-stop__text{width:120px}
  .schedule-stop__icon--img{width:clamp(96px,28vw,124px);height:clamp(72px,20vw,90px)}
  .schedule-stop--1 .schedule-stop__icon--img{width:clamp(106px,30.8vw,136px);height:clamp(79px,22vw,99px)}
  .schedule-stop--1 .schedule-stop__text,
  .schedule-stop--3 .schedule-stop__text,
  .schedule-stop--5 .schedule-stop__text{right:18px}
  .schedule-stop--2 .schedule-stop__text,
  .schedule-stop--4 .schedule-stop__text{left:18px}
  /* slightly bigger dot on mobile to fully cover the line at curve crossings */
  .schedule-stop__dot{width:18px;height:18px}
}

/* extra small screens — keep stops/text from overflowing */
@media (max-width:400px){
  .timing{padding-left:8px;padding-right:8px}
  .schedule-stop__text{width:108px}
  .schedule-stop--1 .schedule-stop__text,
  .schedule-stop--3 .schedule-stop__text,
  .schedule-stop--5 .schedule-stop__text{right:14px}
  .schedule-stop--2 .schedule-stop__text,
  .schedule-stop--4 .schedule-stop__text{left:14px}
  .schedule-stop__icon--img{width:clamp(86px,26vw,108px);height:clamp(64px,18vw,80px)}
  .schedule-stop--1 .schedule-stop__icon--img{width:clamp(95px,28.6vw,119px);height:clamp(70px,19.8vw,88px)}
  .schedule-stop__time{font-size:28px}
  .schedule-stop__name{font-size:17px}
}

/* ═══ DINNER VARIANT ═══ */
.hero--dinner{padding-top:40px;padding-bottom:80px}
.hero--dinner .hero-frame-wrap{height:auto;min-height:90vh;max-height:none;padding:30px 0}
.hero--dinner .hero-pre{font-size:clamp(13px,1.8vw,16px)}
.hero--dinner .hero-names--small{font-size:clamp(28px,4.6vw,42px)}
.hero--dinner .hero-line{font-size:clamp(16px,2.1vw,20px);max-width:38ch}

/* ═══ FINALE ═══ */
.finale{text-align:center;padding:80px var(--content-pad) 100px}
.finale::before{display:none}
.crest-wrap{
  position:relative;
  width:85%;
  margin:0 auto 30px;
  display:flex;align-items:center;justify-content:center;
}
.crest-bg{
  width:100%;height:auto;
  display:block;
}
.crest-emblem{
  position:absolute;
  top:50%;left:50%;
  transform:translate(-50%,-46%);
  width:30%;height:auto;
  max-width:140px;
}
.finale-text{
  font-family:var(--f-script);
  font-size:clamp(34px,5vw,48px);
  color:var(--gold-dk);
  margin:24px 0 32px;
  letter-spacing:.5px;
}
.finale-img{
  width:calc(100% - 16px);
  margin:0 auto;
  padding:0;
  background:transparent;
  border:none;
  box-shadow:none;
}
.finale-img img{
  width:100%;height:auto;display:block;
  filter:saturate(0.7);
  -webkit-mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
          mask-image:radial-gradient(ellipse 92% 92% at center, #000 50%, transparent 100%);
}

/* ═══ FOOTER ═══ */
.ftr{
  position:relative;
  padding:60px 24px 40px;
  text-align:center;
  background:transparent;
  color:var(--ink);
  margin-top:0;
  border-top:1px solid var(--rule);
}
.ftr-up{
  position:absolute;top:-22px;left:50%;transform:translateX(-50%);
  width:44px;height:44px;
  background:var(--gold);
  color:#fff;
  border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  text-decoration:none;
  box-shadow:0 4px 12px rgba(120,90,40,.4);
  transition:transform .3s ease;
}
.ftr-up:hover{transform:translateX(-50%) translateY(-3px)}
.ftr-h{
  font-family:var(--f-display);
  font-size:clamp(20px,2.6vw,26px);
  color:var(--ink);
  letter-spacing:.18em;
  font-weight:500;
  margin-bottom:8px;
}
.ftr-d{
  font-family:var(--f-serif);
  font-style:italic;
  font-size:clamp(18px,2.4vw,22px);
  color:var(--ink-soft);
  margin-bottom:24px;
}
.ftr-love{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  font-size:12px;
  color:var(--ink-soft);
  font-family:var(--f-sans);
  letter-spacing:.08em;
}
.ftr-love a{color:var(--gold-dk);text-decoration:none;border-bottom:1px solid var(--rule)}
.ftr-love a:hover{color:var(--gold)}

/* ═══ RESPONSIVE ═══ */
@media (max-width:720px){
  :root{--content-pad:16px}
  .sec{padding:60px var(--content-pad)}
  .sec::before{inset:18px 14px}
  .hero{padding:0 var(--content-pad) 40px}
  .hero-frame-wrap{height:100vh}
  .hero-frame-text{padding:22% 16%}
  .hero-names .n,
  .hero-names .amp{display:block;line-height:1}
  .hero-names .amp{margin:6px 0;font-size:1.2em}
  .crest-emblem{max-width:100px}
  /* mobile: plate inset (14px) is closer to content padding (16px), so images use full content width */
  .invite-img,.dc-img,.finale-img{width:100%}
}

@media (max-width:480px){
  body{background-size:cover}
  .env-banner{width:90vw}
  .hero-frame-text{padding:24% 18%}
}

/* mobile: bridge background to also work with iOS Safari */
@supports (-webkit-touch-callout:none){
  body{
    background-attachment:scroll;
  }
  body::before{
    content:'';
    position:fixed;inset:0;
    background:url('../images/bg.png') center/cover no-repeat;
    z-index:-2;
    pointer-events:none;
  }
}
