/* ==========================================================================
   Incwadi Yothando — a beaded love letter
   Weziwe & Banele · Umemulo, Umkhehlo & Umembeso · 13 February 2027
   Mobile-first stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   Generated motifs: static bead bands (the no-JS fallback and the door/letter
   trims), shield shapes and the suede texture. The bead-band patterns mirror
   PATTERNS in js/script.js, so change both together.
   -------------------------------------------------------------------------- */
:root {
  /* GENERATED:START */
  --band-zigzag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 9'%3E%3Cdefs%3E%3Crect id='b' width='0.84' height='0.84' rx='0.22'/%3E%3C/defs%3E%3Cg fill='%23141010'%3E%3Cuse href='%23b' x='0.08' y='0.08'/%3E%3Cuse href='%23b' x='1.08' y='0.08'/%3E%3Cuse href='%23b' x='2.08' y='0.08'/%3E%3Cuse href='%23b' x='3.08' y='0.08'/%3E%3Cuse href='%23b' x='4.08' y='0.08'/%3E%3Cuse href='%23b' x='5.08' y='0.08'/%3E%3Cuse href='%23b' x='6.08' y='0.08'/%3E%3Cuse href='%23b' x='7.08' y='0.08'/%3E%3Cuse href='%23b' x='4.08' y='1.08'/%3E%3Cuse href='%23b' x='3.08' y='2.08'/%3E%3Cuse href='%23b' x='5.08' y='2.08'/%3E%3Cuse href='%23b' x='2.08' y='3.08'/%3E%3Cuse href='%23b' x='6.08' y='3.08'/%3E%3Cuse href='%23b' x='1.08' y='4.08'/%3E%3Cuse href='%23b' x='7.08' y='4.08'/%3E%3Cuse href='%23b' x='0.08' y='5.08'/%3E%3Cuse href='%23b' x='0.08' y='8.08'/%3E%3Cuse href='%23b' x='1.08' y='8.08'/%3E%3Cuse href='%23b' x='2.08' y='8.08'/%3E%3Cuse href='%23b' x='3.08' y='8.08'/%3E%3Cuse href='%23b' x='4.08' y='8.08'/%3E%3Cuse href='%23b' x='5.08' y='8.08'/%3E%3Cuse href='%23b' x='6.08' y='8.08'/%3E%3Cuse href='%23b' x='7.08' y='8.08'/%3E%3C/g%3E%3Cg fill='%238A1C26'%3E%3Cuse href='%23b' x='0.08' y='2.08'/%3E%3Cuse href='%23b' x='4.08' y='2.08'/%3E%3Cuse href='%23b' x='3.08' y='3.08'/%3E%3Cuse href='%23b' x='5.08' y='3.08'/%3E%3Cuse href='%23b' x='2.08' y='4.08'/%3E%3Cuse href='%23b' x='6.08' y='4.08'/%3E%3Cuse href='%23b' x='1.08' y='5.08'/%3E%3Cuse href='%23b' x='7.08' y='5.08'/%3E%3Cuse href='%23b' x='0.08' y='6.08'/%3E%3Cuse href='%23b' x='4.08' y='6.08'/%3E%3C/g%3E%3Cg fill='%23FAF6EE'%3E%3Cuse href='%23b' x='4.08' y='3.08'/%3E%3Cuse href='%23b' x='3.08' y='4.08'/%3E%3Cuse href='%23b' x='5.08' y='4.08'/%3E%3Cuse href='%23b' x='2.08' y='5.08'/%3E%3Cuse href='%23b' x='6.08' y='5.08'/%3E%3Cuse href='%23b' x='1.08' y='6.08'/%3E%3Cuse href='%23b' x='7.08' y='6.08'/%3E%3Cuse href='%23b' x='0.08' y='7.08'/%3E%3C/g%3E%3C/svg%3E");
  --band-diamonds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 9'%3E%3Cdefs%3E%3Crect id='b' width='0.84' height='0.84' rx='0.22'/%3E%3C/defs%3E%3Cg fill='%23141010'%3E%3Cuse href='%23b' x='0.08' y='0.08'/%3E%3Cuse href='%23b' x='1.08' y='0.08'/%3E%3Cuse href='%23b' x='2.08' y='0.08'/%3E%3Cuse href='%23b' x='3.08' y='0.08'/%3E%3Cuse href='%23b' x='4.08' y='0.08'/%3E%3Cuse href='%23b' x='5.08' y='0.08'/%3E%3Cuse href='%23b' x='6.08' y='0.08'/%3E%3Cuse href='%23b' x='7.08' y='0.08'/%3E%3Cuse href='%23b' x='8.08' y='0.08'/%3E%3Cuse href='%23b' x='9.08' y='0.08'/%3E%3Cuse href='%23b' x='4.08' y='1.08'/%3E%3Cuse href='%23b' x='3.08' y='2.08'/%3E%3Cuse href='%23b' x='5.08' y='2.08'/%3E%3Cuse href='%23b' x='2.08' y='3.08'/%3E%3Cuse href='%23b' x='6.08' y='3.08'/%3E%3Cuse href='%23b' x='1.08' y='4.08'/%3E%3Cuse href='%23b' x='4.08' y='4.08'/%3E%3Cuse href='%23b' x='7.08' y='4.08'/%3E%3Cuse href='%23b' x='9.08' y='4.08'/%3E%3Cuse href='%23b' x='2.08' y='5.08'/%3E%3Cuse href='%23b' x='6.08' y='5.08'/%3E%3Cuse href='%23b' x='3.08' y='6.08'/%3E%3Cuse href='%23b' x='5.08' y='6.08'/%3E%3Cuse href='%23b' x='4.08' y='7.08'/%3E%3Cuse href='%23b' x='0.08' y='8.08'/%3E%3Cuse href='%23b' x='1.08' y='8.08'/%3E%3Cuse href='%23b' x='2.08' y='8.08'/%3E%3Cuse href='%23b' x='3.08' y='8.08'/%3E%3Cuse href='%23b' x='4.08' y='8.08'/%3E%3Cuse href='%23b' x='5.08' y='8.08'/%3E%3Cuse href='%23b' x='6.08' y='8.08'/%3E%3Cuse href='%23b' x='7.08' y='8.08'/%3E%3Cuse href='%23b' x='8.08' y='8.08'/%3E%3Cuse href='%23b' x='9.08' y='8.08'/%3E%3C/g%3E%3Cg fill='%238A1C26'%3E%3Cuse href='%23b' x='4.08' y='2.08'/%3E%3Cuse href='%23b' x='9.08' y='2.08'/%3E%3Cuse href='%23b' x='3.08' y='3.08'/%3E%3Cuse href='%23b' x='5.08' y='3.08'/%3E%3Cuse href='%23b' x='2.08' y='4.08'/%3E%3Cuse href='%23b' x='6.08' y='4.08'/%3E%3Cuse href='%23b' x='3.08' y='5.08'/%3E%3Cuse href='%23b' x='5.08' y='5.08'/%3E%3Cuse href='%23b' x='4.08' y='6.08'/%3E%3Cuse href='%23b' x='9.08' y='6.08'/%3E%3C/g%3E%3Cg fill='%23FAF6EE'%3E%3Cuse href='%23b' x='4.08' y='3.08'/%3E%3Cuse href='%23b' x='3.08' y='4.08'/%3E%3Cuse href='%23b' x='5.08' y='4.08'/%3E%3Cuse href='%23b' x='4.08' y='5.08'/%3E%3C/g%3E%3C/svg%3E");
  --band-zigzag-v: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8'%3E%3Cdefs%3E%3Crect id='b' width='0.84' height='0.84' rx='0.22'/%3E%3C/defs%3E%3Cg fill='%23141010'%3E%3Cuse href='%23b' x='0.08' y='0.08'/%3E%3Cuse href='%23b' x='5.08' y='0.08'/%3E%3Cuse href='%23b' x='8.08' y='0.08'/%3E%3Cuse href='%23b' x='0.08' y='1.08'/%3E%3Cuse href='%23b' x='4.08' y='1.08'/%3E%3Cuse href='%23b' x='8.08' y='1.08'/%3E%3Cuse href='%23b' x='0.08' y='2.08'/%3E%3Cuse href='%23b' x='3.08' y='2.08'/%3E%3Cuse href='%23b' x='8.08' y='2.08'/%3E%3Cuse href='%23b' x='0.08' y='3.08'/%3E%3Cuse href='%23b' x='2.08' y='3.08'/%3E%3Cuse href='%23b' x='8.08' y='3.08'/%3E%3Cuse href='%23b' x='0.08' y='4.08'/%3E%3Cuse href='%23b' x='1.08' y='4.08'/%3E%3Cuse href='%23b' x='8.08' y='4.08'/%3E%3Cuse href='%23b' x='0.08' y='5.08'/%3E%3Cuse href='%23b' x='2.08' y='5.08'/%3E%3Cuse href='%23b' x='8.08' y='5.08'/%3E%3Cuse href='%23b' x='0.08' y='6.08'/%3E%3Cuse href='%23b' x='3.08' y='6.08'/%3E%3Cuse href='%23b' x='8.08' y='6.08'/%3E%3Cuse href='%23b' x='0.08' y='7.08'/%3E%3Cuse href='%23b' x='4.08' y='7.08'/%3E%3Cuse href='%23b' x='8.08' y='7.08'/%3E%3C/g%3E%3Cg fill='%238A1C26'%3E%3Cuse href='%23b' x='2.08' y='0.08'/%3E%3Cuse href='%23b' x='6.08' y='0.08'/%3E%3Cuse href='%23b' x='5.08' y='1.08'/%3E%3Cuse href='%23b' x='4.08' y='2.08'/%3E%3Cuse href='%23b' x='3.08' y='3.08'/%3E%3Cuse href='%23b' x='2.08' y='4.08'/%3E%3Cuse href='%23b' x='6.08' y='4.08'/%3E%3Cuse href='%23b' x='3.08' y='5.08'/%3E%3Cuse href='%23b' x='4.08' y='6.08'/%3E%3Cuse href='%23b' x='5.08' y='7.08'/%3E%3C/g%3E%3Cg fill='%23FAF6EE'%3E%3Cuse href='%23b' x='7.08' y='0.08'/%3E%3Cuse href='%23b' x='6.08' y='1.08'/%3E%3Cuse href='%23b' x='5.08' y='2.08'/%3E%3Cuse href='%23b' x='4.08' y='3.08'/%3E%3Cuse href='%23b' x='3.08' y='4.08'/%3E%3Cuse href='%23b' x='4.08' y='5.08'/%3E%3Cuse href='%23b' x='5.08' y='6.08'/%3E%3Cuse href='%23b' x='6.08' y='7.08'/%3E%3C/g%3E%3C/svg%3E");
  --shield-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160' preserveAspectRatio='none'%3E%3Cpath d='M50 0C79 21 100 52 100 80c0 28-21 59-50 80C21 139 0 108 0 80 0 52 21 21 50 0z'/%3E%3C/svg%3E");
  --shield-cd: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 160'%3E%3Cpath d='M50 0C79 21 100 52 100 80c0 28-21 59-50 80C21 139 0 108 0 80 0 52 21 21 50 0z' fill='%23EADBB8' transform='translate(50 80) scale(0.97) translate(-50 -80)'/%3E%3Cpath d='M50 0C79 21 100 52 100 80c0 28-21 59-50 80C21 139 0 108 0 80 0 52 21 21 50 0z' fill='none' stroke='%23C9A96E' stroke-width='1.8' stroke-dasharray='4.5 3' transform='translate(50 80) scale(0.85) translate(-50 -80)'/%3E%3Cg fill='%23141010'%3E%3Crect x='46' y='13' width='8' height='6' rx='1.2'/%3E%3Crect x='46' y='141' width='8' height='6' rx='1.2'/%3E%3C/g%3E%3Cg fill='%238A1C26'%3E%3Crect x='46' y='21' width='8' height='6' rx='1.2'/%3E%3Crect x='46' y='133' width='8' height='6' rx='1.2'/%3E%3C/g%3E%3C/svg%3E");
  --suede: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .08  0 0 0 0 .04  0 0 0 0 .02  0 0 0 .42 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  /* GENERATED:END */
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  color-scheme: only light;

  --linen: #D8CDB9;
  --linen-light: #E6DDCC;
  --brown: #4A2A1E;
  --brown-deep: #2E1A12;
  --straw: #EADBB8;
  --maroon: #8A1C26;
  --maroon-dark: #6E1520;
  --bead-black: #141010;
  --bead-white: #FAF6EE;
  --gold: #C9A96E;

  --ink: #2E1A12;
  --muted: #5E4636;

  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --bead: 5px;
  --gutter: 1rem;
  --max: 68.75rem;          /* ~1100px content width */
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
  --focus: var(--maroon);
  --label: var(--maroon);
}

