/* ==========================================================================
   Valters barnedåb
   Breakpoints: mobil < 720px · tablet 720–1023px · desktop ≥ 1024px
   ========================================================================== */
:root {
  --bg: #faf6ef;
  --bg-2: #f3eee3;
  --paper: #fffdf9;
  --ink: #2c3630;
  --muted: #6c746c;
  --sage: #77865f;
  --sage-dark: #56643f;
  --sage-soft: #e8ecdd;
  --sky: #dce7ef;
  --sky-2: #eef4f7;
  --peach: #f2d6c6;
  --line: #e6dfd1;
  --warn: #b25b39;
  --radius: 22px;
  --shadow-sm: 0 1px 2px rgba(44, 54, 48, .05), 0 2px 8px rgba(44, 54, 48, .05);
  --shadow: 0 2px 4px rgba(44, 54, 48, .04), 0 12px 32px rgba(44, 54, 48, .08);
  --shadow-lg: 0 24px 60px rgba(44, 54, 48, .16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: var(--sage-dark); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0 0 .35em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.8rem, 9vw, 5.4rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 .8em; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tiny { font-size: .78rem; margin: 0; }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.2rem); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.error { color: var(--warn); font-weight: 700; font-size: .9rem; margin: .5em 0 0; }
.text-link { font-weight: 700; font-size: .95rem; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid rgba(119, 134, 95, .45); outline-offset: 3px; border-radius: 8px; }

/* --- Knapper ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 50px; padding: .8em 1.6em; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--sage); color: #fff; font: 700 1rem var(--sans); text-decoration: none;
  box-shadow: 0 6px 18px rgba(86, 100, 63, .25);
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:hover { background: var(--sage-dark); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(86, 100, 63, .3); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .7; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--sage-dark); box-shadow: inset 0 0 0 1.5px var(--sage); }
.btn-ghost:hover { background: var(--sage-soft); box-shadow: inset 0 0 0 1.5px var(--sage); }
.btn-light { background: #fff; color: var(--sage-dark); }
.btn-light:hover { background: var(--bg); }
.btn.small { min-height: 40px; padding: .5em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font-size: .88rem; text-decoration: underline; cursor: pointer; }
.link.danger { color: var(--warn); }

.badge {
  display: inline-block; margin: 0 0 1rem; padding: .35em 1em;
  border-radius: 999px; background: var(--paper); box-shadow: var(--shadow-sm);
  font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--sage-dark);
}

/* --- Topbar og menu ------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 12px var(--gutter); padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(250, 246, 239, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.topbar.scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(44, 54, 48, .05); }
.brand { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-width: 0; font: 700 1.55rem var(--serif); color: var(--ink); text-decoration: none; }
.brand-mark { color: var(--sage); display: inline-flex; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: .45em .9em; border-radius: 999px; color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: .95rem; transition: background .2s;
}
.nav a:hover { background: var(--sage-soft); }
.nav a.nav-cta { background: var(--sage); color: #fff; }
.nav a.nav-cta:hover { background: var(--sage-dark); }
.lang { display: inline-flex; flex: none; background: var(--sage-soft); border-radius: 999px; padding: 3px; }
.topbar .nav + .lang, .topbar .lang:last-child { margin-left: 4px; }
.topbar > .brand + .lang { margin-left: auto; }
.lang a {
  min-width: 40px; padding: .35em .7em; border-radius: 999px; text-align: center;
  color: var(--muted); font-weight: 700; font-size: .8rem; text-decoration: none; transition: all .2s;
}
.lang a.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }

.menu-btn {
  display: none; flex: none; width: 44px; height: 44px; margin-left: 2px; padding: 0; border: 0; border-radius: 50%;
  background: var(--paper); box-shadow: var(--shadow-sm); cursor: pointer; position: relative;
}
.menu-btn span {
  position: absolute; left: 13px; right: 13px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 21px; }
.menu-btn span:nth-child(3) { top: 27px; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 719px) {
  .topbar { gap: 10px; }
  .brand { font-size: 1.35rem; }
  .lang { flex: none; }
  .topbar:has(.menu-btn) .lang { margin-left: auto; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0 0 auto 0; z-index: -1;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: calc(76px + env(safe-area-inset-top)) var(--gutter) 24px;
    background: var(--bg); box-shadow: var(--shadow-lg); border-radius: 0 0 28px 28px;
    transform: translateY(-105%); transition: transform .4s var(--ease); visibility: hidden;
  }
  .menu-open .nav { transform: none; visibility: visible; }
  .nav a { padding: .9em 1em; font-size: 1.1rem; border-radius: 14px; }
  .nav a.nav-cta { text-align: center; margin-top: 8px; }
  .menu-open::after {
    content: ""; position: fixed; inset: 0; z-index: 40; background: rgba(44, 54, 48, .25);
  }
}

/* --- Himmel med skyer og papirflyver -------------------------------------- */
.sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.cloud {
  position: absolute; width: 180px; height: 56px; border-radius: 999px; background: #fff; opacity: .75;
  animation: drift 60s linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 80px; height: 80px; left: 26px; top: -38px; }
.cloud::after { width: 60px; height: 60px; left: 90px; top: -26px; }
.c1 { top: 14%; left: -10%; animation-duration: 70s; }
.c2 { top: 58%; left: 40%; transform: scale(.7); opacity: .6; animation-duration: 90s; animation-delay: -40s; }
.c3 { top: 30%; left: 75%; transform: scale(.5); opacity: .55; animation-duration: 80s; animation-delay: -20s; }
@keyframes drift { from { translate: -20vw 0; } to { translate: 120vw 0; } }
.flyer {
  position: absolute; top: 14%; left: -250px;
  animation: fly 28s linear infinite;
}
.stork { display: block; width: 230px; height: auto; animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(44, 54, 48, .12)); }
.stork .wing { transform-box: view-box; animation: flap .9s ease-in-out infinite alternate; }
.stork .wing-front { transform-origin: 117px 51px; }
.stork .wing-back { transform-origin: 98px 52px; animation-delay: -.12s; }
.stork .bundle { transform-box: view-box; transform-origin: 202px 57px; animation: swing 1.8s ease-in-out infinite; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(.3); } }
@keyframes bob { 50% { transform: translateY(6px); } }
@keyframes swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@media (max-width: 719px) { .stork { width: 160px; } .flyer { top: 8%; } }
@keyframes fly {
  0% { transform: translate(0, 30px) rotate(-3deg); }
  25% { transform: translate(30vw, 0) rotate(2deg); }
  50% { transform: translate(60vw, 36px) rotate(-3deg); }
  75% { transform: translate(90vw, 8px) rotate(2deg); }
  90%, 100% { transform: translate(calc(100vw + 280px), -10px) rotate(0); }
}

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 70px);
  display: flex; align-items: center;
  background:
    radial-gradient(1200px 500px at 80% -10%, var(--sky) 0%, transparent 60%),
    radial-gradient(800px 500px at -10% 110%, var(--sage-soft) 0%, transparent 60%),
    linear-gradient(var(--sky-2), var(--bg) 85%);
}
.hero-inner {
  position: relative; z-index: 1; width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 48px var(--gutter) 88px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center;
}
.kicker { font: 500 1.9rem/1 var(--hand); color: var(--sage-dark); margin: 0 0 .1em; transform: rotate(-2deg); transform-origin: left; }
.hero h1 { margin-bottom: .15em; }
.hero-date { font: 600 clamp(1.6rem, 4vw, 2.2rem)/1.1 var(--serif); margin: 0 0 .2em; }
.hero-place { display: flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin: 0 0 1.4em; }
.hero-place .icon { color: var(--sage); flex: none; }
.approx {
  display: inline-block; font: 500 1.5rem var(--hand); color: var(--sage-dark);
  background: var(--paper); padding: .1em .8em; border-radius: 12px; box-shadow: var(--shadow-sm);
  transform: rotate(-1.5deg); margin-bottom: 1.4em;
}
.countdown { display: flex; gap: 10px; margin: 0 0 1.6em; }
.countdown div {
  min-width: 72px; padding: 10px 8px; text-align: center; background: var(--paper);
  border-radius: 16px; box-shadow: var(--shadow-sm);
}
.countdown b { display: block; font: 700 2rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cal-menu { position: relative; display: inline-block; }
.cal-menu summary { list-style: none; cursor: pointer; }
.cal-menu summary::-webkit-details-marker { display: none; }
.cal-menu.link summary { display: inline-block; margin-top: .3em; }
.cal-options {
  position: absolute; z-index: 20; top: calc(100% + 8px); left: 0; min-width: 270px; white-space: nowrap;
  display: grid; gap: 4px; padding: 8px; text-align: left;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: fadein .2s var(--ease);
}
.cal-options a {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: .5em .8em; border-radius: 10px;
  color: var(--ink); font-weight: 600; text-decoration: none;
}
.cal-options a:hover { background: var(--sage-soft); }
.cal-options .icon { color: var(--sage); flex: none; }
@media (max-width: 719px) {
  .hero-actions .cal-menu { flex: 1 1 220px; }
  .hero-actions .cal-menu summary { width: 100%; }
  .hero-actions .cal-options { right: 0; min-width: 0; }
}
.answered { display: flex; align-items: center; gap: 6px; margin: 1em 0 0; font-weight: 700; color: var(--sage-dark); }

.hero-photo { position: relative; justify-self: center; width: min(100%, 420px); }
.arch {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: 999px 999px 32px 32px; box-shadow: var(--shadow-lg);
  border: 8px solid var(--paper);
  animation: float 7s ease-in-out infinite;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
@keyframes float { 50% { transform: translateY(-10px); } }
.hero-photo::before {
  content: ""; position: absolute; inset: 24px -24px -24px 24px; z-index: -1;
  border-radius: 999px 999px 32px 32px; background: var(--sage-soft);
}
.hearts { position: absolute; inset: 0; pointer-events: none; }
.hearts .h { position: absolute; display: block; animation: heartfloat 5s ease-in-out infinite; }
.hearts svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 6px rgba(52, 64, 31, .2)); }
.hearts .h1 { width: 40px; height: 40px; left: -40px; top: 14%; fill: #3f4d2e; animation-delay: -1s; }
.hearts .h2 { width: 26px; height: 26px; left: -8px; top: 2%; fill: #5f7046; animation-delay: -2.4s; }
.hearts .h3 { width: 36px; height: 36px; right: -30px; top: 46%; fill: #3f4d2e; animation-delay: -.4s; }
.hearts .h4 { width: 22px; height: 22px; right: -44px; top: 36%; fill: #77865f; animation-delay: -3.2s; }
.hearts .h5 { width: 30px; height: 30px; right: 10%; bottom: -18px; fill: #34401f; animation-delay: -1.8s; }
.hearts .h6 { width: 20px; height: 20px; left: 16%; bottom: -14px; fill: #5f7046; animation-delay: -4s; }
.hearts .h7 { width: 24px; height: 24px; right: -14px; top: 66%; fill: #77865f; animation-delay: -2.8s; }
.hearts .h8 { width: 34px; height: 34px; left: -18px; bottom: 18%; fill: #34401f; animation-delay: -3.6s; }
@keyframes heartfloat { 0%, 100% { transform: translateY(0) rotate(-8deg) scale(1); } 50% { transform: translateY(-10px) rotate(8deg) scale(1.08); } }
@media (max-width: 719px) {
  .hearts .h1 { left: -24px; width: 32px; height: 32px; } .hearts .h3 { right: -18px; width: 30px; height: 30px; } .hearts .h4 { right: -26px; }
  .hearts .h8 { left: -12px; width: 28px; height: 28px; }
}
.ring {
  position: absolute; right: -36px; top: -30px; width: 140px; height: 140px;
  animation: spin 30s linear infinite;
}
.ring text { font: 700 12.5px var(--sans); letter-spacing: 1px; fill: var(--sage-dark); }
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute; left: 50%; bottom: 24px; z-index: 1; width: 26px; height: 42px; margin-left: -13px;
  border: 2px solid var(--sage); border-radius: 999px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--sage); animation: scrolldot 1.8s ease-in-out infinite;
}
@keyframes scrolldot { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Tablet: billede og tekst side om side, men tættere */
@media (max-width: 1023px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .ring { width: 110px; height: 110px; right: -16px; top: -24px; }
}
/* Mobil: billede øverst, centreret tekst */
@media (max-width: 719px) {
  .hero { min-height: 0; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 28px; padding-bottom: 72px; gap: 28px; }
  .hero-photo { order: -1; width: min(72vw, 300px); }
  .hero-photo::before { inset: 16px -16px -16px 16px; }
  .ring { width: 100px; height: 100px; right: -30px; top: -26px; }
  .kicker { transform-origin: center; }
  .hero-place, .hero-actions, .countdown { justify-content: center; }
  .hero-actions .btn { flex: 1 1 220px; }
  .answered { justify-content: center; }
  .countdown div { min-width: 0; flex: 1; }
  .scroll-hint { display: none; }
}

/* --- Bånd med løbende tekst ---------------------------------------------- */
.ribbon-wrap { overflow: hidden; margin-top: -14px; padding: 8px 0; position: relative; z-index: 2; }
.ribbon { overflow: hidden; background: var(--sage); color: #fff; padding: 12px 0; transform: rotate(-1deg); margin: 0 -10px; }
.ribbon-track { display: flex; gap: 28px; width: max-content; animation: marquee 40s linear infinite; font-weight: 700; font-size: .95rem; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Sektioner ----------------------------------------------------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: clamp(56px, 9vw, 104px) var(--gutter) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head p { margin: 0; }
.intro { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.intro .lead { font-family: var(--serif); font-size: clamp(1.35rem, 3vw, 1.75rem); line-height: 1.4; color: var(--ink); }

.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease) var(--delay, 0ms), transform .8s var(--ease) var(--delay, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* Hvor og hvornår */
.facts { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 16px; }
.fact {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.fact p { margin: 0 0 .25em; }
.fact h3 { margin-bottom: .3em; }
.fact-icon, .card-icon {
  width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--sage-dark);
}
.church { position: relative; margin: 0; min-height: 240px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sky-2); }
.church img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.church figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px;
  background: linear-gradient(transparent, rgba(28, 34, 30, .65)); color: #fff; font: 600 1.25rem var(--serif);
}
.church figcaption small { display: block; font: 400 .7rem var(--sans); opacity: .8; margin-top: 2px; }
.church figcaption a { color: inherit; }
@media (max-width: 1023px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .church { grid-column: 1 / -1; min-height: 280px; }
}
@media (max-width: 559px) {
  .facts { grid-template-columns: 1fr; }
  .fact { flex-direction: row; padding: 20px; }
}

/* Program-tidslinje */
.timeline { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 2px;
  background: repeating-linear-gradient(var(--sage) 0 6px, transparent 6px 12px); opacity: .5;
}
.timeline li { display: flex; gap: 20px; margin-bottom: 18px; position: relative; }
.tl-dot {
  width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); color: var(--sage-dark); border: 2px solid var(--sage-soft); box-shadow: var(--shadow-sm); z-index: 1;
}
.tl-card {
  flex: 1; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow-sm);
}
.tl-card h3 { margin-bottom: .15em; }
.tl-card p { margin: 0; color: var(--muted); }
.tl-time { font: 500 1.35rem/1 var(--hand); color: var(--sage-dark); }
/* Tablet og desktop: tidslinjen skifter side */
@media (min-width: 720px) {
  .timeline::before { left: 50%; margin-left: -1px; }
  .timeline li { width: 50%; padding-right: 48px; margin-left: 0; }
  .timeline li:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 48px; flex-direction: row-reverse; }
  .timeline li .tl-dot { position: absolute; right: -28px; top: 10px; }
  .timeline li:nth-child(even) .tl-dot { right: auto; left: -28px; }
  .timeline li:nth-child(odd) .tl-card { text-align: right; }
}

/* Praktisk info-kort */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s;
}
.cards .card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 1.6rem; }
.card-body p:last-child { margin-bottom: 0; }
.card-body em { color: var(--muted); }
@media (max-width: 719px) {
  .cards { grid-template-columns: 1fr; }
  .card { padding: 22px; }
}

.tab-list { display: flex; gap: 6px; padding: 5px; margin-bottom: 16px; background: var(--bg-2); border-radius: 999px; }
.tab-list [role=tab] {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: .4em .8em; border: 0; border-radius: 999px; background: transparent;
  font-weight: 700; font-size: .9rem; color: var(--muted); cursor: pointer; transition: all .2s;
}
.tab-list [role=tab][aria-selected=true] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
[role=tabpanel] { animation: fadein .35s var(--ease); }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

/* Galleri */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery figure:nth-child(even) { margin-top: 40px; }
.photo {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; background: none;
  border-radius: 18px; overflow: hidden; box-shadow: var(--shadow);
}
.photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .6s var(--ease); }
.photo:hover img { transform: scale(1.05); }
.gallery figcaption { text-align: center; font: 500 1.35rem var(--hand); color: var(--muted); margin-top: 8px; }
.gallery figure:nth-child(4n+1) .photo { transform: rotate(-1.5deg); }
.gallery figure:nth-child(4n+3) .photo { transform: rotate(1.5deg); }
@media (max-width: 1023px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(28, 34, 30, .92); opacity: 0; transition: opacity .25s;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
}
.lightbox.open { opacity: 1; }
.lightbox figure { margin: 0; text-align: center; max-width: min(92vw, 720px); }
.lightbox img { max-height: 80vh; max-height: 80svh; width: auto; margin: 0 auto; border-radius: 14px; box-shadow: var(--shadow-lg); transform: scale(.96); transition: transform .3s var(--ease); }
.lightbox.open img { transform: none; }
.lightbox figcaption { color: #fff; font: 500 1.6rem var(--hand); margin-top: 10px; }
.lightbox button {
  position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; transition: background .2s;
}
.lightbox button:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -24px; }
.lb-next { right: 16px; top: 50%; margin-top: -24px; }
@media (max-width: 719px) {
  .lightbox figure { padding-bottom: 64px; }
  .lightbox img { max-height: calc(100svh - 160px); }
  .lb-prev, .lb-next { top: auto; bottom: max(20px, env(safe-area-inset-bottom)); margin: 0; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}

/* Tilmeld-felt nederst */
.wish {
  max-width: 720px; margin: 0 auto; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 5vw, 56px); box-shadow: var(--shadow-sm);
}
.wish-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--sage-dark); transform: rotate(-6deg);
}
.wish .lead { margin-bottom: 1.4em; }
.wish-note { margin: 1em 0 0; font-style: italic; }
.cta { max-width: var(--max); margin: clamp(64px, 10vw, 112px) auto 0; padding: 0 var(--gutter); }
.cta-inner {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  background: radial-gradient(600px 300px at 90% 0%, rgba(255,255,255,.18), transparent 60%), var(--sage);
  border-radius: 32px; padding: clamp(40px, 7vw, 72px) var(--gutter);
}
.cta-inner h2 { color: #fff; }
.cta-inner p { opacity: .9; margin-bottom: 1.5em; }
.cta-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 4px solid rgba(255,255,255,.6); }

