/* ═══════════════════════════════════════════════════════════════════════
   variant-herbario — soft & botanical
   A run of herbarium sheets. Facts are typewritten specimen labels, photos are
   taped down rather than bled full-width, and the depth comes from drawn sprigs.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --paper: #fbfaf6;
  --board: #efeae0;
  /* deep enough to clear 4.5:1 on paper — it carries all the typewritten labels */
  --stem: #5e6a4c;
  /* browned blush, not pink — also what lets it carry the ampersand at 3:1 */
  --petal: #a8776d;
  --ink: #3c3a33;
  --kraft: #a8977a;

  --ink-soft: color-mix(in oklab, var(--ink), transparent 22%);
  --hair: color-mix(in oklab, var(--ink), transparent 84%);
  --hair-soft: color-mix(in oklab, var(--ink), transparent 90%);

  --focus: var(--stem);
  --skip-bg: var(--ink);
  --skip-fg: var(--paper);

  --display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --body: 'Libre Franklin', system-ui, -apple-system, sans-serif;
  --mono: 'Courier Prime', 'Courier New', monospace;

  --gutter: clamp(1.15rem, 4vw, 3.5rem);
  --stack: clamp(3.5rem, 9vh, 6.5rem);
  --sheet-max: 74rem;
  --measure: 60ch;
}

body {
  background: var(--board);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(0.98rem, 0.94rem + 0.2vw, 1.05rem);
}

/* Laid-paper grain over everything */
.grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* ── parallax + reveal primitives ──────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition:
    opacity 800ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 800ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Drawn sprigs — the parallax depth in this variant */
.flora {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.flora-item {
  position: absolute;
  color: var(--stem);
  opacity: 0.22;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}

.flora-item svg {
  width: 100%;
  height: auto;
}

.flora-left {
  top: -6%;
  left: -5%;
  width: clamp(150px, 24vw, 300px);
  rotate: -8deg;
}

.flora-right {
  top: 8%;
  right: -8%;
  width: clamp(130px, 20vw, 250px);
  rotate: 14deg;
}

.flora-low {
  bottom: -8%;
  left: 38%;
  width: clamp(90px, 12vw, 175px);
  rotate: -3deg;
  opacity: 0.16;
}

.flora-edge {
  top: 4%;
  right: -6%;
  width: clamp(120px, 18vw, 245px);
  rotate: 11deg;
  opacity: 0.18;
}

.flora-edge-left {
  right: auto;
  left: -6%;
  rotate: -11deg;
}

/* ── hero ──────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 100svh;
  display: grid;
  align-content: center;
  gap: clamp(2rem, 6vh, 4rem);
  padding: clamp(5rem, 12vh, 8rem) var(--gutter) clamp(3rem, 8vh, 5rem);
  background: var(--paper);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, var(--sheet-max));
  margin-inline: auto;
}

.stamp {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--stem);
  border: 1px solid color-mix(in oklab, var(--stem), transparent 60%);
  padding: 0.4rem 0.85rem;
  rotate: -1.2deg;
}

.names {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(3rem, 11vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
  margin: clamp(1.75rem, 5vh, 3rem) 0 clamp(2rem, 6vh, 3.5rem);
}

.amp {
  font-style: normal;
  color: var(--petal);
  padding-inline: 0.12em;
}

.slip-hero {
  max-width: 27rem;
}

.scroll-cue {
  position: relative;
  z-index: 2;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--stem);
  text-decoration: none;
}

.scroll-cue-line {
  width: 1px;
  height: 3rem;
  background: linear-gradient(180deg, transparent, var(--stem));
  animation: cue 2.6s ease-in-out infinite;
}

@keyframes cue {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

/* ── sheets ────────────────────────────────────────────────────────────── */

.sheet {
  position: relative;
  overflow: hidden;
  width: min(100% - 2 * var(--gutter), var(--sheet-max));
  margin: clamp(1.5rem, 4vh, 3rem) auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3.5rem) var(--stack);
  background: var(--paper);
  border: 1px solid var(--hair);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03), 0 12px 28px -22px rgba(0, 0, 0, 0.4);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1.1rem;
  margin-bottom: clamp(2rem, 5vh, 3.25rem);
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--stem);
}