@media (min-width: 760px) {
  :root { --bead: 6px; --gutter: 2rem; }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--linen-light);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, address, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--maroon); color: var(--bead-white); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

html.intro-active,
html.lightbox-open { overflow: hidden; }

/* Safety net against sideways scrolling on phones: spinning baskets and other
   decorations that poke past the screen edge are clipped instead of widening the page.
   (hidden first for older iOS; clip, where supported, keeps it from being a scroll box) */
.page { overflow-x: hidden; overflow-x: clip; }

.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -5rem; left: var(--gutter);
  z-index: 50;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  background: var(--brown-deep);
  color: var(--straw);
  font-weight: 600;
  text-decoration: none;
  --focus: var(--gold);
}
.skip-link:focus { top: 1rem; }

html:not(.js) .js-only { display: none !important; }
html.js .no-js-only { display: none !important; }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------------------
   Layout & fields
   -------------------------------------------------------------------------- */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

.section { position: relative; padding-block: clamp(4.5rem, 15vw, 8rem); }

.section--light { background: var(--linen-light); }
.section--linen { background: var(--linen); }
.section--brown {
  --focus: var(--straw);
  --label: var(--straw);
  background: var(--brown);
  color: var(--straw);
}
.section--deep {
  --focus: var(--straw);
  --label: var(--straw);
  background: var(--brown-deep);
  color: var(--straw);
}

/* --------------------------------------------------------------------------
   Section headings: small isiZulu label + large English serif heading
   -------------------------------------------------------------------------- */
.sec-head { max-width: 40rem; margin-bottom: clamp(2.25rem, 7vw, 3.75rem); }

.zu {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.9rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--label);
}
/* three tiny beads before every label */
.zu::before {
  content: "";
  flex: none;
  width: 26px;
  height: 6px;
  background: linear-gradient(90deg,
    var(--maroon) 0 6px, transparent 6px 10px,
    var(--bead-black) 10px 16px, transparent 16px 20px,
    var(--maroon) 20px 26px);
}
.section--brown .zu::before,
.section--deep .zu::before,
.guest .zu::before {
  background: linear-gradient(90deg,
    var(--bead-white) 0 6px, transparent 6px 10px,
    var(--maroon) 10px 16px, transparent 16px 20px,
    var(--bead-white) 20px 26px);
}

