/* NN Home Banner - the turning picture window.
   Three supplied pictures travel sideways into place: the strip slides, the
   pictures do not fade over each other. Nothing is drawn on a picture: no
   words, no label, no button, no mark. A pair of arrows sits at the sides, and
   the dots sit on the picture near its foot - white, close together, each with
   a soft shadow, and no pink in any state.
   House tokens only: the four colours and the type scale from the child theme.
   The word-shapes the unit used to draw (words over a picture, a picture beside
   words, plain ivory) keep their rules at the foot, asleep, for a later row. */

/* --- 1. The unit and its page edge -------------------------------------
   The band keeps the shop's own edge: 24px on a computer, 16px on a phone.
   The section carries the edge itself, so the banner lines up with whatever
   the page puts under it. */

.nn-hb {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding-inline: 24px;
  background: var(--color-ivory, #f4f1ea);
  color: var(--color-charcoal, #20201f);
  font-family: var(--font-body, Manrope, sans-serif);
}

@media (max-width: 767px) {
  .nn-hb {
    padding-inline: 16px;
  }
}

/* --- 2. The picture frame ----------------------------------------------
   One 12:5 window, never taller than 620px and never with a floor under it.
   The strip of slides runs inside this window and is moved sideways as a
   whole, so the window's shape never changes as the pictures travel. The dots
   and the arrows live inside the window too, so they add no height. */

.nn-hb__track {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 12 / 5;
  max-height: 620px;
  overflow: hidden;
  background: var(--color-ivory, #f4f1ea);
}

/* A band of pictures keeps the 12:5 window at every width: a picture slide
   carries no words under the picture, so there is nothing to make room for. */

.nn-hb--pictures .nn-hb__track {
  aspect-ratio: 12 / 5;
  max-height: 620px;
  overflow: hidden;
}

/* --- 3. The strip ------------------------------------------------------
   The slides stand in one row, each exactly as wide as the window, and the
   whole row is shifted by one window per step. With the script blocked the
   row is never shifted, so the first picture is simply the one in view.
   The half-second is the same half-second the fade used. */

.nn-hb__rail {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  width: 100%;
  height: 100%;
  transform: translate3d(0, 0, 0);
  /* The travel time and the easing are the owner's, set in the panel; the
     numbers here are only what the banner shipped with. */
  transition: transform var(--nn-hb-travel, 0.5s) var(--nn-hb-easing, ease-in-out);
}

.nn-hb--still .nn-hb__rail {
  transition: none;
}

/* The copy of the first picture that closes the strip: it is a real picture so
   the travel onto it looks exactly like the travel onto any other, but it is
   never a slide a visitor may read or press. */
.nn-hb .nn-hb__slide--clone {
  pointer-events: none;
}

.nn-hb .nn-hb__slide--clone:focus-visible {
  outline: 0;
}

/* --- 4. One slide ------------------------------------------------------
   Every slide is one cell of the strip: it takes the window's whole width and
   never shrinks. A picture slide is a whole link around a whole picture. */

.nn-hb__slide {
  position: relative;
  flex: 0 0 100%;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--color-ivory, #f4f1ea);
}

/* The page's own link rule underlines every `a` inside page content, and a
   picture must never wear one. */
.nn-hb .nn-hb__slide--picture,
.nn-hb .nn-hb__slide--picture:hover,
.nn-hb .nn-hb__slide--picture:focus {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  outline-offset: -3px;
}

.nn-hb .nn-hb__slide--picture:focus-visible {
  outline: 2px solid var(--color-charcoal, #20201f);
  outline-offset: -3px;
}

/* --- 5. The picture ----------------------------------------------------
   The picture must fill its window exactly, so the box is always 12:5 and the
   crop is decided by the anchor alone. This needs three classes of weight: the
   parent theme's own reset gives every `img` a natural height, and the page
   builder's stylesheet outranks a single class, so a lighter rule would let the
   picture keep its own height and push its foot out of the window.
   Only the box is settled here; where each shape's picture is anchored is
   decided by the shape rules below, at the same weight. */
.nn-hb .nn-hb__slide--picture .nn-hb__img,
.nn-hb .nn-hb__media .nn-hb__img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

/* A picture slide: the picture is the whole window, the even trim at its
   centre - the same sliver off the top and off the bottom. */
.nn-hb .nn-hb__slide--picture .nn-hb__img {
  object-fit: cover;
  object-position: center center;
}

/* --- 6. The dots, over the picture -------------------------------------
   Centred, near the picture's bottom edge: 24px up on a computer, 16px up on
   a phone. White marks 8px across with 20px between centres (12px of
   daylight), inside 20 x 36px pressable cells that stay fully transparent in
   every state. The current slide's mark is solid white, the others are
   half-faded, and hover or keyboard focus only brightens the mark.

   The parent theme's reset paints every hovered or focused button pink
   (#cc3366), and these cells are buttons. Every state is therefore written out
   here with three classes of weight, which the theme's single-class rule
   cannot outrank. */

.nn-hb .nn-hb__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 24px;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  background: none;
  pointer-events: none;
}

.nn-hb--live .nn-hb__dots {
  display: flex;
}

@media (max-width: 767px) {
  .nn-hb .nn-hb__dots {
    bottom: 16px;
  }
}

.nn-hb .nn-hb__dots .nn-hb__dot,
.nn-hb .nn-hb__dots .nn-hb__dot:hover,
.nn-hb .nn-hb__dots .nn-hb__dot:focus,
.nn-hb .nn-hb__dots .nn-hb__dot:focus-visible,
.nn-hb .nn-hb__dots .nn-hb__dot:active,
.nn-hb .nn-hb__dots .nn-hb__dot.is-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 20px;
  height: 36px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  background-color: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: auto;
}

.nn-hb .nn-hb__dots .nn-hb__dot-mark {
  display: block;
  box-sizing: border-box;
  width: 8px;
  height: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  /* The soft shadow is always on: a white mark on a pale picture would
     otherwise smear into the picture. */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  background-color: rgba(255, 255, 255, 0.5);
  transition: background-color 0.2s ease;
}

.nn-hb .nn-hb__dots .nn-hb__dot:hover .nn-hb__dot-mark,
.nn-hb .nn-hb__dots .nn-hb__dot:focus-visible .nn-hb__dot-mark {
  background-color: rgba(255, 255, 255, 0.9);
}

.nn-hb .nn-hb__dots .nn-hb__dot.is-current .nn-hb__dot-mark {
  background-color: #ffffff;
}

.nn-hb .nn-hb__dots .nn-hb__dot:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* --- 7. The arrows -----------------------------------------------------
   One at each side, standing on the picture's middle line. A quiet dark square
   with a white mark, so it reads on a pale picture and on a dark one alike.
   Every state is written out, for the same reason as the dots: the parent
   theme paints buttons pink on hover. */

.nn-hb .nn-hb__arrow {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 4;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background-color: rgba(24, 22, 20, 0.28);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transform: translateY(-50%);
  transition: background-color 0.2s ease;
}

.nn-hb--live .nn-hb__arrow {
  display: inline-flex;
}

.nn-hb .nn-hb__arrow--prev {
  left: 16px;
}

.nn-hb .nn-hb__arrow--next {
  right: 16px;
}

.nn-hb .nn-hb__arrow:hover,
.nn-hb .nn-hb__arrow:focus,
.nn-hb .nn-hb__arrow:active {
  background-color: rgba(24, 22, 20, 0.52);
  border: 0;
  color: #ffffff;
  text-decoration: none;
}

.nn-hb .nn-hb__arrow:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* The white mark inside the arrow: two sides of a square, turned. */
.nn-hb .nn-hb__arrow-mark {
  display: block;
  width: 10px;
  height: 10px;
  border-top: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
}

.nn-hb .nn-hb__arrow--prev .nn-hb__arrow-mark {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.nn-hb .nn-hb__arrow--next .nn-hb__arrow-mark {
  transform: rotate(45deg) translate(-1px, 1px);
}

@media (max-width: 767px) {
  .nn-hb .nn-hb__arrow {
    width: 36px;
    height: 36px;
  }

  .nn-hb .nn-hb__arrow--prev {
    left: 8px;
  }

  .nn-hb .nn-hb__arrow--next {
    right: 8px;
  }

  .nn-hb .nn-hb__arrow-mark {
    width: 8px;
    height: 8px;
  }
}

/* --- 8. A visitor who asked for less motion ---------------------------
   Nothing travels and nothing turns. The arrows and the dots still work: they
   jump straight to the next picture with no movement at all. */

@media (prefers-reduced-motion: reduce) {
  .nn-hb__rail,
  .nn-hb--still .nn-hb__rail,
  .nn-hb .nn-hb__dots .nn-hb__dot-mark,
  .nn-hb .nn-hb__arrow,
  .nn-hb__door {
    transition: none;
  }
}

/* ======================================================================
   THE OLD WORD-SHAPES - asleep
   No shipped slide row asks for these, so none of this draws today. It is
   kept whole so a later effort can bring one back by writing one row, and
   the numbers stay as they were when they were proved.
   ====================================================================== */

/* 'cover' fills the window and is anchored to the foot: every wide painting in
   this house is signed along the bottom edge. 'figure' stands inside the
   window at its own proportions on the ivory ground. 'ground' has no picture. */

.nn-hb__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--color-ivory, #f4f1ea);
}

.nn-hb__slide--cover .nn-hb__media img,
.nn-hb__slide--figure .nn-hb__media img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
}

.nn-hb__slide--cover .nn-hb__media img {
  object-fit: cover;
  object-position: center bottom;
}

.nn-hb__slide--figure .nn-hb__media img {
  object-fit: contain;
  object-position: center center;
}

.nn-hb__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(24, 22, 20, 0.06) 0%,
    rgba(24, 22, 20, 0.18) 20%,
    rgba(24, 22, 20, 0.44) 40%,
    rgba(24, 22, 20, 0.66) 58%,
    rgba(24, 22, 20, 0.78) 74%,
    rgba(24, 22, 20, 0.8) 88%,
    rgba(24, 22, 20, 0.6) 100%
  );
}

