/* =============================================================
   components.css — shared design system layer
   Ownership:
   - shared nav/button/CTA behavior and cadence
   - shared type scale and section rhythm tokens
   - reusable component-level styling used across pages
   Keep page-specific visual experiments out of this file.
   ============================================================= */

:root {
  --space-xxs: clamp(8px, 1vw, 12px);
  --space-xs: clamp(12px, 1.4vw, 18px);
  --space-sm: clamp(18px, 2vw, 28px);
  --space-md: clamp(28px, 3vw, 44px);
  --space-lg: clamp(44px, 5vw, 72px);
  --space-xl: clamp(64px, 8vw, 112px);
  /* One vertical rhythm for sections (replaces ad-hoc --section-pad / interior doubles) */
  --section-block-y: var(--space-xl);
  --section-pad: var(--space-xl);
  --section-label-mb: clamp(16px, 2vw, 22px);
  --section-intro-mt: clamp(20px, 2.5vw, 28px);
  --section-title-divider-mt: clamp(14px, 2vw, 20px);
  --section-title-divider-mb: clamp(16px, 2.2vw, 24px);
  --hero-content-max: min(820px, calc(100vw - 48px));
  /* One editorial voice: same scale on .hero-title and .page-title everywhere */
  --hero-title-max: 12ch;
  --hero-title-fs: clamp(2.62rem, 4.85vw, 4.05rem);
  --hero-title-lh: 1.05;
  --hero-title-track: -0.022em;
  --hero-script-max: 20ch;
  --hero-script-fs: clamp(1.28rem, 2.45vw, 1.95rem);
  --hero-script-lh: 1.12;
  --hero-eyebrow-fs: clamp(0.55rem, 1.15vw, 0.62rem);
  --hero-eyebrow-tracking: 0.3em;
  --hero-eyebrow-mb: clamp(0.32rem, 0.72vw, 0.48rem);
  --hero-subtitle-fs: clamp(0.6rem, 1.38vw, 0.7rem);
  --hero-subtitle-lh: 1.72;
  /* Single measure for subtitle / hero-sub lines inside glass */
  --hero-sub-max: 34ch;
  --hero-stack-gap: clamp(0.4rem, 0.85vw, 0.58rem);
  --hero-panel-pad-y: clamp(12px, 1.45vw, 17px);
  --hero-panel-pad-x: clamp(17px, 1.72vw, 21px);
  --hero-panel-r: 15px;
  --hero-actions-gap: 11px;
  --hero-actions-mt: clamp(0.34rem, 0.85vw, 0.52rem);
  --cta-group-gap: clamp(10px, 1.5vw, 16px);
  --cta-group-mt: clamp(10px, 1.7vw, 18px);
  --cta-button-min: clamp(176px, 16vw, 218px);
  /* Desktop column widths — one system, two families: left rail vs gallery band */
  --hero-panel-w-rail: min(360px, 32vw);
  --hero-panel-w-pricing: min(384px, 33vw);
  --hero-panel-w-gallery: min(392px, 64vw);
  --hero-panel-w-landscape: min(348px, 31.5vw);
  /* Tuned UI type scale for readability on luxury editorial layouts */
  --type-ui-2xs: clamp(0.64rem, 0.9vw, 0.72rem);
  --type-ui-xs: clamp(0.7rem, 0.95vw, 0.78rem);
  --type-ui-sm: clamp(0.76rem, 1.05vw, 0.84rem);
  /* Narrow editorial measure — luxury through restraint, not wide paragraphs */
  --copy-max: 44ch;
  /* Intro blocks: title + divider + copy; slightly wider than body for headline rhythm */
  --section-header-max: min(52ch, calc(100vw - 40px));

  /* Hero glass — frost + light ink for legibility; image still reads through */
  --glass-hero-bg: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.018) 0%,
    rgba(18, 16, 14, 0.032) 46%,
    rgba(6, 5, 4, 0.078) 100%
  );
  --glass-hero-bg-subtle: var(--glass-hero-bg);
  --glass-hero-bg-mobile: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.012) 0%,
    rgba(16, 14, 12, 0.042) 44%,
    rgba(5, 4, 3, 0.095) 100%
  );
  --glass-hero-border: rgba(255, 255, 255, 0.078);
  --glass-hero-border-subtle: rgba(255, 255, 255, 0.068);
  --glass-hero-border-mobile: rgba(255, 255, 255, 0.075);
  --glass-hero-blur: 2px;
  --glass-hero-blur-subtle: 1.5px;
  --glass-hero-blur-mobile: 3px;
  --glass-hero-shadow: 0 2px 14px rgba(4, 3, 2, 0.045);
  --glass-hero-shadow-mobile: 0 4px 16px rgba(4, 3, 2, 0.052);
}

