/* ==========================================================================
   The Albizia — layout.css
   Container, nav, footer, section rhythm, shared blocks.
   ========================================================================== */

/* --- Container & sections ----------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: 900px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(4rem, 8vw, 7rem); }
.section--alt { background: var(--bone-2); }
.section--dark { background: var(--basalt); color: var(--bone); }
.section--dark .eyebrow { color: rgba(244, 241, 236, 0.55); }
.section--dark a { color: var(--bone); border-color: rgba(244,241,236,.3); }
.section--dark a:hover { border-color: var(--bone); }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* A dark section running straight into the dark footer reads as one enormous
   black block. Trim the trailing padding and separate them with a hairline. */
main > .section--dark:last-child { padding-bottom: clamp(3.5rem, 6vw, 5.5rem); }
main:has(> .section--dark:last-child) + .site-footer {
  border-top: 1px solid rgba(244, 241, 236, 0.18);
}
.section--dark .rule { border-top-color: rgba(244, 241, 236, 0.18); }

/* Full-bleed escapes the container; text never does. */
/* Only needed for elements nested inside .container. A section that is already
   a direct child of <main> is full-width without it — adding it there overhangs
   the viewport by the scrollbar width. */
.bleed {
  width: 100vw;
  max-width: 100%;
  margin-inline: calc(50% - 50vw);
}

/* --- Header / nav -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bone);
  border-bottom: 1px solid var(--rule);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

/* Transparent over a photographic hero until the user scrolls. */
.site-header--over {
  position: fixed;
  left: 0; right: 0;
  background: transparent;
  border-bottom-color: transparent;
}
.site-header--over .wordmark,
.site-header--over .nav a,
.site-header--over .nav-toggle { color: var(--bone); }
.site-header--over.is-scrolled {
  background: var(--bone);
  border-bottom-color: var(--rule);
}
.site-header--over.is-scrolled .wordmark,
.site-header--over.is-scrolled .nav a,
.site-header--over.is-scrolled .nav-toggle { color: var(--basalt); }

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 84px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--basalt);
  border: 0;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.wordmark:hover { color: var(--basalt); }

.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.nav a {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--basalt);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.nav a:hover { border-bottom-color: currentColor; }
.nav a[aria-current='page'] { border-bottom-color: currentColor; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  color: var(--basalt);
  padding: 0.7rem 1.1rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 84px 0 auto 0;
    background: var(--bone);
    border-bottom: 1px solid var(--rule);
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s var(--ease);
  }
  .nav.is-open { max-height: 70vh; }

  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem var(--gutter) 2.5rem;
  }
  .nav li { width: 100%; border-bottom: 1px solid var(--rule); }
  .nav li:last-child { border-bottom: 0; }
  .nav a {
    display: block;
    width: 100%;
    padding: 1.15rem 0;
    font-size: 0.8rem;
    color: var(--basalt);
    border-bottom: 0;
  }
  /* Menu panel is always on bone, even when the header is over the hero. */
  .site-header--over .nav a { color: var(--basalt); }
}

/* --- Hero ---------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: flex-end;
  color: var(--bone);
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* <picture> is the element the img's height:100% resolves against, so it has to
   be given the height too — otherwise it stays auto and the photo stops short
   of the hero, leaving the scrim over bare background. */
.hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

/* Scrim: bottom-up so headline type stays legible over the sky gradient. */
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 11, 12, 0.88) 0%,
    rgba(11, 11, 12, 0.66) 32%,
    rgba(11, 11, 12, 0.42) 55%,
    rgba(11, 11, 12, 0.28) 75%,
    rgba(11, 11, 12, 0.45) 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: clamp(4rem, 10vw, 7rem);
}

.hero h1 { max-width: 16ch; }

.hero__sub {
  margin-top: 1.75rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  font-weight: 300;
  line-height: 1.7;
  color: rgba(244, 241, 236, 0.88);
}

.hero__actions {
  margin-top: 2.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Smaller hero for interior pages */
.hero--page { min-height: min(62vh, 620px); }
.hero--page h1 { max-width: 20ch; }

/* Mobile browsers grow/shrink the viewport as the URL bar hides. svh is the
   *small* viewport height, so the hero is sized to the worst case and never
   jumps or overshoots the screen on first paint. */
@supports (height: 100svh) {
  .hero { min-height: min(92svh, 900px); }
  .hero--page { min-height: min(62svh, 620px); }
}

/* --- Hero on small screens ---------------------------------------------- */
@media (max-width: 600px) {
  .hero { min-height: min(86vh, 760px); }
  @supports (height: 100svh) {
    .hero { min-height: min(86svh, 760px); }
  }

  .hero__inner { padding-block: clamp(2.5rem, 9vw, 4rem); }
  .hero__sub { margin-top: 1.25rem; }

  /* Content-width buttons stack ragged. One column, full width, so the two
     calls to action read as a pair and both clear the 44px tap target. */
  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 2rem;
  }
  .hero__actions .btn {
    width: 100%;
    padding-inline: 1rem;
  }
}

