/* ==========================================================================
   Rey de Gloria - Homepage (Guía de Marca, Edición 04)
   Night sky and warm light: navy anchor, ivory/sand document palette.
   Cinzel titles, Cormorant statements, Montserrat wordmark, labels and body.
   Square corners, no shadows, one olive rule under each title.

   Only index.html loads this file. The other pages keep styles/main.css.
   ========================================================================== */

:root {
  --navy: #0B0B2B;
  --navy-2: #131338;
  --navy-meta: #8A8CA6;
  --ivory: #F6F3EA;
  --sand: #E9E6D6;
  --stone: #D9D3BF;
  --olive: #857F52;
  --olive-dark: #6B6640;
  --charcoal: #33322C;
  --ink: #55523F;

  --font-title: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --font-statement: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(1rem, 4vw, 6.5rem);
  --container: 1320px;
  --header-h: 84px;
  --section-y: clamp(5rem, 11vw, 9.5rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.45, 0, 0.2, 1);
}

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

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

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

h1,
h2 {
  font-family: var(--font-title);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.12;
}

h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.4rem);
  color: var(--navy);
}

h3 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy);
}

svg {
  flex: none;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) - 1px);
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--navy);
  color: var(--ivory);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: var(--section-y) 0;
}

.section-ivory { background: var(--ivory); }
.section-sand { background: var(--sand); }
.section-navy { background: var(--navy); color: var(--ivory); }
.section-navy h2 { color: var(--ivory); }

/* --------------------------------------------------------------------------
   Brand type pieces
   -------------------------------------------------------------------------- */
.eyebrow {
  display: block;
  margin-bottom: 1.1rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--olive);
}

.eyebrow-light {
  color: var(--stone);
}

.rule {
  display: block;
  width: 80px;
  height: 2px;
  margin: 1.75rem 0;
  background: var(--olive);
  transform-origin: left;
}

.statement {
  font-family: var(--font-statement);
  font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.35;
  color: var(--ink);
}

.statement-light {
  color: var(--stone);
}

.numeral {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 2rem + 2.5vw, 4.25rem);
  line-height: 1;
  color: var(--stone);
}

.icon {
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}

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

.section-head-center .rule {
  margin-left: auto;
  margin-right: auto;
  transform-origin: center;
}

.section-head-split {
  display: grid;
  gap: 1.5rem 4rem;
  max-width: none;
  align-items: end;
}

@media (min-width: 900px) {
  .section-head-split {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.95rem 2rem;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease), background-color 0.5s var(--ease);
}

/* A panel of the opposite colour slides up from the bottom on hover. */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.55s var(--ease);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: scaleY(1);
}

.btn-light {
  background: var(--ivory);
  color: var(--navy);
  border-color: var(--ivory);
}

.btn-light::before { background: var(--navy); }
.btn-light:hover,
.btn-light:focus-visible { color: var(--ivory); }

.btn-outline-light {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(246, 243, 234, 0.55);
}

.btn-outline-light::before { background: var(--ivory); }
.btn-outline-light:hover,
.btn-outline-light:focus-visible { color: var(--navy); border-color: var(--ivory); }

.btn-dark {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}

.btn-dark::before { background: var(--olive); }
.btn-dark:hover,
.btn-dark:focus-visible { border-color: var(--olive); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--stone);
}

.btn-outline::before { background: var(--sand); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy);
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease), color 0.3s;
}

.text-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s var(--ease);
}

.text-link:hover {
  color: var(--olive-dark);
  background-size: 30% 1px;
}

.text-link:hover svg {
  transform: translateX(4px);
}

.text-link-light {
  color: var(--ivory);
}

.text-link-light:hover {
  color: var(--stone);
}

/* --------------------------------------------------------------------------
   Motion: intro on load, reveal on scroll
   -------------------------------------------------------------------------- */
.js .intro,
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--d, 0) * 110ms);
}

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

.js .intro {
  transition-delay: calc(250ms + var(--d, 0) * 140ms);
}

.js .rule.reveal {
  transform: scaleX(0);
  transition-duration: 1.2s;
}

.js .rule.reveal.is-visible {
  transform: scaleX(1);
}

/* Photos unveil with a curtain that lifts and a slow settle of the image. */
.reveal-image {
  position: relative;
  overflow: hidden;
}