/* Mobile: same hierarchy as desktop — proportional type, lighter glass, image-forward */
@media (max-width: 768px) {
  :root {
    --hero-content-max: min(358px, calc(100vw - 32px));
    --hero-title-fs: clamp(2.26rem, 8.4vw, 3.08rem);
    --hero-title-max: 11ch;
    --hero-title-lh: 1.06;
    --hero-script-fs: clamp(1.06rem, 4.55vw, 1.52rem);
    --hero-script-max: 17ch;
    --hero-script-lh: 1.14;
    --hero-eyebrow-fs: clamp(0.51rem, 2.45vw, 0.58rem);
    --hero-eyebrow-mb: clamp(0.38rem, 1.9vw, 0.52rem);
    --hero-eyebrow-tracking: 0.28em;
    --hero-subtitle-fs: clamp(0.6rem, 2vw, 0.69rem);
    --hero-subtitle-lh: 1.72;
    --hero-stack-gap: clamp(0.38rem, 1.75vw, 0.54rem);
    --hero-panel-pad-y: clamp(15px, 3.8vw, 20px);
    --hero-panel-pad-x: clamp(17px, 4vw, 22px);
    --hero-panel-r: 15px;
    --hero-actions-gap: 12px;
    --hero-actions-mt: clamp(0.42rem, 2vw, 0.56rem);
    --cta-group-gap: 12px;
    --cta-group-mt: 12px;
    --cta-button-min: 0;
    /* Slightly darker than before for small-screen contrast (still image-forward) */
    --glass-hero-bg-mobile: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.014) 0%,
      rgba(14, 12, 10, 0.048) 50%,
      rgba(6, 5, 4, 0.09) 100%
    );
    --glass-hero-border-mobile: rgba(255, 255, 255, 0.065);
    --glass-hero-blur-mobile: 1.25px;
    --glass-hero-shadow-mobile: 0 3px 14px rgba(4, 3, 2, 0.048);
  }

  .gallery-story-intro {
    margin-top: clamp(32px, 4.5vw, 42px);
    max-width: min(var(--copy-max), calc(100vw - 36px));
  }

  .testimonials-grid {
    gap: 20px;
  }

  .social-proof-band-inner {
    padding: clamp(26px, 5vw, 34px) clamp(22px, 5vw, 28px);
  }
}

/* Shared section rhythm */
main > section,
main > div.statement,
main > div.feature-quote {
  scroll-margin-top: 110px;
}

.inner-section,
.inner-section-alt,
.testimonials,
.statement,
.feature-quote {
  padding-top: var(--section-block-y);
  padding-bottom: var(--section-block-y);
}

.section-intro,
.body-copy,
.story-body,
.venue-body,
.space-body,
.cta-band-sub,
.cta-sub,
.contact-intro {
  text-wrap: pretty;
  max-width: var(--copy-max);
}

.pricing-intro,
.gallery-header,
.spaces-intro,
.timeline-header,
.what-expect-header {
  max-width: var(--section-header-max);
  margin-inline: auto;
}

