@font-face {
  font-family: "Quicksand"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("assets/fonts/quicksand-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Caveat"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("assets/fonts/caveat-600-latin.woff2") format("woff2");
}

:root {
  --kraft: #a8927a;
  --kraft-light: #b9a48c;
  --kraft-dark: #8d7760;
  --ink: #3f3328;
  --snow: #fffdf9;
  --gold: #e9d3a6;
  --radius: 18px;
  --head: "Quicksand", system-ui, sans-serif;
  --script: "Caveat", cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--head);
  color: var(--snow);
  background: radial-gradient(ellipse at 50% 0%, var(--kraft-light), var(--kraft) 55%, var(--kraft-dark));
  background-attachment: fixed;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--snow); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- background layers ---------- */
#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.flakes { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; color: rgba(255,255,255,.13); }
.flake { position: absolute; animation: spin 60s linear infinite; }
.f1 { width: 420px; top: -80px; left: 18%; }
.f2 { width: 300px; top: 30%; right: -60px; animation-duration: 80s; animation-direction: reverse; }
.f3 { width: 360px; bottom: -120px; left: -80px; animation-duration: 90s; }
.f4 { width: 220px; top: 55%; left: 40%; animation-duration: 70s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  transition: background .4s, box-shadow .4s, padding .4s;
}
.nav.scrolled { background: rgba(141,119,96,.92); backdrop-filter: blur(8px); box-shadow: 0 6px 24px rgba(0,0,0,.12); padding-block: 8px; }
.brand img { display: block; filter: brightness(0) invert(1); width: 150px; }
.nav nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); font-weight: 600; }
.nav nav a:not(.btn) { text-decoration: none; position: relative; }
.nav nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 2px; background: currentColor; transition: right .3s; }
.nav nav a:not(.btn):hover::after { right: 0; }
@media (max-width: 720px) { .nav nav a:not(.btn) { display: none; } .brand img { width: 120px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 14px 28px; border-radius: 999px;
  background: var(--snow); color: var(--ink); font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 24px rgba(63,51,40,.18);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .25s;
  position: relative; overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(233,211,166,.55) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 4s ease-in-out infinite;
}
@keyframes shine { 60%, 100% { transform: translateX(120%); } }
.btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 30px rgba(63,51,40,.25); }
.btn-ghost { background: transparent; color: var(--snow); border: 2px solid var(--snow); box-shadow: none; }
.btn-ghost::before { display: none; }
.btn-sm { padding: 8px 18px; font-size: .95rem; }
.btn-big { padding: 18px 36px; font-size: 1.15rem; margin-top: 8px; }

/* ---------- hero ---------- */
.hero {
  position: relative; z-index: 2; min-height: 100svh; overflow-x: clip;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  padding: 100px clamp(16px, 6vw, 80px) 120px; gap: 24px;
}
.tree-wrap { display: flex; justify-content: center; }
.tree { width: min(100%, 520px); max-height: 74svh; overflow: visible; }
#treePath {
  fill: none; stroke: var(--snow); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 4px 10px rgba(63,51,40,.15));
}
.tree-star { fill: var(--snow); opacity: 0; transition: opacity .8s ease; }
.tree.drawn .tree-star { opacity: 1; }
@keyframes twinkle { 50% { filter: drop-shadow(0 0 14px var(--gold)); scale: 1.12; } }

