/* ----------------------------------------------------------------------------
 * Reset
 * based on https://piccalil.li/blog/a-more-modern-css-reset/
 * ------------------------------------------------------------------------- */

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

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
body, h1, h2, h3, h4, p,
figure, blockquote, dl, dd {
  margin-block-end: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
  margin: 0;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4,
button, input, label {
  line-height: 1.1;
}

/* Balance text wrapping on headings */
h1, h2,
h3, h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input, button,
textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}



/* ----------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */



/* --------------------------- Colors ----------------------------- */
/* Hintergrund: dunkel-hellgrün: 1E5416 bis 438035;
 * Orange - dunkel-hell: ee8c14, ffa515, ffb515
 */
:root {
  --color-accent: #ee8c15;
  --color-accent-light: #FFa515;
  --color-primary: #006258;
  --color-primary-lighter: #019587;
  /* --color-primary-light: #01bba9; */
  --color-primary-light: #00bc2d;
  --color-primary-darker: #00332E;

  --color-secondary: #438035;
  --color-secondary-darker: #283D04;
  --color-text: #222222;
  --color-grey: #eeeeee;
  --color-background: #f8f8f8;
  --color-background-lightest: #FFFFFF;
  --color-background-primary: #E0EBEA;
  --color-surface: var(--color-primary);
  --color-text-on-surface: #FFFFFF;

  --color-logo-top: #00701b;
  --color-logo-bottom: #004a13;


  --max-page-width: 87.5rem;
  --horizontal-site-gutter: clamp(1rem, 1rem + 10vw, 6rem);;
}

/* ------------------------ General stuff ------------------------- */

/* noto-sans-regular - latin */
@font-face {
  font-display: swap;
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/noto-sans-v37-latin-regular.woff2') format('woff2');
}

/* noto-sans-700 - latin */
@font-face {
  font-display: swap;
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 700;
  src: url('/assets/fonts/noto-sans-v37-latin-700.woff2') format('woff2');
}

/* noto-sans-800 - latin */
@font-face {
  font-display: swap;
  font-family: 'Noto Sans';
  font-style: normal;
  font-weight: 800;
  src: url('/assets/fonts/noto-sans-v37-latin-800.woff2') format('woff2');
}


a {
  text-decoration: none;
  color: inherit;
}

::-moz-selection {
  color: var(--color-text);
  background-color: var(--color-background-lightest);
  opacity: 1
}

::selection {
  color: var(--color-text);
  background-color: var(--color-background-lightest);
  opacity: 1
}


/* ---------------------------------------------------------------- */
/*                         General layout                           */
/* ---------------------------------------------------------------- */

html {
/*  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;*/
  font-family: 'Noto Sans', sans-serif;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  background: var(--color-background);
  font-size: clamp(1rem, 1rem + 0.2vw, 1.2rem);
}

body.home {
  background-color: var(--color-background-primary);
}

.site-wrapper {
  min-height: 100dvh;
  display: flex;
  width: 100%;
  flex-direction: column;
}

.layout-section {
  display: grid;
  grid-template-columns: [full-width-start] minmax(var(--horizontal-site-gutter), 1fr) [content-start] minmax(0, var(--max-page-width)) [content-end] minmax(var(--horizontal-site-gutter), 1fr) [full-width-end];
  width: 100%;
}

.layout-section > * {
  grid-column: content;
  min-width: 0;
}

/* ----------------------------------------------------------------------------
 * Rich-Text
 * ------------------------------------------------------------------------- */

.rich-text h1 {
  padding: 1.5em 0 0.5em 0 ;
  color: var(--color-primary);
}

.rich-text h2 {
  padding: 1em 0 0.3em 0;
  color: var(--color-primary);
}

.rich-text h3 {
  padding: 0.5em 0 0.2em 0;
  color: var(--color-primary);
}

.rich-text p {
  line-height: 1.5;
  padding: 0 0 0.5em 0;
}

.rich-text a {
  color: var(--color-primary);
  text-decoration: underline;
}

.rich-text ul {
  padding-inline-start: 1.5em;
}

