/* ===== Hero =====
   Fills the whole viewport — the header now overlays it (transparent,
   position:absolute) rather than pushing it down, so the image is inset
   from the top by --header-height instead of 0. That gap reveals .hero's
   own flat theme-color background behind the header, which is what makes
   the nav look like it "adopts" each page's color instead of a fixed bar. */
.hero {
  position: relative;
  background: var(--color-theme);
  min-height: 100vh;
  min-height: 100svh;
}

.hero__media {
  position: absolute;
  inset: var(--header-height, 4.75rem) var(--space-hero-inset) var(--space-hero-inset) var(--space-hero-inset);
  overflow: hidden;
  border-radius: var(--radius-hero);
}

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

.hero__content {
  position: absolute;
  inset: var(--header-height, 4.75rem) var(--space-hero-inset) var(--space-hero-inset) var(--space-hero-inset);
  background: linear-gradient(to bottom, transparent 45%, rgba(0, 0, 0, 0.75) 100%);
  border-radius: var(--radius-hero);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-section-x);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-hero-title);
  line-height: 1;
  color: var(--color-cream);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.hero__address {
  font-family: var(--font-body);
  font-size: var(--fs-hero-address);
  color: var(--color-cream);
  text-transform: uppercase;
  margin-top: var(--space-xs);
}

.hero__actions {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-xs);
}

/* Mobile: all three CTAs side by side in one row, so each has to give up
   its usual fixed padding/font-size to fit — they shrink evenly instead
   of wrapping or overflowing. */
.hero__actions .btn {
  flex: 1 1 0;
  padding: 0.65em 0.4em;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Feedback: these three CTAs specifically hover orange, not the site-wide
   cream/olive-invert every other .btn uses — scoped here rather than on
   .btn itself so nothing else changes. */
.hero__actions .btn:hover {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: var(--color-cream);
}

.hero__cta-full {
  display: none;
}

@media (min-width: 1024px) {
  .hero__content {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: var(--space-lg);
  }

  .hero__actions .btn {
    flex: initial;
    padding: var(--button-py) var(--button-px);
    font-size: var(--fs-button);
  }

  .hero__cta-full {
    display: inline;
  }

  .hero__cta-short {
    display: none;
  }

  .hero__title {
    white-space: nowrap;
  }
}

/* ===== Story ===== */
.story {
  background: var(--color-cream);
  color: var(--color-theme);
  padding: var(--space-xl) var(--space-section-x);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.story__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: var(--fs-section-title);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.story__body {
  display: flex;
  flex-direction: column;
  gap: 1em;
  font-size: var(--fs-body);
  line-height: 1.45;
}

.story__details {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.story__detail {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}

.story__label {
  font-size: var(--fs-label);
  font-weight: 400;
  text-transform: uppercase;
  opacity: 0.6;
}

.story__value {
  font-size: var(--fs-value);
  text-transform: uppercase;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* Only the address link actually needs flex (to align its trailing icon
   next to the text) — the plain-text uses of .story__value (Opening
   Hours, phone/email) don't, and flex was actively wrong for them: a
   <br> inside a flex container doesn't reliably force a line break (it's
   a well-known cross-browser inconsistency, not just a browser default
   the UA stylesheet fights — even an explicit flex-basis:100% override
   on the <br> itself didn't force it in testing here), so the phone
   number and email in "Get in touch" were sitting on one wide line
   instead of stacking like the markup's own <br> intends. Scoping flex
   to the <a> tag specifically — the only element that has an icon — and
   leaving the plain <p> tags as normal block flow, where <br> always
   works natively, fixes it without fighting flex layout at all. */
a.story__value {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em;
}

.story__value--email {
  text-transform: lowercase;
}

.story__link-icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .story {
    flex-direction: row;
    align-items: flex-start;
    /* The base (mobile) gap is meant for the stacked column layout — in
       the row layout it was also adding space between the two columns on
       top of .story__intro's own padding-right and .story__details' own
       padding-left, so the divider ended up sitting further from the
       details text (both paddings plus this gap) than its matching
       padding-right sits from the viewport edge (no gap involved there).
       Zeroed here so the two paddings alone (equal values) are what put
       equal space on each side of the divider. */
    gap: 0;
  }

  .story__intro {
    flex: 1 1 60%;
    min-width: 0;
    /* Was 58rem — a bit more room for the intro column. */
    max-width: 64rem;
    padding-right: var(--space-xl);
    /* The divider is this column's own border, so it's only as tall as
       this column's box — extra bottom padding here lets it run past the
       last line of text instead of stopping flush against it. */
    padding-bottom: var(--space-lg);
    border-right: 1px solid var(--color-theme);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }

  .story__details {
    /* Sized to its own content (shrink-to-fit) rather than stretched to
       fill the row — a box that fills all the remaining row width gives
       mathematically equal gaps on paper, but with short left-aligned
       text inside it, the *visible text* still hugs the divider and
       leaves a highly visible dead gap before the box's own (invisible)
       right edge. Centering this snug box with auto margins on both
       sides — splitting the row's leftover space evenly — keeps the
       actual text equidistant from the divider and the section's edge
       instead. Needs .story__value br (above) to actually force
       phone/email onto separate lines first, or this box still has to
       stay wide enough to fit them combined on one line. */
    flex: 0 0 auto;
    min-width: 0;
    max-width: 24rem;
    margin-left: auto;
    margin-right: auto;
    /* auto margins split the row's own leftover space evenly, but .story
       has its own right padding (var(--space-section-x)) that the
       divider side has no equivalent of — the divider sits inside the
       row, not at its padded edge — so the gap to the viewport edge
       still ends up bigger than the gap to the divider by exactly that
       padding amount, however the leftover itself divides. Nudging the
       box right by half that padding equalizes the two: it adds half to
       the (smaller) divider-side gap and removes half from the (bigger)
       edge-side gap, and this correction is the same regardless of the
       actual leftover amount, so it holds at any viewport width and any
       content width. */
    position: relative;
    left: calc(var(--space-section-x) / 2);
    /* .story uses align-items: flex-start, so without this the "Address"
       label lines up with .story__title instead of the paragraph below
       it — this roughly matches the title's own rendered height plus its
       gap to the body text, nudging this column's content down to align
       with the first line of the paragraph instead. */
    padding-top: calc(var(--space-xl) + 0.6rem);
  }
}

/* ===== Cross-promo to the other location ===== */
.location-promo {
  /* This section's own background is the current page's theme color (olive
     on Lennan's Yard, maroon on Haddington Road) — not cream — so it reads
     as a continuation of the page rather than a flat neutral strip; the
     card inside then uses the OTHER location's color to contrast. */
  background: var(--color-theme);
  /* Top matched to the bottom (--space-xl) — was --space-sm, noticeably
     thinner than the bottom strip. */
  padding: var(--space-xl) var(--space-section-x);
}

.location-promo__card {
  background: var(--color-theme-other);
}
