/*
Theme Name: SmartHygro
Theme URI: https://smarthygro.de/
Author: SmartHygro
Description: Schlankes WordPress-Block-Theme für die SmartHygro-Website.
Version: 0.2.2
Text Domain: smarthygro
*/

:root {
  --sh-shadow: 0 18px 50px rgba(11, 59, 56, 0.10);
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--wp--preset--color--amber);
  outline-offset: 4px;
}

.sh-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(11, 59, 56, 0.10);
  backdrop-filter: blur(14px);
}

.sh-wordmark a {
  text-decoration: none;
}

.sh-wordmark strong {
  letter-spacing: -0.035em;
}

.sh-nav a {
  color: var(--wp--preset--color--ink);
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
}

.sh-nav a:hover {
  color: var(--wp--preset--color--petrol);
}

.sh-hero {
  min-height: min(800px, 88vh);
  overflow: hidden;
  position: relative;
}

.sh-hero::after {
  background: var(--wp--preset--color--amber);
  content: "";
  height: 56%;
  position: absolute;
  right: 0;
  top: 0;
  width: 10px;
}

.sh-kicker {
  align-items: center;
  display: flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sh-kicker::before {
  background: var(--wp--preset--color--amber);
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 0.7rem;
  width: 0.7rem;
}

.sh-hero h1 {
  letter-spacing: -0.055em;
  margin-top: 0.35rem;
  max-width: 8.5ch;
}

.sh-lead {
  color: var(--wp--preset--color--slate);
  font-size: var(--wp--preset--font-size--large);
  line-height: 1.55;
  max-width: 43rem;
}

.sh-hero-image,
.sh-photo-card {
  border-radius: 1.75rem;
  box-shadow: var(--sh-shadow);
  overflow: hidden;
}

.sh-hero-image img {
  aspect-ratio: 5 / 4;
  object-fit: cover;
}

.sh-photo-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sh-section {
  scroll-margin-top: 6rem;
}

.sh-section-title {
  letter-spacing: -0.035em;
  max-width: 18ch;
}

.sh-page-hero {
  background: linear-gradient(135deg, #0b3b38 0%, #0f625c 100%);
  color: var(--wp--preset--color--paper);
}

.sh-page-hero h1 {
  letter-spacing: -0.045em;
  max-width: 14ch;
}

.sh-page-hero .sh-lead {
  color: var(--wp--preset--color--mint);
}

.sh-prose h2 {
  margin-top: 2.5em;
}

.sh-prose h3 {
  margin-top: 1.75em;
}

.sh-note {
  border-left: 0.45rem solid var(--wp--preset--color--amber);
  border-radius: 0 1rem 1rem 0;
}

.sh-cta {
  border-radius: 1.5rem;
}

.sh-card,
.sh-step,
.sh-stat,
.sh-topic {
  border: 1px solid var(--wp--preset--color--line);
  border-radius: 1.5rem;
  height: 100%;
}

.sh-card,
.sh-topic {
  background: var(--wp--preset--color--paper);
  box-shadow: 0 12px 32px rgba(11, 59, 56, 0.06);
}

.sh-card h3,
.sh-topic h3,
.sh-step h3 {
  margin-top: 0;
}

.sh-step-number {
  align-items: center;
  background: var(--wp--preset--color--amber);
  border-radius: 50%;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 800;
  height: 2.5rem;
  justify-content: center;
  width: 2.5rem;
}

.sh-stat strong {
  display: block;
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: -0.05em;
  line-height: 1;
}

.sh-survey {
  background: linear-gradient(135deg, #0b3b38 0%, #0f625c 100%);
  border-radius: 2rem;
  box-shadow: var(--sh-shadow);
  overflow: hidden;
  position: relative;
}

.sh-survey::after {
  border: 4rem solid rgba(223, 242, 239, 0.08);
  border-radius: 50%;
  content: "";
  height: 18rem;
  position: absolute;
  right: -8rem;
  top: -8rem;
  width: 18rem;
}

.sh-survey > * {
  position: relative;
  z-index: 1;
}

.sh-topic {
  transition: border-color 160ms ease, transform 160ms ease;
}

.sh-footer a {
  color: inherit;
}

@media (max-width: 880px) {
  .sh-header .wp-block-navigation {
    --navigation-layout-justification-setting: flex-end;
  }

  .sh-hero {
    min-height: auto;
  }

  .sh-hero .wp-block-columns,
  .sh-problem .wp-block-columns {
    flex-wrap: wrap !important;
  }

  .sh-hero .wp-block-column,
  .sh-problem .wp-block-column {
    flex-basis: 100% !important;
  }
}

@media (max-width: 599px) {
  .sh-header {
    /* Avoid a containing block for WordPress' responsive navigation. */
    backdrop-filter: none;
  }

  .sh-header .wp-block-navigation {
    position: relative;
  }

  .sh-header .wp-block-navigation__responsive-container.is-menu-open {
    background: #fff;
    border: 1px solid rgba(11, 59, 56, 0.14);
    border-radius: 0.75rem;
    bottom: auto;
    box-sizing: border-box;
    box-shadow: var(--sh-shadow);
    height: auto;
    left: auto;
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    padding: 1rem 1.15rem 1.25rem;
    position: absolute;
    right: 0;
    top: calc(100% + 1rem);
    width: min(20rem, calc(100vw - 2rem));
  }

  .sh-header .wp-block-navigation__responsive-container-content {
    align-items: stretch;
    padding-top: 2.5rem;
  }

  .sh-header .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
    align-items: flex-start !important;
    gap: 0.8rem;
    width: 100%;
  }

  .sh-header .wp-block-navigation__responsive-container-content > .wp-block-navigation__container > .wp-block-navigation-item {
    align-items: flex-start;
    width: 100%;
  }

  .sh-header .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container {
    align-items: flex-start !important;
    box-sizing: border-box;
    gap: 0.55rem;
    max-width: 100%;
    padding-left: 1rem;
    padding-top: 0.5rem;
    width: auto !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sh-topic {
    transition: none;
  }
}
