/* =========================================================
   DigiInvite — New Year's Eve · "Midnight"
   Layout: full-screen slides that snap like a story, with dot
   navigation. Opening: a 3-2-1 countdown that bursts into fireworks.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@400;600;800&family=Inter:wght@400;500;600&display=swap');

:root{
  --night: #07071A;
  --night-2: #10102C;
  --gold: #F4C452;
  --magenta: #FF3D81;
  --violet: #7B5CFF;
  --text: #F3F1FF;
  --text-soft: rgba(243,241,255,.65);
  --line: rgba(243,241,255,.16);
  --display: 'Unbounded', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.22,1,.36,1);
}
*,*::before,*::after{ box-sizing:border-box; }
*{ margin:0; padding:0; }
html{ scroll-behavior:smooth; scroll-snap-type: y mandatory; }
@media (max-width: 760px), (max-height: 640px){ html{ scroll-snap-type: y proximity; } }
body{ font-family: var(--body); color: var(--text); background: var(--night); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x:hidden; }
body.gate-locked{ overflow:hidden; }
img, svg{ display:block; max-width:100%; }
a{ color:inherit; }
button, input, select, textarea{ font:inherit; color:inherit; }
button{ cursor:pointer; }


#fx{ position:fixed; inset:0; pointer-events:none; z-index: 5; }
[data-reveal]{ opacity:0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in-view{ opacity:1; transform:none; }

.grad{ background: linear-gradient(100deg, var(--gold), var(--magenta) 55%, var(--violet)); -webkit-background-clip:text; background-clip:text; color: transparent; }
.eyebrow{ font-size: .72rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.btn{ display:inline-flex; align-items:center; justify-content:center; gap: 8px; padding: 14px 26px; border-radius: 999px; border: 1.5px solid var(--line); background: rgba(255,255,255,.04); font-weight: 600; font-size: .9rem; text-decoration:none; transition: background .3s ease, border-color .3s ease, transform .3s var(--ease); }
.btn:hover{ border-color: var(--gold); transform: translateY(-2px); }
.btn-glow{ background: linear-gradient(100deg, var(--gold), var(--magenta)); border: none; color: var(--night); box-shadow: 0 10px 30px -8px rgba(255,61,129,.6); }
.btn-sm{ padding: 10px 18px; font-size: .82rem; }

/* =========================================================
   OPENING — 3, 2, 1…
   ========================================================= */
#gate{ position:fixed; inset:0; z-index: 200; display:grid; place-items:center; background: var(--night); transition: opacity .8s ease, visibility 0s .8s; cursor:pointer; }
#gate.is-open{ opacity:0; visibility:hidden; }
#gate .n{ position:absolute; font-family: var(--display); font-weight: 800; font-size: clamp(9rem, 34vw, 22rem); line-height:1; opacity:0; animation: tick 1s ease-out forwards; }
#gate .n:nth-child(1){ animation-delay: .2s; }
#gate .n:nth-child(2){ animation-delay: 1.2s; }
#gate .n:nth-child(3){ animation-delay: 2.2s; }
@keyframes tick{ 0%{ opacity:0; transform: scale(1.6); } 25%{ opacity:1; transform: scale(1); } 80%{ opacity:1; } 100%{ opacity:0; transform: scale(.7); } }
#gate .skip{ position:absolute; bottom: 30px; font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-soft); }

/* =========================================================
   SLIDES + DOTS
   ========================================================= */
.slide{
  position:relative; min-height: 100svh; scroll-snap-align: start;
  display:flex; align-items:center; justify-content:center;
  padding: 90px 28px 70px; overflow:hidden;
}
.slide .inner{ position:relative; z-index: 6; width: 100%; max-width: 1080px; }
.dots{ position:fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 40; display:flex; flex-direction:column; gap: 12px; }
.dots a{ width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .3s ease, transform .3s ease; }
.dots a.is-active{ background: var(--gold); transform: scale(1.4); }
.dots a span{ position:absolute; width:1px; height:1px; overflow:hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px){ .dots{ right: 10px; } }
.top{ position:fixed; top: 0; left: 0; right: 0; z-index: 40; display:flex; justify-content:space-between; align-items:center; padding: 18px 28px; }
.top .brand{ font-family: var(--display); font-weight: 600; font-size: .9rem; letter-spacing: .1em; }
.lang{ display:flex; gap: 2px; }
.lang button{ background:none; border:none; padding: 4px 8px; font-size: .78rem; font-weight:600; color: var(--text-soft); }
.lang button.active{ color: var(--gold); }