h2 {
  font-family: var(--serif);
  font-size: clamp(2.7rem, 11vw, 4.75rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.sec-head__lead { margin-top: 1.1rem; color: var(--muted); }
.section--brown .sec-head__lead,
.section--deep .sec-head__lead { color: rgba(234, 219, 184, 0.86); }

.amp { font-family: var(--serif); font-style: italic; font-weight: 500; }

/* --------------------------------------------------------------------------
   Buttons — maroon pill with a bead, or straw-gold outline
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.85rem 1.75rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s var(--ease), background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--primary { background: var(--maroon); color: var(--straw); }
.section--brown .btn--primary,
.section--deep .btn--primary { box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.55); }

.btn--ghost { background: transparent; color: inherit; border-color: var(--gold); }

/* the tiny bead before each primary label */
.btn__bead {
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--bead-white);
  box-shadow: 0 0 0 1.5px var(--bead-black);
  transform: rotate(45deg);
}

@media (hover: hover) {
  .btn--primary:hover { background: var(--maroon-dark); }
  .btn--ghost:hover { background: rgba(201, 169, 110, 0.16); }
}

/* --------------------------------------------------------------------------
   Beadwork bands — built bead-by-bead in JS so they can "bead" in on scroll.
   Without JS they fall back to a static tile.
   -------------------------------------------------------------------------- */
.band {
  position: relative;
  height: calc(var(--bead) * 9);
  overflow: hidden;
  background: var(--band-zigzag) center / calc(var(--bead) * 8) 100% repeat-x, var(--straw);
}
.band[data-pattern="diamonds"] {
  background: var(--band-diamonds) center / calc(var(--bead) * 10) 100% repeat-x, var(--straw);
}
.band.is-built { background: var(--straw); }

.band svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: none;
}
.band .r { fill: var(--maroon); }
.band .k { fill: var(--bead-black); }
.band .w { fill: var(--bead-white); }

.band .bc {
  opacity: 0;
  transform: scale(0.15);
  transform-box: fill-box;
  transform-origin: center;
}
.band.is-drawn .bc {
  opacity: 1;
  transform: none;
  transition: opacity 0.2s ease, transform 0.42s cubic-bezier(0.3, 1.7, 0.5, 1);
  transition-delay: calc(var(--i) * var(--step, 8ms));
}

/* --------------------------------------------------------------------------
   1. Envelope intro — styled after the Lindokuhle & Anele invitation:
   two paper doors, a landscape envelope with a beaded band and wax seal.
   Opening (classes on <html> from script.js): the seal pops, the flap folds
   back to its beaded lining, the letter rises, beads spill out, the envelope
   drops away and the doors part on beaded edges to reveal the hero.
   -------------------------------------------------------------------------- */
.intro { display: none; }

.js .intro {
  --focus: var(--maroon);
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  overflow: hidden;
  transition: opacity 0.5s ease;
}
.js .intro[hidden] { display: none; }
.is-fading .intro { opacity: 0; }

/* Paper doors (they overlap by 2px so no hairline shows down the middle) */
.door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(50% + 1px);
  overflow: hidden;
  background: var(--linen-light);
  transition: transform 1s cubic-bezier(0.75, 0, 0.2, 1) 1.75s;
}
.door--left  { left: 0; }
.door--right { right: 0; }

/* Kept plain on purpose: the cowhide envelope is the one statement piece here,
   and the couple's photo is saved for the hero the doors part onto. */

/* beaded trim on each door's inner edge, shown as the doors part */
.door::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 18px;
  background: var(--band-zigzag-v) center top / 100% auto repeat-y, var(--straw);
  opacity: 0;
  transition: opacity 0.25s ease 1.7s;
}
.door--left::before  { right: 0; box-shadow: -8px 0 22px -8px rgba(46, 26, 18, 0.45); }
.door--right::before { left: 0;  box-shadow: 8px 0 22px -8px rgba(46, 26, 18, 0.45); }

.is-open .door::before { opacity: 1; }
.is-open .door--left   { transform: translateX(-101%); }
.is-open .door--right  { transform: translateX(101%); }

/* The envelope — sized to fit the screen, with room above for the flap to fold back */
.envelope {
  --env-w: min(500px, 100vw - 48px, (100vh - 60px) * 0.88);
  --env-w: min(500px, 100vw - 48px, (100svh - 60px) * 0.88);
  --env-drop: 44px;
  position: absolute;
  z-index: 2;
  top: max(calc(var(--env-w) * 0.46), calc(50vh - var(--env-w) / 3 + var(--env-drop)));
  top: max(calc(var(--env-w) * 0.46), calc(50svh - var(--env-w) / 3 + var(--env-drop)));
  left: 0;
  right: 0;
  width: var(--env-w);
  margin: 0 auto;
  aspect-ratio: 3 / 2;
  container-type: inline-size;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  perspective: 1400px;
  outline-offset: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s ease;
}
@media (hover: hover) {
  html:not(.is-open) .envelope:hover { transform: translateY(-4px); }
}
@media (max-width: 600px) {
  .envelope {
    --env-w: min(500px, 100vw - 32px, (100vh - 60px) * 0.88);
    --env-w: min(500px, 100vw - 32px, (100svh - 60px) * 0.88);
    --env-drop: 32px;
  }
}

.env-back,
.env-letter,
.env-front,
.env-flap { position: absolute; display: block; }

.env-back {
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: calc(var(--env-w) * 8 / 300);   /* same radius as the SVG clips in index.html */
  background: var(--brown-deep);
  /* a close contact shadow plus a soft drop, so the hide's white patches keep
     a clear edge against the pale linen */
  box-shadow: 0 2px 6px rgba(46, 26, 18, 0.28), 0 30px 60px rgba(46, 26, 18, 0.4);
}
.envelope svg { display: block; width: 100%; height: 100%; max-width: none; }

/* The letter inside: bead strip along the top, the couple's photo, names and date */
.env-letter {
  left: 6%;
  right: 6%;
  top: 7%;
  bottom: 8%;
  z-index: 2;
  display: grid;
  place-items: start center;
  align-content: start;
  padding-top: 6.5%;
  overflow: hidden;
  background: var(--bead-white);
  outline: 1px solid rgba(201, 169, 110, 0.5);
  outline-offset: -11px;
  transition: transform 0.8s cubic-bezier(0.2, 0.75, 0.25, 1) 0.55s;
}
.env-letter::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 9px;
  background: var(--band-zigzag) center / auto 100% repeat-x, var(--straw);
}
/* light sweeps across the letter as it comes out */
.env-letter::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%);
  transform: translateX(-100%);
}
/* A wide 3:1 strip of photo 06 across their two heads, matted in white with a gold
   line. It fills the band that stays clear of the pocket once the letter rises. */
.env-letter-photo {
  display: block;
  width: 84%;
  aspect-ratio: 3 / 1;
  margin-bottom: 4%;
  overflow: hidden;
  border-radius: 3px;
  background: var(--linen);
  box-shadow:
    0 0 0 1px rgba(201, 169, 110, 0.7),
    0 0 0 4px var(--bead-white),
    0 0 0 5px rgba(201, 169, 110, 0.45);
}
.env-letter-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;   /* the band from his headring to her isicholo and both faces */
}
.env-letter-text {
  font-family: var(--serif);
  font-size: clamp(22px, 6.6cqw, 32px);
  font-style: italic;
  line-height: 1.2;
  text-align: center;
  color: var(--ink);
}
.env-letter-text i { color: var(--maroon); }
.env-letter-text small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: clamp(8px, 2.5cqw, 10.5px);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.env-letter-date {
  display: block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: clamp(9px, 2.6cqw, 11px);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--maroon);
}