.sheet-no {
  flex: none;
}

.sheet-rule {
  flex: 1;
  height: 1px;
  background: var(--hair);
}

.sheet-det {
  flex: none;
  color: var(--ink);
}

.sheet-body {
  position: relative;
  z-index: 2;
}

.lead {
  max-width: var(--measure);
  margin-bottom: clamp(2rem, 5vh, 3rem);
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.45;
  color: var(--ink-soft);
}

/* ── specimen labels ───────────────────────────────────────────────────── */

.slip {
  border: 1px solid var(--hair);
  background: color-mix(in oklab, var(--paper), var(--kraft) 7%);
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.5;
  max-width: 34rem;
}

.slip-wide {
  max-width: 46rem;
}

.slip-row {
  display: grid;
  grid-template-columns: minmax(0, 9rem) minmax(0, 1fr);
  border-bottom: 1px dashed var(--hair);
}

.slip-row:last-child {
  border-bottom: 0;
}

.slip dt {
  padding: 0.6rem 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--stem);
  border-right: 1px dashed var(--hair);
}

.slip dd {
  padding: 0.6rem 0.9rem;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .slip-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .slip dt {
    border-right: 0;
    padding-bottom: 0;
  }

  .slip dd {
    padding-top: 0.15rem;
  }
}

/* ── countdown ─────────────────────────────────────────────────────────── */

.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 5vw, 3.5rem);
}

.cd-unit {
  display: grid;
  gap: 0.3rem;
  min-width: 4rem;
}

.cd-num {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 7vw, 4.25rem);
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
}

.cd-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--stem);
}

.countdown-passed {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2rem);
}

/* ── story ─────────────────────────────────────────────────────────────── */

.moments {
  display: grid;
  gap: clamp(1.75rem, 4vh, 2.75rem);
  max-width: 58rem;
}

.moment {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem;
  padding-left: 1.25rem;
  border-left: 2px solid color-mix(in oklab, var(--petal), transparent 45%);
}

.moment-year {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--stem);
}

.moment-place {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.8vw, 1.65rem);
  line-height: 1.25;
}

.moment-text {
  max-width: var(--measure);
  color: var(--ink-soft);
}

/* ── mounted photographs ───────────────────────────────────────────────── */

.mount {
  position: relative;
  rotate: var(--rot, 0deg);
  padding: 0.55rem 0.55rem 0;
  background: var(--paper);
  box-shadow: 0 8px 22px -18px rgba(0, 0, 0, 0.55);
}

/* tape at two opposite corners */
.mount::before,
.mount::after {
  content: '';
  position: absolute;
  width: 4.25rem;
  height: 1.2rem;
  background: color-mix(in oklab, var(--kraft), transparent 55%);
  border: 1px solid color-mix(in oklab, var(--kraft), transparent 70%);
  z-index: 3;
}

.mount::before {
  top: -0.5rem;
  left: -1.1rem;
  rotate: -34deg;
}

.mount::after {
  bottom: 1.35rem;
  right: -1.1rem;
  rotate: -34deg;
}

.mount-inner {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 5);
  overflow: hidden;
  background: var(--board);
}

.mount-inner img {
  width: 100%;
  height: 114%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
  filter: saturate(0.86);
}

.mount-cap {
  padding: 0.6rem 0.15rem 0.55rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.4;
  color: var(--stem);
}

.mount-row {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 6vh, 4rem);
  grid-template-columns: minmax(0, 1fr);
}

.mount-grid {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 620px) {
  .mount-row-2,
  .mount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 940px) {
  .mount-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ── location ──────────────────────────────────────────────────────────── */

.loc-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

@media (min-width: 860px) {
  .loc-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.loc-venue {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  margin-bottom: 1.25rem;
}

.loc-dir {
  max-width: var(--measure);
  margin-top: 1.5rem;
  color: var(--ink-soft);
}

.btn-line {
  display: inline-block;
  margin-top: 1.5rem;
  padding-bottom: 0.3rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stem);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity 200ms ease;
}

.btn-line:hover {
  opacity: 0.6;
}

.mount-inner-map {
  aspect-ratio: 4 / 3;
}

.mount-inner-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: saturate(0.55) sepia(0.18) contrast(0.94);
}

