/* ==========================================================================
   Paola & Andreas — 23 January 2027 — Cartagena, Colombia
   Design system. Palette sampled from the Cartagena watercolour.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Colour — sampled directly from the hero painting */
  --c-terracotta:      #C36A52;  /* cathedral dome */
  --c-terracotta-deep: #A2503C;  /* dome shadow — AA on cream */
  --c-marigold:        #E8A33D;  /* yellow facades */
  --c-marigold-deep:   #B87A1E;  /* AA on cream */
  --c-blue:            #6D9DC5;  /* balcony shutters */
  --c-blue-deep:       #3F6B94;  /* AA on cream */
  --c-bougainvillea:   #C2478A;  /* the flowers — accent only, used sparingly */
  --c-green:           #6E8F5E;  /* awnings, palms */

  --c-cream:           #F7F1E6;  /* page background */
  --c-cream-deep:      #EFE6D6;  /* alternating sections */
  --c-cream-line:      #E2D5BF;  /* hairlines */
  --c-ink:             #2E2A26;  /* body text — 12.9:1 on cream */
  --c-ink-soft:        #5C554C;  /* secondary text — 6.4:1 on cream */
  --c-white:           #FFFFFF;

  /* Semantic */
  --color-background:  var(--c-cream);
  --color-foreground:  var(--c-ink);
  --color-muted:       var(--c-ink-soft);
  --color-border:      var(--c-cream-line);
  --color-primary:     var(--c-terracotta-deep);
  --color-accent:      var(--c-marigold-deep);

  /* Type */
  --font-display: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --font-ui: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing — spacious rhythm (density 3/10) */
  --space-2xs: 4px;
  --space-xs:  8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  48px;
  --space-xl:  72px;
  --space-2xl: 96px;
  --space-3xl: 144px;

  /* Layout */
  --measure: 68ch;
  --container: 1180px;
  --container-narrow: 820px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 160ms;
  --dur: 240ms;
  --dur-slow: 420ms;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(46, 42, 38, 0.06), 0 2px 8px rgba(46, 42, 38, 0.04);
  --shadow-md: 0 2px 6px rgba(46, 42, 38, 0.07), 0 10px 30px rgba(46, 42, 38, 0.08);

  /* Z-scale */
  --z-nav: 100;
  --z-menu: 200;
  --z-modal: 1000;
}

/* --- Reset -------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-foreground);
  font-family: var(--font-ui);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

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

/* --- Typography --------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0.01em;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-terracotta-deep);
  margin: 0 0 var(--space-sm);
}

.section-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin-bottom: var(--space-md);
}

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  font-weight: 300;
  line-height: 1.6;
  color: var(--c-ink-soft);
  max-width: var(--measure);
}

/* Decorative rule with a diamond — echoes the invitation feel */
.rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-lg) auto;
  max-width: 220px;
}
.rule::before, .rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}
.rule span {
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  background: var(--c-terracotta);
}

/* --- Layout ------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding-block: var(--space-2xl);
}
.section--alt { background: var(--c-cream-deep); }

@media (min-width: 768px) {
  .section { padding-block: var(--space-3xl); }
  .container { padding-inline: var(--space-lg); }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-modal);
  background: var(--c-ink);
  color: var(--c-white);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.skip-link:focus { left: var(--space-sm); top: var(--space-sm); }

/* --- Focus -------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--c-terracotta-deep);
  outline-offset: 3px;
  border-radius: 2px;
}
.hero :focus-visible,
.nav--over :focus-visible {
  outline-color: var(--c-white);
}

/* --- Navigation --------------------------------------------------------- */

.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  transition: background var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              padding var(--dur) var(--ease-out);
}

/* Transparent over the hero; the scrim behind it carries the contrast */
.nav--over {
  background: transparent;
  color: var(--c-white);
}

