/* =========================================================
   Kornelia & Tomasz - Save the Date · 16.07.2027
   ========================================================= */

:root {
  --paper: #f6f3ea;
  --paper-2: #efebdf;
  --white: #fdfcf8;
  --ink: #2e3b26;
  --ink-soft: #536047;
  --sage: #8a9a6e;
  --sage-dark: #6c7c52;
  --sage-light: #cdd5bb;
  --line: rgba(78, 94, 56, .28);
  --env: #677a4a;
  --env-dark: #4d5d36;
  --forest: #2f3c26;
  --forest-2: #3b4b2f;
  --ivory: #f3eee2;
  --baby-blue: #6f8ca8;
  --baby-blue-soft: #8eaac4;

  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --script: "Pinyon Script", "Great Vibes", cursive;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .13 -.02'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --paper-tex: url("grafiki/papier.jpg");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(19px, 1.25vw + 12px, 22px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

body.is-closed { overflow: hidden; background: #3a472b; }
body.is-closed .content { display: none; }

/* =========================================================
   SCENA Z KOPERTĄ
   ========================================================= */
.scene {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 340px;
  overflow: hidden;
  transition: opacity 1.2s ease;
}
.is-loading .scene { opacity: 0; }
.is-loading .opener *, .is-loading .opener *::after { animation-play-state: paused; }

.scene-bg {
  position: absolute; inset: 0;
  background:
    var(--paper-tex) 0 0 / 760px,
    radial-gradient(ellipse 80% 70% at 50% 44%, #fdfbf6 0%, #f6f2e8 55%, #ebe6d7 100%);
  background-blend-mode: soft-light, normal;
}
.leaf-shadows {
  position: absolute; inset: -6%;
  width: 112%; height: 112%;
  filter: blur(5px);
  opacity: 0;
  transform-origin: 0 0;
}
.is-open .leaf-shadows { animation: sway 11s ease-in-out infinite alternate; }

.camera {
  position: absolute;
  left: 50%; top: 50%;
  width: 760px; height: 1000px;
  margin: -500px 0 0 -380px;
  transform-origin: 50% 50%;
}
.stage { position: relative; width: 760px; height: 1000px; }
.stage > * { position: absolute; }

/* --- cień koperty na papierze --- */
.ground-shadow {
  left: 46px; top: 560px; width: 668px; height: 420px;
  background: rgba(32, 42, 20, .42);
  border-radius: 12px;
  filter: blur(20px);
  transform: translateY(16px);
}

/* --- wnętrze koperty (podszewka) --- */
.env-back {
  left: 30px; top: 540px; width: 700px; height: 440px;
  z-index: 3;
  background:
    linear-gradient(180deg, rgba(18, 26, 10, .12) 0%, rgba(18, 26, 10, 0) 40%),
    var(--paper-tex) 0 0 / 520px,
    linear-gradient(165deg, #75875a 0%, #677a4a 46%, #59693f 100%);
  background-blend-mode: normal, soft-light, normal;
}

/* --- klapa --- */
.flap {
  left: 30px; top: 540px; width: 700px; height: 270px;
  z-index: 10;
  transform-origin: 50% 0;
  transform: perspective(1500px) rotateX(0deg);
  transform-style: preserve-3d;
}
.flap-face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.flap-front {
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background:
    var(--paper-tex) 0 0 / 520px,
    radial-gradient(130% 120% at 28% 0%, #7d8f5c 0%, #6b7e4d 42%, #5c6e40 100%);
  background-blend-mode: soft-light, normal;
}
.flap-back {
  transform: rotateX(180deg);
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  background:
    linear-gradient(0deg, rgba(20, 28, 12, .1), rgba(20, 28, 12, 0) 60%),
    var(--paper-tex) 0 0 / 520px,
    #6b7e4d;
  background-blend-mode: normal, soft-light, normal;
}
.shade {
  position: absolute; inset: 0;
  background: #1a2410;
  opacity: 0;
}
.lace-wrap svg, .edge-wrap svg { position: absolute; left: 0; top: 0; width: 700px; height: 270px; overflow: visible; }
.edge-wrap path { fill: none; stroke: #fff; stroke-opacity: .26; stroke-width: 2; }
.lace-back { transform: rotateX(180deg); }
.flap-back, .lace-back { visibility: hidden; }
.flap.is-flipped .flap-back, .flap.is-flipped .lace-back { visibility: visible; }
.flap.is-flipped .flap-front, .flap.is-flipped .edge-wrap, .flap.is-flipped .lace-wrap:not(.lace-back) { visibility: hidden; }

.flap-shadow {
  left: 30px; top: 540px; width: 700px; height: 270px;
  z-index: 9;
  filter: blur(7px);
  transform: translateY(10px);
  opacity: .55;
}
.flap-shadow i {
  position: absolute; inset: 0;
  background: #141c0a;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

/* --- kieszeń koperty --- */
.pocket {
  left: 30px; top: 540px; width: 700px; height: 440px;
  z-index: 8;
  clip-path: polygon(0 0, 50% 55.68%, 100% 0, 100% 100%, 0 100%);
  background:
    var(--paper-tex) 160px 90px / 520px,
    linear-gradient(165deg, #75875a 0%, #677a4a 46%, #59693f 100%);
  background-blend-mode: soft-light, normal;
}
.pocket svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.env-text {
  left: 80px; top: 868px; width: 600px; z-index: 8;
  margin: 0;
  font-family: var(--script); font-size: 56px; line-height: 1.2;
  text-align: center;
  color: #f1ebd8;
  text-shadow: 0 1px 0 rgba(18, 26, 8, .45), 0 -1px 0 rgba(255, 255, 255, .12);
  opacity: 0;
  pointer-events: none;
}

.inner-shadow {
  left: 30px; top: 540px; width: 700px; height: 440px;
  z-index: 7;
  overflow: visible;
}
.inner-shadow path { fill: none; stroke: #121a08; stroke-opacity: .26; stroke-width: 26; }

/* --- zawartość koperty --- */
.letters {
  left: 0; top: 0; width: 760px; height: 1000px;
  z-index: 4;
  clip-path: inset(-400px -400px 20px -400px);
}
.letters > .px { position: absolute; }
.pos-frame { left: 98px; top: 212px; width: 240px; height: 420px; }
.pos-rose  { left: 28px; top: 288px; width: 190px; height: 323px; }
.pos-sprig { left: 150px; top: 64px; width: 160px; height: 364px; }
.pos-card  { left: 380px; top: 148px; width: 350px; height: 640px; }
.pos-heart { left: 248px; top: 548px; width: 264px; height: 260px; z-index: 2; }
.pos-stripe { left: 424px; top: 104px; width: 276px; height: 600px; }

.card-anim, .frame-anim, .heart-anim, .stripe-anim, .rose-anim, .sprig-anim { width: 100%; height: 100%; }
.stripe-anim { transform: translateY(440px); filter: drop-shadow(0 6px 10px rgba(28, 38, 18, .18)); }
.stripe-card {
  width: 100%; height: 100%;
  background:
    var(--paper-tex) 40px 0 / 420px,
    linear-gradient(170deg, #d3e0ea, #b9cbdb);
  background-blend-mode: soft-light, normal;
}
.card-anim { transform: translateY(440px); filter: drop-shadow(0 10px 14px rgba(28, 38, 18, .2)) drop-shadow(0 1px 1px rgba(28, 38, 18, .18)); }
.frame-anim { transform: translateY(470px); }
.rose-anim { transform: translateY(420px); }
.sprig-anim { transform: translateY(560px); }
.heart-anim { transform: translateY(240px); }

.card {
  position: relative;
  width: 100%; height: 100%;
  background: var(--paper-tex) 0 0 / 420px, linear-gradient(170deg, #fffefa, #f8f5ec);
  background-blend-mode: soft-light, normal;
  color: var(--ink);
  transform: scale(.92); transform-origin: 100% 0; /* węższa karta, żeby było widać otwartą klapę */
}
.card::before, .card::after {
  content: ""; position: absolute; pointer-events: none;
}
.card::before { inset: 16px; border: 1px solid rgba(78, 94, 56, .45); }
.card::after  { inset: 21px; border: .6px solid rgba(78, 94, 56, .28); }
.card-inner {
  position: relative;
  padding: 50px 30px 0;
  text-align: center;
}
.card-orn { display: block; width: 26px; height: 35px; margin: 0 auto 6px; fill: none; stroke: var(--sage-dark); stroke-width: 6; stroke-linecap: round; }
.std { margin: 0; font-family: var(--script); font-weight: 400; color: var(--ink); line-height: .92; }
.std span { display: block; padding: 0 12px; }
.std-1 { font-size: 92px; transform: translateX(-34px); }
.std-2 { font-size: 74px; transform: translateX(10px); margin-top: -6px; }
.card-rule {
  display: block; width: 120px; height: 9px; margin: 22px auto 18px;
  background:
    linear-gradient(var(--sage), var(--sage)) left center / 50px 1px no-repeat,
    linear-gradient(var(--sage), var(--sage)) right center / 50px 1px no-repeat,
    radial-gradient(circle, var(--sage) 0 2.5px, transparent 3px) center / 9px 9px no-repeat;
}
.names {
  margin: 0;
  font-family: var(--serif); font-weight: 500;
  font-size: 30px; line-height: 1.15;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink);
}
.names span { display: block; }
.names .amp {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  text-transform: none; letter-spacing: 0;
  font-size: 40px; line-height: 1; color: var(--sage-dark);
  margin: 0 0 4px;
}

/* jeden polaroid z dwoma zdjęciami, jak pasek z fotobudki */
.polaroid {
  position: absolute; left: 0; top: 0; margin: 0;
  display: flex; flex-direction: column; gap: 9px;
  width: 218px; padding: 11px 11px 36px;
  background: var(--paper-tex) 0 0 / 420px, #fbfaf5;
  background-blend-mode: soft-light, normal;
  box-shadow: 0 20px 30px -14px rgba(20, 28, 10, .55), 0 1px 2px rgba(20, 28, 10, .22);
  transform: rotate(-5deg);
}
.polaroid img { display: block; width: 196px; height: 180px; object-fit: cover; }

.sprig-anim img {
  width: 160px; max-width: none;
  transform: rotate(-9deg); transform-origin: 50% 100%;
  filter: drop-shadow(0 6px 8px rgba(20, 28, 10, .28)) drop-shadow(0 1px 1px rgba(20, 28, 10, .2));
}
.rose-anim img {
  width: 190px; max-width: none;
  transform: scaleX(-1) rotate(9deg); transform-origin: 50% 100%;
  filter: drop-shadow(0 8px 10px rgba(20, 28, 10, .35)) drop-shadow(0 1px 2px rgba(20, 28, 10, .25));
}

.heart {
  position: relative; width: 264px; height: 260px;
  filter: drop-shadow(0 7px 9px rgba(20, 28, 10, .34)) drop-shadow(0 1px 1px rgba(20, 28, 10, .25));
}
.heart img { width: 100%; height: auto; }
.heart-date {
  position: absolute; left: 50%; top: 40.5%;
  transform: translate(-50%, -50%);
  font-family: var(--serif); font-weight: 500; font-size: 25px; line-height: 1;
  letter-spacing: .04em; white-space: nowrap;
  font-variant-numeric: lining-nums;
  color: var(--ink);
}

/* --- bukiety --- */
.bq { left: 0; top: 0; width: 760px; height: 1000px; pointer-events: none; z-index: 11; }
.bq-anim { position: relative; width: 100%; height: 100%; opacity: 0; }
.bq-right { transform-origin: 690px 800px; }
.fl {
  position: absolute; max-width: none; height: auto;
  rotate: var(--r, 0deg);
  scale: var(--sx, 1) 1;
  filter: drop-shadow(0 7px 9px rgba(22, 32, 12, .32)) drop-shadow(0 1px 2px rgba(22, 32, 12, .25));
}

/* --- pieczęć --- */
.seal-pos { left: 328px; top: 746px; width: 104px; height: 104px; z-index: 12; }
.seal { position: relative; width: 100%; height: 100%; z-index: 1; }
.seal-inner { position: relative; width: 100%; height: 100%; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.seal-inner img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(20, 28, 10, .4)) drop-shadow(0 1px 1px rgba(20, 28, 10, .3)); }
.seal-shadow {
  position: absolute; left: 10%; top: 14%; width: 80%; height: 80%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(14, 20, 6, .5), rgba(14, 20, 6, 0));
  opacity: 0;
}
.scene:has(.opener:hover) .seal-inner { transform: translateY(-3px) scale(1.035); }

/* --- winieta i światło (zbliżenie) --- */
.vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(120% 90% at 32% 18%, rgba(255, 250, 232, .13), rgba(255, 250, 232, 0) 50%),
    radial-gradient(ellipse 75% 70% at 50% 56%, rgba(10, 16, 4, 0) 45%, rgba(10, 16, 4, .52) 100%);
}

/* --- napisy na kopercie --- */
.opener {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; margin: 0;
  background: none; border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.opener:focus { outline: none; }
.opener:focus-visible .seal-ring { border-color: #fffdf6; border-width: 2px; animation: none; opacity: 1; }
body:not(.is-closed) .opener { pointer-events: none; }

.intro {
  position: absolute; left: 0; right: 0;
  bottom: calc(100% - var(--seal-y, 58vh) + var(--seal-r, 90px) + clamp(28px, 17vh, 190px));
  display: flex; flex-direction: column; align-items: center;
  padding: 0 20px;
  color: var(--ivory);
  text-align: center;
}
.intro-names {
  display: block;
  font-family: var(--script);
  font-size: clamp(40px, min(10vw, 9.5vh), 124px);
  line-height: 1.15;
  padding: 0 .12em .08em;
  background: linear-gradient(100deg, #efe9d7 0%, #efe9d7 38%, #fffef8 50%, #efe9d7 62%, #efe9d7 100%) 0 0 / 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(20, 28, 10, .45)) drop-shadow(0 6px 18px rgba(10, 16, 4, .2));
  opacity: 0;
  animation: rise 1.6s .5s cubic-bezier(.2, .7, .2, 1) forwards, sheen 6s 2.4s ease-in-out infinite;
}
.amp-serif {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: .62em; letter-spacing: 0;
  margin: 0 .06em;
}
.intro-hint {
  position: absolute; left: 0; right: 0;
  top: calc(var(--seal-y, 58vh) + var(--seal-r, 90px) + clamp(16px, 3.6vh, 44px));
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(11px, .5vw + .9vh + 2px, 15px);
  letter-spacing: .4em; text-transform: uppercase; padding-left: .4em;
  color: #e6e0cb;
  text-align: center;
  opacity: 0; animation: rise 1.4s 1.3s cubic-bezier(.2, .7, .2, 1) forwards;
}
.intro-hint::after {
  content: ""; display: block;
  width: 1px; height: clamp(18px, 4vh, 40px);
  margin: 12px auto 0;
  background: linear-gradient(#e6e0cb, rgba(230, 224, 203, 0));
  transform-origin: top;
  animation: drip 2.4s 2s ease-in-out infinite;
}
.seal-ring {
  position: absolute; left: 50%; top: var(--seal-y, 58vh);
  width: calc(var(--seal-r, 90px) * 2.08); height: calc(var(--seal-r, 90px) * 2.08);
  margin: calc(var(--seal-r, 90px) * -1.04) 0 0 calc(var(--seal-r, 90px) * -1.04);
  border-radius: 50%;
  border: 1px solid rgba(245, 240, 226, .55);
  opacity: 0;
  animation: ring 3s 2.2s ease-out infinite;
  pointer-events: none;
}

/* --- zachęta do przewijania --- */
.scroll-cue {
  position: absolute; left: 50%; bottom: max(18px, 3vh);
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 500;
  font-size: 12px; letter-spacing: .42em; text-transform: uppercase; padding-left: .42em;
  color: var(--sage-dark);
  text-decoration: none;
  opacity: 0; pointer-events: none;
  transition: opacity 1.2s ease;
  z-index: 5;
}
.scroll-cue span {
  width: 1px; height: 42px;
  background: linear-gradient(var(--sage-dark), rgba(108, 124, 82, 0));
  transform-origin: top;
  animation: drip 2.4s ease-in-out infinite;
}
.is-open .scroll-cue { opacity: 1; pointer-events: auto; }
@media (max-height: 500px) { .scroll-cue { display: none; } }

/* --- płatki --- */
.petals {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 50;
}

/* =========================================================
   TREŚĆ
   ========================================================= */
.content { position: relative; background: var(--paper); }
.sec { position: relative; padding: clamp(84px, 13vh, 150px) 22px; text-align: center; }
.wrap { max-width: 1080px; margin: 0 auto; }
.narrow { max-width: 640px; }

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--serif); font-weight: 600;
  font-size: 12.5px; line-height: 1.5;
  letter-spacing: .38em; text-transform: uppercase; padding-left: .38em;
  color: var(--sage-dark);
}
.eyebrow.light { color: #eef0e2; }
.script { font-family: var(--script); font-weight: 400; }
.title {
  margin: 0 0 .35em;
  font-size: clamp(56px, 7vw + 18px, 104px);
  line-height: 1.12;
  color: var(--ink);
}
.sec p { margin: 0 0 1.1em; }

/* --- odliczanie --- */
.countdown {
  color: var(--ivory);
  background:
    var(--paper-tex) 0 0 / 520px,
    radial-gradient(ellipse 70% 90% at 50% 0%, #7b8d5e 0%, rgba(123, 141, 94, 0) 70%),
    linear-gradient(180deg, #6c7e4e, #637549);
  background-blend-mode: soft-light, normal, normal;
  position: relative; z-index: 1;
  padding-top: clamp(96px, 14vh, 150px);
  padding-bottom: clamp(70px, 10vh, 110px);
}
.lace-edge {
  position: absolute; left: 0; right: 0; top: -12px; height: 40px; z-index: 1;
  background: url("grafiki/koronka.webp") repeat-x 0 0 / auto 40px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3));
}
.lace-edge-bottom { top: auto; bottom: -28px; }
.timer {
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(10px, 3.6vw, 52px);
  margin: 0;
}
.unit { display: flex; flex-direction: column; align-items: center; min-width: 2.2ch; }
.num {
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(44px, 9vw + 10px, 128px);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: #f7f3e8;
  text-shadow: 0 1px 0 rgba(30, 40, 15, .22);
  transition: opacity .35s ease, transform .35s ease, filter .35s ease;
}
.num.flip { opacity: 0; transform: translateY(-8px); filter: blur(3px); transition: none; }
.lbl {
  margin-top: 12px;
  font-weight: 600; font-size: 11.5px;
  letter-spacing: .32em; text-transform: uppercase; padding-left: .32em;
  color: #eef0e2;
}
.sep {
  width: 1px; align-self: stretch;
  margin: 10px 0 44px;
  background: linear-gradient(rgba(243, 240, 226, 0), rgba(243, 240, 226, .55), rgba(243, 240, 226, 0));
}
.today { font-size: clamp(56px, 6vw + 20px, 96px); color: #f7f3e8; margin: 10px 0 20px !important; }

/* --- kiedy --- */
.date { background: var(--grain), var(--paper); }
.display {
  margin: 0 0 42px;
  font-family: var(--serif); font-weight: 300;
  font-size: clamp(34px, 3.4vw + 16px, 60px);
  line-height: 1.15;
  letter-spacing: .01em;
  color: var(--ink);
}
.display em { font-style: italic; font-weight: 400; color: var(--baby-blue); }
.cal-card {
  position: relative;
  max-width: 440px; margin: 0 auto 40px;
  padding: 30px clamp(18px, 5vw, 38px) 34px;
  background: var(--grain), linear-gradient(170deg, #fffefa, #f8f5ec);
  box-shadow: 0 22px 44px -18px rgba(40, 52, 28, .32), 0 2px 4px rgba(40, 52, 28, .08);
  transform: rotate(-1.2deg);
}
.cal-card::before { content: ""; position: absolute; inset: 10px; border: 1px solid var(--line); pointer-events: none; }
.cal-card .lace-frame { --fh: clamp(22px, 2vw + 16px, 40px); }
.cal-head { display: flex; align-items: baseline; justify-content: center; gap: 14px; margin-bottom: 14px; }
.cal-head .script { font-size: 54px; line-height: 1; color: var(--ink); }
.cal-year { font-weight: 500; font-size: 15px; letter-spacing: .32em; color: var(--sage-dark); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 4px; }
.cal-grid .dow {
  font-weight: 600; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage-dark); padding: 6px 0 10px;
}
.cal-grid .day {
  position: relative;
  font-size: 19px; line-height: 2.1;
  font-variant-numeric: lining-nums;
  color: var(--ink-soft);
}
.cal-grid .day.mark { color: var(--ink); font-weight: 600; }
.cal-grid .day svg {
  position: absolute; left: 50%; top: 50%;
  width: 2.7em; height: 2.7em;
  transform: translate(-50%, -54%);
  overflow: visible;
  fill: none; stroke: var(--baby-blue-soft); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 320; stroke-dashoffset: 320;
}
.cal-card.in .day svg { animation: draw-heart 1.8s .6s cubic-bezier(.6, .1, .3, 1) forwards; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.agenda { max-width: 440px; margin: 46px auto 0; padding-top: 30px; border-top: 1px solid var(--line); }
.agenda .eyebrow { margin-bottom: 8px; }
.agenda p:last-child { margin: 0; color: var(--ink-soft); font-style: italic; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px;
  padding: 14px 28px;
  border: 1px solid var(--env-dark);
  border-radius: 999px;
  background: var(--env-dark);
  color: #f8f5ec;
  font-family: var(--serif); font-weight: 600;
  font-size: 12.5px; letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .35s ease, color .35s ease, transform .35s ease, box-shadow .35s ease;
}
.btn:hover { background: var(--forest); transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(40, 52, 28, .55); }
.btn-ghost { background: transparent; color: var(--env-dark); }
.btn-ghost:hover { background: var(--env-dark); color: #f8f5ec; }
.btn-light { background: transparent; color: var(--ivory); border-color: rgba(243, 238, 226, .65); }
.btn-light:hover { background: var(--ivory); color: var(--forest); }
.btn:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; }
@media (max-width: 420px) { .btn { padding: 14px 22px; letter-spacing: .18em; } }
@media (max-width: 360px) { .btn { padding: 13px 18px; letter-spacing: .12em; } }

/* --- miejsce --- */
.place { position: relative; isolation: isolate; overflow: hidden; background: var(--paper); }
.place::before, .place::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.place::before {
  z-index: -2;
  background: url("grafiki/folwark-stodola.jpg") center 55% / cover no-repeat;
  filter: saturate(.7) contrast(.95) brightness(1.03);
}
.place::after {
  z-index: -1;
  background:
    var(--grain),
    linear-gradient(180deg, rgba(246, 243, 234, 1) 0%, rgba(246, 243, 234, 0) 14%, rgba(246, 243, 234, 0) 86%, rgba(246, 243, 234, 1) 100%),
    linear-gradient(180deg, rgba(246, 243, 234, .97) 0%, rgba(246, 243, 234, .9) 42%, rgba(246, 243, 234, .45) 100%);
}
@media (min-width: 900px) {
  .place::after {
    background:
      var(--grain),
      linear-gradient(180deg, rgba(246, 243, 234, 1) 0%, rgba(246, 243, 234, 0) 14%, rgba(246, 243, 234, 0) 86%, rgba(246, 243, 234, 1) 100%),
      linear-gradient(90deg, rgba(246, 243, 234, .98) 0%, rgba(246, 243, 234, .92) 38%, rgba(246, 243, 234, .5) 68%, rgba(246, 243, 234, .3) 100%);
  }
}
.place-grid { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: center; }
.place .actions { margin-top: 28px; }
.map-frame {
  position: relative;
  width: min(100%, 500px); aspect-ratio: 1 / 1;
  margin: 0 auto; padding: 10px;
  background: #fbfaf5;
  box-shadow: 0 30px 60px -28px rgba(40, 52, 28, .45), 0 2px 6px rgba(40, 52, 28, .08);
}
.map-frame iframe { display: block; width: 100%; height: 100%; border: 0; filter: saturate(.75) contrast(1.03); }
@media (min-width: 900px) {
  .place-grid { grid-template-columns: 1.05fr 1fr; gap: 80px; text-align: left; }
  .place-grid .eyebrow { padding-left: 0; }
  .place .actions { justify-content: flex-start; }
}

/* --- menu sekcji --- */
html { scroll-padding-top: 64px; }
.topnav {
  position: fixed; left: 0; right: 0; top: 0; z-index: 40;
  display: flex; justify-content: center; gap: 4px;
  padding: 10px 16px;
  background: rgba(246, 243, 234, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-105%);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
  overflow-x: auto; scrollbar-width: none;
}
.topnav::-webkit-scrollbar { display: none; }
.topnav.show { transform: none; }
.topnav a {
  flex: none;
  padding: 8px 13px; border-radius: 999px;
  font-family: var(--serif); font-weight: 600; font-size: 11.5px;
  letter-spacing: .2em; text-transform: uppercase; white-space: nowrap;
  color: var(--sage-dark); text-decoration: none;
  transition: background .3s ease, color .3s ease;
}
.topnav a:hover, .topnav a.active { background: rgba(103, 122, 74, .13); color: var(--ink); }
@media (max-width: 900px) { .topnav { justify-content: flex-start; } }
body.is-closed .topnav { display: none; }
.card-title { margin: 0 0 12px; font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.2; color: var(--ink); }
.small { font-size: .88em; color: var(--ink-soft); }

.ti svg { width: 30px; height: 30px; fill: none; stroke: var(--env); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* --- noclegi --- */
.stay { background: var(--grain), linear-gradient(180deg, var(--paper), #eef0e6 30%, #eef0e6); }
.stay-grid { display: grid; grid-template-columns: 1fr; gap: 44px; margin-top: 36px; align-items: center; }
.stay-photos { position: relative; width: min(100%, 560px); aspect-ratio: 1 / 1.02; margin: 0 auto; }
.sp { position: absolute; margin: 0; overflow: hidden; background: #dfe5d0; box-shadow: 0 26px 50px -26px rgba(40, 52, 28, .55); }
.sp img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sp-main { left: 0; top: 0; width: 84%; height: 62%; border-radius: 999px 999px 14px 14px; }
.sp-a, .sp-b { width: 40%; height: 48%; border: 8px solid #fbfaf5; border-radius: 10px; }
.sp-a { left: 6%; bottom: 0; transform: rotate(-3deg); }
.sp-b { right: 0; bottom: 6%; transform: rotate(3.5deg); }
.stay-text { text-align: left; max-width: 520px; margin: 0 auto; }
.stay-opt { position: relative; padding: 20px 0 18px 66px; border-top: 1px solid var(--line); }
.stay-opt:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.stay-opt .card-title { margin-top: 0; margin-bottom: 4px; }
.stay-opt p { margin: 0; color: var(--ink-soft); }
.opt-num {
  position: absolute; left: 0; top: 20px;
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  background: #fbfaf5; box-shadow: 0 1px 2px rgba(40, 52, 28, .12);
  font-size: 22px; line-height: 1; color: var(--env-dark); font-variant-numeric: lining-nums;
}
@media (min-width: 960px) {
  .stay-grid { grid-template-columns: 1.05fr 1fr; gap: 70px; }
  .stay-text { margin: 0; }
}

/* --- dojazd (w sekcji „Gdzie”) --- */
.travel-list { list-style: none; margin: 18px 0 26px; padding: 0; text-align: left; }
.travel-list li { display: grid; grid-template-columns: 54px 1fr; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.travel-list li:last-child { border-bottom: 0; }
.ti { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #eef0e6; }
.travel-list strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); margin-bottom: 2px; }
.travel-list li > span:last-child { color: var(--ink-soft); line-height: 1.5; }

/* --- potwierdzenie obecności --- */
.rsvp {
  position: relative; z-index: 1;
  color: var(--ivory);
  background: var(--paper-tex) 0 0 / 520px, linear-gradient(180deg, #6c7e4e, #637549);
  background-blend-mode: soft-light, normal;
  padding-top: clamp(100px, 14vh, 150px); padding-bottom: clamp(100px, 14vh, 150px);
}
.rsvp .title { color: #f7f3e8; }
.rsvp-deadline { margin: 4px auto 40px !important; font-size: clamp(19px, .6vw + 16px, 22px); line-height: 1.35; color: #eef0e2; }
.rsvp-deadline strong {
  display: block; margin-top: 2px;
  font-weight: 500; font-size: 1.6em; letter-spacing: .04em;
  font-variant-numeric: lining-nums; color: #fffdf6;
}
.rsvp-card {
  position: relative;
  margin-top: 30px; padding: clamp(24px, 5vw, 44px);
  text-align: left; color: var(--ink);
  background: var(--paper-tex) 0 0 / 420px, linear-gradient(170deg, #fffefa, #f6f3ea);
  background-blend-mode: soft-light, normal;
  box-shadow: 0 30px 60px -24px rgba(20, 30, 10, .55);
}
/* koronka naszyta wokół karty: prosty brzeg przy karcie, ząbki na zewnątrz, narożniki cięte pod 45° */
.lace-frame {
  --fh: clamp(26px, 2vw + 20px, 44px);
  position: absolute; inset: calc(var(--fh) * -.72); z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 1px 1.5px rgba(20, 28, 10, .4));
}
.lace-frame i { position: absolute; }
.lf-t, .lf-b {
  left: 0; right: 0; height: var(--fh);
  background: url("grafiki/koronka-ramka.webp") repeat-x center 0 / auto 100%;
  clip-path: polygon(var(--fh) 0, calc(100% - var(--fh)) 0, 100% 100%, 0 100%);
}
.lf-t { top: 0; transform: scaleY(-1); }
.lf-b { bottom: 0; }
.lf-l, .lf-r {
  top: 0; bottom: 0; width: var(--fh);
  background: url("grafiki/koronka-ramka-pion.webp") repeat-y 0 center / 100% auto;
  clip-path: polygon(0 0, 100% var(--fh), 100% calc(100% - var(--fh)), 0 100%);
}
.lf-l { left: 0; }
.lf-r { right: 0; transform: scaleX(-1); }
.field { display: block; margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.field > span, .field > legend {
  display: block; padding: 0; margin-bottom: 8px;
  font-weight: 600; font-size: 11.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--sage-dark);
}
.field input[type="text"], .field select, .field textarea {
  width: 100%; padding: 8px 2px;
  font: inherit; font-size: 19px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid rgba(78, 94, 56, .4); border-radius: 0;
  outline: none; transition: border-color .3s ease;
}
.field textarea { resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #a3ab95; font-style: italic; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--env-dark); }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.field-note { margin: -4px 0 12px !important; font-size: .85em; font-style: italic; line-height: 1.5; color: var(--ink-soft); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block; padding: 10px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(78, 94, 56, .45); font-size: 17px; color: var(--ink-soft);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.choice input:checked + span { background: var(--env-dark); border-color: var(--env-dark); color: #f8f5ec; }
.choice input:focus-visible + span { outline: 2px solid var(--sage); outline-offset: 2px; }
.btn-wide { width: 100%; margin-top: 8px; }
.rsvp-thanks { margin: 18px 0 0 !important; text-align: center; font-style: italic; color: var(--env-dark); }
.rsvp-thanks.error { color: #8a3b2e; }

.turnstile-box { margin: -6px 0 16px; }
.turnstile-box:empty { display: none; }

/* po wysłaniu: podziękowanie zamiast pól formularza */
.rsvp-done { display: none; text-align: center; padding: 10px 0 4px; outline: none; }
.rsvp-card.is-done > :not(.lace-frame):not(.rsvp-done) { display: none; }
.rsvp-card.is-done .rsvp-done { display: block; }
.rsvp-done-title { margin: 0 0 6px !important; font-size: clamp(40px, 3vw + 28px, 56px); line-height: 1.15; color: var(--env); }
.rsvp-done-text { margin: 0 0 26px !important; color: var(--ink-soft); }
.rsvp-done-cal { margin-bottom: 26px; }
.rsvp-done-cal .eyebrow { margin-bottom: 14px; }
.rsvp-again {
  padding: 4px 2px; border: 0; background: none; cursor: pointer;
  font-size: .9em; font-style: italic; color: var(--sage-dark);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(108, 124, 82, .45);
}
.rsvp-again:hover { color: var(--env-dark); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- pytania --- */
.faq { background: var(--grain), var(--paper); }
.faq-list { margin-top: 30px; text-align: left; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 20px 44px 20px 4px;
  font-family: var(--serif); font-weight: 500; font-size: 21px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-weight: 300; font-size: 30px; color: var(--sage-dark); transition: transform .3s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: -4px 4px 22px !important; color: var(--ink-soft); }
.faq details p a { color: var(--env); font-weight: 600; letter-spacing: .03em; text-decoration: none; border-bottom: 1px solid rgba(103, 122, 74, .35); white-space: nowrap; }
.faq details p a:hover { color: var(--env-dark); border-bottom-color: currentColor; }

/* --- finał --- */
/* stopka z filmem w tle */
.finale {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-content: center;
  min-height: min(100svh, 860px);
  padding: clamp(90px, 12vh, 130px) 22px clamp(70px, 10vh, 110px);
  text-align: center;
  color: var(--ivory);
  background: #2c3624 url("filmy/final.jpg") 64% 50% / cover no-repeat;
}
.finale-film { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 64% 50%; }
.finale::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(18, 24, 12, .5) 0%, rgba(18, 24, 12, .34) 45%, rgba(18, 24, 12, .58) 100%);
}
.finale .wrap { position: relative; }
.finale .eyebrow { color: #eef0e2; }
.monogram { display: block; width: 150px; height: auto; margin: 10px auto 18px; filter: drop-shadow(0 8px 12px rgba(10, 14, 6, .45)) drop-shadow(0 1px 2px rgba(10, 14, 6, .3)); }
.finale-names { font-size: clamp(50px, 5vw + 22px, 84px); line-height: 1.2; margin: 0 0 .1em !important; color: #f7f3e8; text-shadow: 0 2px 18px rgba(10, 14, 6, .35); }
.finale-meta { font-weight: 600; font-size: 14px; letter-spacing: .34em; text-transform: uppercase; padding-left: .34em; color: #eef0e2; margin-bottom: 40px !important; }
.finale-date { display: block; margin-bottom: 4px; font-weight: 500; font-size: clamp(28px, 1.5vw + 22px, 36px); line-height: 1.2; letter-spacing: .12em; padding-left: .12em; font-variant-numeric: lining-nums; color: #d3e0ea; }

/* --- pojawianie się przy przewijaniu --- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(6px);
  transition: opacity 1.1s cubic-bezier(.2, .7, .2, 1), transform 1.1s cubic-bezier(.2, .7, .2, 1), filter 1.1s ease;
  transition-delay: var(--d, 0s);
}
.reveal.in { opacity: 1; transform: none; filter: none; }
.cal-card.reveal.in { transform: rotate(-1.2deg); }

/* =========================================================
   ANIMACJE
   ========================================================= */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sheen { 0%, 55% { background-position: 100% 0; } 100% { background-position: -60% 0; } }
@keyframes ring { 0% { opacity: .7; transform: scale(.96); } 70%, 100% { opacity: 0; transform: scale(1.32); } }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes sway { from { transform: rotate(-1.2deg) translate(-6px, 0); } to { transform: rotate(1.2deg) translate(6px, 4px); } }
@keyframes draw-heart { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: opacity .6s ease; transform: none; filter: none; }
  .intro-names, .intro-hint { animation: none; opacity: 1; }
  .seal-ring, .intro-hint::after, .scroll-cue span, .is-open .leaf-shadows { animation: none; }
}
