/* ============================================================
   Voor Arianna — stijl (v2, premium editie)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Inter:wght@400;500;600&display=swap');

:root {
  --rose: #b45c74;
  --rose-deep: #7a3348;
  --blush: #f4e1e2;
  --cream: #fbf5ee;
  --cream-2: #f6ebdf;
  --gold: #c6a05a;
  --gold-soft: #e7d3a6;
  --ink: #3a2530;
  --ink-soft: #7d6470;
  --paper: #fffbf5;
  --shadow: 0 25px 55px -25px rgba(122, 51, 72, 0.5);
  --shadow-soft: 0 14px 30px -18px rgba(122, 51, 72, 0.4);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100svh;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  position: relative;
}

::selection { background: var(--blush); color: var(--rose-deep); }

/* ---------- animated background ---------- */

.bg-scene {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 12% 18%, rgba(244, 225, 226, 0.9) 0%, transparent 42%),
    radial-gradient(circle at 88% 12%, rgba(231, 211, 166, 0.55) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(244, 225, 226, 0.85) 0%, transparent 52%),
    linear-gradient(165deg, #fbf5ee 0%, #f8efe6 45%, #f4e6e6 100%);
  background-size: 180% 180%, 160% 160%, 180% 180%, 100% 100%;
  animation: drift 24s ease-in-out infinite alternate;
}

.bg-scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(120deg, rgba(122, 51, 72, 0.015) 0px, transparent 2px, transparent 4px);
  mix-blend-mode: multiply;
}

@keyframes drift {
  0%   { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; }
  100% { background-position: 30% 30%, 65% 25%, 42% 68%, 0 0; }
}

.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -10%;
  font-size: 1rem;
  color: var(--rose);
  opacity: 0.4;
  animation-name: float-up;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.particle.gold { color: var(--gold); }

@keyframes float-up {
  0%   { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.28; }
  100% { transform: translate3d(var(--drift, 20px), -115vh, 0) rotate(180deg); opacity: 0; }
}

/* ---------- nav ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 3.5vw, 1.5rem);
  padding: 1.1rem 1rem 0.9rem;
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(251, 245, 238, 0.94), rgba(251, 245, 238, 0.5));
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--gold-soft), var(--gold));
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px -6px rgba(198, 160, 90, 0.7);
  flex-shrink: 0;
}

.topnav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  position: relative;
  transition: color 0.25s ease, transform 0.25s ease;
}

.topnav a:hover,
.topnav a:focus-visible { color: var(--rose-deep); transform: translateY(-1px); }

.topnav a.active { color: var(--rose-deep); font-weight: 600; }

.topnav a.active::after {
  content: '';
  position: absolute;
  left: 1.05rem;
  right: 1.05rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--rose), var(--gold));
}

main { position: relative; z-index: 1; }

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: clamp(1.5rem, 6vw, 3.25rem) 1.25rem 0.4rem;
}

.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0;
  animation: rise-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0s forwards;
}

.hero .eyebrow::before,
.hero .eyebrow::after {
  content: '';
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.hero .eyebrow::after { background: linear-gradient(90deg, var(--gold), transparent); }

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(2.4rem, 8.5vw, 3.9rem);
  margin: 0.35rem 0 0;
  color: var(--rose-deep);
  text-shadow: 0 8px 32px rgba(122, 51, 72, 0.18);
  opacity: 0;
  transform: translateY(18px);
  animation: rise-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.hero .flourish {
  display: block;
  width: 96px;
  height: 14px;
  margin: 0.35rem auto 0;
  opacity: 0;
  animation: rise-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.hero p.sub {
  margin: 0.6rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.9rem, 2.4vw, 1rem);
  opacity: 0;
  animation: rise-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.42s forwards;
}

@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 3D envelope ---------- */

.envelope-stage {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 6vw, 3rem) 1rem clamp(2.5rem, 7vw, 4rem);
  perspective: 1700px;
}

.envelope {
  position: relative;
  width: min(340px, 82vw);
  aspect-ratio: 3 / 2;
  cursor: pointer;
  transform-style: preserve-3d;
  filter: drop-shadow(0 30px 40px rgba(122, 51, 72, 0.32));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope:hover { transform: translateY(-5px) scale(1.015); }

.envelope .shelf {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -10%;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(122, 51, 72, 0.22), transparent 75%);
  filter: blur(2px);
}

.envelope .body {
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, #fffdfa 0%, #fff5f4 55%, #f8e9e6 100%);
  border-radius: 14px;
  border: 1px solid rgba(122, 51, 72, 0.15);
  overflow: hidden;
}

.envelope .pocket-shadow {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 49.3%, rgba(122, 51, 72, 0.12) 50%, transparent 50.7%),
    linear-gradient(-135deg, transparent 49.3%, rgba(122, 51, 72, 0.12) 50%, transparent 50.7%);
}

