/* ============================================================
   Concept B3 — approved header + hero (white header, black hero slider).
   Sections below the hero live in b3-home.css.
   ============================================================ */
.b3 {
  --b3-white: #ffffff;
  --b3-black: #0a0908;
  --b3-line: rgb(29 25 20 / 0.1);
  --b3-media-h: clamp(15rem, 70vw, 26rem); /* mobile image height */
}

.b3-container {
  width: 100%;
  max-width: calc(var(--b3-container) + var(--b3-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--b3-gutter);
}

/* ---------- Buttons: crisp, rectangular, uppercase ---------- */
.b3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.375rem;
  padding: 0.85rem 1.75rem;
  border: 1px solid transparent;
  font-family: var(--b3-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background-color 450ms var(--b3-ease),
    color 450ms var(--b3-ease),
    border-color 450ms var(--b3-ease);
}

.b3-btn--gold {
  background: var(--b3-champagne);
  border-color: var(--b3-champagne);
  color: var(--b3-black);
}

.b3-btn--gold:hover {
  background: var(--b3-champagne-soft);
  border-color: var(--b3-champagne-soft);
}

.b3-btn--outline {
  border-color: rgb(244 239 231 / 0.55);
  color: var(--b3-on-night);
}

.b3-btn--outline:hover {
  background: var(--b3-on-night);
  border-color: var(--b3-on-night);
  color: var(--b3-black);
}

.b3-btn--line {
  border-color: var(--b3-champagne-deep);
  color: var(--b3-champagne-deep);
}

.b3-btn--line:hover {
  background: var(--b3-champagne-deep);
  color: var(--b3-white);
}

.b3-btn--dark {
  background: var(--b3-ink);
  border-color: var(--b3-ink);
  color: var(--b3-white);
}

/* ============================================================
   Header — white, minimal, nav centred
   ============================================================ */
.b3-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--b3-white);
  color: var(--b3-ink);
  border-bottom: 1px solid var(--b3-line);
  transition: box-shadow 400ms var(--b3-ease);
}

.b3-header.is-scrolled {
  box-shadow: 0 12px 30px -24px rgb(0 0 0 / 0.5);
}

.b3-header__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 5.5rem;
}

/* Temporary wordmark — Manrope only, hierarchy through weight and size */
.b3-wordmark {
  justify-self: start;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-height: 44px;
  font-family: var(--b3-sans);
  color: var(--b3-ink);
  text-decoration: none;
}

/* Logotipo original en la cabecera. El alto manda y el ancho sigue a la proporción
   natural 2.35:1, así la cabecera no crece ni la marca se deforma ni se recorta. */
.b3-wordmark--logo {
  display: block;
  min-height: 0;
  line-height: 0;
}

.b3-wordmark__img {
  display: block;
  height: 4rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.b3-wordmark .wordmark__primary {
  font-size: 1.5rem;
  font-weight: 750;
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  /* optical correction: tracking adds space after the last letter */
  margin-right: -0.24em;
}

.b3-wordmark .wordmark__secondary {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
  color: var(--b3-champagne-deep);
}

.b3-nav__list {
  display: flex;
  justify-content: center;
  gap: clamp(0.25rem, 1.1vw, 1.25rem);
}

.b3-nav__item {
  position: relative;
}

.b3-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0 0.7rem;
  border: 0;
  background: none;
  font-size: 0.9375rem;
  font-weight: 550;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--b3-ink);
  text-decoration: none;
}

.b3-nav__link::after {
  content: '';
  position: absolute;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.45rem;
  height: 1px;
  background: var(--b3-champagne-deep);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms var(--b3-ease);
}

.b3-nav__link:hover::after,
.b3-nav__link[aria-expanded='true']::after {
  transform: none;
}

.b3-nav__chevron {
  width: 16px;
  height: 16px;
  transition: transform 450ms var(--b3-ease);
}

.b3-nav__link[aria-expanded='true'] .b3-nav__chevron {
  transform: rotate(180deg);
}

.b3-subnav {
  position: absolute;
  top: calc(100% + 1.1rem);
  left: -0.5rem;
  z-index: 20;
  min-width: 16rem;
  padding: 0.6rem;
  margin: 0;
  list-style: none;
  background: var(--b3-white);
  border: 1px solid var(--b3-line);
  box-shadow: 0 24px 50px -30px rgb(0 0 0 / 0.45);
}

.b3-subnav__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  color: var(--b3-ink);
  text-decoration: none;
  transition: background-color 250ms, color 250ms;
}

.b3-subnav__link:hover {
  background: var(--b3-ivory);
  color: var(--b3-champagne-deep);
}

.b3-header__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