/* Navigation polish (desktop only; mobile rules stay in responsive.css) */
@media (min-width: 769px) {
  nav,
  nav.scrolled {
    background: rgba(250, 247, 242, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 16px var(--side-pad);
    box-shadow: 0 1px 0 rgba(106, 94, 80, 0.14);
  }

  .nav-logo,
  nav.scrolled .nav-logo {
    color: var(--ink);
    text-shadow: none;
    font-weight: 500;
    letter-spacing: 0.14em;
  }

  .nav-links a,
  nav.scrolled .nav-links a {
    color: var(--stone);
    text-shadow: none;
  }

  .nav-links a:hover,
  nav.scrolled .nav-links a:hover,
  .nav-links a.nav-active:not(.nav-cta),
  nav.scrolled .nav-links a.nav-active:not(.nav-cta) {
    color: var(--ink) !important;
  }

  .nav-cta,
  nav.scrolled .nav-cta {
    color: var(--ink);
    border-color: rgba(106, 94, 80, 0.16);
    background: transparent;
  }

  .nav-cta:hover,
  nav.scrolled .nav-cta:hover {
    background: var(--ink);
    color: var(--white);
    border-color: var(--ink);
  }
}

.nav-toggle span {
  background: var(--ink);
}

/* Shared UI type scale ownership */
.section-label {
  font-size: var(--type-ui-xs);
}

.btn-primary,
.btn-outline,
.btn-ghost,
.form-submit {
  font-size: var(--type-ui-2xs);
}

.filter-btn,
.faq-filter-btn,
.cal-filter-btn {
  font-size: var(--type-ui-2xs);
  letter-spacing: 0.16em;
}

.nav-links a {
  font-size: var(--type-ui-2xs);
}

/* Hero system */
.hero,
.page-hero,
.ceremony-hero {
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Split contact hero: grid + min-height from site.css — do not force flex */
.contact-hero {
  isolation: isolate;
}

.hero {
  min-height: 90vh;
}

.page-hero,
.ceremony-hero {
  min-height: 78vh;
}

.hero::before,
.hero::after,
.page-hero::before,
.page-hero::after,
.ceremony-hero::before,
.ceremony-hero::after,
.cta-band::before,
.cta-band::after,
.gallery-cta-band::before,
.gallery-cta-band::after,
.hero-frame,
.hero-border,
.hero-scroll {
  display: none !important;
  content: none !important;
}

.hero-content,
.page-hero-content,
.cta-band-content,
.cta-band-inner {
  width: var(--hero-content-max);
  max-width: var(--hero-content-max);
  margin-inline: auto;
}

/* Contact column: keep form measure; do not inherit full-bleed hero max width */
.hero-right-inner {
  width: min(100%, 520px);
  max-width: 520px;
  margin-inline: 0;
}

/* Photo hero glass: one vertical stack — gap-only rhythm (no stacked margins) */
.hero-content,
.page-hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--hero-stack-gap);
  text-align: center;
  padding: var(--hero-panel-pad-y) var(--hero-panel-pad-x)
    calc(var(--hero-panel-pad-y) + 1px);
  border-radius: var(--hero-panel-r);
  background: var(--glass-hero-bg);
  border: 1px solid var(--glass-hero-border);
  backdrop-filter: blur(var(--glass-hero-blur-subtle)) saturate(98%);
  -webkit-backdrop-filter: blur(var(--glass-hero-blur-subtle)) saturate(98%);
  box-shadow: var(--glass-hero-shadow);
}

.cta-band-content,
.cta-band-inner {
  display: grid;
  gap: var(--hero-stack-gap);
  justify-items: center;
  text-align: center;
}

.hero-content > *,
.page-hero-content > * {
  min-width: 0;
}

.hero-eyebrow,
.page-eyebrow {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--hero-eyebrow-fs);
  letter-spacing: var(--hero-eyebrow-tracking);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  display: block;
}

/* Stack spacing comes from panel gap only */
.hero-content .hero-eyebrow,
.page-hero-content .page-eyebrow {
  margin-bottom: 0;
}

.hero-title,
.page-title,
.cta-band-title,
.cta-title {
  max-width: var(--hero-title-max);
  margin: 0;
  line-height: var(--hero-title-lh);
  text-wrap: balance;
  letter-spacing: var(--hero-title-track);
}