/* The front: chocolate pocket with a beaded band and "Siyakumema" */
.env-front { inset: 0; z-index: 3; }
.env-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22%;
  height: 9%;
  background: var(--band-zigzag) center / auto 100% repeat-x, var(--straw);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 -1px 0 rgba(0, 0, 0, 0.2);
}
.env-to {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8%;
  font-family: var(--serif);
  font-size: clamp(12px, 4cqw, 18px);
  letter-spacing: 0.34em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(234, 219, 184, 0.95);
  text-shadow: 0 1px 6px rgba(20, 10, 6, 0.8);   /* over the hide */
}

/* The flap turns over at its top edge; halfway it drops behind the letter and shows its lining */
.env-flap {
  inset: 0 0 auto;
  z-index: 4;
  height: 68%;
  transform-origin: top;
  transition: transform 0.6s ease-in-out 0.15s, z-index 0s linear 0.45s;
}
.env-flap svg { position: absolute; inset: 0; }
/* the hide flap casts a soft shadow so it reads as its own fold over the hide pocket */
.env-flap-out { filter: drop-shadow(0 3px 4px rgba(20, 10, 6, 0.45)); overflow: visible; }
.env-flap-in { opacity: 0; transition: opacity 0s linear 0.45s; }

/* Wax seal on the band, with a gold ring that breathes while it waits */
.envelope .seal {
  position: absolute;
  left: 50%;
  top: 68%;
  z-index: 5;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  filter: drop-shadow(0 4px 6px rgba(30, 10, 10, 0.4));
}
.envelope::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 68%;
  z-index: 6;
  width: 74px;
  height: 74px;
  margin: -37px 0 0 -37px;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  animation: env-glow 2.4s ease-out infinite;
}
@container (max-width: 340px) {
  .envelope .seal,
  .envelope::after { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
}
.seal svg { width: 100%; height: 100%; overflow: visible; }
.seal__wax   { fill: url(#wax); }
.seal__press { fill: none; stroke: rgba(46, 10, 14, 0.35); stroke-width: 1.5; }
.seal__beads {
  fill: none;
  stroke: var(--bead-white);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-dasharray: 0 6.28;
}
.seal__text {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  fill: var(--straw);
}

/* Greeting above the envelope (rises in line by line) and the hint below it */
.env-greeting {
  position: absolute;
  left: -1rem;
  right: -1rem;
  bottom: calc(100% + 26px);
  display: grid;
  justify-items: center;
  line-height: 1.15;
  text-align: center;
  transition: opacity 0.25s ease, transform 0.4s ease;
}
.env-greeting > * { animation: env-greet 0.9s cubic-bezier(0.2, 0.75, 0.25, 1) both; }
.env-greeting-from {
  margin-bottom: 10px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--maroon);
  animation-delay: 0.15s;
}
.env-greeting-title {
  font-family: var(--serif);
  font-size: clamp(38px, 11.2cqw, 56px);
  font-style: italic;
  font-weight: 500;
  color: var(--ink);
  animation-delay: 0.3s;
}
.env-greeting-to {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: clamp(17px, 4.6cqw, 21px);
  color: var(--muted);
  text-wrap: balance;
  animation-delay: 0.45s;
}
.env-hint {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 22px);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: env-pulse 2.4s ease-in-out infinite;
}

/* Beads that spill out behind the letter (added by script.js with their own
   direction --x/--y, spin --r and delay --d); above the open flap, below the letter */
.env-burst {
  position: absolute;
  left: 50%;
  top: 12%;
  z-index: 1;
  pointer-events: none;
}
.env-burst i {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 1.5px;
  background: var(--maroon);
  opacity: 0;
  animation: env-burst 1.4s cubic-bezier(0.15, 0.7, 0.3, 1) calc(0.7s + var(--d)) forwards;
}
.env-burst i.k { background: var(--bead-black); }
.env-burst i.w { background: var(--bead-white); box-shadow: 0 0 0 1px rgba(46, 26, 18, 0.15); }
.env-burst i.g { background: var(--gold); }
.env-burst i:nth-child(4n) { border-radius: 50%; width: 6px; height: 6px; }

/* Opening sequence */
.is-open .env-greeting { opacity: 0; transform: translateY(-12px); }
.is-open .env-hint { opacity: 0; animation: none; transition: opacity 0.2s; }
.is-open .env-flap { z-index: 0; transform: rotateX(180deg); }
.is-open .env-flap-in { opacity: 1; }
.is-open .envelope .seal { animation: env-seal-pop 0.6s cubic-bezier(0.3, 0, 0.3, 1) forwards; }
.is-open .envelope::after { animation: env-ripple 0.9s ease-out 0.1s both; }
.is-open .env-letter { transform: translateY(-50%); }
.is-open .env-letter::after { transform: translateX(100%); transition: transform 1s ease 1.05s; }
.is-open .envelope {
  opacity: 0;
  transform: translateY(48px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.5s ease 1.35s, transform 0.6s cubic-bezier(0.5, 0, 0.75, 0) 1.35s;
}

@keyframes env-greet { from { opacity: 0; transform: translateY(14px); } }
@keyframes env-pulse { 50% { opacity: 0.45; } }
@keyframes env-glow {
  from { opacity: 0.75; transform: scale(0.95); }
  70%, to { opacity: 0; transform: scale(1.6); }
}
@keyframes env-seal-pop {
  25% { transform: scale(0.88); }
  55% { opacity: 1; transform: scale(1.18) rotate(-6deg); }
  to  { opacity: 0; transform: translateY(-26px) scale(1.4) rotate(-14deg); }
}
@keyframes env-ripple {
  from { opacity: 0.9; transform: scale(1); }
  to   { opacity: 0; transform: scale(4); }
}
@keyframes env-burst {
  from { opacity: 0; transform: translate(0, 0) rotate(45deg) scale(0.3); }
  12%  { opacity: 1; }
  65%  { opacity: 1; transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); }
  to   { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--r)) scale(0.7); }
}

/* --------------------------------------------------------------------------
   Izimbenge baskets (envelope doors and footer)
   -------------------------------------------------------------------------- */
