/* Hero, first fold, teaser card, and brand styles */

/* Hero shell */
.hero-bg {
  background-image:
    linear-gradient(120deg, rgba(26, 47, 94, 0.75), rgba(79, 47, 34, 0.55)),
    url('/assets/media/site/hero-bathroom-optimized.jpg');
  background-image:
    linear-gradient(120deg, rgba(26, 47, 94, 0.75), rgba(79, 47, 34, 0.55)),
    -webkit-image-set(
      url('/assets/media/site/hero-bathroom.webp') type('image/webp'),
      url('/assets/media/site/hero-bathroom-optimized.jpg') type('image/jpeg')
    );
  background-image:
    linear-gradient(120deg, rgba(26, 47, 94, 0.75), rgba(79, 47, 34, 0.55)),
    image-set(
      url('/assets/media/site/hero-bathroom.webp') type('image/webp'),
      url('/assets/media/site/hero-bathroom-optimized.jpg') type('image/jpeg')
    );
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  background-color: #3c4258;
}

.hero-panel {
  min-height: clamp(300px, 36vh, 374px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.2);
}

.hero-panel-main {
  min-height: clamp(300px, 36vh, 374px);
}

.hero-panel-main .hero-content {
  max-width: 44rem;
  padding: 1.1rem 0.9rem 1.25rem;
  margin-inline: 0;
  text-align: left;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 96px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 1px,
      transparent 96px
    );
  opacity: 0.2;
  pointer-events: none;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(222, 192, 155, 0.35), transparent 55%);
  pointer-events: none;
}

#main h1 {
  font-size: clamp(1.9rem, 3.5vw, 3rem) !important;
  line-height: 1.12;
  text-wrap: balance;
}

.hero-content {
  pointer-events: auto;
}

.hero-content * {
  pointer-events: auto;
}

body.hero-variant-compact .hero-content {
  max-width: 52rem;
}

body.hero-variant-compact #main h1 {
  font-size: clamp(1.9rem, 3.5vw, 3rem) !important;
}

body.hero-variant-compact .hero-content p {
  max-width: 35rem;
  line-height: 1.35;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.875rem;
  min-width: 14rem;
  position: relative;
  z-index: 20;
  border-radius: 0.74rem !important;
}

[data-scroll-contact] {
  border-radius: 0.74rem !important;
}

/* Hero metrics and brand */
.hero-metrics {
  pointer-events: none;
  z-index: 10;
}

.hero-kpis {
  width: 100%;
}

.hero-kpi {
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.35);
  padding: 10px 8px;
}

.hero-kpi-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1;
  color: #f4e6d2;
}

.hero-kpi-label {
  margin-top: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e2e8f0;
}

.calc-teaser-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(180deg, #21325f 0%, #162345 100%);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.22);
  color: #e2e8f0;
  display: grid;
  grid-template-rows: 40% 60%;
  position: relative;
}

.calc-teaser-media {
  min-height: 104px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calc-teaser-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.08) 0%, rgba(15, 23, 42, 0.3) 100%);
}

.calc-teaser-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.calc-teaser-content {
  padding: 14px 15px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  gap: 8px;
}

.calc-teaser-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.52rem;
  font-weight: 700;
  color: #f4e6d2;
  line-height: 1.05;
  max-width: 100%;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-teaser-content p {
  margin: 0 auto;
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.3;
  max-width: 34ch;
}

@media (prefers-reduced-motion: no-preference) {
  .calc-teaser-card.reveal.is-visible {
    transform-origin: 50% 70%;
    animation: calcTeaserCardVibe 5.9s linear infinite;
    will-change: transform;
  }
}

