/* Shared components. Each block notes its Framer source. Sizes in px match the Framer frames. */

/* ───────── Icon (sprite) ───────── */
.icon { width: 1em; height: 1em; flex: none; }

/* ───────── Navbar · Framer "Navbar" (9 colour themes) ─────────
   <header class="nav" data-theme="hero"> … </header>
   Add .is-named to swap the J&B mark for the small "Bea & Josh" (scroll behaviour lives with the hero). */
.nav {
  --nav-bg: transparent; --nav-fg: var(--color-cream); --nav-mark: var(--color-brick);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--nav-bg); color: var(--nav-fg);
  transition: background-color .3s ease, color .3s ease;
}
@media (min-width: 810px) { .nav { padding: 14px 32px; } }
.nav[data-theme="off-white"] { --nav-bg: var(--color-off-white); --nav-fg: var(--color-black); }
.nav[data-theme="sand"]      { --nav-bg: var(--color-sand);      --nav-fg: var(--color-black); }
.nav[data-theme="burgundy"]  { --nav-bg: var(--color-burgundy); }
.nav[data-theme="rust"]      { --nav-bg: var(--color-rust);      --nav-mark: var(--color-cream); }
.nav[data-theme="magenta"]   { --nav-bg: var(--color-magenta);   --nav-mark: var(--color-cream); }
.nav[data-theme="chocolate"] { --nav-bg: var(--color-chocolate); }
.nav[data-theme="black"]     { --nav-bg: var(--color-black); }
.nav[data-theme="photo"]     { --nav-bg: transparent; }
.nav[data-theme="lime"]      { --nav-bg: var(--color-lime);      --nav-fg: var(--color-black); }   /* RSVP Find screen */

.nav__brand { position: relative; display: block; width: 44px; height: 44px; color: var(--nav-mark); }
.nav__mark { width: 44px; height: 44px; transition: opacity .25s ease; }
.nav__name {
  position: absolute; left: 0; top: 10px; white-space: nowrap; color: var(--nav-mark);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.nav.is-named .nav__mark { opacity: 0; }
.nav.is-named .nav__name { opacity: 1; }
.nav__actions { display: flex; align-items: center; gap: 24px; }
.nav__menu { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.nav__menu .icon { width: 22px; height: 14px; }
.nav .pill { border-color: currentColor; }

/* ───────── Tag · a non-clickable label pill (Dress Code lens captions). Use with .t-small ───────── */
.tag {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  height: 40px; padding: 0 16px; border: 1px solid currentColor; border-radius: 999px;
  background: var(--tag-bg, transparent); color: inherit;
}

/* ───────── Pill button · navbar "RSVP" ───────── */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border: 1px solid currentColor; border-radius: 999px;
  font-family: var(--font-favorit); font-weight: 500; font-size: var(--type-button-size); line-height: 1;   /* Button */
  transition: background-color .2s ease, color .2s ease;
}
.pill:hover { background: color-mix(in srgb, currentColor 14%, transparent); }

/* ───────── Solid button · RSVP "Send my reply" / Find "Find my invite" ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 54px; padding: 0 34px; background: var(--color-black); color: var(--color-off-white);
  font-family: var(--font-favorit); font-weight: 500; font-size: var(--type-button-size); line-height: 1;   /* Button */
  transition: opacity .2s ease;
}
.btn:hover { opacity: .88; }
.btn--block { width: 100%; }

/* ───────── Text link · 1px underline with 3px gap (e.g. "Not your invite?", "Back to the site") ───────── */
.link {
  display: inline-block; padding-bottom: 3px; border-bottom: 1px solid currentColor;
  font-family: var(--font-favorit); font-weight: 500; font-size: var(--type-small-size); line-height: var(--type-small-lh);   /* Small */
}
.link:hover { opacity: .7; }

