/* ============================================================
   components.css — hero, buttons, cards, sections
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1.05rem 2.3rem;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: var(--paper);
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease,
              transform 200ms ease, box-shadow 200ms ease;
}

.btn:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: var(--paper);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

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

.btn--ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(248, 246, 230, 0.7);
}

.btn--light:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

/* ---------- Monogram mark ---------- */
.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35em;
  font-family: var(--serif);
  line-height: 1;
  color: var(--ink);
}

.monogram em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}

/* Circular crest monogram (hero / footer) */
.crest {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  position: relative;
}

.crest::before,
.crest::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.9;
}
.crest::before { top: -2.5px; }
.crest::after  { bottom: -2.5px; }

.crest em { font-style: italic; color: var(--gold); margin: 0 0.12em; }

/* ---------- Hero ----------
   Matches the back of the save-the-date: a deep teal field, the hand-drawn
   pine, and an olive dot rule. Gradient stops are sampled from the card art. */
.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(380px, 52vh, 540px);
  padding: 0; /* override the global section padding — it was stacking onto the inner padding */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(to bottom, #274156 0%, #1f3a4d 34%, #1b3445 62%, #1b313e 100%);
  color: var(--paper);
}

/* The warm olive haze the card carries along its bottom edge */
.hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(44% 34% at 50% 105%, rgba(92, 122, 78, 0.42) 0%, transparent 68%);
  pointer-events: none;
}

.hero__inner {
  width: 100%;
  padding: clamp(5.5rem, 7vw, 6.5rem) 0 clamp(2.25rem, 4vw, 3.25rem);
}

/* Hand-drawn pine lifted from the save-the-date */
.hero__pine {
  display: block;
  width: auto;
  height: clamp(104px, 13vw, 158px);
  margin: 0 auto;
}

/* Olive rule with a dot at each end — the card's divider */
.hero__rule {
  display: block;
  position: relative;
  width: clamp(74px, 9vw, 104px);
  height: 1px;
  color: #9fb05a;             /* the card's olive, lightened for the dark field */
  background: currentColor;
  margin: 1.35rem auto clamp(1.5rem, 3vw, 2.1rem);
}

.hero__rule::before,
.hero__rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}
.hero__rule::before { left: -11px; }
.hero__rule::after  { right: -11px; }

.hero__title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.96;
  font-weight: 300;
  letter-spacing: 0.005em;
  color: var(--paper);
  margin: 0;
  text-shadow: 0 1px 2px rgba(10, 18, 20, 0.4), 0 2px 34px rgba(14, 24, 26, 0.55);
}

.hero__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold);
  font-size: 0.78em;
  margin: 0 0.06em;
  letter-spacing: 0.04em;
}

.hero__meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(248, 246, 230, 0.94);
}

.hero__meta-divider {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

/* Scroll cue */
.hero__cue {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(248, 246, 230, 0.6);
}

.hero__cue-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, rgba(248, 246, 230, 0.7), transparent);
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}

@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* Hero tuning for small screens — keep the meta line from overflowing */
@media (max-width: 540px) {
  .hero__meta {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    gap: 0.5rem 0.85rem;
    margin-top: 2rem;
  }
}

/* ---------- Details at a glance ---------- */
.facts {
  /* Same ivory as the welcome section below it — the rule does the separating,
     not a change of tone. */
  background: var(--ivory);
  border-bottom: 1px solid var(--rule-soft);
  padding: 0; /* the cells carry the vertical rhythm — no global section padding */
}

.facts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.facts__cell {
  text-align: center;
  padding: clamp(1.75rem, 4vw, 2.75rem) 1.25rem;
  border-left: 1px solid var(--rule-soft);
}
.facts__cell:first-child { border-left: 0; }

.facts__label {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--olive-deep);
  display: block;
  margin-bottom: 0.7rem;
}

.facts__value {
  font-family: var(--serif);
  font-size: var(--step-1);
  color: var(--ink);
  line-height: 1.25;
}

/* Sub-line under a fact value, or a cell that is only the note */
.facts__value span,
.facts__note {
  display: block;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--brown);
  margin: 0.45rem auto 0;
  max-width: 32ch;
  text-wrap: pretty;
}

/* Phone link inside a fact cell */
.facts__value a,
.facts__note a {
  color: var(--teal);
  border-bottom: 1px solid var(--rule-soft);
  white-space: nowrap;
}
.facts__value a:hover,
.facts__note a:hover { border-bottom-color: currentColor; }

/* Stack the cells rather than orphan one in a 2-up grid */
@media (max-width: 860px) {
  .facts__grid { grid-template-columns: 1fr; }
  .facts__cell {
    border-left: 0;
    border-top: 1px solid var(--rule-soft);
    padding-top: clamp(1.4rem, 4vw, 2rem);
    padding-bottom: clamp(1.4rem, 4vw, 2rem);
  }
  .facts__cell:first-child { border-top: 0; }
}

