/* ══ Terrazzo Speckle — cream · charcoal-brown · terracotta ══
   Prefix: tz- · Fonts: Gabarito (display) · Schibsted Grotesk (body) */

:root {
  --tz-bg: #FAFAF8;
  --tz-bg-2: #F0EEE8;
  --tz-ink: #35291E;
  --tz-body: #5C4F42;
  --tz-accent: #C96F4A;
  --tz-pink: #E8A79B;
  --tz-sage: #A8B89A;
  --tz-ochre: #DFC27E;
  --tz-slate: #8CA3B5;
  --tz-card: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  color: var(--tz-body); -webkit-font-smoothing: antialiased;
  background-color: var(--tz-bg);
}
body:not(.is-open) { overflow: hidden; }

/* decorative speckled desktop backdrop outside the frame */
@media (min-width: 520px) {
  body { background-image:
    radial-gradient(circle 5px at 12% 18%, var(--tz-accent) 97%, transparent),
    radial-gradient(circle 4px at 28% 64%, var(--tz-pink) 97%, transparent),
    radial-gradient(circle 6px at 82% 26%, var(--tz-sage) 97%, transparent),
    radial-gradient(circle 3px at 66% 78%, var(--tz-slate) 97%, transparent),
    radial-gradient(circle 5px at 90% 62%, var(--tz-ochre) 97%, transparent),
    radial-gradient(circle 3px at 44% 34%, var(--tz-pink) 97%, transparent),
    radial-gradient(circle 4px at 8% 84%, var(--tz-ochre) 97%, transparent);
  }
}

.tz-page {
  max-width: 480px; margin: 0 auto; background: var(--tz-bg);
  box-shadow: 0 0 60px rgba(53,41,30,.22); position: relative; overflow-x: clip;
}

/* ── cover: chip field scatters away ── */
.tz-cover {
  position: fixed; inset: 0; z-index: 100; max-width: 480px; margin: 0 auto;
  background: linear-gradient(180deg, var(--tz-bg) 55%, var(--tz-bg-2));
  display: grid; place-items: center; padding: 24px;
  transition: visibility 0s 1.15s;
}
.tz-chip-field { position: absolute; inset: 0; overflow: hidden; }
.tz-chip { position: absolute; animation: tz-drift 7s ease-in-out infinite alternate; }
.tz-chip svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(53,41,30,.14)); }
@keyframes tz-drift { from { translate: 0 0; } to { translate: 6px -9px; } }

.tz-p1 { top: 9%; left: 8%; width: 52px; height: 52px; }
.tz-p2 { top: 6%; right: 10%; width: 40px; height: 40px; animation-delay: .8s; }
.tz-p3 { bottom: 12%; left: 6%; width: 46px; height: 46px; animation-delay: 1.6s; }
.tz-p4 { bottom: 7%; right: 8%; width: 56px; height: 56px; animation-delay: .4s; }
.tz-p5 { top: 30%; left: 3%; width: 34px; height: 34px; animation-delay: 2.2s; }
.tz-p6 { bottom: 32%; right: 4%; width: 38px; height: 38px; animation-delay: 1.1s; }
.tz-p7 { top: 48%; left: 11%; width: 28px; height: 28px; animation-delay: 2.8s; }
.tz-p8 { top: 44%; right: 12%; width: 30px; height: 30px; animation-delay: 1.9s; }
.tz-p9 { top: 68%; left: 20%; width: 26px; height: 26px; animation-delay: 3.2s; }
.tz-p10 { top: 20%; right: 26%; width: 24px; height: 24px; animation-delay: 2.5s; }
.tz-p11 { top: 80%; right: 24%; width: 32px; height: 32px; animation-delay: .7s; }
.tz-p12 { top: 15%; left: 27%; width: 22px; height: 22px; animation-delay: 3.5s; }
.tz-p13 { bottom: 22%; left: 36%; width: 20px; height: 20px; animation-delay: 1.4s; }
.tz-p14 { top: 58%; right: 30%; width: 18px; height: 18px; animation-delay: 2.1s; }
.tz-p15 { top: 36%; left: 42%; width: 16px; height: 16px; animation-delay: 3s; }
.tz-p16 { bottom: 45%; left: 30%; width: 17px; height: 17px; animation-delay: 1.7s; }
.tz-dot { width: 10px; height: 10px; border-radius: 50%; }
.tz-d1 { top: 25%; left: 18%; background: var(--tz-pink); }
.tz-d2 { top: 74%; right: 15%; background: var(--tz-slate); }
.tz-d3 { top: 12%; right: 38%; background: var(--tz-ochre); }
.tz-d4 { bottom: 18%; left: 22%; background: var(--tz-sage); }
.tz-d5 { top: 52%; left: 6%; background: var(--tz-accent); }
.tz-d6 { bottom: 40%; right: 8%; background: var(--tz-pink); }

