/**
 * Single brand page (Figma 163:1608).
 *
 * Depends on brands.css for .brands-container and .brands-breadcrumbs.
 *
 * @package Atsko
 */

/* —— Hero —— */
.brand-hero {
  --brand-hero-wash: #ff3600;
  position: relative;
  overflow: hidden;
  /* White with a brand-tinted wash (Water-Guard orange by default). */
  background-color: color-mix(in srgb, var(--brand-hero-wash) 5%, white);
  padding: 8rem 0;
}

/*
 * Figma BG Shape: 1310x582 white triangle anchored to the bottom-right of the
 * 1600px artboard. Masking the shared angle asset keeps the colour in CSS.
 */
.brand-hero--angle::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
  right: 0;
  bottom: -3.27rem;
  width: 81.875%;
  height: 582px;
  background-color: var(--atsko-white);
  -webkit-mask: url("../images/hero-angle.svg") no-repeat center / 100% 100%;
  mask: url("../images/hero-angle.svg") no-repeat center / 100% 100%;
}

/* Photo style (ZERO): custom backdrop instead of the angle. */
.brand-hero--photo {
  background-color: color-mix(in srgb, var(--brand-hero-wash) 10%, white);
}

.brand-hero__backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  display: flex;
  justify-content: flex-end;
}

.brand-hero__backdrop-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  display: block;
  /* Soft fade so copy on the left stays readable. */
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    transparent 28%,
    rgba(0, 0, 0, 0.55) 48%,
    #000 62%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    transparent 28%,
    rgba(0, 0, 0, 0.55) 48%,
    #000 62%
  );
}

.brand-hero__inner {
  position: relative;
  z-index: 2;
}

.brand-hero__main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3rem;
  max-width: 44.25rem;
}

.brand-hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 0.92;
  color: var(--atsko-charcoal);
}

.brand-hero__title--logo {
  width: 100%;
  line-height: 0;
}

.woocommerce .brand-hero__logo {
  display: block;
  width: auto;
  max-width: min(100%, var(--brand-hero-logo-width, 44.25rem));
  height: auto;
}

.brand-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  max-width: 27.625rem;
}

.brand-hero__text {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-hero__tagline {
  margin: 0;
  font-size: 1.625rem;
  font-style: italic;
  line-height: 1.1;
  color: var(--atsko-charcoal);
}

.brand-hero__intro {
  font-size: 1.125rem;
  line-height: 1.3;
  color: var(--atsko-charcoal);
}

.brand-hero__intro p {
  margin: 0;
}

.brand-hero__intro p + p {
  margin-top: 0.75rem;
}

.brand-hero__media {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  top: 0;
  width: 52%;
  pointer-events: none;
  display: flex;
}

.brand-hero__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

/* —— Linked page content —— */
/* Blocks pick up the site container; full-width blocks bleed edge to edge. */
.brand-page__content > * {
  width: 100%;
  margin-inline: auto;
  padding-inline: max(2rem, calc((100% - var(--atsko-container)) / 2));
  box-sizing: border-box;
}

.brand-page__content > * + * {
  margin-top: 1.5rem;
}

.brand-page__content > :first-child {
  margin-top: 3rem;
}

.brand-page__content > :last-child {
  margin-bottom: 3rem;
}

.brand-page__content > .alignfull,
.brand-page__content > .brand-products,
.brand-page__content > .brand-spotlight,
.brand-page__content > .brand-feature,
.brand-page__content > .brand-reasons {
  padding-inline: 0;
}

/* Full-bleed sections supply their own vertical padding. */
.brand-page__content > .alignfull,
.brand-page__content > .brand-products,
.brand-page__content > .brand-spotlight,
.brand-page__content > .brand-feature,
.brand-page__content > .brand-reasons,
.brand-page__content > .alignfull + *,
.brand-page__content > .alignfull:last-child {
  margin-top: 0;
  margin-bottom: 0;
}

/* —— Products —— */
.brand-products {
  padding: 5rem 0;
  background: var(--atsko-white);
}

.brand-products__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--atsko-gray-200);
}

.brand-products__heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-products__eyebrow {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--atsko-orange-bright);
}

.brand-products__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--atsko-charcoal);
}

.brand-products__all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--atsko-charcoal);
  text-decoration: none;
  white-space: nowrap;
}

.brand-products__all:hover {
  color: var(--atsko-blue);
  text-decoration: underline;
}

.brand-products__all-arrow {
  font-size: 1.25rem;
  line-height: 1;
}

.brand-products__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.brand-product {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  justify-content: flex-end;
  text-align: center;
}

.brand-product__media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 11.6875rem;
  height: 16rem;
  overflow: hidden;
}