/* --- Poster hero (home) -------------------------------------------------
   Desktop shows the owner's poster whole. Below 820px its baked-in type is
   too small to read, so a rebuilt phone layout takes over. Colours are
   sampled from the poster. */

.poster-hero {
  --poster-ink:  #1D1E21;  /* poster's bottom band */
  --poster-cream: #F4EEE6;
  --poster-gold:  #EBCFB2;
  --poster-tan:   #D9C2AA;
  --poster-rule:  rgba(217, 194, 170, 0.35);

  position: relative;
  background: var(--poster-ink);
  color: var(--poster-cream);
  overflow: hidden;
}

/* Beyond the poster's native width it is centred, with a blurred copy of
   itself filling the sides rather than being upscaled. */
/* The top padding is a dark band for the fixed header, so the nav doesn't
   sit on top of the poster's own mark and title. */
.poster-hero__desktop {
  position: relative;
  padding-top: 84px;
}
.poster-hero__desktop::before {
  content: '';
  position: absolute;
  inset: 84px -40px -40px;
  background: url('../img/hero-poster-960.jpg') center / cover no-repeat;
  filter: blur(40px) brightness(0.55);
}
.poster-hero__desktop img {
  position: relative;
  width: 100%;
  max-width: 1448px;
  margin-inline: auto;
}

.poster-m { display: none; }

@media (max-width: 820px) {
  .poster-hero__desktop { display: none; }
  .poster-m { display: block; padding-bottom: 2.75rem; }

  .poster-m__scene {
    position: relative;
    height: clamp(520px, 136vw, 900px);
  }
  .poster-m__bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
  }
  /* Darkens the sky behind the type, as the poster does, and fades the lava
     into the ink band below. */
  .poster-m__scene::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 85% 42% at 50% 30%, rgba(24, 22, 34, 0.42), rgba(24, 22, 34, 0) 100%),
      linear-gradient(to top, var(--poster-ink) 0%, rgba(29, 30, 33, 0) 16%);
  }

  .poster-m__head {
    position: absolute;
    z-index: 1;
    inset: 0 0 auto;
    padding: 96px var(--gutter) 0;
    text-align: center;
    text-shadow: 0 1px 14px rgba(15, 14, 22, 0.55);
  }
  .poster-m__mark {
    width: 46px;
    height: auto;
    margin: 0 auto 1.1rem;
  }
  .poster-m__kicker,
  .poster-m__line {
    font-family: var(--font-sans);
    text-transform: uppercase;
    color: var(--poster-gold);
    line-height: 1.5;
  }
  .poster-m__kicker {
    font-size: clamp(0.8rem, 3.6vw, 1.1rem);
    font-weight: 400;
    letter-spacing: 0.34em;
    margin-right: -0.34em; /* trailing tracking would push it off-centre */
  }
  .poster-m__title {
    margin: 0.35rem 0 0.9rem;
    font-size: clamp(2.1rem, 9.4vw, 3.9rem);
    line-height: 1;
    letter-spacing: 0.09em;
    margin-right: -0.09em;
    text-transform: uppercase;
    color: var(--poster-cream);
  }
  .poster-m__line {
    font-size: clamp(0.72rem, 3.1vw, 0.95rem);
    font-weight: 500;
    letter-spacing: 0.24em;
    margin-right: -0.24em;
  }
  .poster-m__line--small {
    margin-top: 0.5rem;
    font-size: clamp(0.62rem, 2.6vw, 0.8rem);
    font-weight: 400;
    letter-spacing: 0.22em;
    margin-right: -0.22em;
  }

  .poster-m__tagline {
    position: relative;
    z-index: 1;
    margin: -1.75rem 0 0;
    padding-inline: var(--gutter);
    text-align: center;
    font-size: clamp(0.62rem, 2.7vw, 0.8rem);
    font-weight: 400;
    letter-spacing: 0.2em;
    line-height: 2;
    text-transform: uppercase;
    color: var(--poster-cream);
  }

  /* The poster's five-card strip, as a swipeable row. */
  .poster-m__cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(68vw, 300px);
    gap: 0.75rem;
    margin-top: 2rem;
    padding: 0 var(--gutter) 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .poster-m__cards::-webkit-scrollbar { display: none; }
  .poster-m__cards:focus-visible { outline-color: var(--poster-gold); outline-offset: -2px; }
  .poster-m__cards li { scroll-snap-align: start; }
  .poster-m__cards img {
    width: 100%;
    aspect-ratio: 273 / 197;
    object-fit: cover;
    border: 1px solid rgba(244, 238, 230, 0.7);
  }
  .poster-m__cards p {
    margin-top: 0.85rem;
    text-align: center;
    text-transform: uppercase;
    line-height: 1.7;
  }
  .poster-m__cards span { display: block; }
  .poster-m__cards span:first-child {
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    color: var(--poster-cream);
  }
  .poster-m__cards span:last-child {
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    color: var(--poster-tan);
  }

  /* The poster's icon row, as a two-column grid with its vertical rules. */
  .poster-m__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    row-gap: 1.75rem;
    margin: 2rem var(--gutter) 0;
    padding-top: 2rem;
    border-top: 1px solid var(--poster-rule);
  }
  .poster-m__features li {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-inline: 0.5rem;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
    line-height: 1.6;
    text-transform: uppercase;
    color: var(--poster-cream);
  }
  .poster-m__features li:nth-child(even) { border-left: 1px solid var(--poster-rule); }
  .poster-m__features li:last-child {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .poster-m__features img {
    flex: none;
    width: auto;
    height: 26px;
  }
}

