/* Webgears Group – static site styles.
   Recreates the look of the former WordPress/Divi theme without the theme itself. */

@font-face { font-family: "Lato"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/lato-300.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/lato-400.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lato-700.woff2") format("woff2"); }
@font-face { font-family: "Lato"; font-style: normal; font-weight: 900; font-display: swap; src: url("../fonts/lato-900.woff2") format("woff2"); }

:root {
  --green: #6cb127;
  --green-dark: #3b6117;
  --text: #11100b;
  --heading: #53534d;
  --nav: rgba(0, 0, 0, 0.6);
  --bg-light: #f5f5f5;
  --bg-lighter: #f4f4f4;
  --row: min(90%, 1440px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 16px/1.8 "Lato", sans-serif;
}

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

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; color: var(--heading); line-height: 1.2; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 8px 16px;
  background: var(--green);
  color: #fff;
  z-index: 100;
}
.skip-link:focus { left: 16px; }

/* The old theme framed the whole page with a 2% white gutter on each side. */
.page { margin: 0 2%; }

.row { width: var(--row); margin: 0 auto; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 114px;
  transition: height 0.3s ease;
}

.site-header.is-scrolled .site-header__inner { height: 70px; }

.site-header__logo img {
  width: auto;
  height: 74px;
  transition: height 0.3s ease;
}

.site-header.is-scrolled .site-header__logo img { height: 46px; }

.site-nav ul {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--nav);
  font-size: 20px;
  font-weight: 300;
  transition: opacity 0.3s ease;
}

.site-nav a:hover { opacity: 0.7; text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--green); }

/* ---------- Page title band (contact / imprint / data protection) ---------- */

.page-title {
  background: var(--bg-light);
  padding: 30px 0 38px;
  text-align: center;
}

.page-title h1 {
  color: var(--green);
  font-size: 55px;
  font-weight: 700;
}

.page-title--large h1 { font-size: 85px; }

/* ---------- Home: hero ---------- */

.hero {
  padding: 120px 0;
  background:
    linear-gradient(rgba(129, 129, 121, 0.65), rgba(129, 129, 121, 0.65)),
    url("../img/hero.jpg") right center / cover no-repeat #f5f5f5;
}