.baskets { position: absolute; pointer-events: none; }
.basket {
  position: absolute;
  max-width: none;
  filter: drop-shadow(0 10px 14px rgba(46, 26, 18, 0.22));
  animation: spin 60s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   2. Hero — full-bleed photo with the names over it (after the Lindokuhle &
   Anele invitation). The photo settles from a slight zoom and the copy rises
   in line by line once the envelope opens.
   -------------------------------------------------------------------------- */
.hero {
  --focus: var(--straw);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: max(100svh, 860px);
  overflow: hidden;
  background: var(--brown-deep);
  color: #FBF5EA;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
/* on phones the photo is lifted so the faces sit above the text */
.hero-photo img {
  position: absolute;
  left: 0;
  top: -18%;
  width: 100%;
  height: 118%;
  object-fit: cover;
  object-position: 50% 42%;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg,
    rgba(30, 17, 11, 0.96) 0%,
    rgba(30, 17, 11, 0.86) 40%,
    rgba(30, 17, 11, 0.72) 56%,
    rgba(30, 17, 11, 0.5) 64%,
    rgba(30, 17, 11, 0.22) 72%,
    rgba(30, 17, 11, 0.06) 82%,
    rgba(30, 17, 11, 0.12) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: 0 auto;
  padding: 6rem 0 2.75rem;
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.25);
}

.hero-eyebrow {
  margin-bottom: 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #F2E3CC;
}

.hero-intro {
  max-width: 17rem;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.4;
  color: #EFE1CC;
}

.hero h1 {
  margin: 1rem 0 0.9rem;
  font-family: var(--serif);
  font-size: clamp(4.3rem, 21vw, 8.8rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
}
.hero h1 em { font-style: italic; }
.ampersand {
  font-size: 0.62em;
  font-style: italic;
  color: var(--gold);
  vertical-align: middle;
}

.hero-rule {
  width: 70px;
  height: 1px;
  margin: 0.25rem 0 1.25rem;
  background: var(--gold);
  transform-origin: left;
}

.hero-date {
  margin-bottom: 1.6rem;
  font-size: 0.85rem;
  color: #F5EADA;
}
.hero-date span { padding: 0 0.7rem; color: var(--gold); }

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}
.btn--cream { gap: 1.4rem; background: #F5EEE3; color: var(--brown-deep); text-shadow: none; }
@media (hover: hover) {
  .btn--cream:hover { background: #E8D4B8; }
}
.discover {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #F5E8D8;
  text-decoration: none;
}
@media (hover: hover) {
  .discover:hover { text-decoration: underline; text-underline-offset: 5px; }
}

/* Phones: the couple stands in full at the top of the screen (headdress to hem,
   nobody cut at the edges) and the photo only fades to chocolate below the
   pink skirt, so the names never sit over the faces, shield or beadwork.
   Sizes are in vw because the photo scales with the screen width. Landmarks in
   12-couple-smiling.jpg at this scale: faces ~33vw, shield 49-74vw, pink skirt
   ends ~91vw. */
@media (max-width: 599.98px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
  }
  .hero-photo {
    bottom: auto;
    height: 132vw;
  }
  .hero-photo img {
    left: -10%;
    top: -30vw;
    width: 120%;
    max-width: none;   /* the global img rule would cap it at 100% */
    height: auto;
  }
  .hero-photo::after {
    background: linear-gradient(180deg,
      rgba(30, 17, 11, 0.3) 0%,
      rgba(30, 17, 11, 0) 13%,
      rgba(46, 26, 18, 0) 64%,
      rgba(46, 26, 18, 0.5) 76%,
      rgba(46, 26, 18, 0.86) 88%,
      var(--brown-deep) 100%);
  }
  /* never let the copy start above the pink skirt, even on short screens */
  .hero-copy { padding-top: 90vw; }
}

/* Date in a glass isihlangu seal (desktop) */
.date-seal { display: none; }

@media (min-width: 900px) {
  .hero {
    align-items: center;
    min-height: 100vh;
    min-height: max(100svh, 760px);
    background: var(--suede) center / 180px 180px, var(--brown-deep);
  }
  /* photo fills the right of the screen; the left fades into chocolate behind the names */
  .hero-photo { left: 30%; }
  .hero-photo img { top: 0; height: 100%; object-position: 50% 30%; }
  .hero-photo::after {
    background:
      linear-gradient(90deg, var(--brown-deep) 0%, rgba(46, 26, 18, 0.82) 12%, rgba(46, 26, 18, 0.45) 26%, rgba(46, 26, 18, 0) 50%),
      linear-gradient(0deg, rgba(30, 17, 11, 0.55), rgba(30, 17, 11, 0) 40%);
  }
  .hero-copy { padding-block: 7rem 5rem; }
  .hero-eyebrow { letter-spacing: 0.2em; }
  .hero-intro { max-width: 21rem; font-size: 1.45rem; }
  .hero h1 { margin: 1.5rem 0 1.25rem; font-size: clamp(6rem, 9vw, 8.8rem); }
  .hero-actions { flex-direction: row; align-items: center; gap: 2rem; }

  .date-seal {
    position: absolute;
    right: 5%;
    bottom: 3.5rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 92px;
    aspect-ratio: 100 / 160;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(46, 26, 18, 0.3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    -webkit-mask: var(--shield-mask) center / 100% 100% no-repeat;
    mask: var(--shield-mask) center / 100% 100% no-repeat;
  }
  .date-seal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .date-seal__edge { fill: none; stroke: rgba(255, 255, 255, 0.7); stroke-width: 3; }
  .date-seal__bead { fill: var(--maroon); }
  .date-seal strong {
    font-family: var(--serif);
    font-size: 2.4rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0;
  }
}

/* Hero entrance after the envelope opens */
.is-open .hero-photo img { animation: hero-settle 2.1s cubic-bezier(0.2, 0.6, 0.2, 1) 1.6s both; }
.is-open .hero-copy > *,
.is-open .date-seal { animation: hero-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 2.05s both; }
.is-open .hero-copy > :nth-child(2) { animation-delay: 2.13s; }
.is-open .hero-copy > :nth-child(3) { animation-delay: 2.21s; }
.is-open .hero-copy > :nth-child(4) { animation-name: hero-rule; animation-delay: 2.35s; }
.is-open .hero-copy > :nth-child(5) { animation-delay: 2.39s; }
.is-open .hero-copy > :nth-child(6) { animation-delay: 2.47s; }
.is-open .hero-copy > :nth-child(7),
.is-open .date-seal { animation-delay: 2.55s; }

@keyframes hero-settle { from { transform: scale(1.14); } }
@keyframes hero-rise   { from { opacity: 0; transform: translateY(26px); } }
@keyframes hero-rule   { from { transform: scaleX(0); } }

/* --------------------------------------------------------------------------
   3. Countdown — numbers in small shields
   -------------------------------------------------------------------------- */
.cd {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  max-width: 34rem;
}
.cd__unit { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.cd__shield {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 100 / 160;
  background: var(--shield-cd) center / 100% 100% no-repeat;
}
.cd__num {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 8.6vw, 3.1rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--brown-deep);
}
.cd__label {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--straw);
}
.cd__done {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
}
.cd__unit:nth-child(2) { --delay: 0.08s; }
.cd__unit:nth-child(3) { --delay: 0.16s; }
.cd__unit:nth-child(4) { --delay: 0.24s; }

/* Calendar dial, shaped like an imbenge (markup built by a script, see index.html).
   Its rim is the envelope's cowhide with gold stitching and turns slowly like the
   baskets; when the dial scrolls into view the gold pointer sweeps from the 1st to
   the 13th and the 13th rises in its shield. */
.cal {
  width: min(100%, 21rem);
  margin: clamp(2.75rem, 9vw, 3.5rem) auto 0;
}
.cal__dial {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;   /* the turning rim's corner box must not widen the page (the hide is round, so nothing shows past the square) */
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.42));
}
.cal__rim {
  transform-box: view-box;
  transform-origin: 160px 160px;
  animation: spin 90s linear infinite;
}
.cal__beads .k { fill: var(--bead-black); }
.cal__beads .r { fill: var(--maroon); }
.cal__beads .w { fill: var(--bead-white); stroke: rgba(46, 26, 18, 0.35); stroke-width: 0.6; }
.cal__beads .g { fill: var(--gold); stroke: #8A6A33; stroke-width: 0.6; }

.cal__days text,
.cal__mark text {
  font-family: var(--serif);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: lining-nums;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--ink);
}
.cal__mark text { font-size: 11.5px; fill: var(--straw); }