/* E-commerce controls: light line icons, no heavy blocks */
.b3-hicon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--b3-ink);
  text-decoration: none;
  cursor: pointer;
  transition: color 300ms var(--b3-ease);
}

.b3-hicon .b3-icon {
  width: 1.45rem;
  height: 1.45rem;
}

.b3-hicon:hover {
  color: var(--b3-champagne-deep);
}

.b3-hicon__count {
  position: absolute;
  top: 3px;
  right: 1px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--b3-ink);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
  color: var(--b3-white);
}

.b3-header__phone-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.b3-header__cta {
  min-height: 3rem;
  margin-left: 0.6rem;
  padding-inline: 1.35rem;
  white-space: nowrap;
}

.b3 .b3-lang--header {
  margin-right: 0.5rem;
}

.b3-menu-toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  padding: 0 0.9rem;
  border: 1px solid var(--b3-line);
  background: none;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--b3-ink);
}

.b3-menu-toggle__lines {
  position: relative;
  width: 18px;
  height: 8px;
  border-block: 1.5px solid currentColor;
  transition: border-color 200ms var(--b3-ease);
}

/* Open state: the two bars give way to a clear "X" */
.b3-menu-toggle__lines::before,
.b3-menu-toggle__lines::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
  opacity: 0;
  transition:
    transform 450ms var(--b3-ease),
    opacity 200ms var(--b3-ease);
}

.b3-menu-toggle[aria-expanded='true'] .b3-menu-toggle__lines {
  border-color: transparent;
}

.b3-menu-toggle[aria-expanded='true'] .b3-menu-toggle__lines::before {
  opacity: 1;
  transform: rotate(45deg);
}

.b3-menu-toggle[aria-expanded='true'] .b3-menu-toggle__lines::after {
  opacity: 1;
  transform: rotate(-45deg);
}

/* Mobile menu — light */
.b3-mobile-menu {
  position: fixed;
  top: var(--menu-top, 64px);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 2rem;
  padding: 1.25rem var(--b3-gutter) 2.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--b3-white);
  color: var(--b3-ink);
  border-top: 1px solid var(--b3-line);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms var(--b3-ease);
}

.b3-mobile-menu[data-open='true'] {
  opacity: 1;
  pointer-events: auto;
}

.b3-mobile-menu__list > li {
  border-bottom: 1px solid var(--b3-line);
}

.b3-mobile-menu__link {
  display: flex;
  align-items: center;
  min-height: 3.4rem;
  font-family: var(--b3-sans);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--b3-ink);
  text-decoration: none;
}

.b3-mobile-menu__sublist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  padding-bottom: 0.75rem;
}

.b3-mobile-menu__sublist a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--b3-ink-muted);
  text-decoration: none;
}

.b3-mobile-menu__actions {
  display: grid;
  gap: 0.75rem;
}

.b3-mobile-menu__contact {
  display: grid;
  gap: 0.25rem;
}

.b3-mobile-menu__contact a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--b3-ink);
  overflow-wrap: anywhere;
}

/* ============================================================
   Hero — deep black, copy left, product image right
   ============================================================ */
.b3-hero {
  --b3-focus: var(--b3-focus-dark);

  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(38rem, calc(100svh - 8.5rem), 54rem);
  overflow: hidden;
  background: var(--b3-black);
  color: var(--b3-on-night);
}

/* Client view has no prototype bar: the hero fills the screen below the header */
.b3--present .b3-hero {
  min-height: clamp(38rem, calc(100svh - 5.5rem), 54rem);
}

.b3-hero__inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(3.5rem, 7vh, 6rem) clamp(8.5rem, 16vh, 11rem);
  pointer-events: none;
}

.b3-hero__copy {
  max-width: 38rem;
  pointer-events: auto;
}

.b3-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  font-size: var(--b3-fs-label);
  font-weight: 650;
  letter-spacing: 0.3em;
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--b3-champagne);
}

/* letter-spacing trails every character, so the dot gets its own spacing */
.b3-hero__dot {
  margin-inline: 0.25em 0.55em;
  letter-spacing: 0;
  opacity: 0.7;
}

/* H1 only: Montserrat SemiBold, uppercase, ~51px on desktop. The rest of the UI stays Manrope. */
.b3-hero__title {
  margin-top: 1.6rem;
  font-family: 'Montserrat', var(--b3-sans);
  font-size: clamp(1.75rem, 0.6rem + 2.9vw, 3.2rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--b3-on-night);
}

.b3-hero__title em {
  display: block;
  font-style: normal;
  color: var(--b3-champagne);
}

.b3-hero__text {
  max-width: 31rem;
  margin-top: 1.6rem;
  font-size: var(--b3-fs-lead);
  line-height: 1.65;
  color: var(--b3-on-night-muted);
}

