/* ============================================================
   Sahiba & Japneet — Itinerary & Wardrobe Planner
   Built from SJ_WardrobeWebsite.psd (1080 × 6125)
   --x/--y are % of the design canvas; 1cqw = canvas-width/100
   (10.8px at full 1080px scale), so everything scales losslessly.
   ============================================================ */

@font-face { font-family: 'Carnero Light';    src: url('../public/fonts/Carnero-Light.woff2') format('woff2');    font-display: swap; }
@font-face { font-family: 'Carnero';          src: url('../public/fonts/Carnero-Regular.woff2') format('woff2');  font-display: swap; }
@font-face { font-family: 'Carnero SemiBold'; src: url('../public/fonts/Carnero-SemiBold.woff2') format('woff2'); font-display: swap; }

:root {
  --cream:     #F6EBDA;
  --gold:      #A67A1C;
  --ink:       #1b1209;
  --sangeet:   #690D17;
  --haldi:     #5C6945;
  --karaj:     #BA3D40;
  --reception: #6987A3;
  --serif:  'Cormorant Garamond', 'Calluna', Georgia, serif;
  --script: 'Pinyon Script', 'Cylburn', cursive;
  --sans:   'Carnero', 'Carnero Light', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream) url('../public/images/bg.webp') center top / cover fixed no-repeat;
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; height: 100vh; }
html, body { overflow-x: clip; }

/* ---------- page canvas ---------- */
.page {
  position: relative;
  width: 100%;
  max-width: 1440px;      /* same PSD page, enlarged on wide screens */
  margin: 0 auto;
  overflow: visible;
  container-type: inline-size;
  background: transparent;
}

.sprite {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  pointer-events: none;
}
.sprite img { display: block; width: 100%; height: auto; }

.anchor { position: absolute; top: calc(var(--y) * 1%); }

.t {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: max-content;
  max-width: 98cqw;
}
.t.a-c { translate: -50% 0; text-align: center; }
.t.a-l { text-align: left; }
.t.a-r { translate: -100% 0; text-align: right; }

/* ---------- header ---------- */
.gold {
  background: linear-gradient(100deg, #8f6512 0%, #c9a24a 38%, #a67a1c 62%, #8a6010 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.the-wedding, .sec-head, .names {
  background: linear-gradient(100deg, #8f6512 0%, #c9a24a 38%, #a67a1c 62%, #8a6010 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  font-family: var(--serif); font-weight: 600; white-space: nowrap;
}
.the-wedding { font-size: 2.2cqw; letter-spacing: .14em; line-height: 1; }
.names { font-size: 6.1cqw; letter-spacing: .06em; line-height: 1; font-weight: 600; }
.names .amp { font-weight: 500; }
.sec-head { font-size: 2.95cqw; letter-spacing: .14em; line-height: 1; }

/* ---------- itinerary ---------- */
.script {
  font-family: var(--script);
  line-height: .86;
  white-space: nowrap;
  letter-spacing: -.01em;
}
.script.sangeet, .script.haldi, .script.karaj, .script.reception { font-size: 13.6cqw; }
.script.sangeet   { color: var(--sangeet); }
.script.haldi     { color: var(--haldi); }
.script.karaj     { color: var(--karaj); }
.script.reception { color: var(--reception); }
.script.haldi:not(.wr), .script.karaj:not(.wr) { white-space: normal; }

.info {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2.7cqw;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
}

/* ---------- wardrobe planner ---------- */
.script.wr { font-size: 11.4cqw; line-height: 1; }
.script.wr.haldi { font-size: 9.4cqw; }
.script.wr.karaj { font-size: 10.4cqw; }

.wear {
  font-family: var(--sans);
  font-size: 2.35cqw;
  line-height: 1.13;
  white-space: nowrap;
}
.wear b { font-family: 'Carnero SemiBold', 'Carnero', sans-serif; font-weight: normal; }
.wear.etiquette { font-size: 2.12cqw; line-height: 1.07; }
.wear.etiquette b { display: inline-block; margin-bottom: .1em; }
.wear.sangeet   { color: var(--sangeet); }
.wear.haldi     { color: var(--haldi); }
.wear.karaj     { color: var(--karaj); }
.wear.reception { color: var(--reception); }

/* ---------- entrance animations ---------- */
.reveal {
  opacity: 0;
  transition: opacity 1.1s ease, transform 1.4s cubic-bezier(.16,.8,.2,1), translate 1.2s cubic-bezier(.2,.7,.2,1), clip-path 1.7s cubic-bezier(.65,0,.2,1), filter 1.1s ease;
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; clip-path: inset(-10% -10% -10% -10%); filter: none; }
.fx-fade  { transform: translateY(2.5cqw); }
.fx-left  { transform: translateX(-16cqw) scale(.96); }
.fx-right { transform: translateX(16cqw) scale(.96); }
.fx-pop   { transform: scale(.82); filter: blur(4px); }
.fx-rise  { transform: translateY(7cqw) scale(.93); }
.fx-drop  { transform: translateY(-5cqw); }
.fx-write { transform: translateY(.8cqw); clip-path: inset(-10% 100% -10% 0); transition-duration: 1s, 1.4s, 1.2s, 1.9s, 1s; }
.t.reveal:not(.in), .tx.fx-rise:not(.in), .tx.fx-fade:not(.in) { transform: translateY(2.2cqw); filter: blur(3px); }
.tx.fx-write.reveal:not(.in) { transform: translateY(.8cqw); }

/* ---------- idle motion (on the image, so it never fights the entrance) ---------- */
.sprite img { transform-origin: 50% 50%; }
.idle-sway  { transform-origin: 50% 0%;  animation: sway 6.5s ease-in-out infinite alternate; animation-delay: var(--ph, 0s); }
.idle-swing { transform-origin: 50% 0%;  animation: swing 4.2s ease-in-out infinite alternate; }
.idle-hang  { transform-origin: 50% 0%;  animation: hang 7s ease-in-out infinite alternate; }
.idle-float { animation: float 6s ease-in-out infinite alternate; }
.idle-bob   { animation: bob 3.4s ease-in-out infinite alternate; }
.idle-glow  { animation: glow 4.5s ease-in-out infinite; }
.sprite:nth-child(3n)   img { animation-delay: -1.3s; }
.sprite:nth-child(3n+1) img { animation-delay: -2.9s; animation-duration: 7.4s; }
.sprite:nth-child(4n)   img { animation-direction: alternate-reverse; }
.sprite[data-par] img { translate: 0 calc(var(--py, 0) * 1px); }
@keyframes sway  { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg) translateX(.4%); } }
@keyframes swing { from { transform: rotate(-3deg); }   to { transform: rotate(3deg); } }
@keyframes hang  { from { transform: rotate(-.35deg); } to { transform: rotate(.35deg); } }
@keyframes float { from { transform: translateY(-.7cqw); } to { transform: translateY(.9cqw); } }
@keyframes bob   { from { transform: translateY(-.3cqw) rotate(-1deg); } to { transform: translateY(.4cqw) rotate(1.2deg); } }
@keyframes glow  { 0%,100% { filter: brightness(1) saturate(1); } 50% { filter: brightness(1.14) saturate(1.12) drop-shadow(0 0 1.1cqw rgba(255,214,120,.55)); } }

