/* ==========================================================================
   Qfab.Solar — Corporate Website Stylesheet
   Design tokens: Ink / Slate / Signal Orange / Paper / Mist / Steel
   Display face: Archivo · Body face: Inter · Utility face: IBM Plex Mono
   ========================================================================== */

/* Fonts are loaded via <link> tags in the document <head> (see html files)
   for faster, non-render-blocking delivery. */

:root{
  /* --- Color tokens --- */
  --color-ink:        #15191D;   /* primary text — near-black */
  --color-ink-soft:    #4B535A;  /* secondary text */
  --color-slate:       #465665;  /* brand dark (from wordmark) */
  --color-orange:      #EB601B;  /* brand accent (from wordmark) */
  --color-orange-dark: #C24E15;  /* hover / active state */
  --color-paper:       #FFFFFF;  /* primary background */
  --color-mist:        #F5F6F7;  /* secondary background band */
  --color-steel:       #E1E5E8;  /* borders / hairlines */
  --color-steel-dark:  #C7CED3;  /* stronger borders, form fields */

  /* --- Type scale --- */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  /* --- Layout --- */
  --container-max: 1120px;
  --container-narrow: 880px;
  --radius-sm: 3px;
  --gutter: clamp(20px, 5vw, 48px);
}

/* --- Reset --- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img{ max-width: 100%; display: block; }
a{ color: var(--color-orange-dark); text-decoration: none; }
a:hover{ text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible{
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}
h1, h2, h3, h4{
  font-family: var(--font-display);
  color: var(--color-ink);
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
p{ margin: 0 0 1.1em; color: var(--color-ink); }
ul, ol{ margin: 0 0 1.1em; padding-left: 1.3em; }
li{ margin-bottom: 0.45em; }

.container{
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow{ max-width: var(--container-narrow); }

/* --- Signature element: the rail mark ---
   A short orange rule that opens every major heading — a visual echo of a
   single length of rail, tying the layout back to the track-integrated
   product itself. */
.rail-mark{
  display: block;
  width: 52px;
  height: 4px;
  background: var(--color-orange);
  margin-bottom: 18px;
  border-radius: 2px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter);
  background: var(--color-paper);
  border-bottom: 1px solid var(--color-steel);
}
.site-header__logo-link{ display: inline-flex; line-height: 0; flex-shrink: 0; }
.site-header__logo{
  width: 220px;
  min-width: 220px;
  height: auto;
}
@media (min-width: 900px){
  .site-header__logo{ width: 240px; min-width: 240px; }
}
@media (max-width: 380px){
  .site-header{ padding-inline: 10px; gap: 6px; }
  .lang-switch{ padding: 2px; }
  .lang-switch__option{ padding: 4px 6px; font-size: 10px; }
}

/* Language switcher */
.lang-switch{
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-steel-dark);
  border-radius: 999px;
  padding: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.lang-switch__option{
  display: inline-block;
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--color-ink-soft);
  text-decoration: none;
}
a.lang-switch__option:hover{
  text-decoration: none;
  color: var(--color-ink);
  background: var(--color-mist);
}
.lang-switch__option[aria-current="true"]{
  background: var(--color-ink);
  color: var(--color-paper);
  cursor: default;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  padding-top: clamp(40px, 6vw, 76px);
  padding-bottom: clamp(32px, 5vw, 56px);
}
.hero h1{
  font-size: clamp(1.9rem, 3.4vw + 1rem, 3.1rem);
  font-weight: 800;
  max-width: 26ch;
}

.hero__visual{
  width: 100%;
  height: auto;
  background: var(--color-mist);
}

/* ==========================================================================
   Content sections
   ========================================================================== */
.section{
  padding-block: clamp(40px, 6vw, 72px);
}
.section--mist{
  background: var(--color-mist);
}
.section h2{
  font-size: clamp(1.4rem, 1.1vw + 1.1rem, 1.9rem);
  font-weight: 800;
}
.section .lede{
  font-size: 1.05rem;
  color: var(--color-ink-soft);
  max-width: 68ch;
}
.section + .section{
  border-top: 1px solid var(--color-steel);
}

/* --- prefabPV timeline (genuine chronology: demonstrator → 2026 → 2027) --- */
.timeline{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
  position: relative;
}
.timeline::before{
  content: "";
  position: absolute;
  top: 7px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    var(--color-orange) 0 10px,
    transparent 10px 18px
  );
  z-index: 0;
}
.timeline__item{ position: relative; z-index: 1; text-align: center; }
.timeline__dot{
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-paper);
  border: 3px solid var(--color-orange);
  margin: 0 auto 16px;
}
.timeline__period{
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-orange-dark);
  text-transform: uppercase;
  display: block;
  margin-bottom: 6px;
}
.timeline__title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--color-ink);
  margin-bottom: 6px;
}
.timeline__text{
  font-size: 0.92rem;
  color: var(--color-ink-soft);
  margin: 0;
}
@media (max-width: 720px){
  .timeline{ grid-template-columns: 1fr; gap: 32px; }
  .timeline::before{ display: none; }
}

/* ==========================================================================
   Funding / compliance logos section
   White background, centered vertical stack. The three objects are
   separated by short gray rules that deliberately do NOT span the page.
   ========================================================================== */