.b3-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.4rem;
}

.b3-hero__call {
  margin-top: 1.4rem;
  font-size: var(--b3-fs-small);
  color: var(--b3-on-night-muted);
}

.b3-hero__call a {
  display: inline-block;
  padding-block: 0.6rem;
  font-weight: 650;
  color: var(--b3-on-night);
  text-decoration-color: var(--b3-champagne);
  text-underline-offset: 5px;
}

/* Carousel region wraps the whole hero (image, copy and controls) */
.b3-carousel {
  width: 100%;
}

/* Slide copy: panels stack in one cell, so the hero never changes height */
.b3-hero__panels {
  display: grid;
}

.b3-hero__panel {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 500ms var(--b3-ease),
    visibility 0s linear 500ms;
}

.b3-hero__panel.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 800ms var(--b3-ease) 150ms;
}

.b3-hero__w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.b3-hero__i {
  display: inline-block;
}

.b3-fx .b3-hero__panel .b3-hero__i {
  transform: translateY(105%);
  transition: transform 1s var(--b3-ease) calc(var(--i) * 55ms + 100ms);
}

.b3-fx .b3-hero__panel.is-shown .b3-hero__i {
  transform: none;
}

.b3-fx .b3-hero__panel :is(.b3-hero__text, .b3-hero__actions) {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 800ms var(--b3-ease) 350ms,
    transform 900ms var(--b3-ease) 350ms;
}

.b3-fx .b3-hero__panel.is-shown :is(.b3-hero__text, .b3-hero__actions) {
  opacity: 1;
  transform: none;
}

.b3-hero__media {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 62%;
  pointer-events: auto;
}

.b3-hero__slides {
  position: absolute;
  inset: 0;
}

/* The image dissolves into the black on the left and at the bottom */
.b3-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--b3-black) 0%, rgb(10 9 8 / 0.86) 14%, rgb(10 9 8 / 0.3) 38%, rgb(10 9 8 / 0) 58%),
    linear-gradient(0deg, var(--b3-black) 0%, rgb(10 9 8 / 0.6) 16%, rgb(10 9 8 / 0) 38%),
    linear-gradient(180deg, rgb(10 9 8 / 0.45) 0%, rgb(10 9 8 / 0) 16%);
}

.b3-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.8s var(--b3-ease-inout);
}

.b3-slide.is-active {
  opacity: 1;
}

.b3-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* resting position for the next entrance, applied after the fade-out */
  transform: scale(1.07) translate3d(1.5%, 0, 0);
  transition: transform 0s linear 1.9s;
}

.b3-slide.is-active img {
  transform: none;
  transition: transform 9s cubic-bezier(0.2, 0.6, 0.3, 1);
}

.b3-hero__now {
  display: none;
}

/* Controls */
.b3-hero__controls {
  position: absolute;
  right: 0;
  bottom: clamp(1.5rem, 4vh, 2.75rem);
  left: 0;
}

.b3-hero__controls-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  pointer-events: auto;
}

.b3-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 12.5rem));
  gap: 1.5rem;
}

.b3-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.65rem;
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 0 0.35rem;
  border: 0;
  background: none;
  text-align: left;
  color: #d8d0c4; /* 12.6:1 on the hero black — readable, still secondary */
  cursor: pointer;
  transition: color 500ms var(--b3-ease);
}

.b3-tab:hover,
.b3-tab.is-active {
  color: var(--b3-on-night);
}

.b3-tab__bar {
  position: relative;
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: 0.9rem;
  overflow: hidden;
  background: rgb(244 239 231 / 0.32);
}

.b3-tab__fill {
  position: absolute;
  inset: 0;
  background: var(--b3-champagne);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 100ms linear;
}

.b3-tab.is-active .b3-tab__fill {
  transform: scaleX(var(--progress, 0));
}

/* When the user has paused (or motion is reduced) the active bar reads as "selected" */
.b3-hero:not([data-playing]) .b3-tab.is-active .b3-tab__fill {
  transform: none;
}

.b3-tab__num {
  font-size: 0.9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--b3-champagne);
}

