/* Shared alignment and lightweight motion; original label colours are retained. */
:root { --page-gutter: clamp(24px, 4vw, 80px); --anchor-gap: 24px; }
#main > section { --section-gutter: var(--page-gutter); }
.nav.wrap, .site-footer > .wrap { width: calc(100% - 2 * var(--page-gutter)); }
.story-grid { width: calc(100% - 2 * var(--page-gutter)); margin-inline: var(--page-gutter); }
html { scroll-padding-top: calc(var(--header-height) + var(--anchor-gap)); }
html.wheel-smoothing { scroll-behavior: auto; }
#main > .story-section { scroll-margin-top: 0; }

.site-header {
  margin-bottom: calc(-1 * var(--header-height));
  isolation: isolate;
  --banner-rgb: 235 226 211;
  --banner-strength: 1;
  color: var(--ink);
  transition: color 120ms ease-out;
}
.site-header.over-video { color: #fff7ed; --banner-strength: 0; }
/* The backdrop itself supplies the colour. Flat surfaces stay unchanged while
   passing text and photographs soften behind the sharp navigation. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: transparent;
  opacity: var(--banner-strength);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 120ms ease-out;
}
.site-header.over-video::before { backdrop-filter: none; -webkit-backdrop-filter: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header::before { background: rgb(var(--banner-rgb) / 94%); }
}
.nav { grid-template-columns: 1fr auto 1fr; }
.nav > .wordmark { grid-column: 1; grid-row: 1; justify-self: start; }
.nav > .nav-links { grid-column: 2; grid-row: 1; justify-content: center; }
.nav > .nav-actions { grid-column: 3; grid-row: 1; justify-self: end; }
.nav-links a:hover { border-color: currentColor; }
.site-header .brand-logo { filter: var(--logo-lighting, none); transition: filter 80ms linear; }
.over-video .nav-links, .over-video .bag-button { text-shadow: none; }
.over-video .bag-count { color: var(--ink); text-shadow: none; }
.mobile-nav { color: var(--ink); }
.menu-toggle span { background: currentColor; }

#main > .hero-video-section {
  min-height: 100svh;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--header-height) + 70px) var(--page-gutter) 130px;
  background: #706449;
}
.hero-film { position: absolute; inset: 0; z-index: -2; overflow: hidden; transform: translate3d(0, var(--hero-offset, 0px), 0); }
.hero-film > img, .hero-film > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 59% center;
}
.hero-film > video { opacity: 0; visibility: hidden; }
.hero-film.has-video > video { visibility: visible; }
.hero-video-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(29 25 17 / 64%), rgb(29 25 17 / 32%) 42%, transparent 78%),
    linear-gradient(to bottom, rgb(25 23 18 / 20%), transparent 24%);
  pointer-events: none;
}
.hero-video-section::after { content: none; }
.hero-video-section .hero-copy { width: min(760px, 52%); margin: 0; text-align: left; position: relative; z-index: 2; }
.hero-video-section h1 { color: #fff9f0; font-size: clamp(80px, 7.8vw, 150px); text-shadow: none; }
.hero-video-section h1 em { color: #ffe8ca; }
.hero-video-section .hero-description { color: #fff6e9; font-size: clamp(15px, 1.15vw, 18px); max-width: 365px; text-shadow: none; }
.hero-video-section .button { background: var(--cream); color: var(--ink); border: 1px solid var(--cream); }
.hero-video-section .button:hover { background: #fff6e9; }
/* Bring the whole story copy closer to the pets, staying on the empty wall. */
#main > .story-section {
  min-height: max(880px, 112svh);
  aspect-ratio: 1672 / 1040;
  --story-copy-offset: calc(clamp(105px, 7vw, 144px) + clamp(48px, 5vw, 96px));
  padding-top: var(--story-copy-offset);
  scroll-margin-top: calc(0px - var(--story-copy-offset));
}
.story-copy { grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.65fr); gap: 0 clamp(30px, 4.6vw, 90px); max-width: 1460px; }
.story-introduction { max-width: 345px; }
.story-introduction > p { font-size: 16px; line-height: 1.8; }
#main > .shop-section { --section-gutter: clamp(24px, 4vw, 80px); }
.shop-section .product-grid { gap: clamp(24px, 2.5vw, 48px); }
.shop-section .product-media { height: auto; aspect-ratio: 4 / 5; }