/* Flydende tilmeld-knap på mobil */
.fab {
  position: fixed; z-index: 40; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 8px; padding: .85em 1.5em; border-radius: 999px;
  background: var(--sage); color: #fff; font-weight: 700; text-decoration: none; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 140%); transition: transform .4s var(--ease);
}
.fab.show { transform: translate(-50%, 0); }
@media (max-width: 719px) { .fab { display: inline-flex; } }

/* Footer */
.footer { text-align: center; color: var(--muted); font-size: .9rem; padding: 64px var(--gutter) max(48px, calc(env(safe-area-inset-bottom) + 80px)); }
.footer-icon { color: var(--sage); display: inline-block; margin-bottom: 6px; }
.footer-title { font: 600 1.5rem var(--serif); color: var(--ink); margin-bottom: .2em; }
.footer p { margin: 0 0 .4em; }

/* --- Login --------------------------------------------------------------- */
.page-login { background: linear-gradient(var(--sky-2), var(--bg)); }
.login-wrap { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 24px var(--gutter); }
.login-card {
  position: relative; z-index: 1; width: 100%; max-width: 440px; text-align: center;
  background: rgba(255, 253, 249, .92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 32px; padding: 48px 28px 32px; box-shadow: var(--shadow-lg);
  animation: rise .8s var(--ease) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.login-card .lang { position: absolute; top: 14px; right: 14px; }
.login-card h1 { font-size: clamp(2.4rem, 9vw, 3rem); margin-bottom: .1em; }
.login-card .hero-date { font-size: 1.5rem; margin-bottom: .8em; }
.login-form { display: flex; gap: 8px; margin-top: 18px; }
.login-form input { flex: 1; min-width: 0; text-align: center; letter-spacing: .08em; }
@media (max-width: 400px) { .login-form { flex-direction: column; } }
.shake { animation: shake .45s; border-color: var(--warn) !important; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* --- Formularer ---------------------------------------------------------- */
input, textarea {
  width: 100%; min-height: 50px; font: inherit; font-size: 16px; /* 16px undgår zoom på iPhone */
  color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: .7em 1em;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, textarea:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 4px var(--sage-soft); }
input::placeholder, textarea::placeholder { color: #a5aaa3; }

.form-page { max-width: 680px; margin: 0 auto; padding: 32px var(--gutter) 0; }
.form-head { text-align: center; margin-bottom: 28px; }
.form-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; border: 4px solid var(--paper); box-shadow: var(--shadow); }
.form-head h1 { font-size: clamp(2.6rem, 8vw, 3.6rem); }
.panel {
  margin: 0 0 16px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow-sm); min-width: 0;
}
.panel.has-error { border-color: var(--warn); }
.panel-step { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin-bottom: 16px; padding: 0; font: 600 1.5rem var(--serif); }
.panel-step + * { clear: both; }
.panel-step > span:first-child {
  width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage); color: #fff; font: 700 .85rem var(--sans);
}
.panel-step .count { font: italic 500 1.1rem var(--serif); color: var(--muted); }
.field { margin: 0 0 18px; }
.field:last-child { margin-bottom: 0; }
.field > label { display: block; font-weight: 700; margin-bottom: 6px; }
.field.has-error input { border-color: var(--warn); }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; clear: both; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-box {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; height: 100%;
  padding: 20px 14px; border-radius: 18px; border: 2px solid var(--line); background: #fff;
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.choice-emoji { font-size: 2rem; line-height: 1.2; transition: transform .3s var(--ease); }
.choice small { color: var(--muted); }
.choice:hover .choice-box { border-color: var(--sage); }
.choice input:checked + .choice-box { border-color: var(--sage); background: var(--sage-soft); transform: translateY(-2px); }
.choice input:checked + .choice-box .choice-emoji { transform: scale(1.2) rotate(-6deg); }
.choice-no input:checked + .choice-box { border-color: #c9a08b; background: #f8ebe3; }
.choice input:focus-visible + .choice-box { box-shadow: 0 0 0 4px var(--sage-soft); }
@media (max-width: 479px) { .choices { grid-template-columns: 1fr; } .choice-box { flex-direction: row; text-align: left; gap: 12px; padding: 16px; } .choice-box small { display: none; } .choice-emoji { font-size: 1.6rem; } }

.guests .muted { clear: both; }
.rsvp .if-no { display: none; }
.rsvp.is-no .if-no { display: inline; }
.rsvp.is-no .if-yes { display: none; }
/* Ved afbud: kun navne, ingen allergier eller valg */
.rsvp.is-no .guest-fields { grid-template-columns: 1fr; }
.rsvp.is-no .guest-fields .mini:nth-child(2), .rsvp.is-no .guest-opts { display: none; }
.guests.has-error { border-color: var(--warn); }
.guest {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start;
  padding: 16px; margin-bottom: 12px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line);
}
.guest.new { animation: fadein .35s var(--ease); }
.guest-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-dark); margin-top: 22px; }
.guest-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; }
.mini span { display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.guest-opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.remove {
  width: 40px; height: 40px; margin-top: 22px; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--muted); transition: all .2s;
}
.remove:hover { background: #f6e1d6; color: var(--warn); }
@media (max-width: 559px) {
  .guest { grid-template-columns: 1fr auto; padding: 14px; }
  .guest-avatar { display: none; }
  .guest-fields { grid-template-columns: 1fr; }
  .remove { margin-top: 18px; }
}

/* Kontakt-knap (toggle) */
.toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle span { position: relative; width: 42px; height: 24px; flex: none; border-radius: 999px; background: #d9d4c8; transition: background .2s; }
.toggle span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .25s var(--ease);
}
.toggle input:checked + span { background: var(--sage); }
.toggle input:checked + span::after { transform: translateX(18px); }
.toggle input:focus-visible + span { box-shadow: 0 0 0 4px var(--sage-soft); }

.add-guest {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 52px;
  border: 2px dashed var(--sage); border-radius: 18px; background: transparent; color: var(--sage-dark);
  font-weight: 700; cursor: pointer; transition: background .2s;
}
.add-guest:hover { background: var(--sage-soft); }

.submit-bar { position: sticky; bottom: 0; z-index: 5; padding: 12px 0 max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 35%); }

