/* ==========================================================================
   Component variants.

   `global.css` is the house style. This file is the library: every section
   kind has several compositions, and the design system picks one per business.
   A variant is only a class on <section> (`.v-hero--overlay`), so markup stays
   shared and a new look never means a new template.
   ========================================================================== */

/* ---------------------------------------------------------- shared tokens */
body {
  font-family: var(--d-font-body, var(--font-body));
}

.section {
  padding-block: var(--d-section-space, 5rem);
}

.section__title {
  font-family: var(--d-font-display, var(--font-heading));
  font-weight: var(--d-heading-weight, 650);
  letter-spacing: var(--d-heading-track, -0.02em);
}

.section--hero .section__title {
  font-size: clamp(2.4rem, 6vw, var(--d-display-size, 4rem));
  line-height: 1.02;
}

.prose {
  max-width: var(--d-measure, 68ch);
}

.media,
.item,
.btn {
  border-radius: var(--d-radius, var(--radius-l, 1rem));
}

.item-grid--cards .item,
.item-grid--bento .item {
  border-radius: var(--d-radius-lg, var(--radius-l, 1.25rem));
}

/* =========================================================================
   HERO
   ========================================================================= */

/* overlay: full-bleed photo, type on top */
.v-hero--overlay.section--hero {
  padding-block: 0;
}

.v-hero--overlay .hero {
  position: relative;
  min-height: clamp(28rem, 62vh, 40rem);
  display: grid;
  align-items: end;
  isolation: isolate;
}

.v-hero--overlay .hero__media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: -2;
}

.v-hero--overlay .hero__media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  border-radius: 0;
}

.v-hero--overlay .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(8, 12, 18, 0.86) 0%, rgba(8, 12, 18, 0.42) 45%, rgba(8, 12, 18, 0.1) 100%);
}

.v-hero--overlay .hero__content {
  padding-block: clamp(3rem, 9vw, 6rem);
  color: #fff;
}

.v-hero--overlay .hero__content .section__title,
.v-hero--overlay .hero__content p,
.v-hero--overlay .hero__content a:not(.btn) {
  color: #fff;
}

.v-hero--overlay .hero__content .prose {
  max-width: 46ch;
  opacity: 0.92;
}

.v-hero--overlay .hero__points {
  color: #fff;
  opacity: 0.9;
}

/* editorial: type first, picture as a wide plate underneath */
.v-hero--editorial .hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.v-hero--editorial .hero__content {
  max-width: 46rem;
}

.v-hero--editorial .hero__media {
  margin: 0;
}

.v-hero--editorial .hero__media img {
  width: 100%;
  max-height: 32rem;
  object-fit: cover;
  border-radius: var(--d-radius-lg, 1rem);
}

/* split-left: mirror the standard split */
.v-hero--split-left .hero {
  direction: rtl;
}

.v-hero--split-left .hero > * {
  direction: ltr;
}

/* centered: no picture at all, so the type has to carry the page */
.v-hero--centered .hero {
  text-align: center;
  display: block;
}

.v-hero--centered .hero__content {
  max-width: 44rem;
  margin-inline: auto;
}

.v-hero--centered .hero__points {
  justify-content: center;
}

/* =========================================================================
   FEATURES / SERVICES
   ========================================================================= */

/* icon-rows: a checklist, no pictures, two columns of rows */
.v-features--icon-rows .item-grid,
.v-services--icon-rows .item-grid,
.v-features--icon-rows .item-list,
.v-services--icon-rows .item-list {
  display: grid;
  gap: 1.5rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}

.v-features--icon-rows .item,
.v-services--icon-rows .item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.v-features--icon-rows .item::before,
.v-services--icon-rows .item::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--d-accent, var(--color-accent));
}

.v-features--icon-rows .item__media,
.v-services--icon-rows .item__media,
.v-features--icon-rows .item img,
.v-services--icon-rows .item img {
  display: none;
}

.v-features--icon-rows .item h3,
.v-services--icon-rows .item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

/* bento: first card is the hero of the grid */
.v-features--bento .item-grid,
.v-services--bento .item-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}

.v-features--bento .item,
.v-services--bento .item {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 12rem;
  overflow: hidden;
  position: relative;
}

.v-features--bento .item:first-child,
.v-services--bento .item:first-child {
  grid-column: span 4;
  min-height: 20rem;
}

.v-features--bento .item:nth-child(2),
.v-features--bento .item:nth-child(3),
.v-services--bento .item:nth-child(2),
.v-services--bento .item:nth-child(3) {
  grid-column: span 2;
}

.v-features--bento .item__media,
.v-services--bento .item__media,
.v-features--bento .item img,
.v-services--bento .item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
  z-index: 0;
}

.v-features--bento .item h3,
.v-features--bento .item p,
.v-services--bento .item h3,
.v-services--bento .item p {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
}

.v-features--bento .item:not(:has(img)) h3,
.v-features--bento .item:not(:has(img)) p,
.v-services--bento .item:not(:has(img)) h3,
.v-services--bento .item:not(:has(img)) p {
  color: inherit;
  text-shadow: none;
}

/* numbered: an ordered list of commitments */
.v-features--numbered .item-grid,
.v-services--numbered .item-grid,
.v-features--numbered .item-list,
.v-services--numbered .item-list {
  display: grid;
  gap: 0;
  counter-reset: v-item;
  border-top: 1px solid var(--d-border, var(--color-border));
}

.v-features--numbered .item,
.v-services--numbered .item {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border: 0;
  border-bottom: 1px solid var(--d-border, var(--color-border));
  border-radius: 0;
  background: none;
  box-shadow: none;
  counter-increment: v-item;
}

