/* Himkan (हिमकण): Christmas at home or at the office. Pine and cranberry, gold and snow; Fraunces over
   Figtree. Opening: a snow globe packed with snow (.globe__frost); shake it and the canvas snow whirls and
   settles, the scene and the title come out. Then: a card that opens, gift tags, advent doors, the stocking,
   RSVP under falling snow. */

:root {
  --pine: #0f2b22;
  --pine-2: #163d31;
  --pine-3: #1f5443;
  --night: #0d1d2e;
  --cranberry: #b3242f;
  --cranberry-2: #8f1c26;
  --gold: #e3b55a;
  --gold-2: #f3d58f;
  --snow: #f8f6f0;
  --snow-2: #ece7dc;
  --frost: #d5e6ee;
  --ink: #1b2a24;
  --ink-2: #4b5a53;

  --f-display: "Fraunces", Georgia, serif;
  --f-body: "Figtree", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --fx-music-bg: #b3242f;
  --fx-music-ring: #e3b55a;
  --fx-music-ink: #f8f6f0;
  --fx-bg: #f8f6f0;
}

html { scroll-behavior: smooth; }
html.shut, html.shut body { overflow: hidden; }
body { background: var(--snow); color: var(--ink); font: 400 18px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--cranberry); color: var(--snow); }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 4px; }

.kicker { font: 600 13px/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--cranberry); }
.kicker--snow { color: var(--gold-2); }
.sec__title {
  margin: 10px 0 0; font: 600 clamp(36px, 10vw, 66px)/1.02 var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 100;
  letter-spacing: -.01em; color: var(--pine); text-wrap: balance;
}
.sec__title em { font-style: italic; font-weight: 400; color: var(--cranberry); }
.sec__title--snow { color: var(--snow); }
.sec__title--snow em { color: var(--gold-2); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 22px;
  border-radius: 999px; border: 1.5px solid var(--pine); color: var(--pine); background: transparent; text-decoration: none;
  font: 600 16px/1.1 var(--f-body); transition: background .25s, color .25s, transform .2s;
}
.btn:hover { background: rgba(15, 43, 34, .08); }
.btn:active { transform: scale(.97); }
.btn--small { min-height: 44px; padding: 8px 16px; font-size: 14px; }
.btn--red { background: var(--cranberry); border-color: var(--cranberry); color: var(--snow); }
.btn--red:hover { background: var(--cranberry-2); }
.btn--ghost { border-color: rgba(248, 246, 240, .6); color: var(--snow); }
.btn--ghost:hover { background: rgba(248, 246, 240, .1); }
.btn--wide { width: 100%; max-width: 360px; }

/* fairy lights */
.lights { position: absolute; left: 0; right: 0; top: 0; height: 52px; z-index: 3; pointer-events: none; }
.lights__wire { position: absolute; inset: 0; width: 100%; height: 40px; }
.lights i {
  position: absolute; left: var(--x); top: var(--y); width: 9px; height: 14px; margin-left: -4.5px;
  border-radius: 50% 50% 45% 45% / 38% 38% 62% 62%; background: var(--c);
  box-shadow: 0 0 8px 2px var(--c), 0 0 22px 4px color-mix(in srgb, var(--c) 45%, transparent);
  animation: twinkle 3.2s ease-in-out var(--d) infinite;
}
.lights i::before { content: ""; position: absolute; left: 2px; top: -4px; width: 5px; height: 5px; border-radius: 1px; background: #2a3f36; }
@keyframes twinkle { 0%, 100% { opacity: 1; } 45% { opacity: .45; box-shadow: 0 0 3px 1px var(--c); } }
.gate[data-phase="open"] .lights i { animation-duration: 1.1s; }

/* =================================================================== OPENING: the globe */

.gate {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 60px 16px calc(20px + env(safe-area-inset-bottom));
  background: radial-gradient(90% 60% at 50% 40%, #1d4a3b, var(--pine) 60%, #0a1f18);
  color: var(--snow);
}
.bokeh { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bokeh i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); opacity: .12; filter: blur(6px); }

.gate__head { text-align: center; }
.gate__to { font: italic 400 20px/1.2 var(--f-display); color: var(--gold-2); margin-bottom: 4px; }
.gate__hosts { font: 600 13px/1.35 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-2); max-width: 24em; margin: 0 auto; }
.gate__invite { font: italic 400 18px/1.3 var(--f-display); color: var(--frost); }

.stage { position: relative; width: min(74vw, 46svh, 400px); }
.globe {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: grab; color: inherit;
  touch-action: none; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  transform-origin: 50% 85%; will-change: transform;
}
.globe:active { cursor: grabbing; }
.globe__glass {
  position: relative; display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35), inset -18px -24px 50px rgba(9, 25, 40, .55), 0 0 60px rgba(213, 230, 238, .15);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.globe__scene, .scene__svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.snow { position: absolute; inset: 0; width: 100%; height: 100%; }