/* ---------- Section divider (evergreen motif) ---------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  color: var(--olive);
  padding: clamp(1rem, 3vw, 2rem) 0 0;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: min(120px, 18vw);
  background: var(--rule);
}

.divider svg,
.divider img { width: 30px; height: 30px; opacity: 0.85; }

/* ---------- Hero (sub-page, compact) ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  padding: clamp(8rem, 16vw, 11rem) 0 clamp(3.5rem, 7vw, 5.5rem);
  background: var(--teal-night) url("../img/ridge-page.svg") center bottom / cover no-repeat;
  color: var(--paper);
  overflow: hidden;
  text-align: center;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(15, 42, 56, 0.55), rgba(15, 42, 56, 0.2) 55%, rgba(15, 42, 56, 0.5));
  pointer-events: none;
}

.page-hero .eyebrow { color: var(--gold); }
.page-hero .eyebrow::before { background: var(--gold); opacity: 1; }

.page-hero h1 {
  font-size: var(--step-4);
  font-weight: 300;
  color: var(--paper);
  max-width: 20ch;
  margin: 0.5rem auto 0;
}

.page-hero p {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
  color: rgba(248, 246, 230, 0.85);
  max-width: 52ch;
  margin: 1.25rem auto 0;
}

/* ---------- Two-column editorial section ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

.split--reverse { grid-template-columns: 1.2fr 1fr; }
.split--reverse .split__media { order: 2; }

@media (max-width: 820px) {
  .split,
  .split--reverse {
    grid-template-columns: 1fr;
  }
  .split--reverse .split__media { order: 0; }
}

.split__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cream);
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__media--wide { aspect-ratio: 4 / 3; }

/* ---------- Countdown ---------- */
.countdown {
  background: var(--ivory);
  text-align: center;
}

.countdown__label {
  margin-bottom: 1.75rem;
}

/* Months + days display */
.countdown__duo {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(2rem, 6vw, 4.5rem);
}

.countdown__duo .countdown__cell {
  border-left: 0;
  padding: 0;
}

.countdown__duo .countdown__cell + .countdown__cell {
  border-left: 1px solid var(--rule-soft);
  padding-left: clamp(2rem, 6vw, 4.5rem);
}

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 640px;
  margin: 0 auto;
  gap: 0.5rem;
}

.countdown__cell {
  border-left: 1px solid var(--rule-soft);
  padding: 0 0.5rem;
}

.countdown__cell:first-child { border-left: 0; }

/* Final month: the months cell is hidden, so the days cell drops its divider */
.countdown__cell[hidden] + .countdown__cell {
  border-left: 0 !important;
  padding-left: 0 !important;
}

.countdown__num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1;
  color: var(--ink);
  display: block;
  font-feature-settings: "lnum";
  font-variant-numeric: lining-nums tabular-nums;
}

.countdown__unit {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brown);
  margin-top: 0.75rem;
  display: block;
}

/* ---------- Schedule cards (preview) ---------- */
.schedule-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 960px) {
  .schedule-preview { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .schedule-preview { grid-template-columns: 1fr; }
}

.schedule-card {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: 2.25rem 1.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.schedule-card:hover {
  transform: translateY(-5px);
  border-color: var(--olive);
  box-shadow: var(--shadow-md);
}

.schedule-card__date {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brown);
  font-weight: 500;
}

.schedule-card__title {
  font-family: var(--serif);
  font-size: var(--step-2);
  margin: 0.4rem 0 0.3rem;
  color: var(--ink);
}

.schedule-card__meta {
  font-size: 0.92rem;
  color: var(--charcoal);
  opacity: 0.9;
  margin: 0;
}

/* ---------- CTA strip ---------- */
.cta {
  position: relative;
  isolation: isolate;
  background: var(--teal-deep);
  color: var(--paper);
  padding: clamp(4.5rem, 9vw, 7rem) 0;
  text-align: center;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 80% at 50% 0%, rgba(188, 156, 34, 0.18), transparent 60%);
}

.cta h2 {
  color: var(--paper);
  max-width: 22ch;
  margin: 0 auto 1.25rem;
}

.cta p {
  color: rgba(248, 246, 230, 0.8);
  max-width: 48ch;
  margin: 0 auto 2.25rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
}

/* ---------- Photo gallery ----------
   Flexible count: first tile is a 2-row feature, the rest are 4:3.
   A full grid is 8 tiles (1 feature + 7); fewer still lays out cleanly. */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* equal columns keep every 4:3 row flush */
  gap: 0.85rem;
  margin-top: 3rem;
}

.gallery__tile {
  position: relative;
  overflow: hidden;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
}

.gallery__tile:first-child {
  grid-row: span 2;
  aspect-ratio: auto; /* stretches to the height of two rows */
}

.gallery__tile svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 800ms ease;
}

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

@media (max-width: 720px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__tile:first-child,
  .gallery__tile:last-child {
    grid-row: span 1;
    grid-column: span 2;
    aspect-ratio: 16 / 10;
  }
}