/* --- Tak-side ------------------------------------------------------------ */
.thanks { position: relative; display: grid; place-items: center; min-height: calc(100svh - 160px); padding: 32px var(--gutter); }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.thanks-card { max-width: 580px; text-align: center; }
.thanks-photo { position: relative; width: 220px; height: 220px; margin: 0 auto 28px; }
.thanks-photo img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  border: 8px solid var(--paper); box-shadow: 0 0 0 3px var(--sage-soft), var(--shadow-lg);
  animation: pop .7s cubic-bezier(.2, 1.6, .4, 1) both;
}
.thanks.no .thanks-photo img { box-shadow: 0 0 0 3px var(--sky), var(--shadow-lg); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.zzz { position: absolute; right: -4px; top: 0; font: 700 1.8rem var(--hand); color: var(--sage-dark); }
.zzz i { position: absolute; font-style: normal; opacity: 0; animation: zzz 3s ease-in-out infinite; }
.zzz i:nth-child(2) { animation-delay: 1s; font-size: 1.4rem; }
.zzz i:nth-child(3) { animation-delay: 2s; font-size: 1.1rem; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 10px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(24px, -40px); } }
.thanks h1 { font-size: clamp(2.4rem, 8vw, 3.8rem); }
.thanks-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 28px 0; }
.edit-link { padding: 18px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); }
.copy-row { display: flex; gap: 8px; }
.copy-row input { min-height: 40px; font-size: .85rem; padding: .4em .8em; background: var(--bg); }