/* 1 — hero */
.s-hero{ text-align:center; background: radial-gradient(ellipse at 50% 120%, rgba(123,92,255,.45), transparent 55%), radial-gradient(ellipse at 50% -20%, rgba(255,61,129,.25), transparent 50%), var(--night); }
.s-hero .hi{ font-size: 1.05rem; color: var(--text-soft); }
.s-hero .hi strong{ color: var(--text); }
.s-hero h1{ font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 22vw, 15rem); line-height: .9; letter-spacing: -.04em; margin: 16px 0 8px; }
.s-hero .title{ font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 2.6vw, 1.7rem); }
.s-hero .meta{ margin-top: 18px; color: var(--text-soft); }
.s-hero .actions{ margin-top: 34px; display:flex; flex-wrap:wrap; justify-content:center; gap: 12px; }
.scroll-hint{ position:absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index:6; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--text-soft); animation: bob 2s ease-in-out infinite; }
@keyframes bob{ 50%{ transform: translate(-50%, 6px); } }

/* 2 — countdown */
.s-count{ text-align:center; background: var(--night-2); }
.big-count{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 30px; }
@media (max-width: 640px){ .big-count{ grid-template-columns: repeat(2, 1fr); } }
.big-count div{ padding: 26px 10px; border-radius: 22px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.big-count strong{ display:block; font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 9vw, 6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.big-count span{ font-size: .74rem; letter-spacing: .26em; text-transform: uppercase; color: var(--text-soft); }
.s-count h2, .s-night h2, .s-line h2, .s-rsvp h2, .s-end h2{ font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 4.6vw, 3.2rem); line-height:1.1; margin-top: 10px; }

/* 3 — the night (bento) */
.s-night{ background: var(--night); }
.bento{ display:grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: minmax(150px, auto); gap: 14px; margin-top: 34px; }
.bento > div{ border-radius: 24px; padding: 26px; background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.bento .b1{ grid-column: span 3; grid-row: span 2; background: linear-gradient(150deg, rgba(244,196,82,.2), rgba(255,61,129,.15)); }
.bento .b2{ grid-column: span 3; }
.bento .b3{ grid-column: span 3; }
.bento small{ font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.bento h3{ font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height:1.15; margin: 10px 0 8px; }
.bento p{ color: var(--text-soft); }
.bento .b1 h3{ font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.bento .map-ph{ width:100%; height: 170px; border: 0; border-radius: 14px; margin-top: 14px;  }
.bento .map-ph img{ filter: invert(.9) hue-rotate(180deg) saturate(.7); }
@media (max-width: 760px){ .bento{ grid-template-columns: 1fr; } .bento > div{ grid-column: auto !important; grid-row: auto !important; } }

/* 4 — lineup (horizontal timeline) */
.s-line{ background: var(--night-2); }
.lineup{ display:grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 44px; position:relative; }
.lineup::before{ content:''; position:absolute; left: 0; right: 0; top: 11px; height: 2px; background: linear-gradient(90deg, var(--gold), var(--magenta), var(--violet)); }
.lineup li{ list-style:none; position:relative; padding: 36px 14px 0 0; }
.lineup li::before{ content:''; position:absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--night-2); border: 3px solid var(--gold); }
.lineup li.midnight::before{ background: var(--magenta); border-color: var(--magenta); box-shadow: 0 0 20px var(--magenta); }
.lineup time{ font-family: var(--display); font-weight: 600; font-size: 1.3rem; }
.lineup strong{ display:block; margin-top: 4px; }
.lineup span{ color: var(--text-soft); font-size: .92rem; }
@media (max-width: 760px){
  .lineup{ grid-template-columns: 1fr; padding-left: 30px; }
  .lineup::before{ left: 8px; right:auto; top:0; bottom:0; width: 2px; height:auto; background: linear-gradient(var(--gold), var(--magenta), var(--violet)); }
  .lineup li{ padding: 0 0 26px; }
  .lineup li::before{ left: -30px; }
}

/* 5 — rsvp */
.s-rsvp{ background: radial-gradient(ellipse at 100% 100%, rgba(255,61,129,.25), transparent 50%), var(--night); }
.rsvp-grid{ display:grid; grid-template-columns: 1.15fr .85fr; gap: 24px; margin-top: 30px; align-items:start; }
@media (max-width: 820px){ .rsvp-grid{ grid-template-columns: 1fr; } }
.panel{ border-radius: 26px; padding: 30px; background: rgba(255,255,255,.05); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.field{ margin-bottom: 16px; }
.field label, .field .lbl{ display:block; font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-soft); margin-bottom: 6px; }
.field input, .field select, .field textarea{ width:100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(0,0,0,.25); }
.field select option{ background: var(--night-2); }
.field input:focus, .field select:focus{ outline:none; border-color: var(--gold); }
.known{ font-family: var(--display); font-weight: 600; font-size: 1.4rem; }
.row2{ display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px){ .row2{ grid-template-columns: 1fr; gap: 0; } }
.yn{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.yn input{ position:absolute; opacity:0; pointer-events:none; }
.yn label{ padding: 14px; text-align:center; border-radius: 14px; border: 1px solid var(--line); font-weight: 600; cursor:pointer; transition: all .25s ease; }
.yn input:checked + label{ background: var(--gold); color: var(--night); border-color: var(--gold); }
.yn input[value="no"]:checked + label{ background: rgba(255,255,255,.15); color: var(--text); }
.yn input:focus-visible + label{ outline: 2px solid var(--magenta); outline-offset: 2px; }
.thanks{ display:none; text-align:center; padding: 20px 0; }
.thanks.is-visible{ display:block; }
.thanks h3{ font-family: var(--display); font-weight: 600; font-size: 1.8rem; }
.thanks p{ color: var(--text-soft); margin-top: 6px; }
.wristband{ text-align:center; border-radius: 26px; padding: 28px; background: linear-gradient(150deg, var(--gold), var(--magenta)); color: var(--night); }
.wristband small{ font-weight: 600; font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; }
.wristband strong{ display:block; font-family: var(--display); font-weight: 800; font-size: 1.6rem; margin: 4px 0 14px; }
.qr-wait{ width: 150px; height: 150px; margin: 0 auto; border-radius: 16px; border: 2px dashed rgba(7,7,26,.45); display:grid; place-items:center; padding: 14px; font-weight: 600; }
#qrImage{ width: 160px; height: 160px; margin: 0 auto; background: #fff; padding: 8px; border-radius: 14px; }
.wristband p{ font-size: .82rem; margin-top: 10px; }
.wristband .btn{ border-color: rgba(7,7,26,.4); background: rgba(255,255,255,.25); margin-top: 12px; }

/* 6 — end */
.s-end{ text-align:center; background: var(--night-2); }
.upload{ max-width: 560px; margin: 26px auto 0; padding: 26px; border-radius: 22px; border: 1.5px dashed var(--line); }
.upload input[type=file]{ display:none; }
.upload-preview{ display:grid; grid-template-columns: repeat(auto-fill, minmax(76px,1fr)); gap: 8px; margin-top: 14px; }
.upload-preview img{ width:100%; aspect-ratio:1; object-fit:cover; border-radius: 10px; }
.made{ margin-top: 40px; font-size: .82rem; color: var(--text-soft); }

.music{ position:fixed; left: 18px; bottom: 18px; z-index: 50; width: 48px; height: 48px; border-radius:50%; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--gold); display:grid; place-items:center; }
.music svg{ width: 18px; }
.music.is-off{ color: var(--text-soft); }