/* scatter: each chip flies outward with its own vector + spin */
body.is-open .tz-chip {
  animation: tz-scatter .95s cubic-bezier(.45,0,.7,.35) forwards,
             tz-drift 7s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s), 0s;
}
.tz-chip:nth-of-type(odd) { --d: .04s; }
.tz-chip:nth-of-type(3n) { --d: .12s; }
.tz-chip:nth-of-type(4n) { --d: .2s; }
@keyframes tz-scatter {
  40% { opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) rotate(var(--rr)) scale(.6); opacity: 0; }
}
.tz-cover-card {
  position: relative; text-align: center; max-width: 340px; width: 100%;
  background: var(--tz-card); border-radius: 28px; padding: 40px 26px 34px;
  box-shadow: 0 18px 50px -18px rgba(53,41,30,.35);
  transition: opacity .5s ease, transform .5s ease;
}
body.is-open .tz-cover-card { opacity: 0; transform: scale(.92) translateY(-14px); }
body.is-open [data-cover] { pointer-events: none; visibility: hidden; }

.tz-corner { position: absolute; width: 54px; height: 54px; }
.tz-corner-tl { top: -14px; left: -14px; transform: rotate(-12deg); }
.tz-corner-br { bottom: -14px; right: -14px; transform: rotate(168deg); }
.tz-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--tz-accent); }
.tz-cover-names { font-family: "Gabarito", sans-serif; font-weight: 800; font-size: 42px; line-height: 1.05; color: var(--tz-ink); margin-top: 12px; }
.tz-cover-names span { display: block; font-size: 20px; color: var(--tz-accent); margin: 4px 0; }
.tz-cover-date { margin-top: 8px; font-size: 14px; font-weight: 600; letter-spacing: .06em; color: var(--tz-body); }
.tz-cover-guest { margin: 26px 0 22px; font-size: 12.5px; color: var(--tz-body); }
.tz-guest-name { font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 19px; color: var(--tz-ink); margin-top: 4px; }
.tz-open-btn {
  appearance: none; cursor: pointer; border: none; border-radius: 999px;
  background: var(--tz-accent); color: #FFFFFF;
  font-family: "Gabarito", sans-serif; font-size: 14px; font-weight: 700; letter-spacing: .08em;
  padding: 14px 36px; box-shadow: 0 10px 22px -10px rgba(201,111,74,.8);
  transition: transform .2s ease, background .2s ease;
}
.tz-open-btn:hover { background: var(--tz-ink); transform: translateY(-2px); }
.tz-cover-note { margin-top: 16px; font-size: 11.5px; font-style: italic; color: #98897A; }

/* ── speckle strip divider ── */
.tz-strip {
  height: 22px; margin: 0 auto; max-width: 420px; border-radius: 999px;
  background-image:
    radial-gradient(circle 4px at 12px 11px, var(--tz-accent) 96%, transparent),
    radial-gradient(circle 3px at 34px 6px, var(--tz-pink) 96%, transparent),
    radial-gradient(circle 5px at 52px 15px, var(--tz-sage) 96%, transparent),
    radial-gradient(circle 3px at 74px 8px, var(--tz-slate) 96%, transparent),
    radial-gradient(circle 4px at 94px 13px, var(--tz-ochre) 96%, transparent);
  background-size: 106px 22px; background-repeat: repeat-x;
  opacity: .9;
}

/* ── hero ── */
.tz-hero { text-align: center; padding: 56px 24px 44px; }
.tz-hero-kicker { font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--tz-accent); }
.tz-hero-names { font-family: "Gabarito", sans-serif; font-weight: 800; font-size: 44px; line-height: 1.08; color: var(--tz-ink); margin-top: 12px; }
.tz-hero-names span { color: var(--tz-accent); }
.tz-hero-lede { margin: 16px auto 0; font-size: 14px; line-height: 1.7; max-width: 32ch; }
.tz-hero-date { margin-top: 12px; font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 16px; color: var(--tz-ink); letter-spacing: .04em; }
.tz-cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 330px; margin: 26px auto 0; }
.tz-cd-cell {
  background: var(--tz-card); border-radius: 16px; padding: 12px 4px 10px;
  box-shadow: 0 6px 16px -10px rgba(53,41,30,.35); position: relative;
}
.tz-cd-cell::after { content: ""; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--tz-pink); }
.tz-cd-cell:nth-child(2)::after { background: var(--tz-sage); }
.tz-cd-cell:nth-child(3)::after { background: var(--tz-ochre); }
.tz-cd-cell:nth-child(4)::after { background: var(--tz-slate); }
.tz-cd-cell b { display: block; font-family: "Gabarito", sans-serif; font-weight: 800; font-size: 23px; color: var(--tz-ink); font-variant-numeric: tabular-nums; }
.tz-cd-cell span { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--tz-accent); }