.rich-text li {
  list-style-position: outside;
  padding: 0 0 0 0.3em;
  line-height: 1.5;
}


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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-bar {
  --logo-max-height: 4rem;
  --header-bar-inset: 1.5rem;

  position: sticky;
  top: 0;

  padding-block: var(--header-bar-inset);
  /*background-color: var(--color-grey);*/
  background-color: var(--color-background-lightest);
  box-shadow: 0px 0px 10px #778877;
  color: var(--color-text);
  transition: padding 0.3s linear;
}

.header-bar__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 5 10;
  gap: 1rem 3rem;
}

.header-bar__logo {
  height: clamp(2rem, 2rem + 2vw, var(--logo-max-height));
  width: auto;
  transition: height 0.3s linear;
}

/* no sticky header used no more ...
.header-bar.is-sticky {
  --logo-max-height: 2rem;
  --header-bar-inset: 1rem;
  background-color: var(--color-background-lightest);
  box-shadow: 0 1px 5px #444444;
}
*/

.main-navigation {
  font-size: 1.3rem;
  font-weight: 600;

  margin: 0;
  padding: 0;
}

.main-navigation__items {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 2rem;
  flex-wrap: wrap;

  margin: 0;
  padding: 0;
}

.main-navigation__item {
  position: relative;
  margin: 0;
  padding: 0;
  color: black;
}

/* Animated horizontal line under main nav entries */
.main-navigation__item:before {
  content: "";
  position: absolute;
  width: 100%;
  height: 0.15em;
  bottom: -0.2em;
  left: 0;
  background: var(--color-accent);
  visibility: visible;
  transform: scale(0);
  transition: 0.2s linear;  
}

/* no line under contact "button" */
.main-navigation__item:not(:has(.main-navigation__cta)):hover:before {
  visibility: visible;
  transform: scaleX(1.1);
  cursor: pointer;
}

.main-navigation__item:hover .sub-navigation__items  {
  visibility: visible;
  opacity: 1;
}


/* Untermenü */
.sub-navigation__items {
  position: absolute;
  top: 35px;
  left: -5px;
  z-index: 2;
  visibility: hidden;
  list-style: none;
  background-color: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  border-radius: 0 0 4px 4px;
  opacity: 0;
  line-height: 2em;
  border-radius: 5px;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;  
  transition: all 0.3s ease;
  padding: 0;
  margin: 0;
}

.sub-navigation__item {
  border-bottom: 1px solid #aaa;
  padding: 0 2em 0 1em;
  margin: 0;
  font-size: 1.1rem;
  white-space: nowrap;
}

.sub-navigation__item:hover{
  color: orange;
}

/* Kontakt */

.main-navigation__cta {
  padding: 0.3rem 1rem;
  background: var(--color-accent);
  border-radius: 5px;
  color: var(--color-text-on-surface);
  font-weight: bold;
}


.main-navigation__cta:hover {
  background: var(--color-accent-light);
}


/* ----------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------- */

 *,
 *::before,
*::after {
  border: 0px solid red; 
 }


.hero {
  position: relative;
  grid-column: full-width;
  margin-bottom: 4vw;
  padding-block: 3rem 1rem;
  overflow-x: clip;
  overflow-y: visible;
  color: var(--color-primary-lighter);
}

.hero::before,
.hero::after {
  content: '';
  width: 120%;
  left: 50%;
  translate: -50%;
  rotate: -5deg;
}

.hero::before {
  position: absolute;
  height: 200%;
  grid-row: 1 / span 2;
  bottom: 0;
  background-color: var(--color-background-lightest);
}

.hero::after {
  content: '';
  position: relative;
  grid-column: full-width;
  display: block;
  height: min(3vw, 3.2rem);
  background-color: var(--color-surface);
  grid-row: 2;
  z-index: 1;
}

.hero__heading {
  margin-top: 0;
  font-size: clamp(1.2rem, 1.2rem + 0.75vw, 2rem);
}

.hero__intro {
  font-size: clamp(1rem, 1rem + 0.75vw, 1.7rem);
  font-weight: bold;
  color: var(--color-logo-top);
  max-width: 50ch;
}