.v-features--numbered .item::before,
.v-services--numbered .item::before {
  content: counter(v-item, decimal-leading-zero);
  font-family: var(--d-font-display, var(--font-heading));
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--d-accent, var(--color-accent));
  padding-top: 0.2rem;
}

.v-features--numbered .item__media,
.v-services--numbered .item__media,
.v-features--numbered .item img,
.v-services--numbered .item img {
  display: none;
}

/* =========================================================================
   GALLERY
   ========================================================================= */

.v-gallery--grid .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
}

.v-gallery--grid .gallery__item img,
.v-gallery--mosaic .gallery__item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.v-gallery--mosaic .gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.v-gallery--mosaic .gallery__item:first-child {
  grid-column: span 2;
  grid-row: span 2;
}

.v-gallery--mosaic .gallery__item:first-child img {
  aspect-ratio: 1 / 1;
}

.v-gallery--strip .gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(16rem, 22rem);
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.v-gallery--strip .gallery__item {
  scroll-snap-align: start;
}

.v-gallery--strip .gallery__item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* =========================================================================
   TESTIMONIALS
   ========================================================================= */

/* quote: one voice, large */
.v-testimonials--quote .item-grid,
.v-testimonials--quote .testimonials {
  display: block;
}

.v-testimonials--quote .item:not(:first-child),
.v-testimonials--quote .testimonial:not(:first-child) {
  display: none;
}

.v-testimonials--quote .item,
.v-testimonials--quote .testimonial {
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.v-testimonials--quote .item blockquote,
.v-testimonials--quote .testimonial blockquote,
.v-testimonials--quote .item p,
.v-testimonials--quote .testimonial p {
  font-family: var(--d-font-display, var(--font-heading));
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.3;
  font-weight: 500;
  margin: 0;
}

/* logos: names as a quiet row */
.v-testimonials--logos .item-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  align-items: baseline;
}

.v-testimonials--logos .item {
  background: none;
  border: 0;
  padding: 0;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--d-muted, var(--color-muted));
}

.v-testimonials--logos .item p {
  display: none;
}

/* =========================================================================
   CTA
   ========================================================================= */

.v-cta--card .section__head,
.v-cta--card .btn-row {
  max-width: 60rem;
  margin-inline: auto;
}

.v-cta--card .btn-row {
  background: var(--d-surface, var(--color-surface));
  border: 1px solid var(--d-border, var(--color-border));
  border-radius: var(--d-radius-lg, 1.25rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: 1.25rem;
  justify-items: center;
  text-align: center;
}

/* =========================================================================
   ABOUT / CONTENT
   ========================================================================= */

.v-about--editorial .prose,
.v-content--editorial .prose {
  max-width: 52ch;
  font-size: 1.06rem;
}

.v-about--editorial .prose > p:first-of-type::first-letter,
.v-content--editorial .prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--d-font-display, var(--font-heading));
  font-size: 3.6rem;
  line-height: 0.86;
  padding: 0.1rem 0.6rem 0 0;
  color: var(--d-primary, var(--color-primary));
}

.v-content--wide .section__head,
.v-content--editorial .section__head {
  max-width: var(--d-measure, 68ch);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 60rem) {
  .v-features--bento .item-grid,
  .v-services--bento .item-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .v-features--bento .item:first-child,
  .v-services--bento .item:first-child {
    grid-column: span 2;
  }

  .v-gallery--mosaic .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 40rem) {
  .v-features--bento .item,
  .v-services--bento .item,
  .v-features--bento .item:first-child,
  .v-services--bento .item:first-child {
    grid-column: span 1;
    min-height: 10rem;
  }

  .v-gallery--mosaic .gallery {
    grid-template-columns: 1fr;
  }

  .v-gallery--mosaic .gallery__item:first-child {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.v-testimonials--quote .quote:not(:first-child) {
  display: none;
}

/* CTA bands paint the brand, never a pale accent: a light accent wash makes the
   call to action read as a disabled state. */
.v-cta--band.section--cta,
.v-cta--band.section--primary {
  background: var(--d-primary, var(--color-primary));
  color: var(--d-on-primary, #fff);
}

.v-cta--band.section--cta .section__title,
.v-cta--band.section--cta .prose,
.v-cta--band.section--cta .prose p,
.v-cta--band.section--primary .section__title,
.v-cta--band.section--primary .prose,
.v-cta--band.section--primary .prose p {
  color: var(--d-on-primary, #fff);
}

.v-cta--band.section--cta .btn,
.v-cta--band.section--primary .btn {
  background: var(--d-on-primary, #fff);
  color: var(--d-primary, #12324f);
  border-color: transparent;
}

/* Split heroes: two real columns. The preset collapses `.hero` to one column
   for its background-plate look, which no longer applies now that the variant
   owns the composition. */
.v-hero--split .hero,
.v-hero--split-left .hero,
.v-hero--split-right .hero {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  min-height: 0;
  direction: ltr;
}

.v-hero--split-left .hero__media {
  order: -1;
}

.v-hero--split .hero__media,
.v-hero--split-left .hero__media,
.v-hero--split-right .hero__media {
  margin: 0;
}

.v-hero--split .hero__media img,
.v-hero--split-left .hero__media img,
.v-hero--split-right .hero__media img {
  width: 100%;
  max-height: 30rem;
  object-fit: cover;
  border-radius: var(--d-radius-lg, var(--radius-l, 1rem));
}

@media (max-width: 48rem) {
  .v-hero--split .hero,
  .v-hero--split-left .hero,
  .v-hero--split-right .hero {
    grid-template-columns: 1fr;
  }
  .v-hero--split-left .hero__media {
    order: 0;
  }
}