.nn-hb__words {
  position: absolute;
  z-index: 2;
  inset: auto 0 0 0;
  box-sizing: border-box;
  padding: 0 32px 48px;
}

.nn-hb__inner {
  max-width: 62ch;
}

.nn-hb__label {
  margin: 0 0 16px;
  font-family: var(--font-body, Manrope, sans-serif);
  font-size: var(--type-overline-size, 10px);
  font-weight: var(--type-overline-weight, 500);
  line-height: var(--type-overline-leading, 1.2);
  letter-spacing: var(--type-overline-tracking, 0.14em);
  text-transform: uppercase;
  color: var(--color-ivory, #f4f1ea);
}

.nn-hb__headline {
  margin: 0 0 12px;
  font-family: var(--font-body, Manrope, sans-serif);
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-ivory, #f4f1ea);
}

.nn-hb__line {
  margin: 0 0 24px;
  max-width: 46ch;
  font-family: var(--font-body, Manrope, sans-serif);
  font-size: var(--type-body-lg-size, 16px);
  font-weight: var(--type-body-lg-weight, 400);
  line-height: var(--type-body-lg-leading, 1.6);
  letter-spacing: var(--type-body-lg-tracking, 0);
  color: var(--color-ivory, #f4f1ea);
}

.nn-hb__action {
  margin: 0;
}

.nn-hb .nn-hb__door {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid var(--color-charcoal, #20201f);
  border-radius: 2px;
  background-color: var(--color-charcoal, #20201f);
  color: var(--color-ivory, #f4f1ea);
  font-family: var(--font-body, Manrope, sans-serif);
  font-size: var(--type-label-md-size, 12px);
  font-weight: var(--type-label-md-weight, 600);
  line-height: var(--type-label-md-leading, 1.2);
  letter-spacing: var(--type-label-md-tracking, 0.08em);
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nn-hb .nn-hb__door:hover,
.nn-hb .nn-hb__door:focus {
  background-color: var(--color-ivory, #f4f1ea);
  color: var(--color-charcoal, #20201f);
  text-decoration: none;
}

.nn-hb .nn-hb__door:focus-visible {
  outline: 2px solid var(--color-ivory, #f4f1ea);
  outline-offset: 3px;
}

.nn-hb__slide--figure .nn-hb__label,
.nn-hb__slide--ground .nn-hb__label,
.nn-hb__slide--figure .nn-hb__headline,
.nn-hb__slide--ground .nn-hb__headline,
.nn-hb__slide--figure .nn-hb__line,
.nn-hb__slide--ground .nn-hb__line {
  color: var(--color-charcoal, #20201f);
}

.nn-hb__slide--figure .nn-hb__door:focus-visible,
.nn-hb__slide--ground .nn-hb__door:focus-visible {
  outline-color: var(--color-charcoal, #20201f);
}

.nn-hb__slide--figure .nn-hb__media {
  inset: 0 52% 0 0;
}

.nn-hb__slide--figure .nn-hb__words {
  inset: 0 0 0 auto;
  display: flex;
  align-items: center;
  width: 52%;
  padding: 0 32px;
}

.nn-hb__slide--ground .nn-hb__words {
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 32px;
}

/* A word-shape on a phone puts its picture in the strip and its words under
   it on the page edge, where nothing can cover the subject. A band of plain
   pictures is excluded, so it keeps its 12:5 window. */

@media (max-width: 767px) {
  .nn-hb:not(.nn-hb--pictures) .nn-hb__track {
    aspect-ratio: auto;
    max-height: none;
    overflow: visible;
  }

  .nn-hb:not(.nn-hb--pictures) .nn-hb__rail {
    position: relative;
    inset: auto;
    height: auto;
    align-items: stretch;
    overflow: hidden;
  }

  .nn-hb__media,
  .nn-hb__slide--figure .nn-hb__media {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 12 / 5;
    max-height: 620px;
  }

  .nn-hb__scrim {
    display: none;
  }

  .nn-hb__slide--figure .nn-hb__media img {
    object-fit: cover;
    object-position: center 45%;
  }

  .nn-hb__words,
  .nn-hb__slide--figure .nn-hb__words,
  .nn-hb__slide--ground .nn-hb__words {
    position: static;
    inset: auto;
    display: block;
    width: auto;
    padding: 20px 0 4px;
  }

  .nn-hb__label,
  .nn-hb__slide--figure .nn-hb__label,
  .nn-hb__slide--ground .nn-hb__label {
    margin-bottom: 10px;
    color: var(--color-charcoal, #20201f);
  }

  .nn-hb__headline,
  .nn-hb__slide--figure .nn-hb__headline,
  .nn-hb__slide--ground .nn-hb__headline {
    margin-bottom: 10px;
    font-size: 39px;
    line-height: 1.08;
    color: var(--color-charcoal, #20201f);
  }

  .nn-hb__line,
  .nn-hb__slide--figure .nn-hb__line,
  .nn-hb__slide--ground .nn-hb__line {
    margin-bottom: 18px;
    color: var(--color-charcoal, #20201f);
  }
}