/* The clip sits on the child: an element clipped to nothing never reports
   as intersecting, so the observed frame itself must stay unclipped. */
.js .reveal-image > * {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease), transform 2.2s var(--ease);
  transition-delay: calc(var(--d, 0) * 140ms);
}

.js .reveal-image > img {
  transform: scale(1.18);
}

.js .reveal-image.is-visible > * {
  clip-path: inset(0 0 0 0);
}

.js .reveal-image.is-visible > img {
  transform: scale(1.04);
}

/* --------------------------------------------------------------------------
   Scroll progress
   -------------------------------------------------------------------------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 120;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  background: var(--olive);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: var(--ivory);
  transition: background-color 0.6s var(--ease), color 0.6s var(--ease), border-color 0.6s var(--ease);
  border-bottom: 1px solid rgba(246, 243, 234, 0.14);
}

/* The frosted ground lives on a pseudo-element: a backdrop-filter on the
   header itself would trap the fixed mobile menu inside the header box. */
.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(246, 243, 234, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.header.scrolled {
  color: var(--navy);
  border-bottom-color: var(--stone);
}

.header.scrolled::before {
  opacity: 1;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
  transition: height 0.6s var(--ease);
}

.header.scrolled .header-inner {
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 34px;
  height: 34px;
  transition: transform 0.6s var(--ease);
}

.logo:hover .logo-icon {
  transform: translateY(-3px) rotate(-6deg);
}

.logo-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
}

.nav {
  display: none;
  gap: clamp(1.1rem, 2vw, 2.1rem);
}

.nav-link {
  position: relative;
  padding: 0.4rem 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  opacity: 0.88;
  transition: opacity 0.3s;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease);
}

.nav-link:hover {
  opacity: 1;
}

.nav-link:hover::after,
.nav-link.is-current::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.header-social {
  display: none;
  gap: 0.35rem;
}

.header-social a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: inherit;
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.header-social a:hover {
  transform: translateY(-2px);
  opacity: 0.7;
}

.header-social svg,
.footer-social svg,
.follow-platform svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  padding-left: 1.1rem;
  border-left: 1px solid currentColor;
  border-left-color: color-mix(in srgb, currentColor 30%, transparent);
}

.lang-btn {
  padding: 0.35rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  color: inherit;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
}

.lang-btn.active {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
}

.menu-toggle {
  display: grid;
  gap: 7px;
  width: 44px;
  height: 44px;
  padding: 0 8px;
  place-content: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}

.menu-toggle.active span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-toggle.active span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

@media (min-width: 1100px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}

@media (min-width: 640px) {
  .header-social { display: flex; }
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
  background: var(--navy);
  color: var(--ivory);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease), visibility 0s 0.8s;
}

.mobile-nav.active {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.8s var(--ease), visibility 0s;
}

.header.menu-open {
  color: var(--ivory);
  border-bottom-color: transparent;
}

.header.menu-open::before {
  opacity: 0;
}

.mobile-nav-link {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), color 0.3s;
}

.mobile-nav.active .mobile-nav-link {
  opacity: 1;
  transform: none;
}

.mobile-nav.active .mobile-nav-link:nth-child(n) { transition-delay: 0.25s; }
.mobile-nav.active .mobile-nav-link:nth-child(n+3) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-link:nth-child(n+5) { transition-delay: 0.35s; }
.mobile-nav.active .mobile-nav-link:nth-child(n+7) { transition-delay: 0.4s; }
.mobile-nav.active .mobile-nav-link:nth-child(n+9) { transition-delay: 0.45s; }
.mobile-nav.active .mobile-nav-link:nth-child(n+11) { transition-delay: 0.5s; }

.mobile-nav-link:hover {
  color: var(--stone);
}

.mobile-nav-social {
  display: flex;
  gap: 1.75rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(246, 243, 234, 0.2);
}

.mobile-nav-social a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--stone);
}

/* --------------------------------------------------------------------------
   Hero: full-bleed photographs crossfade under a soft navy fade
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: var(--header-h);
  background: var(--navy);
  color: var(--ivory);
  overflow: hidden;
}

.hero-slides,
.hero-slide,
.hero-wash {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 2s var(--ease-soft);
}

.hero-slide.is-active {
  opacity: 1;
}

/* Each slide sets --focus to its subject, so every crop (wide desktop or
   tall phone) keeps that subject in frame, and the zoom grows from it. */
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transform-origin: var(--focus, 50% 50%);
  transform: scale(1.02);
}