.hero-title,
.page-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: var(--hero-title-fs);
  color: var(--white);
}

.hero-script,
.page-script {
  font-family: var(--font-script);
  color: var(--gold-light);
  margin: 0;
  max-width: min(var(--hero-script-max), 100%);
  line-height: var(--hero-script-lh);
  text-wrap: balance;
  font-size: var(--hero-script-fs);
  display: block;
  font-feature-settings: "kern" 1;
}

.cta-band-script,
.cta-script {
  margin: 0;
  max-width: var(--hero-script-max);
  line-height: var(--hero-script-lh);
  text-wrap: balance;
  font-size: var(--hero-script-fs);
}

.hero-subtitle,
.hero-sub {
  max-width: min(var(--hero-sub-max), 100%);
  margin: 0;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-size: var(--hero-subtitle-fs);
  line-height: var(--hero-subtitle-lh);
  background: none;
  border: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.74);
}

.cta-band-sub,
.cta-sub {
  max-width: 36ch;
  margin: 0;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: var(--hero-subtitle-fs);
  line-height: 1.78;
  background: none;
  border: 0;
}

/* Photo heroes: minimal lift — trust the lighter glass, avoid muddy halos */
.hero-content .hero-eyebrow,
.page-hero-content .page-eyebrow {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 6px rgba(18, 15, 12, 0.35);
}

.hero-content .hero-title,
.page-hero-content .page-title {
  text-shadow: 0 1px 16px rgba(18, 15, 12, 0.28);
}

.hero-content .hero-title em,
.page-hero-content .page-title em {
  color: rgba(255, 255, 255, 0.9);
}

.hero-content .hero-script,
.page-hero-content .page-script {
  text-shadow: 0 1px 8px rgba(18, 15, 12, 0.32);
}

.hero-content .hero-subtitle,
.page-hero-content .hero-sub {
  text-shadow: 0 1px 7px rgba(18, 15, 12, 0.3);
}

.hero-actions,
.cta-band-actions,
.cta-band-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--hero-actions-gap);
  margin-top: 0;
}

/* Extra air before CTAs only when not using uniform stack gap (CTA bands) */
.cta-band-actions,
.cta-band-btns {
  margin-top: var(--hero-actions-mt);
}

.hero-content .hero-actions,
.page-hero-content .hero-actions {
  width: 100%;
  justify-content: center;
}

/* CTA cadence ownership — one rhythm system across pages */
.hero-actions,
.cta-band-actions,
.cta-band-btns,
.cal-cta-btns,
.footer-conversion-actions,
.d-flex.flex-wrap.gap-s {
  gap: var(--cta-group-gap);
}

.cal-cta-btns,
.footer-conversion-actions,
.d-flex.flex-wrap.gap-s {
  margin-top: var(--cta-group-mt);
}

.hero-actions .btn-primary,
.hero-actions .btn-outline,
.cta-band-actions .btn-primary,
.cta-band-actions .btn-outline,
.cta-band-btns .btn-primary,
.cta-band-btns .btn-outline,
.cal-cta-btns .btn-primary,
.cal-cta-btns .btn-outline,
.footer-conversion-actions .btn-primary,
.footer-conversion-actions .btn-outline,
.d-flex.flex-wrap.gap-s .btn-primary,
.d-flex.flex-wrap.gap-s .btn-outline {
  min-width: var(--cta-button-min);
}

/* Shared component cadence */
.local-seo-copy {
  max-width: var(--reading-max);
  margin: 20px 0 0;
  font-size: 1rem;
  color: var(--stone);
}

.story,
.split,
.philosophy {
  align-items: start;
}

.story,
.venue-teaser,
.split {
  grid-auto-rows: auto;
  column-gap: clamp(28px, 4vw, 64px);
}

.story-content,
.venue-content {
  padding-block: var(--section-block-y);
  padding-inline: var(--side-pad);
}

.venue-content {
  justify-content: center;
  align-self: center;
}

.story-image,
.venue-image,
.split-img,
.intro-image,
.space-image,
.hero-left,
.pkg-card-img,
.phil-img,
.gallery-item {
  overflow: hidden;
}