/* --- Admin --------------------------------------------------------------- */
.admin { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 0; }
.admin-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.admin-head h1 { font-size: clamp(2.4rem, 6vw, 3.4rem); margin: 0; }
.admin .card { margin-bottom: 16px; }
.admin .card h2 { font-size: 1.6rem; }
.stats { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font: 700 2.4rem/1 var(--serif); }
.stat span { color: var(--muted); font-size: .88rem; font-weight: 600; }
.stat.big { background: var(--sage); color: #fff; border-color: var(--sage); }
.stat.big b { font-size: 3.4rem; }
.stat.big span, .stat.big small { color: rgba(255,255,255,.9); }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.3); margin: 12px 0 6px; overflow: hidden; }
.bar i { display: block; height: 100%; background: #fff; border-radius: 3px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.allergy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.card-title-row h2 { margin: 0; }
.filter { display: inline-flex; padding: 4px; background: var(--bg-2); border-radius: 999px; }
.filter button { border: 0; background: transparent; padding: .45em 1em; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--muted); cursor: pointer; min-height: 36px; }
.filter button.on { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-sm); }
.responses { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.response { border: 1px solid var(--line); border-left: 4px solid var(--sage); border-radius: 16px; padding: 16px; background: var(--bg); }
.response.is-no { border-left-color: #c9a08b; opacity: .85; }
.response header { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.response header strong { font-size: 1.05rem; margin-right: 4px; }
.response p { margin: 0 0 6px; }
.response blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--line); font-style: italic; color: var(--muted); font-size: .92rem; }
.guest-chips { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 4px; font-size: .95rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15em .7em; border-radius: 999px; vertical-align: 2px; }
.pill-yes { background: var(--sage-soft); color: var(--sage-dark); }
.pill-no { background: #f6e1d6; color: var(--warn); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; background: var(--sky); color: var(--ink); padding: .1em .6em; border-radius: 999px; vertical-align: 1px; }
.tag.sat { background: #ece3f3; }
.tag.warn { background: #f6e1d6; color: var(--warn); }
@media (max-width: 1023px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat.big { grid-column: 1 / -1; }
}
@media (max-width: 719px) {
  .admin-grid { grid-template-columns: 1fr; }
  .responses { grid-template-columns: 1fr; }
}

/* --- Mindre bevægelse ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .flyer, .cloud { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Smalle telefoner: hold navnet i toppen på én linje */
@media (max-width: 400px) {
  .topbar { gap: 8px; }
  .brand { font-size: 1.12rem; gap: 6px; }
  .brand-mark svg { width: 22px; height: 22px; }
  .lang a { min-width: 34px; padding: .35em .55em; }
}
