/* ==========================================================================
   H2 Think — Corporate Website
   ========================================================================== */

:root {
  --c-navy: #04283F;
  --c-blue: #0A4A73;
  --c-ink: #0F100A;

  --c-bg: #ffffff;
  --c-bg-alt: #F3F7F9;
  --c-border: #E1E8EC;
  --c-muted: #4C5B63;

  --font-head: 'Raleway', 'Segoe UI', sans-serif;
  --font-body: 'Open Sans', 'Segoe UI', sans-serif;

  --logo-h: clamp(96px, 9vw, 198px);
  --nav-font: calc(var(--logo-h) * 117.333 / 720);
  --header-h: calc(var(--nav-font) + 56px);
  --sidebar-w: calc(100vh * 720 / 1280);
  --max-w: 1140px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  overflow-x: hidden;
}

body {
  margin: 0;
  margin-right: var(--sidebar-w);
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--c-navy);
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.25;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 96px 0;
  scroll-margin-top: var(--header-h);
}

section:nth-of-type(even) { background: var(--c-bg-alt); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-blue);
  margin-bottom: 14px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
}

.section-head p {
  color: var(--c-muted);
  font-size: 17px;
  margin: 0;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: var(--sidebar-w);
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-border);
  z-index: 1000;
}

.header-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 32px;
}

/* The brand logo lives in a persistent fixed badge on the left (.side-logo-left)
   on desktop; this in-header version only reappears on mobile. */
.brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-right: 40px;
  flex-shrink: 0;
}

.brand img {
  height: var(--logo-h);
  width: auto;
}

.main-nav {
  flex-shrink: 0;
}

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

.side-logo-left {
  position: fixed;
  left: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: block;
}

.side-logo-left img {
  height: var(--logo-h);
  width: auto;
  display: block;
}

.side-bar-right {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  z-index: 900;
}

.side-bar-right__art {
  height: 100%;
  width: auto;
  display: block;
}

.side-bar-right__logo {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: auto;
}

.main-nav a {
  display: inline-block;
  padding: 10px 16px;
  color: var(--c-navy);
  font-family: var(--font-head);
  font-weight: 600;
  /* Matches the rendered size of the "H2 Think" wordmark inside the logo
     (117.333 user units tall in the logo's native 1280x720 artwork). */
  font-size: var(--nav-font);
  letter-spacing: 0.02em;
  border-radius: 4px;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.main-nav a:hover {
  color: var(--c-blue);
  background: var(--c-bg-alt);
}

.main-nav a.active {
  color: var(--c-blue);
}

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

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--c-navy);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

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

#start {
  padding-top: calc(var(--header-h) + 96px);
  background: var(--c-bg);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: 0.01em;
}

.hero .lead {
  font-size: 18px;
  color: var(--c-muted);
  margin-bottom: 28px;
}

.hero .logo-mark {
  display: flex;
  justify-content: center;
}

.hero .logo-mark img {
  max-width: 640px;
}

.about-copy p { margin: 0 0 1.1em; }
.about-copy p:last-child { margin-bottom: 0; }

/* -------------------------------------------------------------- Projects */

.project-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 36px 40px;
}

section:nth-of-type(even) .project-card { background: var(--c-bg); }

.project-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.status {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.status--running {
  background: rgba(10, 74, 115, 0.1);
  color: var(--c-blue);
}

.status--past {
  background: rgba(15, 16, 10, 0.07);
  color: var(--c-muted);
}

.status--proposed {
  background: rgba(4, 40, 63, 0.08);
  color: var(--c-navy);
}

.project-card__period {
  font-size: 14px;
  color: var(--c-muted);
}

.project-card h3 {
  font-size: 22px;
  margin-bottom: 4px;
}

.project-card__partner {
  font-size: 14px;
  color: var(--c-muted);
  margin-bottom: 16px;
  font-style: italic;
}

.project-card p {
  margin: 0 0 12px;
  color: var(--c-ink);
}

.project-card p:last-child { margin-bottom: 0; }

.project-card__result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--c-border);
}