/* Solid once scrolled, or on interior pages */
.nav--solid {
  background: rgba(247, 241, 230, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--c-ink);
  box-shadow: 0 1px 0 var(--color-border);
  padding-block: var(--space-sm);
}

.nav__list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: clamp(var(--space-sm), 2vw, var(--space-lg));
}

.nav__link {
  position: relative;
  display: inline-block;
  padding: var(--space-xs) 0;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--dur) var(--ease-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease-out);
}
.nav__link:hover::after,
.nav__link:focus-visible::after { transform: scaleX(1); }

/* Active page marker — terracotta underline, as in the reference */
.nav__link[aria-current='page']::after {
  transform: scaleX(1);
  background: var(--c-terracotta);
  height: 2px;
}

/* RSVP sits in an outlined box */
.nav__rsvp {
  padding: var(--space-xs) var(--space-md);
  border: 1px solid currentColor;
  letter-spacing: 0.18em;
  transition: background var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out);
}
.nav__rsvp::after { display: none; }
.nav--over .nav__rsvp:hover,
.nav--over .nav__rsvp:focus-visible {
  background: var(--c-white);
  color: var(--c-ink);
}
.nav--solid .nav__rsvp:hover,
.nav--solid .nav__rsvp:focus-visible {
  background: var(--c-terracotta-deep);
  border-color: var(--c-terracotta-deep);
  color: var(--c-white);
}

/* Mobile menu button — 44×44 minimum target */
.nav__toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  padding: 0;
  background: none;
  border: 0;
  color: inherit;
}
.nav__toggle svg { width: 24px; height: 24px; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded='true'] .icon-open { display: none; }
.nav__toggle[aria-expanded='true'] .icon-close { display: block; }

.nav__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  margin-inline-end: auto;
}

/* Desktop: full nav, no hamburger. Declared after the mobile rules so it wins. */
@media (min-width: 1140px) {
  .nav__list { display: flex; }
  .nav__toggle { display: none; }
  .nav__brand { display: none; }
}

/* Mobile drawer */
.nav__drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: grid;
  place-items: center;
  background: var(--c-cream);
  opacity: 0;
  visibility: hidden;
  /* visibility is stepped, not interpolated: hold it until the fade-out ends
     on close. Never transition it as a duration — if the transition engine
     doesn't run, visibility stays stuck on its start value and the drawer
     never appears at all. */
  transition: opacity var(--dur) var(--ease-out),
              visibility 0s linear var(--dur);
}
.nav__drawer[data-open='true'] {
  opacity: 1;
  visibility: visible;
  /* On open, flip to visible immediately — no delay. */
  transition: opacity var(--dur) var(--ease-out),
              visibility 0s linear 0s;
}
.nav__drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}
.nav__drawer li { margin-block: var(--space-sm); }
.nav__drawer a {
  display: block;
  padding: var(--space-xs) var(--space-md);
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--c-ink);
}
.nav__drawer a[aria-current='page'] { color: var(--c-terracotta-deep); }

@media (min-width: 1140px) {
  .nav__drawer { display: none; }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--space-3xl)) var(--space-md) var(--space-2xl);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  /* Drop luminance for text contrast, push saturation back up to compensate.
     A flat grey scrim alone would hit the same contrast but wash the
     watercolour out — this keeps the pigment. */
  filter: brightness(0.84) saturate(1.15);
}

/* Scrim. Three layers: top carries the nav's contrast, centre carries the
   names, bottom carries the RSVP button. Without this, white text sits on a
   pale watercolour sky at roughly 1.4:1 — unreadable. */
/* Measured, not guessed: the facades behind the names hit rgb(244), so white
   text needs real help to clear 3:1. Most of the work is done by the filter on
   .hero__bg; this scrim only tops it up where text actually sits. Values tuned
   against a per-pixel contrast sweep of the painting. */
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(38, 32, 28, 0.62) 0%, rgba(38, 32, 28, 0) 240px),
    linear-gradient(to top,    rgba(38, 32, 28, 0.50) 0%, rgba(38, 32, 28, 0) 280px),
    radial-gradient(ellipse 1000px 700px at 50% 52%,
      rgba(38, 32, 28, 0.48) 0%,
      rgba(38, 32, 28, 0.34) 55%,
      rgba(38, 32, 28, 0.10) 100%);
}