.cal__centre text { text-anchor: middle; font-family: var(--sans); font-weight: 600; }
.cal__zu    { font-size: 8.5px; letter-spacing: 2.6px; fill: var(--maroon); }
.cal__centre .cal__big { font-family: var(--serif); font-size: 58px; font-variant-numeric: lining-nums; fill: var(--ink); }
.cal__month { font-size: 8.5px; letter-spacing: 2.2px; fill: var(--muted); }
.cal__when  { font-size: 7.5px; letter-spacing: 1.8px; fill: var(--maroon); }

/* Pointer and marked day: final state by default (no JS, reduced motion) */
.cal__hand {
  transform-box: view-box;
  transform-origin: 160px 160px;
  transform: rotate(var(--to));
  transition: transform 2s cubic-bezier(0.45, 0.05, 0.2, 1) 0.45s;
}
.cal__mark {
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity 0.35s ease 2.25s, transform 0.55s cubic-bezier(0.3, 1.7, 0.5, 1) 2.25s;
}
.js .cal:not(.is-visible) .cal__hand { transform: rotate(0deg); }
.js .cal:not(.is-visible) .cal__mark { opacity: 0; transform: scale(0.3); }

@media (min-width: 900px) {
  .countdown__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    /* heading across the top; the dial and the countdown side by side beneath it */
    grid-template-areas: "head head" "cal cd";
    align-items: center;
    column-gap: 4rem;
  }
  .countdown .sec-head { grid-area: head; }
  .cd { grid-area: cd; gap: 1.25rem; justify-self: end; width: 100%; }
  .cd__done { grid-area: cd; }
  .cal { grid-area: cal; justify-self: center; width: min(100%, 21rem); margin: 0; }
  .cd__label { font-size: 0.7rem; letter-spacing: 0.22em; }
}

/* --------------------------------------------------------------------------
   4. Details — cards with beaded love-letter icons
   -------------------------------------------------------------------------- */
.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.6rem 1.4rem;
  background: var(--bead-white);
}
/* straw-gold stitching */
.card::before,
.info::before,
.rsvp-form::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed var(--gold);
  pointer-events: none;
}

/* Line icons in maroon discs with a gold ring, matching Guest information */
.card__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--straw);
  box-shadow: 0 0 0 3px var(--bead-white), 0 0 0 4px var(--gold);
}

.card__label {
  margin-bottom: 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--maroon);
}
.card__value {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.15;
}
.card__note {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

.card:nth-child(2) { --delay: 0.08s; }
.card:nth-child(3) { --delay: 0.16s; }
.card:nth-child(4) { --delay: 0.24s; }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .card { flex-direction: column; padding: 2rem 1.75rem 2.1rem; }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.details__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.5rem;
}
.details__status {
  min-height: 1.5em;
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   5. Venue
   -------------------------------------------------------------------------- */
.venue__name {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 13vw, 6.5rem);
  font-weight: 500;
  font-style: italic;
  line-height: 0.95;
}
.venue__address {
  margin: 1.5rem 0 2.25rem;
  padding-left: 1.1rem;
  border-left: 1px solid var(--gold);
  font-size: 1.05rem;
  font-style: normal;
  line-height: 1.8;
  color: rgba(234, 219, 184, 0.9);
}

/* Embedded map, hung like a beaded panel: straw mat with gold stitching,
   bead bands top and bottom, an imbenge on the corner and a bead fringe below */
.venue__map {
  margin-top: clamp(3.5rem, 10vw, 4.25rem);   /* room for the imbenge */
}
.venue__frame {
  --bead: 4px;
  position: relative;
  background: var(--straw);
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, 0.75);
}
.venue__view {
  position: relative;
  padding: 10px 12px;
}
.venue__view::before {
  content: "";
  position: absolute;
  inset: 4px 5px;
  border: 1px dashed var(--gold);
  pointer-events: none;
}
.band--flip { transform: scaleY(-1); }

.venue__basket {
  width: 4.75rem;
  height: 4.75rem;
  top: -2.4rem;
  right: -0.5rem;
}

/* strands of 3-5-7-5 beads, so the repeats read as a soft wave */
.venue__fringe {
  --fw: 32px;   /* tile width; height keeps the 28:34 tile ratio */
  height: calc(var(--fw) * 34 / 28);
  margin: 0 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 34'%3E%3Cg fill='%23FAF6EE'%3E%3Ccircle cx='3.5' cy='2' r='1.75'/%3E%3Ccircle cx='10.5' cy='2' r='1.75'/%3E%3Ccircle cx='10.5' cy='14' r='1.75'/%3E%3Ccircle cx='17.5' cy='2' r='1.75'/%3E%3Ccircle cx='17.5' cy='14' r='1.75'/%3E%3Ccircle cx='17.5' cy='26' r='1.75'/%3E%3Ccircle cx='24.5' cy='2' r='1.75'/%3E%3Ccircle cx='24.5' cy='14' r='1.75'/%3E%3C/g%3E%3Cg fill='%238A1C26'%3E%3Ccircle cx='3.5' cy='6' r='1.75'/%3E%3Ccircle cx='10.5' cy='6' r='1.75'/%3E%3Ccircle cx='10.5' cy='18' r='1.75'/%3E%3Ccircle cx='17.5' cy='6' r='1.75'/%3E%3Ccircle cx='17.5' cy='18' r='1.75'/%3E%3Ccircle cx='24.5' cy='6' r='1.75'/%3E%3Ccircle cx='24.5' cy='18' r='1.75'/%3E%3C/g%3E%3Cg fill='%23141010'%3E%3Ccircle cx='3.5' cy='10' r='1.75'/%3E%3Ccircle cx='10.5' cy='10' r='1.75'/%3E%3Ccircle cx='17.5' cy='10' r='1.75'/%3E%3Ccircle cx='17.5' cy='22' r='1.75'/%3E%3Ccircle cx='24.5' cy='10' r='1.75'/%3E%3C/g%3E%3Cg fill='%23C9A96E'%3E%3Ccircle cx='3.5' cy='14.6' r='2.3'/%3E%3Ccircle cx='10.5' cy='22.6' r='2.3'/%3E%3Ccircle cx='17.5' cy='30.6' r='2.3'/%3E%3Ccircle cx='24.5' cy='22.6' r='2.3'/%3E%3C/g%3E%3C/svg%3E") left top / var(--fw) 100%;
  background-repeat: round no-repeat;
  transform-origin: top center;
  animation: sway 7s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: skewX(1.5deg); }
  50%      { transform: skewX(-1.5deg); }
}

.venue__farewell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  margin-top: 1.25rem;
}
.venue__farewell .zu { margin: 0; }
.venue__farewell-en {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-style: italic;
  color: rgba(234, 219, 184, 0.86);
}

.venue__map iframe {
  display: block;
  width: 100%;
  height: clamp(17.5rem, 70vw, 27.5rem);
  border: 0;
  background: var(--linen);   /* shows while the map loads */
  filter: sepia(0.18) saturate(0.92);
}

@media (min-width: 900px) {
  .venue__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    align-items: end;
    gap: 3.5rem 4rem;
  }
  .venue .sec-head { margin-bottom: 0; }
  .venue__map { grid-column: 1 / -1; margin-top: 0; }
  .venue__frame { --bead: 5px; }
  /* overhang stays inside the 2rem page gutter, so no sideways scroll */
  .venue__basket { width: 6.5rem; height: 6.5rem; top: -3.25rem; right: -1.5rem; }
  .venue__fringe { --fw: 40px; margin: 0 20px; }
}

