/* ===========================================================
   Všetko najlepšie, Lucia — romantický & elegantný štýl
   =========================================================== */

:root {
  --cream:   #fdf7f2;
  --cream-2: #f8ebe3;
  --blush:   #f3d9d6;
  --rose:    #c97f8e;
  --rose-dk: #a85b6b;
  --wine:    #6e2b3b;
  --gold:    #c2a25f;
  --gold-lt: #e3cd96;
  --ink:     #4a3a3c;
  --ink-soft:#7c6a6c;

  --serif:  'Playfair Display', Georgia, serif;
  --soft:   'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --sans:   'Jost', system-ui, sans-serif;

  --maxw: 1080px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  /* silnejšie krivky (Emil Kowalski) — vstavané CSS easings sú príliš slabé */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(120% 80% at 80% -10%, var(--blush) 0%, transparent 55%),
    radial-gradient(110% 70% at -10% 10%, #f6e3d9 0%, transparent 50%),
    radial-gradient(120% 90% at 50% 110%, #f4dcd7 0%, transparent 55%),
    var(--cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.12; color: var(--wine); }
h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.01em; }

p { font-size: clamp(1.02rem, 1.4vw, 1.18rem); }

/* ---------- layout helpers ---------- */
.section { padding: clamp(4.5rem, 11vw, 8.5rem) 1.5rem; position: relative; }
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; }
.container.narrow { max-width: 720px; }
.center { text-align: center; }

.kicker {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .42em;
  font-size: .72rem;
  font-weight: 500;
  color: var(--rose-dk);
  margin-bottom: 1rem;
  padding-left: .42em;
}

.lead { color: var(--ink-soft); font-family: var(--soft); font-size: clamp(1.2rem, 2vw, 1.5rem); margin-top: .9rem; }

/* divider flourish under headings */
h2 + .lead { margin-top: 1.4rem; }

/* ===========================================================
   HERO
   =========================================================== */
.hero {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 7rem 1.5rem 4rem;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent, rgba(253,247,242,.6));
  pointer-events: none;
}
.hero-inner { max-width: 820px; position: relative; z-index: 2; }

.eyebrow {
  font-family: var(--soft);
  font-style: italic;
  letter-spacing: .25em;
  text-transform: lowercase;
  color: var(--rose-dk);
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 1.4rem;
}

.hero-title { margin: 0; }
.hero-title .line-1 {
  display: block;
  font-size: clamp(2.1rem, 7vw, 4.2rem);
  color: var(--wine);
}
.hero-title .name {
  display: block;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(4.6rem, 17vw, 11rem);
  line-height: 1.08;                    /* dosť priestoru pre slučky písma — neoreže sa zhora */
  padding: 0.12em 0.06em 0.05em;        /* poistka proti orezaniu swashu */
  margin-top: 0.02em;
  background: linear-gradient(100deg, var(--rose) 0%, var(--wine) 48%, var(--gold) 112%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 8px 20px rgba(110,43,59,.16));
}

.hero-sub {
  font-family: var(--soft);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 1.6rem auto 0;
}