.story-image img,
.venue-image img,
.split-img img,
.intro-image img,
.space-image img,
.hero-left img,
.pkg-card-img img,
.phil-img img,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-image img {
  object-position: center 40%;
}

.venue-image img {
  object-position: center 48%;
  aspect-ratio: 4 / 5;
}

body[data-page="contact"] .hero-left img {
  object-position: 28% 44%;
}

/* CTA as a shared component */
.cta-band {
  min-height: 62vh;
  padding: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.cta-band-content,
.cta-band-inner {
  padding-block: var(--section-block-y);
  padding-inline: clamp(24px, 5vw, 52px);
}

.cta-band-title,
.cta-title {
  max-width: 11ch;
}

.cta-band-script,
.cta-script {
  max-width: 30ch;
}

/* Gallery + testimonial consistency */
.gallery-item img,
.gallery-cell img,
.space-image img,
.pkg-card-img img,
.venue-image img,
.story-image img {
  transition: transform 0.7s ease;
}

.gallery-item:hover img,
.gallery-cell:hover img,
.space-card:hover .space-image img,
.pkg-card:hover .pkg-card-img img,
.venue-teaser:hover .venue-image img,
.story:hover .story-image img {
  transform: scale(1.03);
}

.gallery-story-intro {
  max-width: min(var(--copy-max), calc(100vw - 40px));
  margin: clamp(28px, 3.5vw, 36px) auto 0;
  text-align: center;
  color: var(--stone);
  line-height: 1.78;
}

.feature-quote,
.statement {
  position: relative;
}

.feature-quote::before,
.statement::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: min(88%, 1120px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 151, 90, 0.3), transparent);
}

.testimonials-grid {
  gap: 24px;
}

/* Social proof */
.social-proof-band {
  padding: 0 var(--side-pad) clamp(58px, 7vw, 88px);
}

.social-proof-band-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 34px;
  border-top: 1px solid rgba(184, 151, 90, 0.18);
  border-bottom: 1px solid rgba(184, 151, 90, 0.18);
  text-align: center;
}

.social-proof-band h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 400;
  margin-bottom: 14px;
}

.social-proof-band p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--stone);
}

/* Motion — scroll reveal (site.css + polish.css define duration; keep transform aligned) */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.36s cubic-bezier(0.22, 1, 0.36, 1), transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(14, 12, 10, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  padding: 32px;
}

#lightbox.open {
  display: flex;
}

#lightbox figure {
  max-width: min(1180px, 94vw);
  max-height: 90vh;
  margin: 0;
  display: grid;
  gap: 18px;
  justify-items: center;
}

#lbImg {
  max-width: 100%;
  max-height: calc(90vh - 100px);
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

#lbMeta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  color: rgba(250, 247, 242, 0.88);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#lbLabel {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  letter-spacing: 0;
  text-transform: none;
  color: #fff;
}

#lbCounter {
  color: rgba(250, 247, 242, 0.55);
}

.lb-btn {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.lb-prev {
  left: 28px;
}

.lb-next {
  right: 28px;
}

.lb-close {
  top: 28px;
  right: 28px;
}

@media (max-width: 1100px) {
  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 900px) {
  #lightbox {
    padding: 20px;
  }

  .lb-prev {
    left: 14px;
  }

  .lb-next {
    right: 14px;
  }
}

@media (max-width: 768px) {
  .hero-actions .btn-primary,
  .hero-actions .btn-outline,
  .cta-band-actions .btn-primary,
  .cta-band-actions .btn-outline,
  .cta-band-btns .btn-primary,
  .cta-band-btns .btn-outline,
  .cal-cta-btns .btn-primary,
  .cal-cta-btns .btn-outline,
  .footer-conversion-actions .btn-primary,
  .footer-conversion-actions .btn-outline,
  .d-flex.flex-wrap.gap-s .btn-primary,
  .d-flex.flex-wrap.gap-s .btn-outline {
    min-width: 0;
    width: 100%;
  }
}