/* --------------------------------------------------------------------------
   6. Gallery — a swipeable carousel of arched photos. The track is native
   scroll-snap, so it swipes even without JS; js/script.js marks the centre
   slide, drives the arrows, bead strand and a slow slideshow.
   -------------------------------------------------------------------------- */
.carousel {
  --slide-w: min(74vw, 21rem);
  --slide-gap: 0.85rem;
}
.carousel__track {
  position: relative;            /* slides measure their offsets from here */
  display: flex;
  gap: var(--slide-gap);
  margin: 0;
  padding: 0.75rem 0 3.25rem;    /* the track clips, so the photo's whole shadow must fit */
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }
/* spacers, so the first and last photos can also sit in the centre */
.carousel__track::before,
.carousel__track::after {
  content: "";
  flex: 0 0 calc((100% - var(--slide-w)) / 2 - var(--slide-gap));
}

.slide {
  flex: 0 0 var(--slide-w);
  scroll-snap-align: center;
  scroll-snap-stop: always;      /* one photo per swipe */
}
.slide__link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 999px 999px 4px 4px;   /* arched, like the Incwadi frames */
  background: var(--linen);
  box-shadow: 0 26px 46px -26px rgba(46, 26, 18, 0.65);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.slide__link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 0.8s var(--ease);
}
/* straw stitching just inside the arch */
.slide__link::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(234, 219, 184, 0.85);
  border-radius: inherit;
  pointer-events: none;
}
/* side photos step back so the centre one leads */
.js .slide:not(.is-active) .slide__link {
  transform: scale(0.86);
  opacity: 0.7;
  box-shadow: 0 0 0 rgba(46, 26, 18, 0);
}
@media (hover: hover) {
  .slide.is-active .slide__link:hover img { transform: scale(1.045); }
  .js .slide:not(.is-active) .slide__link:hover { opacity: 0.9; }
}

/* Arrows and bead strand */
.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: min(100% - 2 * var(--gutter), var(--max));
  margin: -1.25rem auto 0;       /* back over the track's shadow room */
  position: relative;
}
.carousel__nav {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  color: var(--brown-deep);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.carousel__nav:active { transform: scale(0.95); }
@media (hover: hover) {
  .carousel__nav:hover { background: var(--maroon); border-color: var(--maroon); color: var(--straw); }
}

/* one bead per photo (black, red, white in turn); the current one swells */
.carousel__beads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}
.carousel__beads span {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.3, 1.7, 0.5, 1), box-shadow 0.35s ease;
}
.carousel__beads .k { background: var(--bead-black); }
.carousel__beads .r { background: var(--maroon); }
.carousel__beads .w { background: var(--bead-white); box-shadow: inset 0 0 0 1px rgba(46, 26, 18, 0.35); }
.carousel__beads .is-active {
  transform: scale(1.55);
  box-shadow: 0 0 0 1.5px var(--linen-light), 0 0 0 2.5px var(--gold);
}

/* Counter and slideshow toggle */
.carousel__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.6rem;
}
.carousel__count {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.carousel__current { color: var(--maroon); }
.carousel__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: var(--brown-deep);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}
.carousel__icon-play { display: none; }
.carousel.is-paused .carousel__icon-play { display: block; }
.carousel.is-paused .carousel__icon-pause { display: none; }
@media (hover: hover) {
  .carousel__toggle:hover .carousel__toggle-text { text-decoration: underline; text-underline-offset: 4px; }
}

@media (min-width: 760px) {
  /* sized so the photo, arrows and slideshow toggle fit one laptop screen */
  .carousel { --slide-w: clamp(15rem, 24vw, 19.5rem); --slide-gap: 1.5rem; }
  /* photos soften away at the screen edges */
  .carousel__track {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  }
}

/* Lightbox */
.lightbox {
  --focus: var(--straw);
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(30, 17, 11, 0.97);
  color: var(--straw);
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: rgba(30, 17, 11, 0.9); }
.lightbox[open] { display: block; }

.lightbox__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: calc(68px + env(safe-area-inset-top)) 0.75rem calc(88px + env(safe-area-inset-bottom));
}
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.45), 0 24px 60px rgba(0, 0, 0, 0.6);
  transition: opacity 0.3s ease;
}
.lightbox__img.is-loading { opacity: 0; }

.lightbox__close,
.lightbox__nav {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1.5px solid var(--gold);
  border-radius: 50%;
  background: rgba(46, 26, 18, 0.75);
  color: var(--straw);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .lightbox__close:hover,
  .lightbox__nav:hover { background: var(--maroon); }
}
.lightbox__close {
  position: absolute;
  top: calc(0.75rem + env(safe-area-inset-top));
  right: 0.75rem;
}
.lightbox__bar {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.lightbox__counter {
  min-width: 4.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   7. Guest information — the one section on Nguni cowhide
   -------------------------------------------------------------------------- */
/* A real cowhide photo (images/cowhide.jpg) under a chocolate veil that is
   heaviest behind the heading, so the cream text reads over the white patches.
   The white cards float on the hide. Chocolate shows while the photo loads. */
.guest {
  --label: var(--straw);
  --focus: var(--straw);
  isolation: isolate;
  background: var(--brown-deep);
  color: var(--straw);
}
.guest::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(30, 17, 11, 0.74) 0%,
      rgba(30, 17, 11, 0.5) 38%,
      rgba(30, 17, 11, 0.3) 100%),
    url("../images/cowhide.jpg") 50% 50% / cover no-repeat;
}
.guest h2 { color: #FBF5EA; text-shadow: 0 2px 18px rgba(20, 10, 6, 0.45); }
.guest .info {
  color: var(--ink);
  box-shadow: 0 26px 50px -24px rgba(20, 10, 6, 0.75);
}

.info-list {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.info {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  padding: 1.6rem 1.4rem;
  background: var(--bead-white);
}
.info__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--straw);
  box-shadow: 0 0 0 3px var(--bead-white), 0 0 0 4px var(--gold);
}
.info h3 {
  margin-bottom: 0.25rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.15;
}
.info p { font-size: 0.98rem; }
.info:nth-child(2) { --delay: 0.1s; }
.info:nth-child(3) { --delay: 0.2s; }

@media (min-width: 760px) {
  .info-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .info { flex-direction: column; padding: 2.1rem 1.75rem; }
}

/* --------------------------------------------------------------------------
   8. RSVP
   -------------------------------------------------------------------------- */
.rsvp__grid { display: grid; gap: 3rem; }

@media (min-width: 900px) {
  .rsvp__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: start;
    gap: 4rem;
  }
}

.rsvp__or {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(234, 219, 184, 0.86);
}
.rsvp__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(201, 169, 110, 0.6);
}

.rsvp__name {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 10vw, 3.25rem);
  font-weight: 500;
  line-height: 1.05;
}
.rsvp__phone {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.rsvp__phone + .rsvp__phone { margin-top: -0.2rem; }
.rsvp__via {
  flex: none;
  min-width: 6.5rem;   /* wide enough for "WhatsApp", so both numbers line up */
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(234, 219, 184, 0.86);
}
.rsvp__phone a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

.btn-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
@media (min-width: 520px) {
  .btn-row { flex-direction: row; flex-wrap: wrap; }
}

/* Form card */
.rsvp-form {
  --focus: var(--maroon);
  position: relative;
  padding: 2rem 1.35rem 1.6rem;
  background: var(--bead-white);
  color: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}
.rsvp-form__title {
  margin-bottom: 1.5rem;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.1;
}

.field { min-width: 0; margin: 0 0 1.35rem; padding: 0; border: 0; }
.field__label {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--maroon);
}
.field__optional { font-weight: 500; letter-spacing: 0.04em; text-transform: none; color: var(--muted); }