.hero__frame {
  width: min(80%, 1440px);
  min-height: 408px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 8%;
  border: 10px solid #fff;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Same entrance as the old Divi slider: fade in while sliding up. */
.hero__content { animation: hero-in 0.7s ease-in-out 0.9s both; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(10%); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__title {
  margin-bottom: 0.25em;
  color: #fff;
  font-size: 100px;
  font-weight: 900;
}

.hero__text { font-size: 18px; }

/* ---------- Home: live ticker ---------- */

.ticker {
  background: var(--green);
  padding: 20px 0;
  color: var(--green-dark);
  font-size: 60px;
  font-weight: 300;
  line-height: 1.3;
  text-align: center;
}

.ticker strong { color: #fff; font-weight: 900; }

/* ---------- Home: intro + numbers ---------- */

.intro {
  background: var(--bg-lighter);
  padding: 140px 0 60px;
}

.headline {
  max-width: 1440px;
  margin: 0 auto;
  color: var(--green);
  font-size: 50px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.counters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5.5%;
  width: min(89%, 1440px);
  margin: 200px auto 0;
  text-align: center;
}

.counter__value {
  display: block;
  padding-bottom: 20px;
  color: var(--green);
  font-size: 45px;
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.counter__label {
  margin-top: 20px;
  font-size: 26px;
  font-weight: 400;
  color: #9a9a95;
}

/* ---------- Home: values ---------- */

.values {
  background: var(--bg-light);
  padding: 40px 0 80px;
}

.divider {
  width: 100px;
  height: 8px;
  margin: 40px auto 100px;
  border: 0;
  background: var(--heading);
}

.values__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5.5%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.value {
  max-width: 190px;
  margin: 0 auto;
  text-align: center;
}

.value img { width: 190px; margin: 0 auto 30px; }

.value h3 {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 25px;
  font-weight: 900;
}

/* ---------- Contact ---------- */

.offices {
  background: var(--bg-light);
  padding: 0 0 40px;
}

.office {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: var(--row);
  margin: 0 auto 40px;
}

.office:last-child { margin-bottom: 0; }

.office__card,
.office__photo {
  height: 350px;
  border: 5px solid var(--bg-light);
}

.office__card {
  padding: 40px;
  background: var(--green);
}

.office__card h2 {
  margin-bottom: 15px;
  color: #fff;
  font-size: 50px;
  font-weight: 900;
}

.office__card address { font-style: normal; }
.office__card a { color: inherit; }

.office__photo {
  background-size: cover;
  background-position: center;
}

.office__photo--berlin { background-image: url("../img/berlin-office.jpg"); }
.office__photo--vorarlberg { background-image: url("../img/vorarlberg-office.jpg"); }

/* ---------- Legal pages ---------- */

.legal {
  background: var(--bg-lighter);
  padding: 0 0 100px;
}

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

.prose { max-width: 960px; margin: 0 auto; }
.prose h2 { margin: 1.8em 0 0.6em; font-size: 22px; font-weight: 700; color: var(--text); }
.prose h3 { margin: 1.6em 0 0.5em; font-size: 18px; font-weight: 700; color: var(--text); }
.prose h4 { margin: 1.4em 0 0.5em; font-size: 16px; font-weight: 700; color: var(--text); }
.prose h2:first-child { margin-top: 0; }
.prose ol,
.prose ul { margin: 0 0 1em; padding-left: 1.5em; }
.prose a { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer {
  padding: 30px 0 40px;
  text-align: center;
}

.site-footer img {
  width: auto;
  max-height: 120px;
  margin: 0 auto 20px;
}

.site-footer small { font-size: 13px; }

.site-footer ul {
  margin: 1em 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 2.5;
}

/* ---------- Scroll to top ---------- */

.to-top {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 40;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}

.to-top img { width: 32px; height: 32px; }
.to-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- 404 ---------- */

.not-found {
  background: var(--bg-light);
  padding: 60px 0 120px;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .hero__title { font-size: 80px; }
  .ticker { font-size: 44px; }
}

@media (max-width: 980px) {
  .hero { padding: 100px 0; }
  .hero__frame { border: 0; min-height: 0; width: 90%; padding: 0; }
  .ticker { font-size: 36px; }
  .intro { padding: 50px 0; }
  .headline { font-size: 40px; }
  .counters { margin-top: 80px; }
  .counter__value { font-size: 30px; }
  .values { padding: 50px 0; }
  .values__grid { grid-template-columns: repeat(2, 1fr); row-gap: 60px; }
  .page-title { padding: 50px 0 30px; }
  .page-title--large h1 { font-size: 64px; }
  .office__card h2 { font-size: 40px; }
  .legal { padding-bottom: 50px; }
}

@media (max-width: 767px) {
  .page { margin: 0; }
  .row { width: auto; margin: 0 16px; }
  .site-header__inner { height: 72px; padding: 0 16px; }
  .site-header__logo img,
  .site-header.is-scrolled .site-header__logo img { height: 44px; }
  .site-header.is-scrolled .site-header__inner { height: 60px; }
  .site-nav ul { gap: 16px; }
  .site-nav a { font-size: 17px; }
  .hero { padding: 60px 0; }
  .hero__title { font-size: 34px; }
  .hero__text { font-size: 16px; }
  .ticker { font-size: 24px; }
  .headline { font-size: 26px; }
  .divider { display: none; }
  .counters { grid-template-columns: 1fr; gap: 40px; margin-top: 50px; }
  .counter__value { font-size: 45px; }
  .values__grid { grid-template-columns: 1fr; row-gap: 50px; }
  .value { max-width: 320px; }
  .page-title { padding-left: 16px; padding-right: 16px; }
  .page-title h1 { font-size: 32px; overflow-wrap: anywhere; hyphens: auto; }
  .page-title--large h1 { font-size: 48px; }
  .office { grid-template-columns: 1fr; width: auto; margin: 0 16px 30px; }
  .office__card,
  .office__photo { height: auto; border-width: 0; }
  .office__card { padding: 30px 24px; }
  .office__card h2 { font-size: 32px; }
  .office__photo { aspect-ratio: 16 / 9; }
  /* Show each office's details before its photo on small screens. */
  .office__card { order: 1; }
  .office__photo { order: 2; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after { transition: none !important; }
  .hero__content { animation: none; }
}