.hero__heading-line-1,
.hero__heading-line-2 {
  font-family: 'Noto Sans', sans-serif;
  font-weight: bold;
  font-size: 30px;
  display: block;
  text-transform: uppercase;
}

.hero__heading-line-1 {
  margin-bottom: 0.2em;
  letter-spacing: 0.03em;
}

.hero__heading-line-2 {
  font-size: 1.6em;
  color: var(--color-logo-bottom);
}

.hero__image {
  width: 100%;
  height: auto;
}

.hero__content {
  position: relative;
  display: grid;
  gap: 2rem 0.5rem;
  z-index: 2;
}

@media screen and (max-width: 680px) {
  .hero__image-wrapper {
    max-width: 10rem;
    margin-inline: auto;
    margin-bottom: -1rem;
  }
}

@media screen and (min-width: 680px) {
  .hero__content {
    grid-template-rows: 1vw auto 2vw;
    grid-template-columns: 3fr 1fr;
    grid-template-areas:
      ". image"
      "text image"
      ". image";
  }

  .hero__image-wrapper {
    grid-area: image;
    align-self: end;
    justify-self: end;
  }

  .hero__text {
    grid-area: text;
    align-self: center;
  }
}

@media screen and (min-width: 1024px) {
  .hero__image-wrapper {
    max-width: 25rem;
  }

  .hero__content {
    grid-template-columns: 2fr 1fr;
  }
}

@media screen and (min-width: 1280px) {

  .hero__content {
    grid-template-columns: 2fr 1fr;
  }
}


/* ----------------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------------- */

.section-heading {
  margin-top: 1em;
  margin-bottom: 1.3em;
  font-size: clamp(1.5rem, 1.5rem + 1vw, 3rem);
  color: var(--color-primary);
  text-align: center;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: max(1rem, 2vw);
}

.card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: 1.5rem;
  padding: 2rem 2.5rem 1rem 2.5rem;
  background-color: #fff;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 0 2px 0 rgba(0,0,0,0.2);
}

.card:hover {
  box-shadow: 0 0 4px 1px rgba(0,0,0,0.4);
}

.card__image-wrapper {
  width: auto;
  aspect-ratio: 1;
  max-width: 8rem;
  margin-inline: auto;
}

.card__image {
  object-fit: contain;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card__heading {
  margin-block: 1.5rem 1.2rem;
  font-weight: normaL;
  font-size: 1.5rem;
  text-align: center;
}

.card__heading::after {
  content: '';
  display: block;
  height: 3px;
  width: 30%;
  margin-inline: auto;
  margin-top: 1.5rem;
  background-color: var(--color-primary-lighter);
}


/* ---------------------------------------------------------------- */
/*                                Home                              */
/* ---------------------------------------------------------------- */

.titleimage {
  width: 100%;
}

.sectionheader {
  padding: 1em 0 0.5em 0;
  text-align: center;
  font-size: 38pt;
  color: var(--color-primary);
  font-weight: 700;
}

.rocket.in-view {
  animation-duration: 3s;
  animation-delay: 1s;
  animation-name: rocket-takeoff;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}

@keyframes rocket-takeoff {
  0% {
    transform: rotate(0deg);
    translate: 0 0px;
  }
  100% {
    transform: rotate(45deg);
    translate: 50px -80px;
  }
}



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

.site-footer {
  margin-top: auto;
}

.site-footer__bar {
  margin-top: 5rem;
  padding-block: 1.5rem;
  background-color: var(--color-surface);
  color: var(--color-text-on-surface);
  border-top: 5px solid var(--color-accent);
}

.site-footer__content {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.meta-navigation__items {
  --meta-navigation-gap: 0.5rem;

  display: flex;
  gap: var(--meta-navigation-gap);
  justify-content: right;
  margin: 0;
  padding: 0;
}

.meta-navigation__item {
  margin: 0;
  padding: 0;
}

.meta-navigation__item:not(:first-child)::before {
  content: '|';
  margin-right: var(--meta-navigation-gap);
}

.meta-navigation__link {
  color: inherit;
  transition: color 0.2s linear;
}

.meta-navigation__link:hover {
  color: var(--color-accent);
}