/* ── sections ── */
.tz-sec { padding: 48px 22px; }
.tz-head { text-align: center; margin-bottom: 28px; }
.tz-head-mark { width: 46px; height: 46px; margin-bottom: 4px; }
.tz-title { font-family: "Gabarito", sans-serif; font-weight: 800; font-size: 26px; color: var(--tz-ink); }
.tz-sub { margin-top: 5px; font-size: 12.5px; font-style: italic; color: #98897A; }
.tz-note { text-align: center; font-size: 13px; line-height: 1.65; max-width: 34ch; margin: 0 auto 22px; }

/* ── couple: arch windows with chip borders ── */
.tz-person {
  background: var(--tz-card); border-radius: 24px; padding: 28px 20px 24px;
  text-align: center; max-width: 330px; margin: 0 0 18px;
  box-shadow: 0 12px 30px -18px rgba(53,41,30,.4); position: relative;
}
.tz-person:first-of-type { margin-right: auto; }
.tz-person:nth-of-type(2) { margin-left: auto; }
.tz-person::after {
  content: ""; position: absolute; inset: 8px; border-radius: 18px; pointer-events: none;
  border: 1.5px dashed rgba(201,111,74,.4);
}
.tz-arch {
  width: 104px; height: 128px; margin: 0 auto 14px; border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg, var(--tz-bg-2), var(--tz-pink));
  display: grid; place-items: center; position: relative;
  box-shadow: inset 0 0 0 4px var(--tz-card), 0 0 0 1.5px var(--tz-accent);
}
.tz-mono { font-family: "Gabarito", sans-serif; font-weight: 800; font-size: 34px; color: var(--tz-ink); }
.tz-arch-chip { position: absolute; width: 34px; height: 34px; }
.tz-arch-chip-l { left: -18px; bottom: -8px; transform: rotate(-18deg); }
.tz-arch-chip-r { right: -16px; top: 14px; transform: rotate(150deg); }
.tz-person-name { font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 21px; color: var(--tz-ink); }
.tz-person-parents { margin-top: 7px; font-size: 13px; line-height: 1.6; }
.tz-person-ig { margin-top: 5px; font-size: 12px; font-weight: 600; color: var(--tz-accent); }

