/* NOOK unified public presentation layer
   Interior Collections is the visual reference for every studio module. */

:root {
  --nook-ivory: #eee9df;
  --nook-ink: #171715;
  --nook-muted: #c8c0b4;
  --nook-line: rgba(238, 233, 223, 0.42);
  --nook-gold: #c69b4c;
}

body.r5-unified {
  background: var(--nook-ivory);
}

body.r5-unified .site-shell {
  position: relative;
}

/* One integrated, transparent header across all four modules. */
body.r5-unified .site-header {
  position: absolute !important;
  inset: 0 0 auto;
  z-index: 80;
  min-height: 124px;
  padding: 10px clamp(24px, 4.5vw, 78px);
  color: #fff;
  background: linear-gradient(180deg, rgba(7, 7, 6, 0.56), rgba(7, 7, 6, 0)) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

body.r5-unified .brand-logo {
  filter: brightness(0) invert(1);
}

body.r5-unified .brand-section {
  color: rgba(255, 255, 255, 0.84) !important;
}

body.r5-unified .primary-nav {
  gap: clamp(14px, 2.25vw, 38px) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

body.r5-unified .primary-nav a,
body.r5-unified .primary-nav button {
  position: relative;
  padding: 12px 0 10px !important;
  color: rgba(255, 255, 255, 0.76) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  font-size: 10px !important;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.15em !important;
  text-transform: uppercase;
  white-space: nowrap;
}

body.r5-unified .primary-nav a::after,
body.r5-unified .primary-nav button::after {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  height: 1px;
  content: "";
  background: currentColor;
  opacity: 0;
  transform: scaleX(0.35);
  transition: opacity 180ms ease, transform 180ms ease;
}

body.r5-unified .primary-nav a:hover,
body.r5-unified .primary-nav a:focus-visible,
body.r5-unified .primary-nav button:hover,
body.r5-unified .primary-nav button:focus-visible,
body.r5-unified .primary-nav .active,
body.r5-unified .primary-nav [aria-current="page"] {
  color: #fff !important;
}

body.r5-unified .primary-nav a:hover::after,
body.r5-unified .primary-nav a:focus-visible::after,
body.r5-unified .primary-nav button:hover::after,
body.r5-unified .primary-nav button:focus-visible::after,
body.r5-unified .primary-nav .active::after,
body.r5-unified .primary-nav [aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
}

body.r5-unified .showroom-enquiry,
body.r5-unified .palette-trigger {
  min-height: 42px;
  padding: 0 18px !important;
  color: #fff !important;
  background: rgba(10, 10, 9, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  border-radius: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

body.r5-unified .palette-trigger {
  gap: 10px;
}

body.r5-unified .palette-count {
  width: 24px;
  height: 24px;
  margin: 0;
  color: var(--nook-ink);
  background: #fff;
}

body.r5-unified .mobile-palette-trigger {
  display: none;
}

/* Make the made-to-measure promise unmistakable without changing its editorial tone. */
body.r5-cabinetry .made-to-measure-band .eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 26px;
  padding: 10px 14px;
  color: #7c5c20 !important;
  border: 1px solid rgba(168, 129, 59, 0.72);
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.2em;
}

body.r5-unified .library-section,
body.r5-unified .showroom-films,
body.r5-unified .completed-projects,
body.r5-unified .made-to-measure-band {
  scroll-margin-top: max(28px, env(safe-area-inset-top));
}

/* Shared opening composition: image, editorial copy and deliberate negative space. */
body.r5-unified .collections-hero,
body.r5-unified .studio-intro,
body.r5-unified .showroom-hero,
body.r5-unified .projects-hero {
  min-height: 100svh !important;
}

body.r5-unified .collections-hero-copy h1,
body.r5-unified .studio-intro h1,
body.r5-unified .showroom-hero-copy h1,
body.r5-unified .projects-hero h1 {
  max-width: 820px;
  color: #fff !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(62px, 7.7vw, 132px) !important;
  font-weight: 400;
  line-height: 0.9 !important;
  letter-spacing: -0.055em !important;
}

body.r5-unified .collections-hero .eyebrow,
body.r5-unified .studio-intro .eyebrow,
body.r5-unified .showroom-hero .eyebrow,
body.r5-unified .projects-hero .eyebrow {
  color: var(--nook-gold) !important;
}

body.r5-unified .collections-hero-copy > p:last-child,
body.r5-unified .studio-intro .intro-copy,
body.r5-unified .showroom-hero-copy > p:last-child,
body.r5-unified .projects-hero > p {
  max-width: 560px;
  color: rgba(238, 233, 223, 0.86) !important;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(17px, 1.4vw, 22px) !important;
  line-height: 1.6 !important;
}

/* Cabinetry already owns the reference composition; refine it to the full viewport. */
body.r5-cabinetry .collections-hero-copy {
  width: min(790px, 74vw);
  padding-bottom: clamp(70px, 8vw, 124px);
}

body.r5-cabinetry .collections-hero-shade {
  background: linear-gradient(90deg, rgba(8, 8, 7, 0.92) 0%, rgba(8, 8, 7, 0.62) 42%, rgba(8, 8, 7, 0.08) 76%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.66));
}

/* Material Library: transform the detached cream introduction into a photographic hero. */
body.r5-materials .studio-intro {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  align-items: end;
  gap: clamp(40px, 8vw, 130px);
  padding: clamp(220px, 31vh, 370px) clamp(24px, 7vw, 120px) clamp(70px, 9vw, 132px);
  overflow: hidden;
  background: #111;
}

body.r5-materials .studio-intro::before,
body.r5-materials .studio-intro::after,
body.r5-projects .projects-hero::before,
body.r5-projects .projects-hero::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
}

body.r5-materials .studio-intro::before {
  background: url("/showroom/material-studio-hero.webp") center 46% / cover no-repeat;
  transform: scale(1.002);
}

body.r5-materials .studio-intro::after {
  z-index: -1;
  background: linear-gradient(90deg, rgba(8, 8, 7, 0.9) 0%, rgba(8, 8, 7, 0.52) 48%, rgba(8, 8, 7, 0.18) 78%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
}

body.r5-materials .studio-intro > div,
body.r5-materials .studio-intro .intro-copy {
  position: relative;
  z-index: 1;
}

/* Showroom: use its own hero photograph as the canvas instead of a split panel. */
body.r5-showroom .showroom-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  padding: clamp(220px, 31vh, 370px) clamp(24px, 7vw, 120px) clamp(70px, 9vw, 132px);
  overflow: hidden;
  color: #fff;
  background: #111;
}

body.r5-showroom .showroom-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(8, 8, 7, 0.88) 0%, rgba(8, 8, 7, 0.55) 42%, rgba(8, 8, 7, 0.04) 75%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.62));
}