.hero__inner {
  position: relative;
  text-align: center;
  color: var(--c-white);
  max-width: 900px;
  text-shadow: 0 1px 24px rgba(38, 32, 28, 0.35);
}

.hero__intro {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-md);
}

.hero__names {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
}

.hero__amp {
  display: block;
  font-style: italic;
  text-transform: none;
  font-size: 0.62em;
  letter-spacing: 0;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.94);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  letter-spacing: 0.08em;
  margin: var(--space-md) 0 var(--space-xs);
}
.hero__meta .sep {
  display: inline-block;
  margin-inline: 0.6em;
  opacity: 0.6;
}

/* Narrow screens: stack date over city rather than let "Colombia" orphan.
   align-items must flip to center too — in a column flex container it governs
   the horizontal axis, and the inherited `baseline` would pin both to the
   start edge. */
@media (max-width: 560px) {
  .hero__meta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2xs);
  }
  .hero__meta .sep { display: none; }
}

.hero__venue {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  /* 24px floor keeps this at WCAG "large text", so 3:1 applies */
  font-size: clamp(1.5rem, 2vw, 1.6rem);
  margin: 0;
}
.hero__venue a {
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: 2px;
  transition: border-color var(--dur) var(--ease-out);
}
.hero__venue a:hover { border-color: var(--c-white); }

.hero__cta { margin-top: var(--space-xl); }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: var(--space-md);
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.85);
  animation: nudge 2.6s var(--ease-in-out) infinite;
}
.hero__scroll svg { width: 22px; height: 22px; }

@keyframes nudge {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}

/* --- Buttons ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 46px;
  padding: var(--space-xs) var(--space-xl);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(0.98); }

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.9);
  color: var(--c-white);
  background: rgba(38, 32, 28, 0.12);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--c-white);
  color: var(--c-ink);
  border-color: var(--c-white);
}

.btn--solid {
  background: var(--c-terracotta-deep);
  color: var(--c-white);
  border-color: var(--c-terracotta-deep);
}
.btn--solid:hover,
.btn--solid:focus-visible { background: #8C4231; border-color: #8C4231; }

.btn--outline {
  border-color: var(--c-ink);
  color: var(--c-ink);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--c-ink);
  color: var(--c-cream);
}

/* --- Countdown ---------------------------------------------------------- */

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(var(--space-md), 5vw, var(--space-xl));
  margin: 0;
  padding: 0;
  list-style: none;
}
.countdown__num {
  display: block;
  font-family: var(--font-display);
  /* tabular figures stop the layout jittering as numbers tick */
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 300;
  line-height: 1;
  color: var(--c-terracotta-deep);
}
.countdown__unit {
  display: block;
  margin-top: var(--space-xs);
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}
.countdown > li { text-align: center; }

/* --- Utilities ---------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- Quick links -------------------------------------------------------- */

.linkgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
@media (min-width: 640px) { .linkgrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .linkgrid { grid-template-columns: repeat(3, 1fr); } }

.linkcard {
  display: block;
  padding: var(--space-lg) var(--space-md);
  background: var(--c-white);
  border: 1px solid var(--color-border);
  text-decoration: none;
  text-align: center;
  transition: transform var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out);
}
.linkcard:hover,
.linkcard:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--c-terracotta);
}
.linkcard__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: 0 auto var(--space-sm);
  color: var(--c-terracotta-deep);
}
.linkcard__icon svg { width: 26px; height: 26px; stroke-width: 1.25; }
.linkcard h3 {
  font-size: 1.5rem;
  margin-bottom: var(--space-2xs);
}
.linkcard p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
  line-height: 1.6;
}