.project-card__result strong {
  color: var(--c-navy);
}

.project-card__layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.project-card__note {
  font-size: 14px;
  color: var(--c-muted);
  margin-top: 16px;
}

.project-card__note a {
  color: var(--c-blue);
}

.project-card__figure {
  align-self: center;
  width: 100%;
  max-width: 560px;
}

.project-card__figure img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-bg);
}

/* ------------------------------------------------------------- Downloads */

.downloads-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  background: var(--c-bg);
}

.downloads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.downloads-table th {
  text-align: left;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-blue);
  padding: 16px 28px;
  border-bottom: 1px solid var(--c-border);
  white-space: nowrap;
}

.downloads-table td {
  padding: 20px 28px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}

.downloads-table tr:last-child td {
  border-bottom: none;
}

.downloads-table td:first-child {
  font-family: var(--font-head);
  font-weight: 600;
  width: 42%;
}

.downloads-table td a {
  color: var(--c-navy);
}

.downloads-table td a:hover {
  color: var(--c-blue);
}

.downloads-table td:last-child {
  color: var(--c-muted);
}

@media (max-width: 700px) {
  .downloads-table td:first-child {
    width: auto;
  }
  .downloads-table th,
  .downloads-table td {
    padding: 14px 16px;
  }
}

/* ------------------------------------------------------------------ Team */

.team-card {
  width: 220px;
  text-align: center;
}

.team-card img {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  border: 3px solid var(--c-bg-alt);
}

.team-card .name {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-navy);
  font-size: 17px;
}

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

.kontakt-layout {
  display: flex;
  gap: 56px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 780px;
  flex: 1 1 480px;
}

.contact-item h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-blue);
  margin-bottom: 10px;
}

.contact-item p {
  margin: 0;
  color: var(--c-ink);
}

/* ------------------------------------------------------------- Impressum */

.legal {
  max-width: 820px;
}

.legal h3 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-blue);
  margin-top: 0;
}

.legal-block {
  margin-bottom: 20px;
}

.legal p, .legal li {
  font-size: 15px;
  color: var(--c-muted);
}

.legal-notice {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 32px 36px;
  margin-bottom: 48px;
}

.legal-notice p { color: var(--c-ink); }

details.legal-section {
  border-bottom: 1px solid var(--c-border);
  padding: 18px 0;
}

details.legal-section summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--c-navy);
  font-size: 16px;
  list-style: none;
}

details.legal-section summary::-webkit-details-marker { display: none; }

details.legal-section summary::before {
  content: '+ ';
  color: var(--c-blue);
}

details.legal-section[open] summary::before {
  content: '\2212 ';
}

details.legal-section .legal-body {
  margin-top: 16px;
}

details.legal-section h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--c-navy);
  margin: 18px 0 6px;
}

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

.site-footer {
  background: var(--c-navy);
  color: #cfe0ea;
  padding: 40px 0;
  font-size: 14px;
}

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

.site-footer a { color: #ffffff; }

/* ------------------------------------------------------------------ Utils */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------- Mobile */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero .logo-mark { order: -1; }
  .hero .logo-mark img { max-width: 200px; }

  .header-inner { padding-left: 20px; }

  .site-header { right: 0; }
  body { margin-right: 0; }
  .brand { display: flex; }
  .side-logo-left,
  .side-bar-right { display: none; }

  .nav-toggle { display: flex; }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--c-border);
    padding-top: var(--header-h);
    transform: translateY(-100%);
    transition: transform 0.25s ease;
  }

  .main-nav.open { transform: translateY(0); }

  .main-nav ul {
    flex-direction: column;
    padding: 12px 24px 24px;
    gap: 4px;
  }

  .main-nav a { display: block; padding: 12px 8px; font-size: 18px; }

  section { padding: 64px 0; }
  .project-card { padding: 28px 24px; }

  .project-card__figure { max-width: 100%; }

  .kontakt-layout { gap: 32px; }
}

@media (max-width: 520px) {
  .container { padding: 0 20px; }
  .legal-notice { padding: 24px; }
}