@keyframes calcTeaserCardVibe {
  0%, 15.3%, 100% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  2.1% {
    transform: translate3d(0.8px, -0.5px, 0) rotate(0.14deg);
  }
  4.2% {
    transform: translate3d(-0.9px, 0.4px, 0) rotate(-0.12deg);
  }
  6.3% {
    transform: translate3d(0.6px, 0.7px, 0) rotate(0.11deg);
  }
  8.4% {
    transform: translate3d(-0.7px, -0.6px, 0) rotate(-0.15deg);
  }
  10.5% {
    transform: translate3d(0.9px, 0.2px, 0) rotate(0.12deg);
  }
  12.6% {
    transform: translate3d(-0.6px, 0.8px, 0) rotate(-0.1deg);
  }
  14.7% {
    transform: translate3d(0.5px, -0.7px, 0) rotate(0.09deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .calc-teaser-card.reveal.is-visible {
    animation: none !important;
    transform: none !important;
  }
}

.calc-teaser-btn {
  margin-top: auto;
  width: 100%;
  align-self: stretch;
  min-height: 2.35rem;
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(147, 197, 253, 0.58);
  box-shadow: 0 10px 20px rgba(47, 106, 229, 0.24), 0 0 0 1px rgba(148, 197, 255, 0.24) inset;
}

.brand-mark {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 0;
  overflow: visible;
  flex-shrink: 0;
  background: transparent;
  box-shadow: none;
}

.brand-mark picture {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-logo-mark {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-fallback {
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(140deg, #c68a53, #2f6ae5);
  font-size: 1rem;
}

.brand-mark-footer {
  width: 3.6rem;
  height: 3.6rem;
}

.brand-wordmark-main {
  font-family: 'Montserrat', 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: 0.14em;
  line-height: 0.95;
  text-transform: uppercase;
}

.brand-wordmark-sub {
  font-family: 'Montserrat', 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  line-height: 1;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

/* Mobile hero and teaser layout */
@media (max-width: 768px) {
  .hero-bg {
    background-attachment: scroll;
  }

  .first-fold-shell {
    border-radius: 20px;
    padding: var(--first-fold-inset);
  }

  .fold-main-grid {
    grid-template-columns: 1fr;
    gap: var(--first-fold-inset);
  }

  .hero-panel {
    min-height: clamp(420px, 62vh, 520px);
  }

  .hero-panel-main {
    min-height: clamp(392px, 59vh, 470px);
    justify-content: center;
    text-align: center;
  }

  .hero-panel-main .hero-content {
    padding: 0.95rem 0.55rem 1.05rem;
    margin-inline: auto;
    text-align: center;
  }

  .hero-panel-main .hero-content p {
    margin-inline: auto;
  }

  .calc-teaser-card {
    min-height: 190px;
    grid-template-rows: 104px auto;
  }

  .calc-teaser-media {
    height: 104px;
    min-height: 104px;
  }

  .calc-teaser-content {
    gap: 7px;
    padding: 12px 12px 12px;
  }

  .calc-teaser-btn {
    min-height: 2.2rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
  }

  .brand-mark {
    width: 3rem;
    height: 3rem;
  }

  .brand-mark-footer {
    width: 3.2rem;
    height: 3.2rem;
  }

  .brand-wordmark-main {
    font-size: 1.08rem;
    letter-spacing: 0.12em;
  }

  .brand-wordmark-sub {
    font-size: 0.62rem;
    letter-spacing: 0.38em;
  }

  .hero-cta {
    width: 100%;
  }

  .btn-primary-nav {
    min-height: 2.6rem;
    padding-inline: 1.3rem;
    font-size: 0.92rem;
  }
}

@media (max-height: 760px) and (min-width: 768px) {
  #main h1 {
    font-size: clamp(2rem, 3.8vw, 3.1rem) !important;
  }
}


@media (max-height: 900px) and (min-width: 1024px) {
  .first-fold > .max-w-7xl {
    padding-top: 92px !important;
    padding-bottom: 14px !important;
  }

  .hero-panel {
    min-height: clamp(286px, 36vh, 360px);
  }
}


@media (max-height: 640px) {
  .hero-kpis {
    display: none !important;
  }
}