/* --- Footer ------------------------------------------------------------- */

.footer {
  padding-block: var(--space-2xl) var(--space-lg);
  background: var(--c-ink);
  color: var(--c-cream);
  text-align: center;
}
.footer__names {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 var(--space-sm);
}
.footer__meta {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(247, 241, 230, 0.75);
  margin: 0 0 var(--space-lg);
}
.footer__rule {
  width: 60px;
  height: 1px;
  background: rgba(247, 241, 230, 0.28);
  margin: 0 auto var(--space-lg);
  border: 0;
}
.footer__note {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(247, 241, 230, 0.5);
  margin: 0;
}

.footer__tag {
  min-height: 44px;
  padding: var(--space-xs) var(--space-sm);
  background: none;
  border: 0;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--c-cream);
  transition: color var(--dur) var(--ease-out);
}
.footer__tag:hover,
.footer__tag:focus-visible { color: var(--c-marigold); }
.footer__tag[data-copied='true']::after {
  content: ' — copied';
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--c-marigold);
}
.footer :focus-visible { outline-color: var(--c-marigold); }

/* --- Interior page header ----------------------------------------------- */

/* Interior pages have no hero, so they need top padding to clear the fixed nav. */
.page-head {
  padding-block: calc(var(--space-3xl) + 40px) var(--space-xl);
  text-align: center;
  background: var(--c-cream-deep);
  border-bottom: 1px solid var(--color-border);
}
.page-head h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin-bottom: var(--space-md);
}
.page-head .lede { margin-inline: auto; }

/* --- Cards -------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}
@media (min-width: 640px) { .cards--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  background: var(--c-white);
  border: 1px solid var(--color-border);
}
.card h3 {
  font-size: 1.55rem;
  margin-bottom: var(--space-2xs);
}
.card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--c-ink-soft);
}
.card__meta {
  margin-top: var(--space-xs);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-marigold-deep);
}
.card__link {
  margin-top: auto;
  padding-top: var(--space-md);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-terracotta-deep);
  text-decoration: none;
}
.card__link:hover { text-decoration: underline; }

.badge {
  align-self: flex-start;
  margin-bottom: var(--space-xs);
  padding: 2px var(--space-xs);
  background: var(--c-terracotta-deep);
  color: var(--c-white);
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --- Itinerary ---------------------------------------------------------- */

.day + .day { margin-top: var(--space-2xl); }

.day__label {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}
.day__date {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 300;
}
.day__name {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
}

.event {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xs) var(--space-lg);
  padding-block: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}
@media (min-width: 720px) {
  .event { grid-template-columns: 180px 1fr; }
}
.event__time {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--c-terracotta-deep);
  font-variant-numeric: tabular-nums;
}
.event__note {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--c-ink-soft);
}
.event h3 { font-size: 1.7rem; margin-bottom: var(--space-2xs); }
.event p { margin: 0 0 var(--space-xs); color: var(--c-ink-soft); }
.event__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xs);
}
.event__links a {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-terracotta-deep);
}

/* --- Simple lists (restaurants, salons, flights) ------------------------ */

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pills li {
  padding: var(--space-2xs) var(--space-sm);
  background: var(--c-white);
  border: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.group + .group { margin-top: var(--space-xl); }
.group__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 400;
  margin-bottom: var(--space-2xs);
}
.group__note {
  margin: 0 0 var(--space-md);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--c-ink-soft);
}

/* --- Accordion (native <details> — works with JS disabled) -------------- */