.mount-map::after {
  bottom: -0.5rem;
}

/* ── practical info ────────────────────────────────────────────────────── */

.facts {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.fact-q {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stem);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--hair);
}

.fact-a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ── rsvp ──────────────────────────────────────────────────────────────── */

.sheet-rsvp .sheet-body {
  max-width: 40rem;
}

.rsvp {
  display: grid;
  gap: 1.4rem;
}

.demo-notice {
  font-family: var(--mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: color-mix(in oklab, var(--petal), black 30%);
  padding: 0.5rem 0.75rem;
  border: 1px dashed color-mix(in oklab, var(--petal), transparent 50%);
  justify-self: start;
}

.field {
  display: grid;
  gap: 0.45rem;
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.field > label,
.field legend {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--stem);
  padding: 0;
}

.field input[type='text'],
.field input[type='email'],
.field input[type='number'],
.field textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: color-mix(in oklab, var(--paper), var(--kraft) 5%);
  border: 1px solid var(--hair);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.92rem;
  transition: border-color 180ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in oklab, var(--ink), transparent 62%);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--stem);
}

.field textarea {
  resize: vertical;
}

.field-half {
  max-width: 9rem;
}

.field-choice {
  gap: 0.55rem;
}

.choice,
.check {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  font-size: 0.94rem;
}

.choice input,
.check input {
  accent-color: var(--stem);
  width: 1rem;
  height: 1rem;
}

.err {
  min-height: 1.05rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: color-mix(in oklab, var(--petal), black 28%);
}

.field [aria-invalid='true'] {
  border-color: color-mix(in oklab, var(--petal), black 20%);
}

.btn {
  justify-self: start;
  margin-top: 0.35rem;
  padding: 0.85rem 2.25rem;
  background: var(--stem);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: background-color 180ms ease;
}

.btn:hover:not(:disabled) {
  background: color-mix(in oklab, var(--stem), black 15%);
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.rsvp-done h3 {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  margin-bottom: 0.6rem;
}

.rsvp-done p {
  color: var(--ink-soft);
  max-width: 40ch;
}

/* ── footer ────────────────────────────────────────────────────────────── */

.footer {
  padding: clamp(2.5rem, 7vh, 4.5rem) var(--gutter);
  text-align: center;
  display: grid;
  gap: 0.7rem;
  color: var(--ink-soft);
}

.footer-mark {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--ink);
}

.footer-note,
.footer-credits {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.footer-credits {
  text-transform: none;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.footer-credits a {
  color: inherit;
}

/* ── music toggle ──────────────────────────────────────────────────────── */

.music {
  position: fixed;
  right: clamp(0.9rem, 3vw, 1.75rem);
  bottom: clamp(0.9rem, 3vw, 1.75rem);
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.8rem;
  background: var(--paper);
  border: 1px solid var(--hair);
  color: var(--stem);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 13px;
}

.music-bars i {
  width: 2px;
  height: 40%;
  background: var(--stem);
  transition: height 200ms ease;
}

.music[data-playing='true'] .music-bars i {
  animation: bars 900ms ease-in-out infinite alternate;
}

.music[data-playing='true'] .music-bars i:nth-child(2) { animation-delay: 150ms; }
.music[data-playing='true'] .music-bars i:nth-child(3) { animation-delay: 300ms; }

@keyframes bars {
  from { height: 30%; }
  to { height: 100%; }
}

.music-hint {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0;
  transition:
    max-width 300ms ease,
    opacity 200ms ease;
}

.music[data-empty='true'] .music-hint {
  max-width: 15rem;
  opacity: 0.85;
}

/* ── reduced motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .scroll-cue-line {
    animation: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