body.r5-showroom .showroom-hero-copy {
  position: relative;
  z-index: 2;
  width: min(680px, 65vw);
  padding: 0;
}

body.r5-showroom .showroom-hero figure {
  position: absolute;
  inset: 0;
  z-index: -2;
}

body.r5-showroom .showroom-hero figure > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

body.r5-showroom .showroom-hero figcaption {
  position: absolute;
  right: clamp(24px, 4.5vw, 78px);
  bottom: 38px;
  left: clamp(24px, 4.5vw, 78px);
  z-index: 2;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
}

/* Projects: give the editorial introduction the same image-led authority. */
body.r5-projects .projects-hero {
  position: relative;
  isolation: isolate;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: end;
  gap: clamp(48px, 8vw, 138px);
  padding: clamp(220px, 31vh, 370px) clamp(24px, 7vw, 120px) clamp(70px, 9vw, 132px);
  overflow: hidden;
  color: #fff;
  background: #111;
}

body.r5-projects .projects-hero::before {
  background: url("/projects/project-01/project-01-living-kitchen.webp") center 58% / cover no-repeat;
  transform: scale(1.002);
}

body.r5-projects .projects-hero::after {
  z-index: -1;
  background: linear-gradient(90deg, rgba(8, 8, 7, 0.92) 0%, rgba(8, 8, 7, 0.58) 45%, rgba(8, 8, 7, 0.18) 78%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.7));
}