/* --- Page intro (no photo) ---------------------------------------------- */

.page-intro { padding-block: clamp(7rem, 14vw, 11rem) clamp(3rem, 6vw, 5rem); }
.page-intro h1 { max-width: 18ch; }
.page-intro .lede { margin-top: 2rem; }

/* --- Shared blocks ------------------------------------------------------- */

/* Two-column: heading left, body right */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}
@media (min-width: 900px) {
  .split { grid-template-columns: 5fr 7fr; align-items: start; }
}

/* Alternating image / text rows */
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1fr; }
  .feature--flip .feature__media { order: 2; }
}
.feature__body h3 { margin-bottom: 1.25rem; }
.feature__body .btn,
.feature__body .link-arrow { margin-top: 2rem; }

/* Three-up card grid */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2rem, 4vw, 3rem);
}
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card__media { overflow: hidden; margin-bottom: 1.75rem; }
.card__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }
.card h3 { margin-bottom: 0.85rem; }
.card p { font-size: 1rem; color: var(--stone); }

/* Hairline-ruled definition list — used for amenities and specs.
   Deliberately not icon tiles; icons cheapen this palette. */
.spec-list { border-top: 1px solid var(--rule); }
.section--dark .spec-list { border-top-color: rgba(244,241,236,.18); }

.spec-list > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.section--dark .spec-list > div { border-bottom-color: rgba(244,241,236,.18); }

@media (min-width: 700px) {
  .spec-list > div {
    grid-template-columns: minmax(180px, 1fr) 2fr;
    gap: 2rem;
    align-items: baseline;
  }
}

.spec-list dt {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
}
.spec-list dd { margin: 0; font-weight: 300; }
.section--dark .spec-list dt { color: rgba(244,241,236,.55); }

/* Stat band — the operator-facing numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.section--dark .stats { border-top-color: rgba(244,241,236,.18); border-left-color: rgba(244,241,236,.18); }

.stats > div {
  padding: clamp(1.75rem, 3vw, 2.75rem) clamp(1rem, 2vw, 2rem);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.section--dark .stats > div { border-right-color: rgba(244,241,236,.18); border-bottom-color: rgba(244,241,236,.18); }

.stats .stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1;
  margin-bottom: 0.9rem;
}
.stats .stat__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  line-height: 1.5;
}
.section--dark .stats .stat__label { color: rgba(244,241,236,.6); }

/* Full-bleed image band with overlaid text */
.band {
  position: relative;
  min-height: min(70vh, 680px);
  display: flex;
  align-items: center;
  color: var(--bone);
  overflow: hidden;
}
.band__media { position: absolute; inset: 0; }
.band__media img { width: 100%; height: 100%; object-fit: cover; }
.band__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(11,11,12,.78) 0%, rgba(11,11,12,.45) 55%, rgba(11,11,12,.25) 100%);
}
.band__inner { position: relative; z-index: 1; width: 100%; }
.band .eyebrow { color: rgba(244,241,236,.6); }

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--basalt);
  color: var(--bone);
  padding-block: clamp(4rem, 8vw, 6rem) 2.5rem;
}

.site-footer a {
  color: rgba(244, 241, 236, 0.8);
  border-bottom-color: transparent;
}
.site-footer a:hover { color: var(--bone); border-bottom-color: rgba(244,241,236,.5); }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
}
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }

.footer-grid h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  max-width: 14ch;
  margin-bottom: 2rem;
}

.footer-col h3 {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.5);
  margin-bottom: 1.5rem;
}
.footer-col li { margin-bottom: 0.9rem; font-size: 0.9375rem; font-weight: 300; }

.footer-bottom {
  border-top: 1px solid rgba(244, 241, 236, 0.18);
  padding-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(244, 241, 236, 0.55);
  letter-spacing: 0.06em;
}

/* --- Scroll reveal ------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}
