/* ==========================================================================
   components.css — reusable building blocks
   Buttons, heroes, photo frames, cards, letter, timeline, details,
   notice, swatches, reveal animations.
   Naming: .block, .block__part, .block--variant  (the "BEM" convention)
   ========================================================================== */

/* ---------- Button ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0.8rem 2.2rem;
  border: 1px solid var(--color-blush-deep);
  border-radius: 999px;
  background: var(--color-blush-deep);
  color: var(--color-white);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.button:hover {
  background: transparent;
  color: var(--color-blush-deep);
  transform: translateY(-2px);
}

.button--outline {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-ink);
}

.button--outline:hover {
  background: var(--color-ink);
  color: var(--color-white);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button-row--center { justify-content: center; }

/* ---------- Hero (home page) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6) var(--section-pad);
}

.hero__inner {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; }
}

.hero__kicker {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.hero__names {
  margin: 0 0 var(--space-4);
  font-family: var(--font-script);
  font-size: var(--text-hero);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0;
  color: var(--color-blush-deep);
}

.hero__names span { display: block; }

.hero__amp {
  margin-left: 0.6em;
  font-size: 0.6em;
  color: var(--color-sage-deep);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__meta li + li::before {
  content: "✿";
  margin-right: var(--space-3);
  color: var(--color-sage-deep);
}

.hero__intro {
  max-width: 34ch;
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-ink-soft);
}

/* Soft blurred colour blobs behind the hero */
.bloom {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
  animation: bloom-drift 14s ease-in-out infinite alternate;
}

.bloom--blush { width: 42vw; height: 42vw; top: -10%; right: -8%; background: var(--color-blush); }
.bloom--peach { width: 30vw; height: 30vw; bottom: -5%; left: -10%; background: var(--color-peach); animation-delay: -5s; }
.bloom--sage  { width: 22vw; height: 22vw; top: 35%; left: 40%; background: var(--color-sage); opacity: 0.45; animation-delay: -9s; }

@keyframes bloom-drift {
  to { transform: translate(4%, 6%) scale(1.08); }
}

/* ---------- Page hero (top of every inner page) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-6);
  text-align: center;
}

.page-hero__title {
  margin-bottom: var(--space-3);
  font-family: var(--font-script);
  font-size: var(--text-hero);
  line-height: 1;
  letter-spacing: 0;
  color: var(--color-blush-deep);
}

.page-hero__lead {
  margin: 0;
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-ink-soft);
}

/* ---------- Photo frames ---------- */
.photo {
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.photo:hover img { transform: scale(1.04); }

.photo--arch { border-radius: var(--radius-arch); }
.photo--portrait { aspect-ratio: 3 / 4; }
.photo--landscape { aspect-ratio: 3 / 2; }

/* Natural shape, centred (e.g. the printed invitation) */
.photo--centered {
  max-width: 30rem;
  margin-inline: auto;
}

/* Wide banner: landscape on phones, cinematic on larger screens */
.photo--banner { aspect-ratio: 3 / 2; }

@media (min-width: 760px) {
  .photo--banner { aspect-ratio: 21 / 9; }
}

/* Two overlapping photos */
.collage {
  position: relative;
  padding-bottom: 18%;
}

.collage__back { width: 78%; }

.collage__front {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 48%;
  border: 6px solid var(--color-cream);
}

/* ---------- Text block ---------- */
/* :where() keeps this rule weak, so components inside (e.g. .letter__salutation) win */
:where(.prose) p { color: var(--color-ink-soft); }
.prose .button-row { margin-top: var(--space-4); }

/* ---------- Teaser card (home page links to inner pages) ---------- */
.teaser-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 760px) {
  .teaser-grid { grid-template-columns: 1fr 1fr; }
}

.teaser {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.teaser__title {
  font-size: var(--text-xl);
  text-transform: uppercase;
}

.teaser p { color: var(--color-ink-soft); }
.teaser .button { align-self: flex-start; margin-top: auto; }

/* ---------- Letter (Our Story) ---------- */
.letter__salutation {
  margin-bottom: var(--space-5);
  font-family: var(--font-script);
  font-size: var(--text-2xl);
  line-height: 1.1;
  text-align: center;
  color: var(--color-blush-deep);
}

/* Large first letter, like an old storybook */
.drop-cap::first-letter {
  float: left;
  padding-right: 0.08em;
  font-family: var(--font-display);
  font-size: 3.6em;
  line-height: 0.8;
  color: var(--color-blush-deep);
}

/* ---------- Timeline (vertical line with a flower at each step) ---------- */
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline__item {
  position: relative;
  padding: 0 0 var(--space-5) var(--space-5);
  border-left: 1px solid var(--color-line);
}

.timeline__item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline__item::before {
  content: "✿";
  position: absolute;
  top: -0.2em;
  left: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  transform: translateX(-50%);
  background: var(--color-cream);
  color: var(--color-sage-deep);
}

.timeline__item p { margin: 0; }

/* ---------- Details list (label + value pairs, e.g. event when/where) ---------- */
.details {
  display: grid;
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
}

.details__row {
  display: grid;
  gap: var(--space-1);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-line);
}

.details dt {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-blush-deep);
}

.details dd {
  margin: 0;
  font-size: var(--text-lg);
  color: var(--color-ink);
}

.details__note {
  display: block;
  font-size: var(--text-base);
  color: var(--color-ink-soft);
}

.details__link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: var(--text-base);
  color: var(--color-sage-deep);
  text-underline-offset: 3px;
}

/* ---------- Notice (a single message on a photo, e.g. "Registration is closed") ---------- */
/* The photo is set per page with an inline background-image */
.notice {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-height));
  padding: var(--section-pad) var(--gutter);
  background-position: center;
  background-size: cover;
}

/* Dark wash over the photo so the card stands out */
.notice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(74, 59, 61, 0.35), rgba(74, 59, 61, 0.55));
}

.notice__card {
  position: relative;
  width: 100%;
  max-width: 34rem;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-md);
  background: rgba(255, 250, 245, 0.94);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.notice__script {
  margin-bottom: var(--space-2);
  font-family: var(--font-script);
  font-size: var(--text-2xl);
  line-height: 1.1;
  color: var(--color-blush-deep);
}

.notice__title {
  margin-bottom: var(--space-5);
  font-size: var(--text-xl);
  text-transform: uppercase;
}

/* ---------- Colour swatches (dress code) ---------- */
.swatches {
  display: flex;
  gap: var(--space-4);
  margin-block: var(--space-4) var(--space-5);
}

.swatch {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.swatch::before {
  content: "";
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid var(--color-white);
  background: var(--swatch);
  box-shadow: var(--shadow-soft);
}

/* Smaller circles for use inside cards */
.swatches--small {
  gap: var(--space-3);
  margin-block: var(--space-2) 0;
}

.swatches--small .swatch::before {
  width: 52px;
  height: 52px;
  border-width: 3px;
}

/* ---------- Call-to-action band ---------- */
.cta {
  text-align: center;
}

.cta__title {
  max-width: 20ch;
  margin-inline: auto;
  margin-bottom: var(--space-5);
  font-size: var(--text-2xl);
}

/* ---------- Reveal on scroll (driven by js/main.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration) var(--ease-out), transform var(--duration) var(--ease-out);
  transition-delay: var(--delay, 0s);
}

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

/* If JavaScript is off, show everything */
.no-js .reveal {
  opacity: 1;
  transform: none;
}