body.r5-projects .projects-hero > div,
body.r5-projects .projects-hero > p {
  position: relative;
  z-index: 1;
}

/* Preserve the functionality and high-contrast rhythm below each hero. */
body.r5-unified .library-section,
body.r5-unified .completed-projects {
  background: var(--nook-ink);
}

body.r5-unified :focus-visible {
  outline: 2px solid var(--nook-gold);
  outline-offset: 4px;
}

@media (max-width: 1080px) {
  body.r5-unified .site-header {
    min-height: 104px;
  }

  body.r5-unified .primary-nav {
    gap: 16px !important;
  }

  body.r5-unified .primary-nav a,
  body.r5-unified .primary-nav button {
    font-size: 9px !important;
  }

  body.r5-materials .studio-intro,
  body.r5-projects .projects-hero {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
  }
}

@media (max-width: 820px) {
  body.r5-unified .site-header {
    min-height: 88px;
    padding: 10px 20px;
  }

  body.r5-unified .brand-logo-full {
    width: 52px;
    height: 68px;
  }

  body.r5-unified .brand-section {
    padding-left: 12px;
    font-size: 9px;
  }

  body.r5-unified .mobile-menu-toggle {
    color: #fff !important;
    background: rgba(12, 12, 11, 0.22) !important;
    border-color: rgba(255, 255, 255, 0.72) !important;
  }

  body.r5-unified .mobile-menu-toggle span,
  body.r5-unified .mobile-menu-toggle::before,
  body.r5-unified .mobile-menu-toggle::after {
    background: #fff !important;
  }

  body.r5-unified .primary-nav {
    position: absolute !important;
    top: 76px !important;
    right: 18px !important;
    left: 18px !important;
    z-index: 90;
    flex-direction: column;
    align-items: stretch;
    gap: 0 !important;
    padding: 10px 18px 16px !important;
    background: rgba(18, 17, 15, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transform: none !important;
  }

  body.r5-unified .primary-nav a,
  body.r5-unified .primary-nav button {
    width: 100%;
    padding: 14px 0 !important;
    text-align: left;
  }

  body.r5-unified .primary-nav a::after,
  body.r5-unified .primary-nav button::after {
    right: auto;
    width: 52px;
  }

  body.r5-unified .showroom-enquiry,
  body.r5-unified .palette-trigger {
    display: none !important;
  }

  body.r5-materials .primary-nav.mobile-open .mobile-palette-trigger {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 18px !important;
    color: var(--nook-gold) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
  }

  body.r5-materials .mobile-palette-trigger .mobile-palette-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    color: var(--nook-ink);
    background: var(--nook-ivory);
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: 0;
  }

  body.r5-unified .collections-hero,
  body.r5-unified .studio-intro,
  body.r5-unified .showroom-hero,
  body.r5-unified .projects-hero {
    min-height: 100svh !important;
  }

  body.r5-unified .collections-hero-copy h1,
  body.r5-unified .studio-intro h1,
  body.r5-unified .showroom-hero-copy h1,
  body.r5-unified .projects-hero h1 {
    font-size: clamp(50px, 15vw, 78px) !important;
  }

  body.r5-materials .studio-intro,
  body.r5-projects .projects-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 28px;
    padding: 180px 24px 62px;
  }

  body.r5-showroom .showroom-hero {
    padding: 180px 24px 62px;
  }

  body.r5-showroom .showroom-hero-copy,
  body.r5-cabinetry .collections-hero-copy {
    width: 100%;
  }

  body.r5-showroom .showroom-hero figcaption {
    right: 24px;
    bottom: 20px;
    left: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.r5-unified *,
  body.r5-unified *::before,
  body.r5-unified *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