/* Tall screens see a narrow slice of each photo; --focus-m aims that slice. */
@media (max-aspect-ratio: 1 / 1) {
  .hero-slide img {
    object-position: var(--focus-m, var(--focus, 50% 50%));
    transform-origin: var(--focus-m, var(--focus, 50% 50%));
  }
}

/* Slow, level push-in while a photo is on screen: scale only, no drift. */
.hero-slide.is-active img {
  animation: kenburns 9s linear forwards;
}

@keyframes kenburns {
  from { transform: scale(1.02); }
  to { transform: scale(1.1); }
}

.hero-wash {
  background:
    linear-gradient(180deg, rgba(11, 11, 43, 0.7) 0%, rgba(11, 11, 43, 0.4) 28%, rgba(11, 11, 43, 0.55) 55%, rgba(11, 11, 43, 0.96) 100%),
    linear-gradient(90deg, rgba(11, 11, 43, 0.6) 0%, rgba(11, 11, 43, 0.1) 70%),
    rgba(11, 11, 43, 0.25);
}

.hero-content {
  position: relative;
  padding-top: 4rem;
  padding-bottom: clamp(2.5rem, 6vh, 4rem);
}

.hero-dove {
  width: clamp(44px, 5vw, 60px);
  height: auto;
  margin-bottom: 1.5rem;
  color: var(--ivory);
}

.hero-title {
  max-width: 13ch;
  font-size: clamp(2.7rem, 1.4rem + 6.4vw, 6.6rem);
  line-height: 1.02;
  letter-spacing: 0.04em;
}

.hero-statement {
  margin-top: 1.25rem;
  font-family: var(--font-statement);
  font-style: italic;
  font-size: clamp(1.35rem, 1rem + 1.4vw, 2.1rem);
  line-height: 1.3;
  color: var(--ivory);
}

.hero-meta {
  margin-top: 1.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
}

.hero-address {
  display: block;
  margin-top: 0.35rem;
  color: var(--navy-meta);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.5rem;
}

.hero-footer {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.4rem;
  padding-bottom: 1.6rem;
}

.hero-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: rgba(246, 243, 234, 0.18);
}

.hero-dots {
  display: flex;
  gap: 0.5rem;
}

.hero-dots span {
  position: relative;
  width: 44px;
  height: 2px;
  background: rgba(246, 243, 234, 0.25);
  overflow: hidden;
}

.hero-dots span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--ivory);
  transform: scaleX(0);
  transform-origin: left;
}

.hero-dots span.is-active::after {
  animation: dot-fill var(--slide-ms, 7000ms) linear forwards;
}

@keyframes dot-fill {
  to { transform: scaleX(1); }
}

.hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--stone);
}

.hero-scroll i {
  position: relative;
  width: 1px;
  height: 36px;
  background: rgba(246, 243, 234, 0.25);
  overflow: hidden;
}

.hero-scroll i::after {
  content: '';
  position: absolute;
  left: 0;
  top: -40%;
  width: 1px;
  height: 40%;
  background: var(--ivory);
  animation: scroll-line 2.2s var(--ease-soft) infinite;
}

@keyframes scroll-line {
  to { top: 100%; }
}

/* --------------------------------------------------------------------------
   Follow us
   -------------------------------------------------------------------------- */
.follow {
  padding-top: clamp(4.5rem, 9vw, 7.5rem);
}

.follow .section-head {
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.follow-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 900px) {
  .follow-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.follow-tile {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(246, 243, 234, 0.14);
  background: var(--navy-2);
  color: var(--ivory);
  text-decoration: none;
  transition: border-color 0.5s var(--ease), transform 0.7s var(--ease);
}

.follow-tile:hover {
  border-color: rgba(246, 243, 234, 0.4);
  transform: translateY(-4px);
}

.follow-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy);
}

.follow-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease), filter 1s var(--ease);
}

.follow-tile:hover .follow-media img {
  transform: scale(1.06);
}

.follow-youtube .follow-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 43, 0) 40%, rgba(11, 11, 43, 0.6) 100%);
}