/* gold shimmer sweeping across the header lettering */
.tx.shimmer { animation: shimmer 5.5s ease-in-out infinite; }
@keyframes shimmer { 0%,100% { filter: brightness(1); } 45% { filter: brightness(1.28) contrast(1.05); } }

/* ---------- seal splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  cursor: pointer; outline: none;
}
.splash-panel {
  position: absolute; top: 0; bottom: 0; width: 50.2%;
  background: var(--cream) url('../public/images/bg.webp') center / cover;
  transition: transform 1.3s cubic-bezier(.77,0,.18,1);
}
.splash-left  { left: 0; box-shadow: 1px 0 0 rgba(166,122,28,.25); }
.splash-right { right: 0; }
.seal { position: relative; z-index: 2; text-align: center; transition: opacity .5s ease, transform .6s ease; }
.seal-frame { position: relative; width: min(46vw, 240px); margin: 0 auto; animation: breathe 3.2s ease-in-out infinite; }
.seal-oval { display: block; width: 100%; height: auto; }
.seal-mark { position: absolute; left: 22%; top: 22%; width: 55%; height: auto; }
.seal-names { margin-top: 1.6rem; font: 600 clamp(15px, 4.2vw, 22px)/1 var(--serif); letter-spacing: .14em; color: var(--gold); }
.seal-hint  { margin-top: 1rem; font: 600 11px/1 var(--serif); letter-spacing: .32em; color: var(--gold); opacity: .8; animation: blink 2.2s ease-in-out infinite; }
.splash.open .seal { opacity: 0; transform: scale(1.06); }
.splash.open .splash-left  { transform: translateX(-101%); }
.splash.open .splash-right { transform: translateX(101%); }
.splash.gone { display: none; }
@keyframes breathe { 50% { transform: scale(1.025); } }
@keyframes blink { 50% { opacity: .35; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none !important; clip-path: none !important; filter: none !important; }
  .seal-frame, .seal-hint, .sprite img, .tx.shimmer { animation: none !important; }
  .sprite[data-par] img { translate: none; }
  html { scroll-behavior: auto; }
}

/* ---------- lettering exported from the PSD (Cylburn / Calluna) ---------- */
.tx {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--w) * 1%);
  height: auto;
  pointer-events: none;
  user-select: none;
}
.tx.fx-rise:not(.in) { transform: translateY(1.2cqw); }
.tx.fx-fade:not(.in) { transform: translateY(1.2cqw); }


/* Pieces the PSD cuts flush at the left edge of the canvas stay flush with
   the SCREEN edge on wide displays (--gap is set by main.js). */
.sprite.edge-l { translate: calc(var(--gap, 0px) * -1) 0; }