.brand-product__image,
.brand-product__media img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand-product__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--atsko-charcoal);
}

.brand-product__title a {
  color: inherit;
  text-decoration: none;
}

.brand-product__title a:hover {
  color: var(--atsko-blue);
}

.brand-product__price {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.5;
}

.brand-product__price-prefix {
  color: var(--atsko-charcoal);
}

.brand-product__price-amount,
.brand-product__price-amount .amount,
.brand-product__price-amount .woocommerce-Price-amount {
  font-weight: 700;
  color: var(--atsko-orange);
}

.brand-product__cta {
  margin-top: 0.375rem;
}

/* —— Spotlight (block pattern) —— */
.brand-spotlight {
  padding: 7rem max(2rem, calc((100% - var(--atsko-container)) / 2));
  /* background: var(--atsko-white); */
  box-sizing: border-box;
}

.brand-spotlight.alignfull {
  width: 100%;
  max-width: none;
  padding-inline: max(2rem, calc((100% - var(--atsko-container)) / 2));
}

.brand-spotlight__inner {
  /* Image meets the 50% center line; text inset is handled on the copy column. */
  gap: 0 !important;
  margin: 0 !important;
}

.brand-spotlight__media,
.brand-spotlight__copy {
  flex-basis: 50% !important;
  width: 50% !important;
}

.brand-spotlight__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-sizing: border-box;
}

/* Figma: 160px gutter between image edge and text. */
.brand-spotlight--media-right .brand-spotlight__copy {
  padding-right: 8rem;
}

.brand-spotlight--media-left .brand-spotlight__copy {
  padding-left: 8rem;
}

.brand-spotlight__eyebrow {
  margin: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5 !important;
  color: var(--atsko-orange-bright) !important;
}

.brand-spotlight__title {
  margin: 0 !important;
  font-size: clamp(1.75rem, 3vw, 2rem) !important;
  font-weight: 700 !important;
  line-height: 0.9 !important;
  color: var(--atsko-charcoal) !important;
}

.brand-spotlight__body {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  color: var(--atsko-charcoal) !important;
}

.brand-spotlight__actions {
  margin: 0.5rem 0 0 !important;
}

.brand-spotlight__figure {
  margin: 0 !important;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  aspect-ratio: 646 / 400;
  background: var(--atsko-gray-400);
}

.brand-spotlight__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-spotlight__figure--video > a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.brand-spotlight__figure--video > a::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 5rem;
  height: 3.5rem;
  background: url("../images/brand/play.svg") center / contain no-repeat;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
  pointer-events: none;
  transition: transform 0.15s ease;
}

.brand-spotlight__figure--video > a:hover::after,
.brand-spotlight__figure--video > a:focus-visible::after {
  transform: scale(1.06);
}

/* Blog / resources spotlight (Figma 402:4344) — soft ZERO-green angle wash */
.brand-spotlight--blog {
  position: relative;
  overflow: hidden;
}

.brand-spotlight--blog::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: url("../images/green-angle.png") no-repeat bottom right / 50% auto;
}

.brand-spotlight--blog > * {
  position: relative;
  z-index: 1;
}

/* —— Feature list (block pattern) —— */
.brand-feature {
  position: relative;
  overflow: hidden;
  padding: 8rem max(2rem, calc((100% - var(--atsko-container)) / 2));
  background: var(--atsko-white);
  box-sizing: border-box;
}

.brand-feature.alignfull {
  width: 100%;
  max-width: none;
  padding-inline: max(2rem, calc((100% - var(--atsko-container)) / 2));
  background: url("../images/brand/gray-background.webp") no-repeat center /
    cover;
}

.brand-feature__inner {
  gap: 3rem !important;
  margin: 0 !important;
  align-items: center;
}

.brand-feature__copy {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 29rem;
}

.brand-feature__eyebrow {
  margin: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5 !important;
  color: var(--atsko-orange-bright) !important;
}

.brand-feature__title {
  margin: 0 !important;
  font-size: clamp(1.75rem, 3vw, 2rem) !important;
  font-weight: 700 !important;
  line-height: 0.9 !important;
  color: var(--atsko-charcoal) !important;
}

.brand-feature__intro {
  margin: 0 !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
  color: var(--atsko-charcoal) !important;
}

.brand-feature__list {
  display: flex;
  flex-direction: column;
  gap: 2.625rem;
  margin-top: 1.5rem !important;
  width: 100%;
}

.brand-feature__item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

/*
 * Constrained layout (from theme.json / global styles) centers children with
 * margin-inline: auto. Short feature copy then looks indented. Keep these
 * stacks left-aligned even on already-inserted patterns that still use
 * layout:constrained.
 */