@media (max-width: 1150px) and (min-width: 761px) {
  .hero-video-section h1 { font-size: clamp(70px, 8.2vw, 98px); }
  .story-copy { grid-template-columns: minmax(0, 1.15fr) minmax(250px, 0.85fr); column-gap: 32px; }
  .story-introduction > p { font-size: 15px; }
}
@media (max-width: 760px) {
  .nav { grid-template-columns: 1fr auto auto; gap: 17px; }
  .nav > .wordmark { justify-content: flex-start; }
  .nav > .menu-toggle { grid-column: 2; grid-row: 1; }
  .nav > .nav-links { display: none; }
  .nav > .nav-actions { grid-column: 3; }
  :root { --page-gutter: 20px; }
  #main > .hero-video-section { padding: 220px var(--page-gutter) 90px; min-height: max(740px, 100svh); align-items: end; }
  .hero-video-section .hero-copy { width: 100%; max-width: 470px; }
  .hero-video-section h1 { font-size: clamp(66px, 16.7vw, 106px); margin-bottom: 24px; }
  .hero-video-section .hero-description { font-size: 14px; max-width: 310px; margin-left: 0; }
  .hero-video-section .button { margin-top: 24px; }
  .hero-film > img, .hero-film > video { object-position: 55% center; }
  .hero-video-section::before { background: linear-gradient(to top, rgb(29 25 17 / 86%) 5%, rgb(29 25 17 / 54%) 47%, rgb(29 25 17 / 8%) 75%), linear-gradient(to bottom, #211b154d, transparent 22%); }
  #main > .story-section { min-height: max(920px, 110svh); aspect-ratio: auto; --story-copy-offset: 132px; }
  .story-copy { display: block; }
  .story-introduction > p { font-size: 14px; }
  #main > .shop-section { --section-gutter: 20px; }
  .shop-section .product-grid { gap: 34px; }
}
@media (max-width: 370px) {
  :root { --page-gutter: 16px; }
  .hero-video-section h1 { font-size: 63px; }
  #main > .shop-section { --section-gutter: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header::before, .site-header .brand-logo { transition: none; }
}

/* Keep the final questions below the sticky navigation, including at page end. */
#main > .faq-section { padding-top: 96px; padding-bottom: 32px; scroll-margin-top: 0; }
.faq-section h2 { margin-top: 0; }
.faq-list { padding-top: 20px; }
.faq-list summary { padding-block: 16px; scroll-margin-top: calc(var(--header-height) + 24px); }
.faq-list details { scroll-margin-top: calc(var(--header-height) + 24px); }
.site-footer { padding: 24px 0 14px; }
.footer-top { padding-bottom: 16px; }
.footer-wordmark .brand-logo { width: 88px; height: 85px; }
.footer-top p { margin-top: 8px; }
.footer-bottom { padding-top: 12px; }
@media (max-width: 760px) {
  #main > .faq-section { padding-top: 64px; padding-bottom: 28px; }
  .faq-list { padding-top: 8px; }
  .site-footer { padding-top: 24px; }
  .footer-top { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-links { margin-top: 0; display: grid; gap: 18px; padding-right: 0; }
  .footer-top p { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-film { transform: none; }
}

/* Let the FAQ own the final viewport; footer colour is established before its links. */
#main > .faq-section { min-height: max(660px, calc(100svh - 80px)); }
.site-footer { position: relative; background: var(--sage); }
.site-footer::before { content: ""; position: absolute; inset: -24px 0 auto; height: 24px; background: linear-gradient(to bottom, transparent, var(--sage)); pointer-events: none; }
.contact-dialog { width: min(480px, calc(100% - 32px)); padding: 48px 32px 32px; }
.contact-dialog h2 { font-size: clamp(36px, 5vw, 48px); margin-bottom: 20px; }
.contact-dialog p { color: var(--muted); max-width: 36ch; }
.footer-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 52px); }
.footer-social-link, .footer-social-placeholder { display: flex; align-items: center; gap: 8px; min-height: 20px; }
.footer-social-link svg, .footer-social-placeholder svg { width: 16px; height: 16px; flex: 0 0 16px; }
.footer-social-note { color: var(--muted); font-size: 10px; margin-top: 3px; }
@media (max-width: 760px) {
  .footer-top { display: block; }
  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 28px; gap: 24px 16px; }
}
@media (min-width: 761px) and (max-height: 800px) { #main > .faq-section { align-content: end; } }

.motion-paused .site-header, .motion-paused .site-header::before { transition: none; }