/* ───────── Arrow · Framer "Arrow" (Next / Previous, light / dark) ───────── */
.arrow {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid currentColor; border-radius: 50%; color: var(--color-off-white);
  transition: background-color .2s ease, opacity .2s ease;
}
.arrow .icon { width: 14px; height: 14px; }
.arrow--dark { color: var(--color-black); }
.arrow:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
.arrow[disabled], .arrow[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* ───────── Colour dot · Framer "Colour dot" (Large 56 / Medium 44 / Small 32) ───────── */
.dot { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; color: var(--color-off-white); }
.dot__circle { width: 56px; height: 56px; border-radius: 50%; background: var(--dot, var(--color-sand)); }
.dot--m .dot__circle { width: 44px; height: 44px; }
.dot--s .dot__circle { width: 32px; height: 32px; }
.dot__label, .dot__hex {
  font-family: var(--font-redward-mono); font-size: var(--type-eyebrow-size); letter-spacing: .1em; text-transform: uppercase;   /* Eyebrow size */
  font-variation-settings: "wght" 400;
}
.dot__hex { font-variation-settings: "wght" 100; }

/* ───────── Stamp · Framer "Stamp" (perforated paper + 70×90 photo) ───────── */
.stamp {
  position: relative; width: 84px; height: 104px; color: var(--color-off-white);
  filter: drop-shadow(0 1px 1px rgba(20,12,6,.05)) drop-shadow(0 6px 7px rgba(20,12,6,.18));
}
.stamp__paper { position: absolute; inset: 0; width: 100%; height: 100%; }
.stamp__photo {
  position: absolute; left: 7px; top: 7px; width: 70px; height: 90px; object-fit: cover;
  background: var(--color-sand);
}

/* ───────── Countdown · hero countdown (Red Eye Count numbers + Red Eye Thin labels) ───────── */
/* Equal-width columns, so the four units sit symmetrically on the centre line
   ("Seconds" is wider than "Days", which pushed the group off centre) */
.countdown {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; justify-content: center;
  width: fit-content; margin-inline: auto; column-gap: 20px; color: var(--color-cream);
}
@media (max-width: 809px) { .countdown { column-gap: 8px; } }
.countdown__unit { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.countdown__num { font-variant-numeric: tabular-nums; }

/* ───────── RSVP stamp button · Framer "RSVP Button" (Default / Hover) ───────── */
.rsvp-stamp { position: relative; display: inline-block; width: 260px; height: 240px; }
.rsvp-stamp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .2s ease, transform .3s ease; }
.rsvp-stamp__hover { opacity: 0; transform: rotate(-7deg) scale(1.1); }
.rsvp-stamp:hover .rsvp-stamp__default, .rsvp-stamp:focus-visible .rsvp-stamp__default { opacity: 0; }
.rsvp-stamp:hover .rsvp-stamp__hover, .rsvp-stamp:focus-visible .rsvp-stamp__hover { opacity: 1; }

/* ───────── Form controls · RSVP flow ─────────
   Light by default (cream panel). Wrap in .form--dark for the Chocolate form. */
.form {
  --f-fg: var(--color-black); --f-label: var(--color-charcoal); --f-value: var(--color-black);
  --f-placeholder: var(--color-taupe); --f-line: rgba(42,38,34,.45); --f-row: rgba(42,38,34,.14);
  --f-box: var(--color-cream); --f-box-line: rgba(42,38,34,.55); --f-check: var(--color-burgundy);
  --f-pill-line: rgba(42,38,34,.4); --f-pill-on: var(--color-blush); --f-pill-on-fg: var(--color-chocolate);
  --f-error: var(--color-red); --f-error-line: var(--color-red);
  color: var(--f-fg);
}
.form--dark {
  --f-fg: var(--color-cream); --f-label: var(--color-sand); --f-value: var(--color-cream);
  --f-placeholder: var(--color-sand); --f-line: rgba(247,239,216,.45); --f-row: rgba(220,195,165,.14);
  --f-box: rgba(247,239,216,.04); --f-box-line: rgba(220,195,165,.55); --f-check: var(--color-burgundy);
  --f-pill-line: rgba(247,239,216,.4); --f-error: var(--color-cream);
  background: var(--color-chocolate);
}

/* Field row: label column + underlined input. Stacks on phone. */
.field { display: grid; grid-template-columns: 132px 1fr; column-gap: 14px; align-items: end; padding-top: 6px; }
@media (max-width: 809px) { .field { grid-template-columns: 1fr; row-gap: 4px; } }
.field__label { padding-bottom: 12px; color: var(--f-label); }
@media (max-width: 809px) { .field__label { padding-bottom: 0; } }
.field__pair { display: flex; gap: 10px; }
.field__pair > .input:last-child { flex: 0 0 128px; }
.input, .select {
  width: 100%; height: 44px; padding: 8px 2px 6px; border: 0; border-bottom: 1px solid var(--f-line);
  background: transparent; color: var(--f-value); border-radius: 0; outline-offset: 2px;
  font-family: var(--font-greenstone); font-style: italic; font-size: var(--type-input-size); line-height: var(--type-input-lh);   /* Input */
}
.input::placeholder { color: var(--f-placeholder); opacity: 1; }
.input.is-error { border-bottom-color: var(--f-error-line); }
.field__error { grid-column: 2; padding-top: 8px; color: var(--f-error); }
@media (max-width: 809px) { .field__error { grid-column: 1; } }

/* Checkbox row: 20px box, name, day/time on the right */
.check {
  display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 0;
  border-bottom: 1px solid var(--f-row); cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: none; display: grid; place-items: center; width: 20px; height: 20px;
  background: var(--f-box); border: 1.5px solid var(--f-box-line); border-radius: 3px; color: var(--color-cream);
}
.check__box .icon { width: 16px; height: 16px; opacity: 0; }
.check input:checked + .check__box { background: var(--f-check); border-color: var(--f-check); }
.check input:checked + .check__box .icon { opacity: 1; }
.check input:focus-visible + .check__box { outline: 2px solid currentColor; outline-offset: 2px; }
.check__name { flex: 1; }
.check__day { color: var(--f-label); text-align: right; }
/* Phone: day/time drops under the event name so long names keep room */
@media (max-width: 809px) {
  .check { display: grid; grid-template-columns: 20px 1fr; column-gap: 12px; row-gap: 2px; }
  .check__box { grid-row: span 2; align-self: center; }
  .check__day { text-align: left; }
}

/* Radio pills (after-afterparty) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 809px) { .choices { flex-direction: column; } .choices .choice { width: 100%; } }
.choice {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px;
  border: 1.5px solid var(--f-pill-line); border-radius: 999px; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__radio {
  display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--f-pill-line); background: var(--color-chocolate);
}
.form:not(.form--dark) .choice__radio { background: var(--color-cream); }
.choice__radio::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-sand); opacity: 0; }
.choice:has(input:checked) { background: var(--f-pill-on); border-color: var(--color-sand); color: var(--f-pill-on-fg); }
.choice:has(input:checked) .choice__radio::after { opacity: 1; }
.choice:has(input:focus-visible) { outline: 2px solid currentColor; outline-offset: 2px; }

/* Textarea (Anything else?) */
.textarea {
  display: block; width: 100%; min-height: 128px; padding: 12px 14px; resize: vertical;
  border: 1.5px solid var(--f-pill-line); background: transparent; color: var(--f-value); border-radius: 0;
  font-family: var(--font-greenstone); font-style: italic; font-size: var(--type-input-size); line-height: var(--type-input-lh);   /* Input */
}
.textarea::placeholder { color: var(--f-placeholder); opacity: 1; }

/* Banner (Replied) */
.banner { display: flex; gap: 10px; align-items: center; padding: 14px 16px; background: var(--color-blush); color: var(--color-chocolate); }
.banner .icon { width: 18px; height: 18px; }

/* ───────── Reveals (motion spec: Entourage, FAQs, RSVP) ─────────
   data-reveal            fade in + rise (--rise, default 12px)
   data-reveal="group"    the element stays put; its .rv-item children rise one after another (--step)
   data-reveal="mask"     uncovered from the bottom up; the image inside settles from 104%
   data-reveal="draw"     an svg whose stroked paths draw on and filled shapes fade in
   data-reveal-at=".3"    how much must be in view (phone uses the smaller of this and .15)
   js/components.js adds .is-in once, and adds it straight away when reduced motion is on. */
[data-reveal] {
  --rv-dur: .5s; --rv-ease: var(--ease-out-expo);
  opacity: 0; translate: 0 var(--rise, 12px);
  transition: opacity var(--rv-dur) var(--rv-ease) var(--delay, 0s), translate var(--rv-dur) var(--rv-ease) var(--delay, 0s);
}
[data-reveal].is-in { opacity: 1; translate: 0 0; }

[data-reveal="group"], [data-reveal="mask"], [data-reveal="draw"] { opacity: 1; translate: none; }
[data-reveal="group"] .rv-item {
  display: block; opacity: 0; translate: 0 var(--rise, 12px);
  transition: opacity .45s var(--ease-out-expo), translate .45s var(--ease-out-expo);
  transition-delay: calc(var(--delay, 0s) + var(--i, 0) * var(--step, .04s));
}
[data-reveal="group"].is-in .rv-item { opacity: 1; translate: 0 0; }

[data-reveal="mask"] {
  clip-path: inset(100% 0 0 0);
  transition: clip-path .7s var(--ease-out-expo) var(--delay, 0s);
}
[data-reveal="mask"] img { scale: 1.04; transition: scale .7s var(--ease-out-expo) var(--delay, 0s); }
[data-reveal="mask"].is-in { clip-path: inset(0 0 0 0); }
[data-reveal="mask"].is-in img { scale: 1; }

[data-reveal="draw"] [stroke] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .6s var(--ease-out-quart) var(--delay, 0s); }
[data-reveal="draw"] :is(path, g, circle):not([stroke]) { opacity: 0; transition: opacity .4s var(--ease-out-quart) var(--delay, 0s); }
[data-reveal="draw"].is-in [stroke] { stroke-dashoffset: 0; }
[data-reveal="draw"].is-in :is(path, g, circle):not([stroke]) { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal] * { transition: none !important; }
}