.play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  border-radius: 50%;
  background: rgba(246, 243, 234, 0.92);
  color: var(--navy);
  transition: transform 0.6s var(--ease);
}

.play::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid var(--ivory);
  animation: pulse 2.6s var(--ease-soft) infinite;
}

.play svg {
  width: 26px;
  height: 26px;
  margin-left: 4px;
  fill: currentColor;
}

.follow-tile:hover .play {
  transform: scale(1.08);
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.8; }
  to { transform: scale(1.7); opacity: 0; }
}

.follow-mosaic {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}

.follow-mosaic img:first-child {
  grid-row: span 2;
}

.follow-mosaic img:nth-child(2) { transition-delay: 0.05s; }
.follow-mosaic img:nth-child(3) { transition-delay: 0.1s; }

.follow-body {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.35rem 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.1rem);
}

.follow-platform {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--stone);
}

.follow-title {
  grid-column: 1;
  font-family: var(--font-statement);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
  line-height: 1.2;
}

.follow-handle {
  grid-column: 1;
  font-size: 0.85rem;
  color: var(--navy-meta);
}

.follow-cta {
  grid-column: 2;
  grid-row: 2 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.3rem;
  border: 1px solid rgba(246, 243, 234, 0.4);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

.follow-cta svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.follow-tile:hover .follow-cta {
  background: var(--ivory);
  color: var(--navy);
}

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

  .follow-cta {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    margin-top: 1rem;
  }
}

/* --------------------------------------------------------------------------
   Mission
   -------------------------------------------------------------------------- */
.mission-grid {
  display: grid;
  gap: clamp(3rem, 7vw, 6rem);
  align-items: center;
}

@media (min-width: 960px) {
  .mission-grid {
    grid-template-columns: 1fr 1.05fr;
  }
}

.mission-copy .statement {
  margin-bottom: 1.5rem;
}

.mission-copy > p:not(.eyebrow):not(.statement) {
  max-width: 54ch;
  color: var(--charcoal);
  margin-bottom: 2rem;
}

.mission-media {
  position: relative;
  padding: 0 0 clamp(3rem, 8vw, 5rem) 0;
}

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

.mission-photo-main {
  aspect-ratio: 4 / 5;
  width: 82%;
  margin-left: auto;
}

.mission-photo-inset {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46%;
  aspect-ratio: 1;
  border: 10px solid var(--ivory);
}

/* --------------------------------------------------------------------------
   Visit
   -------------------------------------------------------------------------- */
.visit-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 960px) {
  .visit-grid {
    grid-template-columns: 1fr 1.1fr;
    align-items: stretch;
  }
}

.visit-info {
  display: grid;
}

.visit-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--stone);
}

.visit-item:last-child {
  border-bottom: 1px solid var(--stone);
}

.visit-item h3 {
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--olive-dark);
}

.visit-item p {
  margin-bottom: 0.75rem;
  color: var(--charcoal);
}

.visit-item p:last-child {
  margin-bottom: 0;
}

.times div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
}

.times div + div {
  border-top: 1px solid var(--stone);
}

.times dt {
  font-family: var(--font-statement);
  font-size: 1.3rem;
  color: var(--navy);
}

.times dd {
  align-self: center;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--charcoal);
}

.visit-map {
  min-height: 360px;
  background: var(--stone);
  border: 1px solid var(--stone);
}

.visit-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
  filter: grayscale(0.85) sepia(0.15) contrast(0.95);
  transition: filter 0.8s var(--ease);
}

.visit-map:hover iframe {
  filter: none;
}

/* --------------------------------------------------------------------------
   Gatherings: photo half, navy panel half
   -------------------------------------------------------------------------- */
.gatherings {
  display: grid;
  background: var(--navy);
  color: var(--ivory);
}

@media (min-width: 960px) {
  .gatherings {
    grid-template-columns: 1fr 1fr;
    min-height: 92vh;
  }
}

.gatherings-media {
  min-height: 56vw;
  overflow: hidden;
}

@media (min-width: 960px) {
  .gatherings-media {
    min-height: 0;
  }
}

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

.gatherings-panel {
  padding: var(--section-y) var(--gutter);
  align-self: center;
  max-width: 680px;
}

.gatherings-panel h2 {
  color: var(--ivory);
}