.b3-tab__label {
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.b3-hero__nav {
  display: flex;
  gap: 0.5rem;
}

.b3-ctrl {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(244 239 231 / 0.42);
  background: rgb(10 9 8 / 0.4);
  color: var(--b3-on-night);
  transition:
    border-color 400ms var(--b3-ease),
    color 400ms var(--b3-ease);
}

.b3-ctrl svg {
  width: 16px;
  height: 16px;
}

.b3-ctrl:hover {
  border-color: var(--b3-champagne);
  color: var(--b3-champagne);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1239px) {
  .b3-nav__list {
    gap: 0;
  }

  .b3-nav__link {
    padding-inline: 0.5rem;
  }

  .b3-nav__link::after {
    left: 0.5rem;
    right: 0.5rem;
  }

  .b3-header__cta {
    padding-inline: 1rem;
    letter-spacing: 0.04em;
  }

  /* Narrower image with a longer fade so the headline never sits on the product */
  .b3-hero__media {
    width: 56%;
  }

  .b3-hero__media::after {
    background:
      linear-gradient(90deg, var(--b3-black) 0%, rgb(10 9 8 / 0.9) 18%, rgb(10 9 8 / 0.35) 45%, rgb(10 9 8 / 0) 66%),
      linear-gradient(0deg, var(--b3-black) 0%, rgb(10 9 8 / 0.6) 16%, rgb(10 9 8 / 0) 38%),
      linear-gradient(180deg, rgb(10 9 8 / 0.45) 0%, rgb(10 9 8 / 0) 16%);
  }

  .b3-hero__copy {
    max-width: 34rem;
  }
}

/* Header: the phone icon joins the bar on wide screens only — the number stays
   visible in the hero, the footer and the mobile action bar. */
@media (max-width: 1439px) {
  .b3-header__phone {
    display: none;
  }
}

/* Full navigation from 1280px; below, the menu button (e-commerce icons stay) */
@media (max-width: 1279px) {
  .b3-nav {
    display: none;
  }

  .b3-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .b3-menu-toggle {
    display: inline-flex;
    margin-left: 0.5rem;
  }

  .b3-mobile-menu {
    display: flex;
  }
}

@media (max-width: 899px) {
  .b3-header__cta {
    display: none;
  }
}

@media (max-width: 1023px) {
  /* Tablet: copy and photo side by side without the headline crossing the piece */
  .b3-hero__media {
    width: 52%;
  }

  .b3-hero__copy {
    max-width: 25rem;
  }

  .b3-tabs {
    grid-template-columns: repeat(3, minmax(0, 10rem));
    gap: 1rem;
  }
}

@media (max-width: 767px) {
  .b3-header__cta,
  .b3-hicon--account {
    display: none;
  }

  .b3-header__inner {
    min-height: 4.5rem;
  }

  .b3-wordmark .wordmark__primary {
    font-size: 1.3125rem;
  }

  .b3-wordmark .wordmark__secondary {
    font-size: 0.875rem;
  }

  .b3-wordmark__img {
    height: 2.75rem;
  }

  /* Image on top, copy below, controls at the bottom */
  .b3-hero {
    display: block;
    min-height: 0;
  }

  .b3-hero__media {
    bottom: auto;
    left: 0;
    width: 100%;
    height: var(--b3-media-h);
  }

  .b3-hero__media::after {
    background:
      linear-gradient(0deg, var(--b3-black) 0%, rgb(10 9 8 / 0.55) 22%, rgb(10 9 8 / 0) 55%),
      linear-gradient(180deg, rgb(10 9 8 / 0.4) 0%, rgb(10 9 8 / 0) 22%);
  }

  .b3-hero__inner {
    padding-block: calc(var(--b3-media-h) - 3.25rem) 7.5rem;
  }

  .b3-hero__now {
    position: absolute;
    top: 1rem;
    left: var(--b3-gutter);
    z-index: 2;
    display: flex;
    gap: 0.6rem;
    font-size: var(--b3-fs-label);
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--b3-on-night);
    text-shadow: 0 1px 12px rgb(0 0 0 / 0.6);
    animation: b3-now 700ms var(--b3-ease);
  }

  .b3-hero__now span {
    font-variant-numeric: tabular-nums;
    color: var(--b3-champagne);
  }

  .b3-hero__eyebrow {
    letter-spacing: 0.2em;
  }

  .b3-hero__actions .b3-btn {
    width: 100%;
  }

  .b3-hero__controls {
    bottom: 1.5rem;
  }

  .b3-hero__controls-inner {
    align-items: center;
    gap: 1rem;
  }

  .b3-tabs {
    flex: 1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .b3-tab {
    grid-template-columns: 1fr;
  }

  /* Numbers + progress bars only; the active slide's name is shown over the image */
  .b3-tab__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 419px) {
  .b3-menu-toggle__text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .b3-menu-toggle {
    width: 44px;
    justify-content: center;
    padding: 0;
  }

  .b3-wordmark .wordmark__primary {
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    margin-right: -0.2em;
  }

  .b3-header__actions {
    gap: 0.4rem;
  }
}

@keyframes b3-now {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .b3-slide img,
  .b3-slide.is-active img {
    transform: none;
  }
}