.qa {
  border-bottom: 1px solid var(--color-border);
}
.qa summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
  font-family: var(--font-display);
  font-size: 1.35rem;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--c-terracotta-deep);
  border-bottom: 1.5px solid var(--c-terracotta-deep);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur) var(--ease-out);
}
.qa[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.qa__body {
  padding-bottom: var(--space-md);
  max-width: var(--measure);
  color: var(--c-ink-soft);
}
.qa__body p { margin: 0; }
.qa__body a { color: var(--c-terracotta-deep); }

/* --- Mood board masonry ------------------------------------------------- */

.masonry {
  columns: 1;
  column-gap: var(--space-md);
}
@media (min-width: 560px) { .masonry { columns: 2; } }
@media (min-width: 960px) { .masonry { columns: 3; } }

.masonry figure {
  break-inside: avoid;
  margin: 0 0 var(--space-md);
}
.masonry img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
}
.masonry figcaption {
  margin-top: var(--space-2xs);
  font-size: 0.8rem;
  font-style: italic;
  color: var(--c-ink-soft);
}

/* --- Our Story photo ---------------------------------------------------- */

/* Portrait 3:4. Capped well below the container width — at full width it would
   run over 1000px tall and bury the text underneath it. */
.story-photo {
  max-width: 400px;
  margin: 0 auto var(--space-xl);
}
.story-photo img {
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
}

/* --- Full-width image band ---------------------------------------------- */

.band {
  height: 300px;
  overflow: hidden;
}
.band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
@media (min-width: 768px) { .band { height: 400px; } }

/* --- Forms -------------------------------------------------------------- */

.form { max-width: 620px; margin-inline: auto; }

.field { margin-bottom: var(--space-lg); }

/* Attendee-only fields are hidden when a guest declines. Stated explicitly so
   that adding a `display` to .field later cannot silently un-hide them. */
.field[hidden] { display: none; }

.field > label,
.field__legend {
  display: block;
  margin-bottom: var(--space-xs);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-ink);
}
.field__hint {
  margin: 0 0 var(--space-xs);
  font-size: 0.88rem;
  font-style: italic;
  color: var(--c-ink-soft);
}

.input,
.select,
.textarea {
  width: 100%;
  /* 16px floor — anything smaller makes iOS zoom on focus */
  min-height: 48px;
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 300;
  color: var(--c-ink);
  background: var(--c-white);
  border: 1px solid var(--c-cream-line);
  border-radius: 0;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--c-terracotta-deep);
  box-shadow: 0 0 0 3px rgba(162, 80, 60, 0.14);
}
.textarea { min-height: 120px; padding-top: var(--space-sm); resize: vertical; }

.field--invalid .input,
.field--invalid .select,
.field--invalid .textarea { border-color: #B3261E; }

.error {
  display: none;
  margin: var(--space-2xs) 0 0;
  font-size: 0.84rem;
  color: #B3261E;
}
.field--invalid .error { display: block; }

/* Radio / checkbox rows — whole row is the target, min 48px */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  border: 0;
  margin: 0;
  padding: 0;
}
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: var(--space-xs) var(--space-md);
  background: var(--c-white);
  border: 1px solid var(--c-cream-line);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease-out),
              background var(--dur) var(--ease-out);
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  margin: 0;
  cursor: pointer;
}
.choice__mark {
  flex: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--c-cream-line);
  border-radius: 50%;
  transition: border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.choice input[type='checkbox'] ~ .choice__mark { border-radius: 2px; }
.choice:hover { border-color: var(--c-terracotta); }
.choice:has(input:checked) {
  border-color: var(--c-terracotta-deep);
  background: #FBF3EF;
}
.choice:has(input:checked) .choice__mark {
  border-color: var(--c-terracotta-deep);
  box-shadow: inset 0 0 0 3.5px var(--c-white), inset 0 0 0 9px var(--c-terracotta-deep);
}
/* Keyboard focus must be visible on the row, not the hidden input */
.choice:has(input:focus-visible) {
  outline: 2px solid var(--c-terracotta-deep);
  outline-offset: 2px;
}

.form__status {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  background: var(--c-white);
  text-align: center;
}
.form__status[hidden] { display: none; }

/* --- Registry: sticky give-button + preview ------------------------------ */