.gathering {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid rgba(246, 243, 234, 0.16);
}

.gathering .numeral {
  color: rgba(217, 211, 191, 0.3);
}

.gathering h3 {
  font-family: var(--font-statement);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--ivory);
}

.gathering-time {
  margin: 0.2rem 0 0.7rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stone);
}

.gathering p:not(.gathering-time) {
  color: rgba(246, 243, 234, 0.82);
}

.gatherings-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2rem;
  margin-top: 2.25rem;
}

/* --------------------------------------------------------------------------
   Gallery marquee
   -------------------------------------------------------------------------- */
.gallery {
  overflow: hidden;
}

.marquee {
  --marquee-speed: 70s;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee + .marquee {
  margin-top: 14px;
}

.marquee-track {
  display: flex;
  flex: none;
  gap: 14px;
  padding-right: 14px;
  animation: marquee var(--marquee-speed) linear infinite;
}

.marquee-reverse .marquee-track {
  animation-direction: reverse;
  --marquee-speed: 80s;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee img {
  height: clamp(170px, 22vw, 300px);
  width: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.8s var(--ease);
}

.marquee img:hover {
  transform: scale(1.03);
}

@keyframes marquee {
  to { transform: translateX(-100%); }
}

/* --------------------------------------------------------------------------
   Ministries
   -------------------------------------------------------------------------- */
.ministries {
  padding-top: 0;
}

.ministries-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 820px) {
  .ministries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ministry {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 3vw, 2.75rem);
  background: var(--sand);
  overflow: hidden;
  transition: background-color 0.6s var(--ease), transform 0.7s var(--ease);
}

.ministry:hover {
  background: var(--stone);
  transform: translateY(-4px);
}

.ministry .numeral {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: clamp(3.5rem, 3rem + 2vw, 5rem);
  transition: color 0.6s var(--ease);
}

.ministry:hover .numeral {
  color: var(--ivory);
}

.ministry .icon {
  margin-bottom: 2.5rem;
}

.ministry-tag {
  margin-bottom: 0.6rem;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--olive-dark);
}

.ministry h3 {
  margin-bottom: 0.9rem;
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
}

.ministry > p:not(.ministry-tag) {
  flex: 1;
  margin-bottom: 2rem;
  color: var(--charcoal);
}

.ministry .text-link {
  align-self: flex-start;
}

/* --------------------------------------------------------------------------
   ACADI
   -------------------------------------------------------------------------- */
.acadi-grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5.5rem);
  align-items: center;
}

@media (min-width: 960px) {
  .acadi-grid {
    grid-template-columns: 1.1fr 1fr;
  }
}

.acadi-media {
  aspect-ratio: 4 / 3;
}

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

.acadi-copy .statement {
  margin-bottom: 1.25rem;
}

.acadi-copy > p:not(.eyebrow):not(.statement):not(.note) {
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}

.note {
  margin-bottom: 2.25rem;
  padding: 1rem 1.25rem;
  background: var(--ivory);
  border: 1px solid var(--stone);
  font-size: 0.9rem;
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Give
   -------------------------------------------------------------------------- */
.give {
  background: var(--navy);
  color: var(--ivory);
  overflow: hidden;
  text-align: center;
}

.give-bg {
  position: absolute;
  inset: -10% 0;
}

.give-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.give-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(11, 11, 43, 0.55) 0%, rgba(11, 11, 43, 0.92) 75%);
}

.give-content {
  position: relative;
  max-width: 900px;
}

.give h2 {
  color: var(--ivory);
}

.give .rule {
  margin-left: auto;
  margin-right: auto;
  transform-origin: center;
}

.give-verse {
  margin: 0 auto 1.75rem;
}

.give-verse p {
  font-family: var(--font-statement);
  font-style: italic;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.4rem);
  line-height: 1.35;
}

.give-verse cite {
  display: block;
  margin-top: 1.25rem;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--stone);
}

.give-text {
  max-width: 56ch;
  margin: 0 auto 2.5rem;
  color: rgba(246, 243, 234, 0.82);
}

/* --------------------------------------------------------------------------
   Mailing list
   -------------------------------------------------------------------------- */
.mailing {
  padding: clamp(4rem, 8vw, 6rem) 0;
}

.mailing-inner {
  display: grid;
  gap: 2rem 4rem;
  align-items: end;
}