.brand-feature__list.is-layout-constrained > *,
.brand-feature__item.is-layout-constrained > *,
.brand-feature__list > .brand-feature__item {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100%;
}

.brand-feature__item-title {
  margin: 0 !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  line-height: 0.9 !important;
  color: var(--atsko-charcoal) !important;
}

.brand-feature__item-body {
  margin: 0 !important;
  font-size: 1.125rem !important;
  line-height: 1.5 !important;
  color: var(--atsko-charcoal) !important;
}

.brand-feature__figure {
  margin: 0 !important;
}

.brand-feature__figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* —— Reasons cards (block pattern) —— */
.brand-reasons {
  padding: 5.5rem max(2rem, calc((100% - var(--atsko-container)) / 2)) 7rem;
  background-color: #fff5f2;
  box-sizing: border-box;
}

.brand-reasons.alignfull {
  width: 100%;
  max-width: none;
  padding-inline: max(2rem, calc((100% - var(--atsko-container)) / 2));
}

/* ZERO / green tint variant (Figma 402:4338) */
.brand-reasons--green {
  background-color: #fff;
  background-image: linear-gradient(
    90deg,
    rgba(138, 198, 65, 0.05),
    rgba(138, 198, 65, 0.05)
  );
}

/* Soft blue variant (Figma 522:6265 / Pro-Tec-Skin) */
.brand-reasons--blue {
  background-color: #e8f5ff;
}

.brand-reasons__header {
  margin-bottom: 2.5rem !important;
}

.brand-reasons__eyebrow {
  margin: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5 !important;
  color: var(--atsko-orange-bright) !important;
}

.brand-reasons__title {
  margin: 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  color: var(--atsko-charcoal) !important;
}

.brand-reasons__grid {
  gap: 2.5rem !important;
  margin: 0 !important;
}

.brand-reasons__card {
  background: var(--atsko-white);
  border-radius: 16px;
  padding: 2rem !important;
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
}

.brand-reasons__card-title {
  margin: 0 !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  color: var(--atsko-orange-bright) !important;
}

.brand-reasons__card-body {
  margin: 0 !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
  color: var(--atsko-charcoal) !important;
}

/* Editor canvas tweaks live in editor.css so layout stays with theme.json. */

@media (max-width: 1200px) {
  .brand-hero {
    padding: 5rem 0;
  }

  .brand-hero__media {
    width: 44%;
    opacity: 0.9;
  }

  .brand-products__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-spotlight,
  .brand-feature {
    padding-block: 5rem;
  }

  .brand-spotlight--media-right .brand-spotlight__copy {
    padding-right: 4rem;
  }

  .brand-spotlight--media-left .brand-spotlight__copy {
    padding-left: 4rem;
  }
}

@media (max-width: 900px) {
  .brand-hero {
    padding: 3.5rem 0 0;
  }

  .brand-hero__main {
    max-width: none;
  }

  /* Stack the artwork under the copy instead of letting it overlap. */
  .brand-hero__media {
    position: static;
    width: 100%;
    margin-top: 2rem;
    opacity: 1;
  }

  .brand-hero__image {
    height: auto;
    max-height: 26rem;
    object-position: center bottom;
  }

  .brand-products__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .brand-spotlight__inner,
  .brand-feature__inner,
  .brand-reasons__grid {
    flex-direction: column !important;
  }

  .brand-spotlight--media-left .brand-spotlight__media {
    order: -1;
  }

  .brand-spotlight__media,
  .brand-spotlight__copy {
    flex-basis: 100% !important;
    width: 100% !important;
  }

  .brand-spotlight--media-right .brand-spotlight__copy,
  .brand-spotlight--media-left .brand-spotlight__copy {
    padding: 0;
  }

  .brand-feature__copy {
    max-width: none;
  }

  .brand-reasons__card {
    flex-basis: 100% !important;
  }
}

@media (max-width: 700px) {
  .brand-hero--angle::before {
    display: none;
  }

  .brand-spotlight--blog::before {
    display: none;
  }

  .brand-hero__backdrop-image {
    -webkit-mask-image: linear-gradient(
      180deg,
      transparent 0%,
      #000 35%,
      #000 100%
    );
    mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 100%);
    object-position: center center;
    opacity: 0.45;
  }

  .brand-hero__title {
    font-size: 2.25rem;
  }

  .brand-hero__tagline {
    font-size: 1.375rem;
  }

  .brand-products {
    padding: 3rem 0;
  }

  .brand-products__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
  }

  .brand-spotlight,
  .brand-feature {
    padding-block: 3.5rem;
  }

  .brand-reasons {
    padding-block: 3.5rem 4.5rem;
  }

  .brand-feature__list {
    gap: 1.75rem;
  }
}