.funding{
  background: var(--color-paper);
  border-top: 1px solid var(--color-steel);
  padding-block: clamp(40px, 6vw, 64px);
}
.funding__stack{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.funding__item{
  display: flex;
  justify-content: center;
  max-width: 100%;
}
.funding__divider{
  width: 160px;
  max-width: 50%;
  border: none;
  border-top: 1px solid var(--color-steel);
  margin: 28px 0;
}
.funding__logo{
  width: 220px;
  min-width: 220px;
  height: auto;
}
/* EFRE logo: minimum online width 500 px. On viewports too narrow for
   500 px it scales down to fit rather than overflow the page. */
.funding__logo--efre{
  width: 500px;
  min-width: 0;
  max-width: 100%;
}
.funding__link{
  font-weight: 700;
  font-size: 1rem;
}
/* EFRE logo clear space */
.funding__item:first-child{
  padding: 24px;
}
/* UWNRW badge requires a protected clear-space of >= 32px on every side */
.funding__badge-wrap{
  padding: 32px;
  display: inline-flex;
  line-height: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: var(--color-paper);
  border-top: 1px solid var(--color-steel);
  padding: 32px var(--gutter);
}
.site-footer__inner{
  max-width: var(--container-max);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.site-footer__nav{
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer__nav a{
  color: var(--color-ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
}
.site-footer__nav a:hover{ color: var(--color-orange-dark); }
.site-footer__copy{
  font-size: 0.86rem;
  color: var(--color-ink-soft);
  font-family: var(--font-mono);
  margin: 0;
}
.site-footer__copy .copyright-symbol{
  font-size: 1.25em;
  vertical-align: -0.08em;
  line-height: 1;
}
@media (max-width: 640px){
  .site-footer__inner{ flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Subpages (Impressum / Datenschutz / Haftungsausschluss)
   ========================================================================== */
.page-header{
  padding-top: clamp(36px, 5vw, 64px);
  padding-bottom: 8px;
}
.page-header__back{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  margin-bottom: 24px;
}
.page-header__back:hover{ color: var(--color-orange-dark); }
.page-header h1{
  font-size: clamp(1.7rem, 2vw + 1rem, 2.4rem);
  font-weight: 800;
}

.legal{
  padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 96px);
}
.legal-section{
  max-width: var(--container-narrow);
  padding-block: 36px;
}
.legal-section + .legal-section{
  border-top: 1px solid var(--color-steel);
}
.legal-section h2{
  font-size: 1.25rem;
  font-weight: 700;
}
.legal-section h3{
  font-size: 1.02rem;
  font-weight: 700;
  margin-top: 1.4em;
}
.legal-section p, .legal-section li{
  color: var(--color-ink-soft);
  font-size: 0.98rem;
}
.legal-section address{
  font-style: normal;
  color: var(--color-ink-soft);
  font-size: 0.98rem;
  line-height: 1.8;
}
.legal-section ul.plain{
  list-style: none;
  padding-left: 0;
}
.legal-section ul.plain li{
  padding-left: 1.6em;
  position: relative;
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.contact-layout{
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-block: clamp(24px, 4vw, 40px) clamp(56px, 8vw, 96px);
}
@media (min-width: 880px){
  .contact-layout{ grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
}
.contact-info h2{
  font-size: 1.1rem;
  font-weight: 700;
}
.contact-info address{
  font-style: normal;
  color: var(--color-ink-soft);
  line-height: 1.9;
  margin-bottom: 24px;
}
.contact-info__item{
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}
.contact-info__label{
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-orange-dark);
  margin-bottom: 4px;
}
.contact-info__value{
  color: var(--color-ink);
  font-weight: 500;
}
.contact-info__value a{ color: var(--color-ink); font-weight: 500; }
.contact-info__value a:hover{ color: var(--color-orange-dark); }

.form-field{ margin-bottom: 22px; }
.form-field label{
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--color-ink);
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field textarea{
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.98rem;
  color: var(--color-ink);
  background: var(--color-paper);
  border: 1px solid var(--color-steel-dark);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.form-field input:focus, .form-field textarea:focus{
  border-color: var(--color-orange);
}
.form-field textarea{ resize: vertical; min-height: 140px; }
.form-field--checkbox{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.form-field--checkbox input{ margin-top: 4px; flex-shrink: 0; }
.form-field--checkbox label{ font-weight: 400; font-size: 0.88rem; color: var(--color-ink-soft); margin: 0; }

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.96rem;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  background: var(--color-orange-dark);
  color: #fff;
  transition: background-color 0.15s ease;
}
.btn:hover{ background: #9E4010; color: #fff; }

.form-note{
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  margin-top: 14px;
}
.form-success{
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--color-mist);
  border-left: 3px solid var(--color-orange);
  font-size: 0.94rem;
  color: var(--color-ink);
}
.form-success.is-visible{ display: block; }
.form-error{
  display: none;
  margin-top: 20px;
  padding: 16px 18px;
  background: var(--color-mist);
  border-left: 3px solid #c0392b;
  font-size: 0.94rem;
  color: var(--color-ink);
}
.form-error.is-visible{ display: block; }
/* Honeypot: offscreen, invisible for humans, filled only by bots */
.form-field--hp{
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  .btn{ transition: none; }
}