.globe__frost {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 120%, #fff 30%, transparent 31%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.6 -.55'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, .96), rgba(225, 236, 242, .94) 60%, rgba(190, 210, 222, .95));
  transition: opacity 1.2s ease;
}
.gate:not([data-phase="idle"]) .globe__frost { opacity: 0; }
.globe__shine {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background:
    radial-gradient(ellipse 22% 14% at 30% 22%, rgba(255, 255, 255, .75), transparent 70%),
    radial-gradient(ellipse 8% 5% at 70% 78%, rgba(255, 255, 255, .35), transparent 70%),
    radial-gradient(circle at 50% 50%, transparent 62%, rgba(255, 255, 255, .14) 70%, transparent 72%);
}
.globe__base {
  position: relative; display: grid; place-items: center; width: 84%; height: clamp(54px, 15vw, 82px); margin: -8% auto 0;
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 30%),
    linear-gradient(90deg, #5a1015, var(--cranberry) 30%, #c9363f 50%, var(--cranberry) 70%, #5a1015);
  box-shadow: inset 0 6px 0 var(--gold);
}
.globe__base::before { content: ""; position: absolute; left: 6%; right: 6%; top: 0; height: 7px; background: linear-gradient(90deg, #9b7432, var(--gold-2), #9b7432); }
.plaque {
  margin-top: 6px; padding: 4px 14px; border-radius: 4px; background: linear-gradient(180deg, var(--gold-2), var(--gold));
  font: italic 600 clamp(14px, 3.8vw, 19px)/1.2 var(--f-display); color: var(--cranberry-2); white-space: nowrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 2px 4px rgba(0, 0, 0, .3);
}
.globe__shadow { position: absolute; left: 10%; right: 10%; bottom: -10px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .35); filter: blur(8px); z-index: -1; }
.gate[data-phase="idle"] .globe:not(:active) { animation: nudge 4s ease-in-out 1.5s infinite; }
@keyframes nudge { 0%, 82%, 100% { rotate: 0deg; } 86% { rotate: -5deg; } 90% { rotate: 4deg; } 94% { rotate: -2deg; } }
.tree__star { transform-box: fill-box; transform-origin: center; }
.gate[data-phase="open"] .tree__star { animation: shine 2.4s ease-in-out infinite; }
@keyframes shine { 50% { scale: 1.25; filter: drop-shadow(0 0 4px #ffd56b); } }

.gate__words { position: relative; width: 100%; max-width: 760px; text-align: center; min-height: 150px; }
.gate__prompt { position: absolute; left: 0; right: 0; top: 10px; transition: opacity .5s, translate .5s; }
.prompt__big { font: italic 500 clamp(26px, 7vw, 34px)/1.15 var(--f-display); color: var(--snow); }
.prompt__small { margin-top: 6px; font-size: 16px; color: var(--frost); opacity: .85; }
.gate:not([data-phase="idle"]) .gate__prompt { opacity: 0; translate: 0 -10px; pointer-events: none; }
.reveal-words > * { opacity: 0; translate: 0 14px; transition: opacity 1s var(--ease), translate 1s var(--ease); }
.gate[data-phase="open"] .reveal-words > * { opacity: 1; translate: 0 0; }
.gate[data-phase="open"] .reveal-words > :nth-child(2) { transition-delay: .15s; }
.gate[data-phase="open"] .reveal-words > :nth-child(3) { transition-delay: .3s; }
.gate[data-phase="open"] .reveal-words > :nth-child(4) { transition-delay: .6s; }
.gate.instant .reveal-words > * { transition: none; }
.title { margin: 0; font: 600 clamp(36px, 10.5vw, 72px)/1 var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 100; letter-spacing: -.015em; text-wrap: balance; color: var(--snow); }
.title__when { margin-top: 10px; font: 600 17px/1.35 var(--f-body); color: var(--gold-2); }
.title__where { font-size: 16px; color: var(--frost); }
.title__down {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px;
  font: 600 13px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); text-decoration: none;
}
.title__down::after { content: "↓"; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { translate: 0 4px; } }

.gate__skip {
  position: absolute; left: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 5; min-height: 36px; padding: 8px 14px;
  border: 1px solid rgba(248, 246, 240, .45); border-radius: 999px; background: rgba(10, 31, 24, .5);
  font: 600 12px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--snow); cursor: pointer;
}
.gate__skip::before { content: ""; position: absolute; inset: -6px; }
.gate:not([data-phase="idle"]) .gate__skip { display: none; }
html:not(.js) .globe__frost, html:not(.js) :is(.gate__skip, .gate__prompt) { display: none; }
html:not(.js) .reveal-words > * { opacity: 1; translate: none; }

/* =================================================================== SECTIONS */

.sec { position: relative; padding: clamp(80px, 15vw, 130px) 16px; text-align: center; }
.sec__head { max-width: 640px; margin: 0 auto clamp(34px, 7vw, 54px); }

/* --- the card --- */
.sec--card { background: var(--snow); }
.xcard { position: relative; width: min(100%, 380px); aspect-ratio: 5 / 7; margin: 0 auto; perspective: 1600px; }
.xcard__inside, .xcard__front { position: absolute; inset: 0; border-radius: 6px; }
.xcard__inside {
  display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 28px 26px;
  background: linear-gradient(180deg, #fffdf7, var(--snow-2)); color: var(--ink);
  box-shadow: 0 30px 60px -28px rgba(15, 43, 34, .55), inset 0 0 0 1px #e2dccd;
}
.xcard__greet { font: italic 600 clamp(28px, 8vw, 36px)/1.1 var(--f-display); color: var(--cranberry); }
.xcard__msg { font-size: 18px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.xcard__sign { font: 400 16px/1.4 var(--f-body); color: var(--ink-2); }
.xcard__sign span { font: italic 600 19px/1.3 var(--f-display); color: var(--pine); }
.xcard__front {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; border: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 40%, var(--pine-3), var(--pine) 70%); color: var(--snow);
  transform-origin: 0 50%; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(.5, 0, .2, 1), box-shadow 1.2s;
  box-shadow: 0 30px 60px -28px rgba(15, 43, 34, .7), inset 0 0 0 8px var(--pine), inset 0 0 0 9.5px var(--gold);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.xcard__front:hover { transform: rotateY(-8deg); }
.xcard.is-open .xcard__front { transform: rotateY(-178deg); box-shadow: none; }
.wreath { width: 62%; height: auto; }
.xcard__front-greet { font: italic 600 clamp(26px, 7.6vw, 34px)/1.1 var(--f-display); color: var(--gold-2); }
.xcard__tap { font: 600 12px/1 var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--frost); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .45; } }

/* --- gift tags --- */
.sec--tags { background: radial-gradient(90% 70% at 50% 30%, var(--pine-2), var(--pine) 70%); padding-top: 120px; }
.lights--sec { top: 18px; }
.tags { display: grid; gap: 34px; max-width: 640px; margin: 0 auto; }
.tag {
  position: relative; padding: 34px 22px 26px 22px; text-align: left; rotate: var(--r);
  background:
    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='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .1 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    #d8b98b;
  color: #2b1d10; border-radius: 6px;
  clip-path: polygon(0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  box-shadow: 0 24px 40px -20px rgba(0, 0, 0, .6);
}
.tag__hole { position: absolute; left: 50%; top: 12px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--pine); box-shadow: inset 0 0 0 3px #b8955f; }
.tag__to { font: italic 400 15px/1.3 var(--f-display); color: #6b4f2e; text-align: center; margin-top: 8px; }
.tag__hi { margin-top: 10px; font-size: 18px; color: var(--cranberry); text-align: center; }
.tag__name { margin: 8px 0 16px; text-align: center; font: 600 clamp(28px, 8vw, 38px)/1.05 var(--f-display); color: var(--cranberry-2); }
.tag__rows { margin: 0; display: grid; gap: 10px; border-top: 1px dashed #8a6a42; padding-top: 14px; }
.tag__rows dt { font: 700 11px/1.3 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #7b5a33; }
.tag__rows dd { margin: 0; font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.tag__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag .btn { border-color: #2b1d10; color: #2b1d10; }
.tag .btn--red { border-color: var(--cranberry); color: var(--snow); }

/* --- advent doors --- */
.sec--advent { background: var(--snow); }
.count { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 560px; margin: 0 auto; }
.count span {
  position: relative; display: grid; justify-items: center; gap: 6px; padding: 20px 4px 14px; border-radius: 8px;
  background: var(--cranberry); color: var(--gold-2); font: 600 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase;
  box-shadow: inset 0 0 0 3px var(--cranberry-2), inset 0 0 0 4.5px var(--gold), 0 14px 24px -14px rgba(143, 28, 38, .8);
}
.count span:nth-child(2n) { background: var(--pine-2); box-shadow: inset 0 0 0 3px var(--pine), inset 0 0 0 4.5px var(--gold), 0 14px 24px -14px rgba(15, 43, 34, .8); }
.count span::before { content: ""; position: absolute; right: 9px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.count b { font: 600 clamp(28px, 8vw, 52px)/1 var(--f-display); color: var(--snow); letter-spacing: -.02em; }
.count__done { font: italic 600 28px/1.2 var(--f-display); color: var(--cranberry); }
.advent__when { margin-top: 22px; color: var(--ink-2); }

/* --- the stocking --- */
.sec--santa { background: var(--snow-2); }
.santa { display: grid; gap: 18px; justify-items: center; max-width: 760px; margin: 0 auto; }
.stocking { width: 150px; height: auto; transform-origin: 30% 0; animation: hang 4s ease-in-out infinite alternate; }
@keyframes hang { from { rotate: -4deg; } to { rotate: 4deg; } }
.santa__bring { margin-top: 14px; font: italic 500 clamp(22px, 6vw, 30px)/1.35 var(--f-display); color: var(--pine); text-wrap: balance; }
.santa__dress { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.santa__dress em { font-style: normal; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: var(--pine); color: var(--snow); }
@media (min-width: 760px) { .santa { grid-template-columns: 200px 1fr; text-align: left; align-items: center; } .santa__dress { justify-content: flex-start; } .stocking { width: 180px; } }

/* --- passes --- */
.passes { list-style: none; margin: 0 auto 26px; padding: 0; max-width: 560px; display: grid; gap: 10px; }
.passes li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 10px; background: #fff; text-align: left; box-shadow: inset 0 0 0 1px var(--snow-2); }
.passes__name { font-weight: 600; }
.passes__name small { display: block; font-weight: 400; font-size: 15px; color: var(--ink-2); }
.passes b { font: 600 24px/1 var(--f-display); color: var(--cranberry); }

/* --- gallery --- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-width: 900px; margin: 0 auto; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }

/* --- reply --- */
.sec--reply { background: linear-gradient(180deg, var(--night), var(--pine)); color: var(--snow); overflow: hidden; }
.flurry { position: absolute; inset: 0; pointer-events: none; }
.flurry i { position: absolute; left: var(--x); top: -10px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .8; animation: fall var(--d) linear var(--delay) infinite; }
@keyframes fall { to { transform: translate(30px, 900px); } }
.reply { position: relative; max-width: 560px; margin: 0 auto; }
.reply__ask { margin-top: 14px; color: var(--frost); }
.reply__btns { display: grid; justify-items: center; gap: 12px; margin-top: 28px; }
.reply__tag { margin-top: 26px; font: italic 600 24px/1 var(--f-display); color: var(--gold-2); }

/* --- footer --- */
.foot { padding: 50px 16px calc(96px + env(safe-area-inset-bottom)); text-align: center; background: #0a1f18; color: #b9c9c1; font-size: 15px; }
.foot__title { font: 600 28px/1.15 var(--f-display); color: var(--snow); }
.foot__date { margin-top: 4px; }
.foot__cal { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.foot__cal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--gold-2); }
.foot__music, .foot__credit { margin-top: 8px; font-size: 14px; }
.up { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; color: var(--gold-2); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }

/* =================================================================== OG CARD */

.ogcard { align-items: center; gap: 56px; padding: 40px 70px 0; background: radial-gradient(80% 90% at 30% 50%, #1d4a3b, var(--pine) 60%, #0a1f18); color: var(--snow); }
.lights--og { top: 0; height: 60px; }
.og__globe { position: relative; flex: 0 0 380px; }
.og__glass { position: relative; display: block; width: 380px; height: 380px; border-radius: 50%; overflow: hidden; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), inset -20px -26px 50px rgba(9, 25, 40, .55); }
.og__glass .scene__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.og__base { display: grid; place-items: center; width: 320px; height: 76px; margin: -30px auto 0; position: relative; clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); background: linear-gradient(90deg, #5a1015, var(--cranberry) 30%, #c9363f 50%, var(--cranberry) 70%, #5a1015); box-shadow: inset 0 6px 0 var(--gold); }
.og__base span { padding: 4px 16px; border-radius: 4px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); font: italic 600 22px/1.2 var(--f-display); color: var(--cranberry-2); }
.og__words { flex: 1; }
.og__hosts { font: 600 20px/1.3 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-2); }
.og__title { margin-top: 14px; font: 600 82px/1 var(--f-display); font-variation-settings: "opsz" 144, "SOFT" 100; }
.og__date { margin-top: 22px; font: 600 30px/1.2 var(--f-body); color: var(--gold-2); }
.og__venue { margin-top: 6px; font: 400 26px/1.2 var(--f-body); color: var(--frost); }

@media (prefers-reduced-motion: reduce) { .flurry { display: none; } }