.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  margin-top: 3rem;
  color: var(--rose-dk);
  text-decoration: none;
  font-size: .72rem;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.scroll-hint svg { animation: bob 2.2s var(--ease) infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* ===========================================================
   OSOBNÝ ODKAZ
   =========================================================== */
.message { text-align: center; }
.message h2 { font-style: italic; }

/* jemný ornament pod nadpisom (namiesto bordrovaného panelu) */
.flourish { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 1.4rem; }
.fl-line { height: 1px; width: min(72px, 18vw); background: linear-gradient(to right, transparent, var(--gold)); }
.fl-line:last-child { background: linear-gradient(to left, transparent, var(--gold)); }
.fl-heart { flex: none; }

/* čistá editoriálna typografia — bez panelu */
.letter { margin: 1.8rem auto 0; max-width: 40ch; }
.letter p { font-family: var(--soft); font-size: clamp(1.28rem, 2.4vw, 1.62rem); line-height: 1.62; color: var(--ink); }
.letter p + p { margin-top: 1.15rem; }

.signature {
  font-family: var(--script);
  font-size: clamp(2.3rem, 5vw, 3rem);
  color: var(--rose-dk);
  margin-top: 1.9rem;
  line-height: 1.2; padding-bottom: .08em;
}

/* ===========================================================
   NAŠA FOTKA (jedna — centerpiece)
   =========================================================== */
.photo-section { text-align: center; }
.photo-single { margin: 2.4rem auto 0; max-width: 540px; }
.photo-single .frame {
  border-radius: 22px; overflow: hidden;
  box-shadow: 0 34px 80px -42px rgba(110,43,59,.55), 0 0 0 1px rgba(194,162,95,.28);
  background: linear-gradient(160deg, #fff, var(--cream-2));
}
.photo-single img { width: 100%; height: auto; display: block; }
.photo-single figcaption {
  font-family: var(--script); font-size: clamp(1.6rem, 3.4vw, 2rem);
  color: var(--rose-dk); margin-top: 1.1rem; line-height: 1.2;
}
.frame.placeholder {
  aspect-ratio: 4 / 3; display: grid; place-content: center;
  border: 1px dashed rgba(168,91,107,.4); color: var(--rose-dk);
  background:
    repeating-linear-gradient(135deg, rgba(201,127,142,.05) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #fff 0%, var(--cream-2) 100%);
}
.frame.placeholder .ph-inner { display: grid; place-items: center; gap: .55rem; }
.frame.placeholder small { letter-spacing: .18em; text-transform: uppercase; font-size: .64rem; opacity: .8; }

/* ===========================================================
   VZDIALENOSŤ / MAPA (Ko Samui → Praha)
   =========================================================== */
.distance { text-align: center; background: linear-gradient(to bottom, transparent, rgba(248,235,227,.5), transparent); }
.map-card {
  margin: 2.6rem auto 0; max-width: 760px;
  background: linear-gradient(165deg, #fff, #faeee7);
  border: 1px solid rgba(194,162,95,.3); border-radius: 24px;
  padding: clamp(.8rem, 2.6vw, 1.6rem);
  box-shadow: 0 34px 80px -44px rgba(110,43,59,.5);
  overflow: hidden;
}
.map-svg { width: 100%; height: auto; display: block; border-radius: 14px; }

/* pevnina + oceán + mriežka */
.land  { transition: opacity 1.1s var(--ease); }
.grid  { opacity: .9; }
.twinkles circle { animation: twinkle 3.6s ease-in-out infinite; }

/* trasa */
.route-base { opacity: .7; }
.route-glow { opacity: .55; }
.route, .route-glow { will-change: stroke-dashoffset; }

/* mestá — tep */
.city .dot { fill: var(--wine); }
.city.from .dot  { fill: var(--rose); }
.city .halo {
  transform-box: fill-box; transform-origin: center;
  animation: cityPulse 3s cubic-bezier(.22,.61,.36,1) infinite;
}
.city.to .halo  { animation-duration: 2.4s; }
.city.from .halo { stroke: var(--rose); }
.city.arrived .halo { animation-duration: 1.6s; }

/* žiariaca iskra a lietadlo */
.spark { will-change: transform, opacity; }
.plane { fill: var(--wine); filter: drop-shadow(0 2px 4px rgba(110,43,59,.45)); }

.map-label { font-family: var(--serif); font-weight: 600; font-size: 30px; fill: var(--wine); }
.map-sub   { font-family: var(--sans); font-size: 16px; letter-spacing: .14em; fill: var(--rose-dk); }

@keyframes cityPulse {
  0%       { transform: scale(1);   opacity: .65; }
  70%,100% { transform: scale(2.7); opacity: 0;   }
}
@keyframes twinkle {
  0%,100% { opacity: .15; } 50% { opacity: .85; }
}
@keyframes heartFloat {
  0%   { opacity: 0; transform: translateY(0) scale(.4); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-46px) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .twinkles circle, .city .halo { animation: none; }
}

.km-line { margin-top: 1.9rem; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.km-num {
  font-family: var(--serif); font-weight: 700; color: var(--wine);
  font-size: clamp(2.4rem, 8vw, 3.8rem); line-height: 1; font-variant-numeric: tabular-nums;
}
.km-unit { font-family: var(--soft); font-style: italic; font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--ink-soft); }

/* ===========================================================
   PREKVAPENIE — TORTA
   =========================================================== */
.surprise { text-align: center; }

.cake-wrap { margin-top: 3rem; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }

.cake {
  --w: 220px;
  position: relative;
  width: var(--w);
  height: 210px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  display: block;
  transition: transform .25s var(--ease);
}
.cake:hover { transform: translateY(-4px) scale(1.015); }
.cake:focus-visible { outline: 2px solid var(--gold); outline-offset: 10px; border-radius: 14px; }

.cake .plate {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: calc(var(--w) + 40px); height: 16px; border-radius: 50%;
  background: linear-gradient(var(--gold-lt), var(--gold));
  box-shadow: 0 14px 26px -10px rgba(110,43,59,.45);
}
.cake .cake-base, .cake .cake-mid, .cake .cake-top {
  position: absolute; left: 50%; transform: translateX(-50%);
  background: linear-gradient(160deg, #fbe7df 0%, #f3cfc6 100%);
  border: 1px solid rgba(168,91,107,.25);
}
.cake .cake-base { bottom: 12px; width: var(--w); height: 78px; border-radius: 14px 14px 10px 10px; }
.cake .cake-mid  { bottom: 78px; width: calc(var(--w) - 46px); height: 58px; border-radius: 12px; background: linear-gradient(160deg,#fff0ea,#f6d8d0); }
.cake .cake-top  { bottom: 124px; width: calc(var(--w) - 96px); height: 40px; border-radius: 12px; background: linear-gradient(160deg,#fff6f1,#f7ded7); }

/* poleva / kvapky */
.cake .cake-base::before, .cake .cake-mid::before {
  content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 16px;
  background:
    radial-gradient(circle at 12% 0, var(--rose) 7px, transparent 8px),
    radial-gradient(circle at 32% 0, var(--rose) 6px, transparent 7px),
    radial-gradient(circle at 52% 0, var(--rose) 8px, transparent 9px),
    radial-gradient(circle at 72% 0, var(--rose) 6px, transparent 7px),
    radial-gradient(circle at 90% 0, var(--rose) 7px, transparent 8px);
  opacity: .55;
}

.candles {
  position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 16px; z-index: 3;
}
.candle {
  position: relative; width: 8px; height: 34px; border-radius: 3px;
  background: repeating-linear-gradient(45deg, #e9a7b4 0 6px, #fff 6px 12px);
}
.flame {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 18px;
  background: radial-gradient(circle at 50% 70%, #fff6c4 0%, #ffd24a 40%, #ff8a3c 75%, #ff5e3a 100%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: 0 0 18px 6px rgba(255,176,71,.65);
  transform-origin: 50% 90%;
  animation: flicker .35s ease-in-out infinite alternate;
}
@keyframes flicker {
  0%   { transform: translateX(-50%) rotate(-3deg) scaleY(1);   opacity: .95; }
  100% { transform: translateX(-50%) rotate(3deg)  scaleY(1.12); opacity: 1; }
}
/* sfúknuté */
.cake.out .flame { opacity: 0; box-shadow: none; transform: translateX(-50%) scaleY(.2); transition: all .35s var(--ease); }
.cake.out .candle::after {
  content: ""; position: absolute; top: -12px; left: 50%;
  width: 3px; height: 16px; border-radius: 3px;
  background: linear-gradient(to top, rgba(120,120,120,.5), transparent);
  animation: smoke 1.1s ease-out forwards;
}
@keyframes smoke { to { transform: translate(-50%, -22px); opacity: 0; } }

.cake-hint { font-family: var(--soft); font-style: italic; color: var(--rose-dk); font-size: 1.05rem; transition: opacity .4s; }

.wish {
  margin-top: 2.6rem;
  opacity: 0; transform: translateY(16px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.wish.show { opacity: 1; transform: none; }
.wish-text { font-family: var(--soft); font-size: clamp(1.25rem, 2.4vw, 1.7rem); color: var(--ink); }
.wish-sign { font-family: var(--script); font-size: clamp(2rem, 5vw, 2.8rem); color: var(--wine); margin-top: 1rem; }

/* ===========================================================
   ZÁVER + FOOTER
   =========================================================== */
.outro h2 { font-style: italic; }
.outro .hearts { font-size: 1.8rem; letter-spacing: .4em; margin-top: 1.6rem; }

.footer {
  text-align: center;
  padding: 2.6rem 1.5rem 3.2rem;
  font-family: var(--soft);
  font-style: italic;
  color: var(--ink-soft);
  letter-spacing: .04em;
}

/* ===========================================================
   PADAJÚCE LÍSTKY
   =========================================================== */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.petal {
  position: absolute; top: -40px;
  font-size: 18px;
  opacity: 0;
  animation: fall linear forwards;
  will-change: transform;
}
@keyframes fall {
  0%   { opacity: 0; transform: translateY(-10px) rotate(0deg); }
  10%  { opacity: .85; }
  100% { opacity: 0; transform: translateY(105vh) rotate(420deg); }
}

/* ===========================================================
   REVEAL ON SCROLL
   =========================================================== */
/* skryté len keď beží JS (progressive enhancement) — bez JS je všetko viditeľné */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.visible { opacity: 1; transform: none; }
/* postupné nadväzovanie v rámci sekcie */
.reveal.visible:nth-child(2) { transition-delay: .08s; }
.reveal.visible:nth-child(3) { transition-delay: .16s; }
.reveal.visible:nth-child(4) { transition-delay: .24s; }

/* ===========================================================
   MIKRO-INTERAKCIE (Emil: tlačidlá musia reagovať na stlačenie)
   =========================================================== */
@media (hover: hover) and (pointer: fine) {
  .photo-single .frame { transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
  .photo-single:hover .frame { transform: translateY(-5px); box-shadow: 0 40px 92px -44px rgba(110,43,59,.62), 0 0 0 1px rgba(194,162,95,.34); }
  .scroll-hint:hover svg { color: var(--wine); }
}

/* viditeľné focus stavy pre klávesnicu (a11y) */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 8px;
}

/* ===========================================================
   GATE — celoobrazovkové odpočítavanie / obálka
   =========================================================== */
/* gate-stránka: rovnaké ružové pozadie aj na podklade (canvas), aby na iOS
   nebol biely pruh v overscrolle / pod systémovými lištami. Gradient je
   zhodný s .gate, takže okraje aj overscroll splynú bez švíku. */
body.gate-page {
  min-height: 100svh;
  background-color: #e7b4b9;     /* základ pre oblasti za gradientom (overscroll) */
  background-image:
    radial-gradient(120% 90% at 50% 18%, #fdeee7 0%, #f4d3cf 52%, #e7b4b9 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;  /* pozadie ukotvené k viewportu → zarovná sa s fixným gate-om */
}

.gate {
  position: fixed; inset: 0; z-index: 200;
  display: none;                 /* bez JS sa gate nezobrazí → web je rovno viditeľný */
  text-align: center;
  padding: 2rem 1.5rem;
  overflow: hidden;
  background-color: #e7b4b9;     /* poistka pre rohy mimo gradientu */
  background-image:
    radial-gradient(120% 90% at 50% 18%, #fdeee7 0%, #f4d3cf 52%, #e7b4b9 100%);
}
.js .gate { display: grid; place-items: center; }   /* s JS gate prevezme obrazovku */
body.gate-open { overflow: hidden; }                 /* kým je gate, web sa nedá scrollovať */
/* jemný vinetový okraj pre hĺbku */
.gate::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 220px 40px rgba(110,43,59,.16);
}
.gate-glow {
  position: absolute; top: 12%; left: 50%; width: 60vmin; height: 60vmin;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,235,210,.7), transparent 62%);
  filter: blur(20px);
  animation: glowPulse 6s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100% { opacity:.55; transform: translateX(-50%) scale(1); } 50% { opacity:.9; transform: translateX(-50%) scale(1.08); } }

.gate-petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* odchod gate-u — scale + blur maskuje prechod (Emil) */
.gate.gate-hide {
  opacity: 0; transform: scale(1.06); filter: blur(8px); pointer-events: none;
  transition: opacity .85s var(--ease-out), transform .85s var(--ease-out), filter .85s var(--ease-out);
}

.gate-view { position: relative; z-index: 2; max-width: 720px; }
.gate-view[hidden] { display: none; }
.gate-eyebrow {
  font-family: var(--soft); font-style: italic; letter-spacing: .3em;
  text-transform: lowercase; color: var(--rose-dk);
  font-size: clamp(.95rem, 2vw, 1.2rem);
}
.gate-title {
  font-family: var(--serif); color: var(--wine); font-style: italic;
  font-size: clamp(1.9rem, 6vw, 3.4rem); margin-top: .5rem;
}
.gate-hint {
  font-family: var(--soft); font-style: italic; color: var(--rose-dk);
  font-size: clamp(1rem, 2.2vw, 1.25rem); margin-top: 1.4rem; opacity: .9;
}

/* vstupná stagger animácia obsahu gate-u */
.gate-view > * { animation: gateIn .8s var(--ease-out) both; }
.gate-view > *:nth-child(1) { animation-delay: .05s; }
.gate-view > *:nth-child(2) { animation-delay: .13s; }
.gate-view > *:nth-child(3) { animation-delay: .21s; }
.gate-view > *:nth-child(4) { animation-delay: .29s; }
@keyframes gateIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── ODPOČÍTAVANIE ── */
.countdown {
  display: flex; align-items: flex-start; justify-content: center;
  gap: clamp(.3rem, 2vw, 1.3rem);
  margin: clamp(1.6rem, 4vw, 2.6rem) 0 1.4rem;
}
.cd-unit { display: flex; flex-direction: column; align-items: center; gap: .55rem; min-width: clamp(54px, 13vw, 100px); }
.cd-num {
  font-family: var(--serif); font-weight: 600; line-height: 1;
  font-size: clamp(2.6rem, 10vw, 5.2rem); color: var(--wine);
  font-variant-numeric: tabular-nums; will-change: transform, opacity;
}
.cd-label { font-size: clamp(.58rem, 1.5vw, .72rem); text-transform: uppercase; letter-spacing: .26em; color: var(--rose-dk); }
.cd-sep {
  font-family: var(--serif); font-size: clamp(1.8rem, 6vw, 3.6rem);
  color: var(--gold); margin-top: .12em; opacity: .55;
}

/* ── OBÁLKA (3D) ── */
.envelope-view { perspective: 1400px; }
.envelope {
  --w: clamp(260px, 78vw, 360px);
  position: relative; width: var(--w); height: calc(var(--w) * 0.66);
  margin: clamp(2rem, 5vw, 3rem) auto 1.2rem;
  border: 0; background: none; padding: 0; cursor: pointer;
  transform-style: preserve-3d;
  transition: transform .22s var(--ease-out);
}
.envelope:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) {
  .envelope:hover:not(.opening) { transform: translateY(-3px); }
}

.env-back, .env-front, .env-flap, .env-letter, .env-seal { position: absolute; }

.env-back {
  inset: 0; border-radius: 12px;
  background: linear-gradient(160deg, #f7e8dd, #ecd1c5);
  box-shadow: 0 34px 70px -30px rgba(110,43,59,.55);
}
.env-letter {
  left: 6%; right: 6%; bottom: 11px; height: 78%; z-index: 1;
  background: linear-gradient(180deg, #fffdfb, #fbf1ea);
  border: 1px solid rgba(194,162,95,.4); border-radius: 9px;
  display: grid; place-content: center; gap: .35rem;
  will-change: transform;
  transition: transform .62s var(--ease-out) .34s, box-shadow .5s var(--ease-out) .34s;
}
.letter-heart, .letter-text { opacity: 0; transition: opacity .45s ease .6s; }
.letter-heart { font-size: 1.5rem; color: var(--rose); }
.letter-text { font-family: var(--serif); color: var(--wine); font-size: clamp(1.05rem, 3vw, 1.3rem); line-height: 1.25; }

.env-front {
  inset: 0; z-index: 3; border-radius: 12px;
  background: linear-gradient(160deg, #f0dacd, #e3c0b3);
  clip-path: polygon(0 30%, 50% 70%, 100% 30%, 100% 100%, 0 100%);
}
.env-flap {
  top: 0; left: 0; right: 0; height: 62%; z-index: 4;
  transform-origin: top center; backface-visibility: hidden;
  background: linear-gradient(160deg, #f1d8cc, #e6bfb2);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  will-change: transform;
  transition: transform .58s var(--ease-in-out) .06s, z-index 0s .32s;
}
.env-seal {
  top: 30%; left: 50%; transform: translate(-50%, -50%); z-index: 6;
  width: clamp(42px, 13vw, 56px); height: clamp(42px, 13vw, 56px); border-radius: 50%;
  display: grid; place-content: center;
  background: radial-gradient(circle at 34% 28%, #93374b, var(--wine));
  color: var(--gold-lt); font-family: var(--serif); font-size: clamp(1.1rem, 4vw, 1.5rem);
  box-shadow: 0 7px 16px -6px rgba(110,43,59,.75);
  will-change: transform, opacity;
  transition: transform .42s var(--ease-out), opacity .38s ease;
}
.env-seal span { transform: translateY(-1px); }

/* OTVORENÁ obálka */
.envelope.opening .env-seal { transform: translate(-50%, -64%) scale(.4) rotate(-20deg); opacity: 0; }
.envelope.opening .env-flap { transform: rotateX(179deg); z-index: 0; }
.envelope.opening .env-letter { transform: translateY(-34%) scale(1.02); z-index: 5; box-shadow: 0 24px 50px -24px rgba(110,43,59,.5); }
.envelope.opening .letter-heart, .envelope.opening .letter-text { opacity: 1; }

#envHint { animation: hintPulse 2.4s ease-in-out infinite; }
@keyframes hintPulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

/* ── PRIHLÁSENIE (login formulár v gate-i) ── */
.login-form {
  margin: clamp(1.8rem, 4vw, 2.4rem) auto 0;
  width: min(360px, 100%);
  display: flex; flex-direction: column; gap: 1rem;
  text-align: left;
}
.login-field { display: flex; flex-direction: column; gap: .4rem; }
.login-field > span {
  font-family: var(--sans);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .22em;
  color: var(--rose-dk); padding-left: .15em;
}
.login-field input {
  font-family: var(--soft); font-size: 1.15rem; color: var(--ink);
  background: rgba(255,253,251,.85);
  border: 1px solid rgba(194,162,95,.5); border-radius: 12px;
  padding: .8rem 1rem; outline: none;
  -webkit-appearance: none; appearance: none;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.login-field input:focus {
  border-color: var(--rose); background: #fff;
  box-shadow: 0 0 0 3px rgba(201,127,142,.18);
}
.login-error {
  font-family: var(--soft); font-style: italic; color: var(--wine);
  font-size: 1rem; margin: -.2rem 0 .1rem;
}
.login-error[hidden] { display: none; }
.login-btn {
  margin-top: .4rem;
  font-family: var(--sans); font-weight: 500; font-size: 1rem;
  letter-spacing: .12em; text-transform: uppercase; color: #fff;
  background: linear-gradient(150deg, var(--rose), var(--wine));
  border: 0; border-radius: 999px; padding: .95rem 1.4rem; cursor: pointer;
  box-shadow: 0 14px 30px -12px rgba(110,43,59,.6);
  transition: transform .2s var(--ease-out), box-shadow .25s var(--ease-out), filter .2s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .login-btn:hover { transform: translateY(-2px); box-shadow: 0 20px 38px -14px rgba(110,43,59,.66); filter: brightness(1.04); }
}
.login-btn:active { transform: translateY(0) scale(.99); }

/* verejný gate musí fungovať aj bez JS (login je tu jediný obsah) */
html:not(.js) .gate { display: grid; place-items: center; }
html:not(.js) #countdownView { display: none; }
html:not(.js) #loginView { display: block; }

/* ===========================================================
   VIDEO
   =========================================================== */
.video { text-align: center; }
.video-frame {
  margin-top: 2.4rem; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  box-shadow: 0 28px 64px -34px rgba(110,43,59,.55);
  border: 1px solid rgba(194,162,95,.3);
}
.video-frame video, .video-frame iframe { width: 100%; height: 100%; display: block; border: 0; object-fit: cover; }
.video-frame.placeholder {
  display: grid; place-content: center; gap: .8rem;
  background:
    repeating-linear-gradient(135deg, rgba(201,127,142,.06) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #fff 0%, var(--cream-2) 100%);
  border: 1px dashed rgba(168,91,107,.45); color: var(--rose-dk);
}
.video-frame.placeholder small { letter-spacing: .18em; text-transform: uppercase; font-size: .64rem; opacity: .75; }
.play-badge {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 50%;
  display: grid; place-content: center;
  color: #fff; background: linear-gradient(150deg, var(--rose), var(--wine));
  box-shadow: 0 14px 30px -12px rgba(110,43,59,.6);
  padding-left: 4px;
  animation: badgeBreathe 3.2s ease-in-out infinite;
}
@keyframes badgeBreathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 720px) {
  .map-label { font-size: 34px; }
  .map-sub { font-size: 17px; letter-spacing: .1em; }
}

@media (max-width: 540px) {
  .cd-sep { display: none; }          /* oddeľovače preč, čísla majú priestor */
  .countdown { gap: .7rem 1.1rem; flex-wrap: wrap; }
  .cd-unit { min-width: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .pulse { display: none; }           /* SMIL pulz vypneme pri zníženom pohybe */
  html { scroll-behavior: auto; }
}

/* ===========================================================
   DENNÁ OBÁLKA — /private/dnes.html  (mobile-first)
   =========================================================== */
.day-page { min-height: 100svh; }

.day-view {
  position: relative; z-index: 2;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: clamp(2rem, 8vw, 4rem) 1.25rem;
  text-align: center;
}
.day-view[hidden] { display: none; }
.day-inner { width: min(640px, 100%); margin-inline: auto; }

.day-eyebrow {
  font-family: var(--soft); font-style: italic;
  letter-spacing: .3em; text-transform: lowercase; color: var(--rose-dk);
  font-size: clamp(.95rem, 3.4vw, 1.15rem);
}
.day-date {
  font-family: var(--serif); color: var(--wine); font-style: italic;
  font-size: clamp(1.5rem, 6.5vw, 2.5rem); margin-top: .35rem; line-height: 1.16;
}

/* obálka a médium sa prekrývajú v jednej bunke → žiadny veľký skok layoutu */
.day-stage { display: grid; justify-items: center; align-items: center; margin-top: clamp(1.4rem, 5vw, 2.2rem); }
.day-stage > * { grid-area: 1 / 1; }

.envelope-stage { transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), filter .5s var(--ease-out); }
.envelope-stage.gone { opacity: 0; transform: translateY(-14px) scale(.96); filter: blur(4px); pointer-events: none; }
.env-hint {
  font-family: var(--soft); font-style: italic; color: var(--rose-dk);
  font-size: clamp(1rem, 4vw, 1.2rem); margin-top: .9rem;
}

/* odhalené médium */
.day-media {
  margin: 0; opacity: 0; transform: translateY(16px) scale(.985); filter: blur(5px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
  will-change: opacity, transform, filter;
}
.day-media[hidden] { display: none; }
.day-media.in { opacity: 1; transform: none; filter: blur(0); }

/* menej pohybu → zachovaj len jemné stmavnutie, žiadny posun ani rozmazanie */
@media (prefers-reduced-motion: reduce) {
  .envelope-stage { transition: opacity .3s ease; }
  .envelope-stage.gone { transform: none; filter: none; }
  .day-media { transform: none; filter: none; transition: opacity .3s ease; }
}

.media-card {
  display: inline-block; max-width: 100%;
  border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 70px -38px rgba(110,43,59,.6), 0 0 0 1px rgba(194,162,95,.28);
  background: linear-gradient(160deg, #fff, var(--cream-2));
}
.media-card img, .media-card video {
  display: block; width: auto; max-width: 100%; max-height: 68svh; margin-inline: auto;
}
.media-card video { width: min(100%, 520px); background: #000; }

.day-caption {
  font-family: var(--script); color: var(--rose-dk);
  font-size: clamp(1.5rem, 6vw, 2.1rem); line-height: 1.25; margin-top: 1rem;
}

.day-soon {
  border: 1px dashed rgba(168,91,107,.45); border-radius: 20px;
  padding: clamp(1.7rem, 7vw, 2.6rem);
  background:
    repeating-linear-gradient(135deg, rgba(201,127,142,.05) 0 14px, transparent 14px 28px),
    linear-gradient(160deg, #fff 0%, var(--cream-2) 100%);
  font-family: var(--soft); font-style: italic; color: var(--rose-dk);
  font-size: clamp(1.15rem, 4.6vw, 1.45rem); line-height: 1.5;
}

.end-text {
  font-family: var(--soft); color: var(--ink-soft);
  font-size: clamp(1.15rem, 2.4vw, 1.5rem); margin-top: 1rem;
}
.day-view .hearts { font-size: 1.6rem; letter-spacing: .4em; margin-top: 1.4rem; }

.day-back {
  display: inline-block; margin-top: clamp(1.7rem, 5vw, 2.4rem);
  font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--rose-dk); text-decoration: none; opacity: .8;
}
.day-back[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .day-back:hover { color: var(--wine); opacity: 1; }
}

@media (min-width: 640px) {
  .media-card video { width: min(100%, 560px); }
}