/* Giving cannot happen inside the frame. Browsers treat Joy's cookies as
   third-party there, so cart, sign-in and checkout fail silently. So the
   button is the product and the frame is a picture of it. Everything below
   is arranged to make that impossible to get wrong. */

/* Sticks under the fixed nav so it stays reachable however far the guest
   scrolls through the preview. */
.registry-cta {
  position: sticky;
  top: var(--nav-h, 76px);
  z-index: 50;
  padding: var(--space-md) 0;
  background: rgba(247, 241, 230, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-block: 1px solid var(--color-border);
  text-align: center;
}
@media (min-width: 768px) {
  .registry-cta { top: 72px; }
}

/* Generous padding is the point of this button, but on a narrow phone 96px a
   side leaves too little room for the label and it wraps awkwardly. Tighten
   the padding and tracking below 480px so it stays on one line. */
.btn--big {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-align: center;
  line-height: 1.4;
}
@media (min-width: 480px) {
  .btn--big {
    padding: var(--space-sm) var(--space-2xl);
    font-size: 0.86rem;
    letter-spacing: 0.22em;
  }
}

.registry-cta__note {
  margin: var(--space-sm) 0 0;
  font-size: 0.78rem;
  color: var(--c-ink-soft);
}

/* The frame is deliberately tall rather than a fixed window: a short frame
   would need scrolling *inside* it, which is unreliable on touch and hides
   Joy's ~1330px header before a single gift appears. Tall frame, page scrolls
   normally, gifts visible. */
.registry-preview {
  padding-block: var(--space-xl) var(--space-2xl);
}

.registry-preview__frame {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  height: 1500px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--c-white);
}
@media (min-width: 768px) {
  .registry-preview__frame { height: 2400px; }
}

.registry-preview__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  /* Dead to the pointer: the overlay below takes every click instead. */
  pointer-events: none;
}

.registry-preview__hit {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
}
.registry-preview__hit:hover,
.registry-preview__hit:focus-visible {
  background: rgba(46, 42, 38, 0.04);
}

/* Visible only on hover/focus, so the preview stays clean but the click
   target still announces itself. */
.registry-preview__hit-label {
  position: absolute;
  left: 50%;
  bottom: var(--space-lg);
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-md);
  background: var(--c-ink);
  color: var(--c-cream);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--dur) var(--ease-out);
}
.registry-preview__hit:hover .registry-preview__hit-label,
.registry-preview__hit:focus-visible .registry-preview__hit-label { opacity: 1; }

.registry-preview__caption {
  margin: var(--space-md) auto 0;
  max-width: var(--container);
  text-align: center;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}
.registry-preview__caption a { color: var(--c-terracotta-deep); }

/* --- RSVP thank-you panel ----------------------------------------------- */

.thanks {
  padding: var(--space-2xl) var(--space-lg);
  background: var(--c-white);
  border: 1px solid var(--color-border);
  text-align: center;
  animation: thanks-in var(--dur-slow) var(--ease-out) both;
}
.thanks:focus { outline: none; }

.thanks__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  margin: 0;
}
.thanks__body {
  max-width: 46ch;
  margin: 0 auto;
  color: var(--c-ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}
.thanks__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-xl) 0 0;
}
.thanks__links .btn { padding-inline: var(--space-lg); }

@keyframes thanks-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .thanks { animation: none; }
}
.form__status--ok { border-color: var(--c-green); }
.form__status--err { border-color: #B3261E; color: #B3261E; }

/* --- Scroll reveal ------------------------------------------------------ */

/* Progressive enhancement, deliberately.
   Content is visible by default. Only once JS has confirmed it can actually
   run the animation does it add .js-anim to <html> and opt into hiding.
   If JS fails, errors, or IntersectionObserver misbehaves on some guest's
   browser, they still see a complete page instead of a blank one. */
.reveal {
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.js-anim .reveal {
  opacity: 0;
  transform: translateY(18px);
}
.js-anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; }
  .hero__scroll { animation: none; }
}
