@import url('fonts.css');

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  color: #3e4a4c;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  transition: color 0.5s, background-color 0.5s;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
}

h1 {
  display: inline-block;
  font-size: 30px;
  font-weight: 300;
}

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 100px 0;
}

.section-title {
  font-family: 'Josefin Sans', 'Raleway', sans-serif;
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3em);
  text-align: center;
  margin-bottom: 50px;
  letter-spacing: 0.02em;
  font-synthesis: none;
}

.text-center {
  text-align: center;
}

/* —— Header / nav —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(70, 120, 160, 0.92);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 1rem;
  min-height: 60px;
  padding: 0 15px;
  max-width: 1170px;
  margin: 0 auto;
  position: relative;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  color: #fff;
}

.brand__title {
  text-decoration: none;
  color: inherit;
}

.brand__title:hover h1 {
  color: #9bbabf;
}

.brand__phone {
  color: rgb(107, 49, 49);
  font-family: Verdana, sans-serif;
  font-size: clamp(1rem, 3.5vw, 25px);
  font-weight: 400;
  text-decoration: none;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  background: transparent;
  border: none;
}

.nav-toggle-label span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 1px;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.site-nav a {
  display: block;
  padding: 15px 12px;
  color: #fffefe;
  text-decoration: none;
  font-size: 15px;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #333;
  background-color: #e7e7e7;
}

main {
  padding-top: 60px;
}

/* —— Hero —— */
.hero {
  position: relative;
  height: min(100vh, 720px);
  min-height: 280px;
  overflow: hidden;
  background: #2a3a4a;
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  pointer-events: none;
}

.hero__slide:first-child {
  opacity: 1;
}

.js .hero__slide:first-child {
  opacity: 0;
}

.js .hero__slide.is-active {
  opacity: 1;
}

.hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— About —— */
.about {
  background: url('../images/bg/dom1.webp') center / cover no-repeat;
  background-attachment: scroll;
}

@supports (background-image: image-set(url('x.webp') type('image/webp'))) {
  .about {
    background-image: image-set(
      url('../images/bg/dom1.webp') type('image/webp'),
      url('../images/bg/dom1.jpg') type('image/jpeg')
    );
  }
}

.about__panel {
  background: rgba(255, 255, 255, 0.8);
  padding: 50px 0;
}

.about__panel p {
  font-size: clamp(15px, 2.5vw, 19px);
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto;
}

.about__panel .section-title {
  color: #3e4a4c;
  padding-bottom: 0;
  margin-bottom: 50px;
}

/* —— Intro block —— */
.intro-block {
  padding: 50px 0;
  background: url('../images/bg/kov-back.webp') center / cover no-repeat;
}

@supports (background-image: image-set(url('x.webp') type('image/webp'))) {
  .intro-block {
    background-image: image-set(
      url('../images/bg/kov-back.webp') type('image/webp'),
      url('../images/bg/kov-back.png') type('image/png')
    );
  }
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .intro-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.intro-headings {
  font-family: 'Josefin Sans', 'Raleway', sans-serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 4vw, 2.5em);
  color: #3e4a4c;
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-synthesis: none;
}

.intro-headings hr {
  width: 200px;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.3);
  margin: 1rem 0;
}

.intro-lead {
  font-size: clamp(15px, 2vw, 19px);
  line-height: 1.7;
}

.logo-card {
  position: relative;
  text-align: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.logo-card figure {
  margin: 0;
  position: relative;
  display: inline-block;
  max-width: 460px;
}

.logo-card figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(44, 78, 44, 0.21);
  opacity: 0;
  transform: scale(0.7);
  transition: transform 0.4s, opacity 0.4s;
}

.logo-card figure:hover figcaption,
.logo-card figure:focus-within figcaption {
  opacity: 1;
  transform: scale(1);
}

.logo-card figcaption h3 {
  font-family: 'Poiret One', cursive;
  font-size: 2em;
  color: #fff;
  text-align: center;
}

.logo-card figure:hover img {
  transform: scale(0.6);
}

.logo-card img {
  transition: transform 0.4s;
}

/* —— Services —— */
.services {
  background: url('../images/bg/blur.webp') center / cover no-repeat;
}

@supports (background-image: image-set(url('x.webp') type('image/webp'))) {
  .services {
    background-image: image-set(
      url('../images/bg/blur.webp') type('image/webp'),
      url('../images/bg/blur.jpg') type('image/jpeg')
    );
  }
}

.services .section-title {
  color: #fff;
  margin-bottom: 30px;
}

.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1100px;
  margin-inline: auto;
}

.service-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 900px) {
  .service-item {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
  }
}

.service-circle {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.service-circle__wrap {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: #f9f9f9 url('../images/services/bg.webp') center;
  box-shadow: 0 0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 3px rgba(115, 114, 23, 0.8);
  overflow: hidden;
}

.service-circle__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease-in-out, opacity 0.4s ease-in-out 0.2s;
}