.envelope .seal {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 32% 28%, #c96e86, var(--rose-deep) 70%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbe9ec;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.55rem;
  box-shadow:
    0 10px 18px -6px rgba(122, 51, 72, 0.65),
    inset 0 2px 3px rgba(255, 255, 255, 0.35),
    inset 0 -3px 6px rgba(0, 0, 0, 0.25);
  z-index: 4;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.envelope .flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 55%;
  background: linear-gradient(155deg, #f4d9dc, #ecc0c6);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 3;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.envelope .flap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.35), transparent 55%);
}

.envelope .letter-card {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 6%;
  top: 34%;
  background: var(--paper);
  border-radius: 10px;
  box-shadow: 0 -10px 22px -14px rgba(122, 51, 72, 0.35);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  font-family: 'Dancing Script', cursive;
  color: var(--rose-deep);
  font-size: 1.4rem;
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.35, 1) 0.1s;
}

.envelope .hint {
  position: absolute;
  bottom: -2.2rem;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.envelope.open .flap { transform: rotateX(-178deg); }
.envelope.open .seal { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
.envelope.open .letter-card { transform: translateY(-18%) scale(1.04); }
.envelope.open .hint { display: none; }

/* ---------- letter ---------- */

.letter {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem clamp(2rem, 6vw, 4rem);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.letter.visible { opacity: 1; transform: translateY(0); }

.letter-paper {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 6vw, 3.5rem) clamp(1.5rem, 5vw, 3.25rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(122, 51, 72, 0.1);
  position: relative;
}

.letter-paper::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid var(--gold-soft);
  opacity: 0.55;
  border-radius: calc(var(--radius) - 10px);
  pointer-events: none;
}

.letter-paper .corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid var(--gold);
  opacity: 0.6;
}
.letter-paper .corner.tl { top: 16px; left: 16px; border-right: none; border-bottom: none; }
.letter-paper .corner.br { bottom: 16px; right: 16px; border-left: none; border-top: none; }

.letter-paper p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.04rem, 2.6vw, 1.2rem);
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 1.15rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.letter-paper p.in-view { opacity: 1; transform: translateY(0); }
.letter-paper p:last-of-type { margin-bottom: 0; }

.letter-paper p.signature {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  color: var(--rose-deep);
  margin-top: 1.6rem;
  line-height: 1.4;
}

.updated {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 1.85rem;
  opacity: 0.75;
  letter-spacing: 0.02em;
}

.empty {
  text-align: center;
  color: var(--ink-soft);
  font-style: italic;
  font-family: 'Playfair Display', serif;
}

/* ---------- teaser strip naar fotos ---------- */

.teaser {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.25rem clamp(2.5rem, 7vw, 4.5rem);
  text-align: center;
}

.teaser a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--rose-deep);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--gold-soft);
  background: rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.teaser a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  background: #fff;
}

/* ---------- fotos ---------- */

.gallery-section {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.1rem clamp(2rem, 6vw, 4rem);
}

.gallery-count {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: -0.5rem 0 1.5rem;
}

.gallery {
  columns: 2 145px;
  column-gap: clamp(0.6rem, 2vw, 1.1rem);
  perspective: 1200px;
}

@media (min-width: 560px) {
  .gallery { columns: 3 190px; }
}

@media (min-width: 900px) {
  .gallery { columns: 4 210px; }
}

.gallery figure {
  margin: 0 0 clamp(0.6rem, 2vw, 1.1rem);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  break-inside: avoid;
  box-shadow: var(--shadow-soft);
  transform-style: preserve-3d;
  transition: transform 0.15s ease, box-shadow 0.35s ease;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  animation: pop-in 0.75s ease forwards;
  background: var(--paper);
}

@keyframes pop-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gallery figure:hover { box-shadow: var(--shadow); }

.gallery figure a {
  display: block;
  line-height: 0;
}

.gallery figure img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
  cursor: zoom-in;
}

.gallery figure:hover img,
.gallery figure:active img { transform: scale(1.06); }

.gallery figure .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(255, 255, 255, 0.28), transparent 45%);
  pointer-events: none;
}

.gallery figure .zoom-hint {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(58, 37, 48, 0.45);
  backdrop-filter: blur(3px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.gallery figure:hover .zoom-hint { opacity: 1; transform: translateY(0); }

/* lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(58, 37, 48, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox .frame {
  position: relative;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.lightbox.open img { transform: scale(1); opacity: 1; }

.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }

.lightbox-close {
  top: -1.5rem;
  right: -0.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.3rem;
  transform: translateY(-100%);
}

.lightbox-nav {
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.3rem;
  transform: translateY(-50%);
}

.lightbox-nav.prev { left: -1.2rem; }
.lightbox-nav.next { right: -1.2rem; }

.lightbox-counter {
  position: absolute;
  bottom: -2.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .lightbox-close { top: -0.2rem; right: 0.2rem; transform: none; }
  .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-nav.prev { left: 0.2rem; }
  .lightbox-nav.next { right: 0.2rem; }
}

/* ---------- footer ---------- */

footer {
  text-align: center;
  padding: 1.5rem 1rem 2.75rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
}

footer .beat {
  display: inline-block;
  color: var(--rose);
  animation: beat 1.2s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.25); }
  40% { transform: scale(1); }
}

/* ---------- 404 ---------- */

.notfound { text-align: center; padding: 4rem 1.5rem; }

.notfound h1 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--rose-deep);
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.notfound a { color: var(--rose); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
