/* Homepage bento gallery hero — loaded on homepage only */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600&display=swap");

:root {
  /* Align with site-header compact height C (~64px) when Airbnb header is active */
  --sticky-nav-h: 64px;
  --site-header-h: var(--sticky-nav-h);
  --bento-hero-h: calc(100vh - var(--sticky-nav-h) - var(--ab-h, 0px));
  --bento-cream: #f4efe6;
  --bento-beige: #e6dccb;
  --bento-forest: #243528;
  --bento-gold: #b8975c;
  --bento-olive: #5a6b48;
  --bento-muted: #4a4844;
}

@supports (height: 100svh) {
  :root {
    --bento-hero-h: calc(100svh - var(--sticky-nav-h) - var(--ab-h, 0px));
  }
}

.bento-hero {
  position: relative;
  display: flex;
  width: 100%;
  height: var(--bento-hero-h);
  min-height: var(--bento-hero-h);
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  background: var(--bento-cream);
  z-index: 1;
}

.bento-grid {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  gap: 0.5vh;
  align-content: stretch;
  justify-content: center;
  grid-template-columns: repeat(3, calc((100vw - 1vh) / 3));
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

@media (min-width: 992px) {
  .bento-grid {
    gap: 0.6vh;
  }
}

/* Tall: 1,3,4,6 — Landscape: 2,5,7,8 */
.bento-grid__item:nth-child(1) { grid-area: 1 / 1 / 3 / 2; }
.bento-grid__item:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
.bento-grid__item:nth-child(3) { grid-area: 2 / 2 / 4 / 3; } /* CENTER */
.bento-grid__item:nth-child(4) { grid-area: 1 / 3 / 3 / 4; }
.bento-grid__item:nth-child(5) { grid-area: 3 / 1 / 4 / 2; }
.bento-grid__item:nth-child(6) { grid-area: 3 / 3 / 5 / 4; }
.bento-grid__item:nth-child(7) { grid-area: 4 / 1 / 5 / 2; }
.bento-grid__item:nth-child(8) { grid-area: 4 / 2 / 5 / 3; }

.bento-grid__item {
  overflow: hidden;
  background: var(--bento-beige);
  will-change: transform;
  transition: none;
  animation: none;
  filter: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.bento-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: none;
  animation: none;
  filter: none;
}

/*
 * Flip measurement only — never the resting painted state.
 * Rows total 2× hero height; align-content:center shifts the grid so tile 3
 * (rows 2–3) lands exactly on the viewport.
 */
.bento-grid--final {
  align-content: center;
  justify-content: center;
  grid-template-columns: repeat(3, 100vw);
  grid-template-rows: repeat(4, calc(var(--bento-hero-h) * 0.5));
}

.bento-hero__veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transition: none;
  animation: none;
  filter: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: radial-gradient(
    ellipse 52% 48% at 50% 50%,
    rgba(244, 239, 230, 0.94),
    rgba(244, 239, 230, 0.72) 55%,
    rgba(244, 239, 230, 0) 78%
  );
}

@media (min-width: 992px) {
  .bento-hero__veil {
    background: radial-gradient(
      ellipse 46% 42% at 50% 50%,
      rgba(244, 239, 230, 0.94),
      rgba(244, 239, 230, 0.72) 55%,
      rgba(244, 239, 230, 0) 78%
    );
  }
}

.bento-hero__copy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* At load, ~(E−C) of the hero sits below the fold (spacer = E, hero = 100svh−C).
     Extra bottom padding shifts the flex centre into the visible band. */
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem);
  padding-bottom: calc(2rem + (var(--hdr-expanded, 190px) - var(--hdr-compact, 64px)));
  pointer-events: none;
  transition: none;
  animation: none;
}

@media (max-width: 768px) {
  .bento-hero__copy {
    padding-bottom: 2rem;
  }
}

.bento-hero__copy .eyebrow {
  margin: 0 0 0.85rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bento-gold);
}

.bento-hero__copy h1 {
  margin: 0 0 1rem;
  max-width: 48rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.65rem, 6.5vw, 3.5rem);
  line-height: 0.95;
  color: var(--bento-forest);
}

/* Line-by-line headline entrance */
.bento-hero__copy h1 .bento-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.bento-hero__copy h1 .bento-line__inner {
  display: block;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .bento-hero__copy h1 .bento-line__inner {
    will-change: auto;
    transform: none !important;
    opacity: 1 !important;
  }
}

.bento-hero__copy .description {
  margin: 0 0 1.5rem;
  max-width: 36rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: clamp(0.92rem, 2.2vw, 1.05rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--bento-muted);
}

.bento-hero__copy .hint {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bento-olive);
}

.bento-hero__copy .hint::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1px;
  background: var(--bento-gold);
}

@media (prefers-reduced-motion: reduce) {
  .bento-grid__item {
    will-change: auto;
  }
}