/* More reveals (FAQs, Things to come):
   data-reveal="settle"   fades in and settles from 106% to 100% (1.4s)
   data-reveal="letters"  each letter fades in, 0.05s apart (js splits the text into letters)
   data-reveal="paper"    fades in, rises 22px and settles from 102% (1s) */
[data-reveal="settle"] { --rv-dur: 1.4s; translate: none; scale: 1.06; transition: opacity var(--rv-dur) var(--rv-ease) var(--delay, 0s), scale var(--rv-dur) var(--rv-ease) var(--delay, 0s); }
[data-reveal="settle"].is-in { scale: 1; translate: none; }
[data-reveal="letters"], [data-reveal="letters"].is-in { opacity: 1; translate: none; }
[data-reveal="letters"] .rv-l { opacity: 0; transition: opacity .5s var(--ease-letters) calc(.1s + var(--delay, 0s) + var(--i, 0) * .05s); }
[data-reveal="letters"].is-in .rv-l { opacity: 1; }
[data-reveal="paper"] { --rv-dur: 1s; --rise: 22px; scale: 1.02; transition: opacity var(--rv-dur) var(--rv-ease) var(--delay, 0s), translate var(--rv-dur) var(--rv-ease) var(--delay, 0s), scale var(--rv-dur) var(--rv-ease) var(--delay, 0s); }
[data-reveal="paper"].is-in { scale: 1; }