.hero-copy { text-align: center; }
.kicker { letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; font-weight: 600; opacity: .9; }
.title-art { font-size: clamp(3.2rem, 9vw, 6.5rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
.merry { display: block; font-size: .32em; font-weight: 700; letter-spacing: .25em; }
.sub { font-size: clamp(1.2rem, 2.6vw, 1.7rem); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: .2em 0; }
.sub .place { display: block; font-size: .62em; font-weight: 600; letter-spacing: .22em; margin-top: .35em; opacity: .92; }
.when { font-family: var(--script); font-size: clamp(1.6rem, 3.4vw, 2.3rem); text-wrap: balance; margin: .2em 0 0; color: var(--gold); }
.where { margin: 0 0 1.4em; font-weight: 500; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-copy > * { opacity: 0; transform: translateY(24px); animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards; }
.hero-copy > *:nth-child(1) { animation-delay: .3s; }
.hero-copy > *:nth-child(2) { animation-delay: .5s; }
.hero-copy > *:nth-child(3) { animation-delay: .8s; }
.hero-copy > *:nth-child(4) { animation-delay: 1s; }
.hero-copy > *:nth-child(5) { animation-delay: 1.15s; }
.hero-copy > *:nth-child(6) { animation-delay: 1.35s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* hanging stars */
.strings { position: absolute; top: 0; height: 100%; display: flex; gap: clamp(18px, 3vw, 46px); pointer-events: none; }
.strings.left { left: clamp(10px, 3vw, 50px); }
.strings.right { right: clamp(10px, 3vw, 50px); flex-direction: row-reverse; }
.strings span {
  position: relative; width: 2px; height: var(--h); background: rgba(255,253,249,.85);
  transform-origin: top center; animation: sway 5s ease-in-out var(--d) infinite alternate;
}
.strings span::before { content: ""; position: absolute; inset: 0; background: inherit; transform: scaleY(0); }
.strings svg { position: absolute; bottom: -16px; left: 50%; width: 32px; translate: -50% 0; fill: var(--snow); }
.strings span { animation: drop 1.4s cubic-bezier(.3,1.4,.5,1) calc(var(--d) + .2s) both, sway 5s ease-in-out calc(var(--d) + 1.6s) infinite alternate; }
@keyframes drop { from { height: 0; } }
@keyframes sway { from { rotate: -3deg; } to { rotate: 3deg; } }

/* countdown */
.countdown {
  grid-column: 1 / -1; justify-self: center; display: flex; gap: clamp(10px, 3vw, 28px);
  opacity: 0; animation: rise .9s 1.6s forwards;
}
.countdown div {
  min-width: 78px; padding: 12px 10px; text-align: center; border-radius: var(--radius);
  background: rgba(255,253,249,.14); border: 1px solid rgba(255,253,249,.35); backdrop-filter: blur(4px);
}
.countdown b { display: block; font-size: clamp(1.6rem, 4vw, 2.4rem); font-variant-numeric: tabular-nums; }
.countdown b.tick { animation: tick .45s ease; }
@keyframes tick { 40% { transform: translateY(-6px); color: var(--gold); } }
.countdown span { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; }

.scroll-cue { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; width: 28px; height: 46px; border: 2px solid var(--snow); border-radius: 20px; }
.scroll-cue span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; background: var(--snow); border-radius: 2px; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 60% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 90px; text-align: center; }
  .tree-wrap { order: -1; }
  .tree { width: min(62vw, 280px); }
  .strings span:nth-child(n+3) { display: none; }
  .countdown div { min-width: 64px; }
}

/* ---------- sections ---------- */
.band { position: relative; z-index: 2; padding: clamp(70px, 10vw, 120px) clamp(16px, 5vw, 40px); }
.wrap { max-width: 1120px; margin: 0 auto; }
.wrap.narrow { max-width: 760px; }
.lead { max-width: 680px; margin: 0 auto 48px; text-align: center; font-size: 1.15rem; }
.script { font-family: var(--script); font-size: 2rem; color: var(--gold); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.card {
  position: relative; text-align: center; color: var(--snow); border-radius: var(--radius); padding: 34px 26px 30px;
  background: rgba(255,253,249,.1); border: 1.5px solid rgba(255,253,249,.6);
  backdrop-filter: blur(3px);
  transition: transform .35s cubic-bezier(.3,1.5,.5,1), background .35s;
}
.card::after {
  content: ""; position: absolute; inset: 7px; border-radius: calc(var(--radius) - 5px);
  border: 1px dashed rgba(255,253,249,.35); pointer-events: none;
}
.card:hover { transform: translateY(-6px); background: rgba(255,253,249,.16); }
.card h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: .3em; }
.card p { margin: 0 0 .6em; }
.card .icon {
  width: 58px; height: 58px; margin: 0 auto 12px; display: block; overflow: visible;
  fill: none; stroke: var(--snow); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
}
.card .icon text { fill: var(--gold); stroke: none; font: 700 13px var(--head); opacity: 0; transition: opacity .6s 1.1s; }
.card .icon :is(rect, path, ellipse) { stroke-dasharray: 1; stroke-dashoffset: 1; }
.card.in .icon :is(rect, path, ellipse) { animation: draw 1.4s cubic-bezier(.45,.05,.3,1) calc(var(--delay, 0s) + .2s) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.card.in .icon text { opacity: 1; }
.card:hover .icon { animation: wiggle .6s ease; }
@keyframes wiggle { 25% { rotate: -8deg; } 75% { rotate: 8deg; } }
.card .date { font-family: var(--script); font-size: 1.6rem; color: var(--gold); margin: 0 0 4px; }
.card .link {
  display: inline-block; margin-top: 6px; font-weight: 700; color: var(--snow); text-decoration: none;
  border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}
.card .link:hover { color: var(--gold); }

.kids { background: rgba(255,253,249,.08); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split h2 { text-align: left; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.fine { font-size: .9rem; opacity: .85; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps li {
  display: flex; gap: 16px; align-items: flex-start; background: var(--snow); color: var(--ink);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 10px 28px rgba(63,51,40,.14);
}
.steps b {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--kraft); color: var(--snow); font-size: 1.2rem;
}
.steps h3 { margin: 4px 0 2px; font-size: 1.1rem; }
.steps p { margin: 0; font-size: .95rem; }

address { font-style: normal; font-size: 1.2rem; margin-bottom: 16px; }
.tips { padding-left: 1.2em; margin-bottom: 24px; }
.tips li { margin-bottom: 8px; }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: 0 14px 40px rgba(63,51,40,.2); aspect-ratio: 4 / 3; background: var(--kraft-dark); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

details {
  background: var(--snow); color: var(--ink); border-radius: 14px; margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(63,51,40,.12); overflow: hidden;
}
summary { cursor: pointer; padding: 18px 54px 18px 22px; font-weight: 700; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 22px; top: 50%; translate: 0 -50%; font-size: 1.6rem; transition: rotate .3s; }
details[open] summary::after { rotate: 45deg; }
details p { margin: 0; padding: 0 22px 20px; animation: rise .4s ease forwards; }
details a { color: var(--kraft-dark); font-weight: 700; }

.closing { position: relative; z-index: 2; text-align: center; padding: 100px 20px 120px; }
.verse { font-family: var(--script); font-size: clamp(1.8rem, 4vw, 2.8rem); max-width: 820px; margin: 0 auto; line-height: 1.3; }
.ref { letter-spacing: .2em; text-transform: uppercase; font-weight: 600; margin-bottom: 32px; }

.foot { position: relative; z-index: 2; text-align: center; padding: 40px 20px; background: rgba(63,51,40,.25); font-size: .95rem; }
.foot img { filter: brightness(0) invert(1); width: 150px; }
.social { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* invite card */
.invite { background: rgba(255,253,249,.08); }
.invite-card { perspective: 900px; display: flex; justify-content: center; }
.ic-inner {
  width: min(100%, 360px); aspect-ratio: 5 / 7; border-radius: 22px; padding: 34px 28px;
  background: radial-gradient(ellipse at 50% 0%, var(--kraft-light), var(--kraft) 70%);
  border: 2px solid rgba(255,253,249,.7); box-shadow: 0 24px 60px rgba(63,51,40,.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  animation: float 6s ease-in-out infinite; transition: transform .4s ease;
}
.invite-card:hover .ic-inner { transform: rotateY(-8deg) rotateX(4deg) scale(1.02); }
@keyframes float { 50% { translate: 0 -10px; rotate: 1deg; } }
.ic-tree { width: 46px; fill: var(--snow); animation: twinkle 2.4s ease-in-out infinite; margin-bottom: 10px; }
.ic-kicker { font-family: var(--script); font-size: 1.8rem; color: var(--gold); margin: 0; }
.ic-title { font-size: 2.3rem; font-weight: 600; margin: 0 0 6px; line-height: 1.1; }
.ic-when { font-weight: 700; letter-spacing: .06em; margin: 0 0 12px; }
.ic-where { margin: 0 0 16px; font-size: .95rem; }
.ic-note { margin: 0; font-size: .85rem; padding: 6px 14px; border: 1px dashed rgba(255,253,249,.7); border-radius: 999px; }
.field { display: block; font-weight: 700; margin: 18px 0 6px; }
.field span { font-weight: 400; opacity: .8; }
.input {
  width: 100%; max-width: 340px; padding: 12px 16px; border-radius: 12px; border: 2px solid transparent;
  font: inherit; color: var(--ink); background: var(--snow);
}
.input:focus { outline: none; border-color: var(--gold); }
.cta.left { justify-content: flex-start; margin-top: 18px; }
button.btn { font: inherit; font-weight: 700; cursor: pointer; }

.share-label { font-weight: 700; margin: 26px 0 10px; }
.socials { display: flex; gap: 12px; flex-wrap: wrap; }
.soc {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--snow); color: var(--ink); border: 0; padding: 0;
  box-shadow: 0 6px 18px rgba(63,51,40,.18); transition: transform .25s cubic-bezier(.3,1.6,.5,1);
}
.soc svg { width: 24px; height: 24px; fill: currentColor; }
.soc:hover { transform: translateY(-4px) rotate(-6deg) scale(1.08); }
#shareMsg:empty { display: none; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: var(--delay, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