/* ── events ── */
.tz-events { background: linear-gradient(180deg, var(--tz-bg-2), var(--tz-bg)); }
.tz-event {
  background: var(--tz-card); border-radius: 22px; padding: 22px 20px;
  margin-bottom: 14px; box-shadow: 0 12px 28px -18px rgba(53,41,30,.4); position: relative;
}
.tz-event::before {
  content: ""; position: absolute; top: 16px; right: 16px; width: 30px; height: 30px;
  border-radius: 60% 40% 55% 45%;
}
.tz-event:first-of-type::before { background: var(--tz-pink); }
.tz-event:last-of-type::before { background: var(--tz-slate); }
.tz-event-tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tz-accent); background: rgba(201,111,74,.12); border-radius: 999px; padding: 4px 12px; }
.tz-event-title { font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 22px; color: var(--tz-ink); margin-top: 10px; }
.tz-event-time { font-size: 13.5px; font-weight: 600; color: var(--tz-accent); margin-top: 3px; }
.tz-event-venue { font-size: 14.5px; font-weight: 600; color: var(--tz-ink); margin-top: 9px; }
.tz-event-addr { font-size: 12.5px; line-height: 1.55; margin-top: 2px; }
.tz-cal { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.tz-cal a { font-size: 12px; font-weight: 600; color: var(--tz-ink); text-decoration: none; border-bottom: 2px solid var(--tz-ochre); padding-bottom: 2px; }
.tz-map-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tz-map-tab {
  appearance: none; cursor: pointer; border: 1.5px solid var(--tz-ink); background: var(--tz-card);
  border-radius: 999px; padding: 9px 0; font-family: "Gabarito", sans-serif;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: var(--tz-ink);
  transition: background .2s ease, color .2s ease;
}
.tz-map-tab.is-active { background: var(--tz-ink); color: var(--tz-bg); }
.tz-map { display: block; width: 100%; height: 220px; border: none; border-radius: 18px; box-shadow: 0 12px 28px -18px rgba(53,41,30,.4); }
.tz-map-link { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 600; color: var(--tz-accent); text-decoration: none; }

/* ── story timeline with chip bullets ── */
.tz-story { list-style: none; display: grid; gap: 6px; }
.tz-story-item { position: relative; padding: 12px 0 16px 40px; border-bottom: 1.5px dashed #D9D8D1; }
.tz-story-item:last-child { border-bottom: none; }
.tz-story-chip { position: absolute; left: 2px; top: 15px; width: 20px; height: 20px; border-radius: 62% 38% 55% 45%; }
.tz-story-item:nth-child(1) .tz-story-chip { background: var(--tz-accent); }
.tz-story-item:nth-child(2) .tz-story-chip { background: var(--tz-pink); border-radius: 40% 60% 45% 55%; }
.tz-story-item:nth-child(3) .tz-story-chip { background: var(--tz-ochre); border-radius: 55% 45% 38% 62%; }
.tz-story-item:nth-child(4) .tz-story-chip { background: var(--tz-sage); border-radius: 45% 55% 60% 40%; }
.tz-story-year { font-family: "Gabarito", sans-serif; font-weight: 800; font-size: 13px; letter-spacing: .12em; color: var(--tz-accent); }
.tz-story-title { font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 17.5px; color: var(--tz-ink); margin-top: 2px; }
.tz-story-text { font-size: 13.5px; line-height: 1.65; margin-top: 4px; }

/* ── gallery: arch tiles ── */
.tz-gal { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tz-g-item {
  cursor: zoom-in; overflow: hidden; aspect-ratio: 4/5;
  border-radius: 999px 999px 20px 20px;
  box-shadow: 0 0 0 3px var(--tz-card), 0 12px 26px -16px rgba(53,41,30,.5);
  transition: transform .25s ease;
}
.tz-g-item:nth-child(even) { border-radius: 20px 20px 999px 999px; transform: translateY(14px); }
.tz-g-item:hover { transform: scale(1.03) rotate(-1deg); }
.tz-g-item svg { display: block; width: 100%; height: 100%; }
.tz-g-item { color: #C96F4A; }

/* ── forms ── */
.tz-form { display: grid; gap: 16px; }
.tz-field { display: grid; gap: 6px; border: none; }
.tz-field span, .tz-field legend { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--tz-ink); }
.tz-field input, .tz-field select, .tz-field textarea {
  font-family: "Schibsted Grotesk", sans-serif; font-size: 14.5px; color: var(--tz-ink);
  background: var(--tz-card); border: 1.5px solid #DDDCD6; border-radius: 14px;
  padding: 12px 14px; outline: none; width: 100%; transition: border-color .2s ease;
}
.tz-field input:focus, .tz-field select:focus, .tz-field textarea:focus { border-color: var(--tz-accent); }
.tz-radios label { display: flex; gap: 9px; align-items: center; font-size: 14px; padding: 5px 0; }
.tz-radios input { accent-color: var(--tz-accent); width: 16px; height: 16px; }
.tz-submit {
  justify-self: center; appearance: none; cursor: pointer; border: none; border-radius: 999px;
  background: var(--tz-ink); color: var(--tz-bg); font-family: "Gabarito", sans-serif;
  font-size: 13.5px; font-weight: 700; letter-spacing: .06em; padding: 13px 34px;
  transition: background .2s ease, transform .2s ease;
}
.tz-submit:hover { background: var(--tz-accent); transform: translateY(-2px); }
.tz-thanks { text-align: center; font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 16.5px; color: var(--tz-accent); padding: 22px 8px; }
.tz-wish-form { margin-bottom: 24px; }

/* ── wishes ── */
.tz-wishes { display: grid; gap: 10px; margin-bottom: 16px; }
[data-wishes-list] .wish {
  background: var(--tz-card); border-radius: 16px 16px 16px 4px; padding: 13px 16px 11px;
  box-shadow: 0 8px 18px -12px rgba(53,41,30,.35); position: relative;
}
[data-wishes-list] .wish::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 999px; background: var(--tz-pink); }
[data-wishes-list] .wish:nth-child(2n)::before { background: var(--tz-sage); }
[data-wishes-list] .wish:nth-child(3n)::before { background: var(--tz-ochre); }
[data-wishes-list] .wish h4 { font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 15px; color: var(--tz-ink); }
[data-wishes-list] .wish p { font-size: 13px; line-height: 1.6; margin-top: 3px; }
[data-wishes-list] .wish time { display: block; font-size: 10.5px; color: #98897A; margin-top: 6px; }
.tz-more {
  display: block; margin: 0 auto; appearance: none; cursor: pointer; background: none;
  border: 1.5px solid var(--tz-ink); border-radius: 999px; color: var(--tz-ink);
  font-family: "Gabarito", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 9px 22px;
}

/* ── amplop ── */
.tz-amplop { background: linear-gradient(180deg, var(--tz-bg-2), var(--tz-bg)); }
.tz-envs { display: grid; gap: 14px; }
.tz-env {
  background: var(--tz-ink); color: var(--tz-bg); border-radius: 22px;
  padding: 22px 18px 19px; text-align: center; position: relative; overflow: hidden;
}
.tz-env::before, .tz-env::after {
  content: ""; position: absolute; border-radius: 60% 40% 55% 45%; opacity: .35; pointer-events: none;
}
.tz-env::before { width: 46px; height: 46px; background: var(--tz-ochre); top: -14px; left: -12px; }
.tz-env::after { width: 38px; height: 38px; background: var(--tz-pink); bottom: -12px; right: -10px; border-radius: 45% 55% 40% 60%; }
.tz-env-name { font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--tz-ochre); }
.tz-env-num { font-family: "Gabarito", sans-serif; font-weight: 700; font-size: 24px; letter-spacing: .05em; margin-top: 7px; position: relative; }
.tz-env-holder { font-size: 12px; color: #C9BCAB; margin-top: 3px; position: relative; }
.tz-copy {
  margin-top: 13px; appearance: none; cursor: pointer; border: none; border-radius: 999px;
  background: var(--tz-accent); color: #FFFFFF; font-family: "Gabarito", sans-serif;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; padding: 9px 20px; position: relative;
  transition: background .2s ease;
}
.tz-copy:hover { background: var(--tz-ochre); color: var(--tz-ink); }

/* ── closing ── */
.tz-closing { background: var(--tz-ink); color: var(--tz-bg); text-align: center; padding: 52px 26px 30px; }
.tz-close-cluster { width: 56px; height: 56px; }
.tz-closing-text { font-size: 13px; line-height: 1.7; color: #C9BCAB; max-width: 32ch; margin: 16px auto 20px; }
.tz-closing-names { font-family: "Gabarito", sans-serif; font-weight: 800; font-size: 32px; }
.tz-closing-family { margin-top: 14px; font-size: 12.5px; letter-spacing: .1em; color: var(--tz-ochre); }

/* ── music toggle: visible only after open ── */
.tz-music {
  position: fixed; right: 18px; bottom: 22px; z-index: 90; width: 46px; height: 46px;
  border-radius: 50%; border: none; cursor: pointer; display: grid; place-items: center;
  background: var(--tz-accent); color: #FFFFFF; box-shadow: 0 10px 24px -10px rgba(201,111,74,.9);
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s;
}
body.is-open .tz-music { opacity: 1; visibility: visible; }
.tz-music svg { width: 20px; height: 20px; }
.tz-music.is-playing { animation: tz-pulse 2.4s ease infinite; }
@keyframes tz-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,111,74,.5);} 70% { box-shadow: 0 0 0 12px rgba(201,111,74,0);} }

/* ── reveal (behavior-critical) ── */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .75s ease, transform .75s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }
.tz-g-item[data-reveal]:nth-child(even) { transform: translateY(14px); }
.tz-g-item[data-reveal].revealed:nth-child(even) { transform: translateY(14px); }

/* ── lightbox restyle ── */
.lb-overlay { background: rgba(53,41,30,.9); backdrop-filter: blur(4px); font-family: "Schibsted Grotesk", sans-serif; }
.lb-stage { border-radius: 24px; overflow: hidden; box-shadow: 0 0 0 4px var(--tz-bg), 0 24px 60px rgba(0,0,0,.5); }
.lb-cap { color: var(--tz-bg); font-size: 13px; }
.lb-btn { background: var(--tz-accent); color: #FFFFFF; border: none; border-radius: 50%; }

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tz-chip, .tz-music.is-playing, .tz-open-btn, .tz-submit { animation: none !important; transition: none !important; }
  body.is-open .tz-chip { opacity: 0; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}