.field__input {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.8rem 1rem;
  border: 1.5px solid rgba(46, 26, 18, 0.32);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;          /* 16px stops iPhones zooming in on focus */
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.field__input:focus { border-color: var(--maroon); }
.field__input--area { min-height: 6.5rem; resize: vertical; }
.field__input[aria-invalid="true"] { border-color: var(--maroon); background: #FFF6F3; }

.field__error { margin-top: 0.45rem; font-size: 0.86rem; font-weight: 600; color: var(--maroon); }
.field__error:empty { display: none; }

.choice-row { display: grid; gap: 0.6rem; }
.choice {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-height: 56px;
  padding: 0.75rem 1.1rem;
  border: 1.5px solid rgba(46, 26, 18, 0.32);
  border-radius: 999px;
  background: #fff;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.choice input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 0 3px;
  border: 2px solid var(--maroon);
  border-radius: 1px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  transform: rotate(45deg);
  cursor: pointer;
}
.choice input:checked { background: var(--maroon); box-shadow: inset 0 0 0 2px #fff; }
.choice input:focus-visible { outline-offset: 5px; }
.choice:has(input:checked) { border-color: var(--maroon); background: #F8ECE8; }
.field--choice.is-invalid .choice { border-color: var(--maroon); }

.rsvp-form__submit { width: 100%; margin-top: 0.25rem; }
.rsvp-form__note { margin-top: 0.75rem; font-size: 0.85rem; text-align: center; color: var(--muted); }
.rsvp-form__status:not(:empty) {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--maroon);
  background: var(--linen-light);
  font-size: 0.95rem;
}
.rsvp-form__status a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--maroon);
  text-underline-offset: 4px;
}

/* --------------------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------------------- */
.footer {
  --focus: var(--straw);
  position: relative;
  overflow: hidden;
  background: var(--brown-deep);
  color: var(--straw);
  text-align: center;
}
.footer__inner {
  position: relative;
  padding: 4.5rem var(--gutter) calc(6.5rem + env(safe-area-inset-bottom));
}

.baskets--footer {
  position: relative;
  width: 9rem;
  height: 7rem;
  margin: 0 auto 1.75rem;
}
.baskets--footer .basket--lg { width: 7rem; height: 7rem; top: 0; left: 0; }
.baskets--footer .basket--sm { width: 3.75rem; height: 3.75rem; bottom: -0.5rem; right: 0; animation-direction: reverse; }

.footer__thanks {
  font-family: var(--serif);
  font-size: clamp(3.4rem, 16vw, 6rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1;
}
.footer__thanks-en {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(234, 219, 184, 0.82);
}
.footer__names {
  margin: 2.25rem 0 2.5rem;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.footer__names .amp { color: var(--gold); }
.footer__credit { font-size: 0.8rem; line-height: 1.6; color: rgba(234, 219, 184, 0.78); }
.footer__credit a {
  display: inline-block;
  padding-block: 0.8rem;
  color: var(--gold);
  text-decoration: none;
}
@media (hover: hover) {
  .footer__credit a:hover { text-decoration: underline; text-underline-offset: 4px; }
}

/* --------------------------------------------------------------------------
   Floating music player — a "now playing" pill. The couple photo spins like
   a record while the song plays, inside a maroon ring of white beads that
   fills with gold as the song goes on.
   -------------------------------------------------------------------------- */
.music {
  position: fixed;
  left: calc(1rem + env(safe-area-inset-left));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 90;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}
.music[hidden] { display: none; }
/* Kept out of the way while the hero text sits behind it (see script.js) */
.music.is-tucked {
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
}
.music__toggle {
  --focus: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 4px 1.1rem 4px 4px;
  border: 1px solid rgba(201, 169, 110, 0.38);
  border-radius: 999px;
  background: rgba(46, 26, 18, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  color: var(--bead-white);
  font: inherit;
  text-align: left;
  box-shadow: 0 12px 30px rgba(46, 26, 18, 0.34);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s, background-color 0.2s;
}
@media (hover: hover) {
  .music__toggle:hover { background: rgba(46, 26, 18, 0.95); transform: translateY(-1px); }
}
.music__toggle:active { transform: scale(0.97); }

/* The record: maroon disc, bead ring, photo, then the play/pause glyph on top */
.music__disc {
  position: relative;
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--maroon);
}
.music__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: none;
  transform: rotate(-90deg);   /* progress starts at 12 o'clock */
}
.music__track    { stroke: var(--maroon-dark); stroke-width: 3.6; }
/* r = 15.9155 makes the circumference 100, so the dash offset is "percent still to play" */
.music__progress {
  stroke: var(--gold);
  stroke-width: 3.6;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 0.25s linear;
}
.music__beads {
  stroke: var(--bead-white);
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-dasharray: 0 4;        /* 25 round beads */
}
.music__cover,
.music__icon {
  position: absolute;
  inset: 7px;
  border-radius: 50%;
}
.music__cover {
  background: var(--brown) url("../images/music-cover.jpg") center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(20, 16, 16, 0.5);
}
.music__icon {
  display: grid;
  place-items: center;
  background: rgba(20, 16, 16, 0.42);
  color: var(--bead-white);
  transition: background-color 0.3s;
}
.music__icon svg { grid-area: 1 / 1; }
.music__play { margin-left: 2px; }
.music__pause,
.is-playing .music__play  { display: none; }
.is-playing .music__pause { display: block; }
.is-playing .music__icon  { background: rgba(20, 16, 16, 0.16); }
.is-loading .music__progress { stroke-dashoffset: 72; }
.is-loading .music__ring     { animation: spin 0.9s linear infinite; }

.music__label {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}
.music__label strong {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--straw);
}
.music__label span {
  max-width: 8.6rem;
  overflow: hidden;
  font-size: 0.6875rem;
  color: rgba(250, 246, 238, 0.66);
  white-space: nowrap;
  text-overflow: ellipsis;
}
@media (min-width: 760px) {
  .music { left: calc(1.5rem + env(safe-area-inset-left)); bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .music__label span { max-width: none; }
}

/* Little equaliser that dances while the song plays */
.music__bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}
.music__bars i {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: var(--gold);
  opacity: 0.5;
  transform: scaleY(0.25);
  transform-origin: bottom;
  transition: transform 0.3s, opacity 0.3s;
}
.is-playing .music__bars i { opacity: 1; animation: music-bar 0.9s ease-in-out infinite alternate; }
.is-playing .music__bars i:nth-child(2) { animation-duration: 0.7s; animation-delay: -0.3s; }
.is-playing .music__bars i:nth-child(3) { animation-duration: 1.1s; animation-delay: -0.6s; }
.is-playing .music__bars i:nth-child(4) { animation-duration: 0.8s; animation-delay: -0.2s; }
@keyframes music-bar {
  from { transform: scaleY(0.2); }
  to   { transform: scaleY(1); }
}

/* "Tap play to start the music" bubble */
.music__status {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.6rem);
  margin: 0;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  background: rgba(46, 26, 18, 0.94);
  color: var(--bead-white);
  font-size: 0.75rem;
  line-height: 1.4;
  white-space: nowrap;
}
.music__status:empty { display: none; }

/* --------------------------------------------------------------------------
   Scroll reveal (fade + slight rise)
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Reduced motion: everything still; the envelope simply fades away
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
  .js .intro { transition-duration: 0.5s !important; }

  .js .reveal,
  .band .bc {
    opacity: 1;
    transform: none;
  }
}