@media (min-width: 900px) {
  .mailing-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.mailing .statement {
  color: var(--navy);
}

.mailing-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mailing-form input {
  flex: 1 1 240px;
  min-height: 52px;
  padding: 0 1.1rem;
  border: 1px solid var(--stone);
  border-radius: 0;
  background: var(--ivory);
  font: inherit;
  color: var(--charcoal);
  transition: border-color 0.3s;
}

.mailing-form input::placeholder {
  color: var(--ink);
}

.mailing-form input:focus {
  outline: none;
  border-color: var(--navy);
}

/* --------------------------------------------------------------------------
   Give modal
   -------------------------------------------------------------------------- */
.give-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(11, 11, 43, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease), visibility 0s 0.45s;
}

.give-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s var(--ease), visibility 0s;
}

.give-modal-panel {
  width: min(560px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: var(--ivory);
  border: 1px solid var(--stone);
  color: var(--charcoal);
  transform: translateY(24px);
  transition: transform 0.6s var(--ease);
}

.give-modal.is-open .give-modal-panel {
  transform: none;
}

.give-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.give-modal-header h3 {
  font-family: var(--font-title);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.give-modal-close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--stone);
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--navy);
  cursor: pointer;
  transition: background-color 0.3s;
}

.give-modal-close:hover {
  background: var(--sand);
}

.give-modal-intro {
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.give-modal-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1.5rem;
  border: 1px solid var(--stone);
}

.give-tab {
  padding: 0.85rem 0.75rem;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.give-tab.active {
  background: var(--navy);
  color: var(--ivory);
}

.give-panel {
  display: grid;
  gap: 1rem;
}

.give-panel[hidden] {
  display: none;
}

.give-etransfer-email {
  display: grid;
  gap: 0.4rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--stone);
  background: var(--sand);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.3s;
}

.give-etransfer-email:hover {
  border-color: var(--olive);
}

.give-etransfer-email-text {
  font-weight: 600;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.give-etransfer-email-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--ink);
}

.give-etransfer-email-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.give-copy-feedback,
.give-stripe-status {
  min-height: 1.2em;
  font-size: 0.85rem;
}

.give-copy-feedback.is-success,
.give-stripe-status.is-success { color: #3D5A2E; }
.give-copy-feedback.is-error,
.give-stripe-status.is-error { color: #8A2A1E; }

.give-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  padding: clamp(4rem, 8vw, 6rem) 0 2rem;
  background: var(--navy);
  color: var(--ivory);
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(246, 243, 234, 0.14);
}

.footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--ivory);
}

.footer-lockup svg {
  width: 44px;
  height: 44px;
}

.footer-lockup span {
  font-weight: 500;
  font-size: clamp(0.95rem, 0.8rem + 0.6vw, 1.25rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.footer-statement {
  font-family: var(--font-statement);
  font-style: italic;
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.6rem);
  color: var(--stone);
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding: 3rem 0;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.footer h4 {
  margin-bottom: 1.1rem;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--navy-meta);
}

.footer-column p {
  margin-bottom: 0.9rem;
  color: rgba(246, 243, 234, 0.85);
  font-size: 0.92rem;
}

.footer-column a {
  color: var(--ivory);
  text-decoration: none;
  font-size: 0.92rem;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}

.footer-column a:hover {
  background-size: 100% 1px;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(246, 243, 234, 0.14);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy-meta);
}

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */
@media (max-width: 639px) {
  :root {
    --header-h: 70px;
  }

  .logo-name {
    font-size: 0.7rem;
    letter-spacing: 0.24em;
  }

  .hero-ctas .btn {
    flex: 1 1 100%;
  }

  .hero-meta {
    letter-spacing: 0.2em;
    line-height: 1.9;
  }

  .mission-photo-main {
    width: 88%;
  }

  .visit-map,
  .visit-map iframe {
    min-height: 300px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion: keep everything, drop the movement
   -------------------------------------------------------------------------- */
@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;
    transition-delay: 0s !important;
  }

  .marquee {
    overflow-x: auto;
  }
}

/* The invitation to join, under the photos of the church family. */
.gallery-cta {
  margin-top: clamp(2.5rem, 5vw, 3.75rem);
  text-align: center;
}
