/* ==========================================================================
   cygos GmbH – Corporate Website Stylesheet
   ========================================================================== */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Custom Properties ---------- */
:root {
  --color-primary: #0d2137;
  --color-primary-light: #163350;
  --color-accent: #fe4600;
  --color-accent-hover: #e53e00;
  --color-bg: #ffffff;
  --color-bg-alt: #f0f4f8;
  --color-bg-dark: #0a1929;
  --color-text: #334155;
  --color-text-light: #64748b;
  --color-border: #e2e8f0;
  --font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Roboto, sans-serif;
  --max-width: 1100px;
  --header-height: 80px;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--color-accent-hover);
}

ul,
ol {
  list-style: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-primary);
  height: var(--header-height);
  display: flex;
  align-items: center;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__logo img {
  height: 50px;
  width: auto;
}

.site-header__logo span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 400;
  display: none;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  color: #ffffff;
  border-bottom-color: var(--color-accent);
}

/* Mobile menu toggle – CSS-only checkbox hack (no JavaScript, CSP-compliant) */
.menu-toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.menu-toggle {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger animation when open */
.menu-toggle-input:checked ~ .menu-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle-input:checked ~ .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-toggle-input:checked ~ .menu-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-bg-dark) 100%);
  color: #ffffff;
  padding: 7rem 0 6rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/banner.jpg') center/cover no-repeat;
  opacity: 0.1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--color-bg), transparent);
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.85;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero__accent {
  color: var(--color-accent);
}

/* ---------- Sections ---------- */
.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section__title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
}

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

.section__title--center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ---------- About ---------- */
.about__text {
  font-size: 1.05rem;
  max-width: 720px;
  line-height: 1.8;
  color: var(--color-text);
}

.about__roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.about__role {
  background: var(--color-bg);
  color: var(--color-primary);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
  border-left: 3px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.about__role:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ---------- Badges / Certifications ---------- */
.badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
}

.badge {
  text-align: center;
  background: var(--color-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.badge:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.badge img {
  max-height: 140px;
  width: auto;
  margin: 0 auto;
}

.badge__label {
  display: block;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--color-text-light);
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ---------- Legal Pages (Impressum, Datenschutz) ---------- */
.legal {
  padding: 4rem 0;
  min-height: calc(100vh - var(--header-height) - 120px);
}

.legal h1 {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-accent);
}

.legal h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal h3 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal p {
  margin-bottom: 1rem;
}

.legal ul {
  list-style: disc;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal li {
  margin-bottom: 0.35rem;
}

.legal address {
  font-style: normal;
  line-height: 1.8;
}

.legal strong {
  color: var(--color-primary);
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal pre {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.legal code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.legal p code {
  background: var(--color-bg-alt);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.5);
  padding: 2rem 0;
  font-size: 0.82rem;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: #ffffff;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 1.5rem 2rem;
    gap: 1rem;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  /* CSS-only menu open state */
  .menu-toggle-input:checked ~ .main-nav {
    transform: translateY(0);
  }

  .site-header__logo span {
    display: none;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .about__roles {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .badges {
    gap: 1.5rem;
  }

  .badge {
    padding: 1.5rem;
  }

  .badge img {
    max-height: 100px;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 769px) {
  .site-header__logo span {
    display: inline;
  }
}