/* Illustrated placeholder label */
.ph-label {
  position: absolute;
  bottom: 0.9rem;
  left: 0.9rem;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 246, 230, 0.9);
  z-index: 1;
}

/* ---------- Detail list (schedule, FAQ, etc.) ---------- */
.detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.detail-list > li {
  border-bottom: 1px solid var(--rule);
  padding: 2rem 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

@media (max-width: 720px) {
  .detail-list > li { grid-template-columns: 1fr; gap: 0.5rem; }
}

.detail-list__when {
  font-family: var(--serif);
  font-size: var(--step-1);
  color: var(--brown);
  font-style: italic;
}

.detail-list__what h3 {
  margin: 0 0 0.4rem;
  font-size: var(--step-2);
}

.detail-list__what p { margin: 0.5rem 0; max-width: 60ch; }

/* ---------- FAQ accordion (CSS-only) ---------- */
.faq {
  border-top: 1px solid var(--rule);
  max-width: 820px;
}

.faq details {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  font-family: var(--serif);
  font-size: var(--step-1);
  color: var(--ink);
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 1.4rem;
  color: var(--brown);
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.faq details[open] summary::after { content: "–"; }

.faq details > *:not(summary) {
  margin-top: 1rem;
  color: var(--charcoal);
  max-width: 65ch;
}

/* ---------- Info cards (travel / things to do) ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  padding: 2rem;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--olive);
}

.info-card h3 {
  font-size: var(--step-1);
  margin-bottom: 0.5rem;
}

.info-card__meta {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin-bottom: 1rem;
  display: block;
}

.info-card p { font-size: 0.95rem; margin-bottom: 0.5rem; }
.info-card p:last-child { margin-bottom: 0; }

.info-card__link {
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  border-bottom: 1px solid var(--olive);
  padding-bottom: 2px;
  display: inline-block;
  margin-top: 0.75rem;
}
.info-card__link:hover { color: var(--teal-deep); }

/* Illustrated info card — dusk artwork banner above the text block */
.info-card--illustrated { padding: 0; }

.info-card__art {
  aspect-ratio: 600 / 260;
  background: var(--teal-night);
  overflow: hidden;
}

.info-card__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-card__body { padding: 1.6rem 2rem 2rem; }

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: 1.25rem;
  max-width: 560px;
}

.form label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brown);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form input,
.form select,
.form textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(27, 66, 87, 0.12);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
}

.form__radio-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form__radio-group label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

/* Hide the native radio but keep it focusable — display: none would break
   keyboard access and silently swallow required-field validation */
.form__radio-group input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.form__radio-group label { position: relative; }

.form__radio-group label:has(input:checked) {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--paper);
}

.form__radio-group label:has(input:focus-visible) {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.form__note {
  font-size: 0.82rem;
  color: var(--brown);
}

/* ---------- Centered "see more" row under a grid ---------- */
.section-more {
  margin-top: 2.75rem;
  text-align: center;
}

/* ---------- Section intro ---------- */
.section-intro {
  max-width: 62ch;
  margin-bottom: 3rem;
}

.section-intro--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-intro h2 { max-width: 18ch; }
.section-intro--center h2 { margin-inline: auto; }

.section-intro p {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--charcoal);
}

/* Centered editorial block — calm, image-free copy sections */
.prose-center {
  max-width: 58ch;
  margin: 0 auto;
  text-align: center;
}

.prose-center h2 { margin-bottom: 0.9rem; }

.prose-center p { color: var(--charcoal); }

.signature {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
  color: var(--brown);
  margin-top: 1.75rem;
}

.prose-center .btn { margin-top: 1.75rem; }

/* Section background helpers */
/* Tone utilities. Currently unused on purpose: every content section runs on the
   body's ivory, and only the nav, page heroes, CTA strips, and footer break from
   it. Reach for these only if a band is meant to stand apart. */
.bg-cream { background: var(--cream); } /* brand cream — the wedding off-white */
.bg-ivory { background: var(--ivory); }
.bg-paper { background: var(--paper); }

/* ---------- Toned-down gold: calmer, mostly-neutral accents ---------- */
.brand em,
.hero__title em,
.site-footer__names em,
.crest em,
.monogram em { color: inherit; }

.crest::before,
.crest::after { background: currentColor; opacity: 0.3; }

.hero__meta-divider { background: rgba(248, 246, 230, 0.55); }

.page-hero .eyebrow::before { background: currentColor; opacity: 0.55; }

.page-hero .eyebrow,
.eyebrow--light { color: rgba(248, 246, 230, 0.85); }

.site-footer h4 { color: rgba(248, 246, 230, 0.62); }
.site-footer a:hover { border-bottom-color: rgba(248, 246, 230, 0.7); }

.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] { border-bottom-color: currentColor; }

.site-footer::before { background: radial-gradient(70% 60% at 22% -10%, rgba(201, 162, 39, 0.08), transparent 60%); }
.cta::before { background: radial-gradient(60% 80% at 50% 0%, rgba(188, 156, 34, 0.08), transparent 60%); }