.service-circle__face--front {
  z-index: 1;
}

.service-circle__face--back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: rgb(66, 119, 152);
  color: #fff;
  opacity: 0;
  transform: scale(1.5);
  padding: 1rem;
  pointer-events: none;
}

.service-circle__label {
  font-family: 'Poiret One', cursive;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 16px;
  margin: 0 0 0.5rem;
}

.service-circle__face--back p {
  font-size: 14px;
  margin: 0;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.service-circle:hover .service-circle__face--front,
.service-circle:focus-within .service-circle__face--front {
  transform: scale(0);
  opacity: 0;
}

.service-circle:hover .service-circle__face--back,
.service-circle:focus-within .service-circle__face--back {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}

.service-circle__face--1 { background-image: url('../images/services/Komfortabel.webp'); }
.service-circle__face--2 { background-image: url('../images/services/nt_kippweite2.webp'); }
.service-circle__face--3 { background-image: url('../images/services/winkhaus-locking.webp'); }
.service-circle__face--4 { background-image: url('../images/services/890718-xs.webp'); }
.service-circle__face--5 { background-image: url('../images/services/z4.webp'); }

.service-body h3 {
  font-family: 'Poiret One', cursive;
  font-size: 22px;
  color: #fff;
  padding: 0 0 10px;
  font-weight: 400;
}

.service-body p {
  font-size: 16px;
  color: #fff;
  padding: 0 0 20px;
  line-height: 1.6;
}

/* —— Portfolio —— */
.portfolio {
  background: url('../images/bg/obr4.webp') center / cover no-repeat;
}

@supports (background-image: image-set(url('x.webp') type('image/webp'))) {
  .portfolio {
    background-image: image-set(
      url('../images/bg/obr4.webp') type('image/webp'),
      url('../images/bg/obr4.jpg') type('image/jpeg')
    );
  }
}

.portfolio .section-title {
  color: #3e4a4c;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.portfolio-card__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(119, 136, 170, 0.9);
  color: #fff;
  text-align: center;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.portfolio-card:hover .portfolio-card__caption,
.portfolio-card:focus-within .portfolio-card__caption {
  opacity: 0;
}

.portfolio-card__caption p {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.portfolio-card__caption .detail {
  font-size: 0.7em;
}

/* —— Contact —— */
.contact {
  background: url('../images/bg/contback3.webp') center / cover no-repeat;
}

@supports (background-image: image-set(url('x.webp') type('image/webp'))) {
  .contact {
    background-image: image-set(
      url('../images/bg/contback3.webp') type('image/webp'),
      url('../images/bg/contback3.jpg') type('image/jpeg')
    );
  }
}

.contact .section-title {
  color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.contact-map {
  text-align: center;
}

.contact-map img {
  margin: 0 auto;
  max-width: 100%;
}

.contact-details p {
  font-size: clamp(16px, 2.5vw, 22px);
  padding: 10px 0;
  color: #fff;
}

.contact-details a {
  color: #fff;
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-email {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: clamp(16px, 2.5vw, 22px);
  color: #fff;
}

.contact-email .email-user {
  order: 1;
}

.contact-email .email-at {
  order: 2;
}

.contact-email .email-domain {
  order: 3;
}

.contact-email .email-dot {
  order: 4;
}

.contact-email .email-tld {
  order: 5;
}

.contact-warning {
  margin-top: 2rem;
  font-size: clamp(14px, 2vw, 18px);
  line-height: 1.6;
}

/* —— Footer —— */
.site-footer {
  color: #fff;
}

.footer-top {
  padding: 50px 0;
  background-color: #475025;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-top h4 {
  font-family: 'Poiret One', cursive;
  font-size: 25px;
  padding-bottom: 35px;
}

.footer-bottom {
  position: relative;
  padding: 25px 0 60px;
  background-color: rgb(53, 58, 34);
  text-align: center;
}

.back-to-top {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  text-decoration: none;
}

.back-to-top:hover {
  color: red;
}

.back-to-top svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* —— Reveal (progressive) —— */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__slide {
    transition: none;
  }
}

/* —— Mobile nav —— */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .nav-toggle-label {
    display: flex;
    margin-left: auto;
  }

  .site-nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: rgba(0, 80, 1, 0.74);
  }

  .site-nav.is-open,
  .nav-toggle:checked ~ .site-nav {
    max-height: 320px;
  }

  .site-nav ul {
    flex-direction: column;
    text-align: center;
  }

  section {
    padding: 60px 0;
  }
}

@media (min-width: 768px) {
  .site-nav {
    margin-left: auto;
  }

  .about,
  .intro-block,
  .services,
  .portfolio,
  .contact {
    background-attachment: fixed;
    background-size: 100% 100%;
  }
}
