/* ==========================================================================
   next. — design system
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #0e2b24;
  --paper: #f6f3ee;
  --paper-dim: #ece7de;
  --accent: #c8532a;
  --accent-dim: #e9c3af;
  --line: rgba(14, 43, 36, 0.14);
  --muted: rgba(14, 43, 36, 0.62);

  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

em {
  font-style: italic;
  color: var(--accent);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--gutter);
  background: rgba(14, 43, 36, 0.92);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-header * { color: #fff; }

.logo {
  display: flex;
  align-items: center;
}

.logo-mark {
  position: relative;
  display: block;
  height: 46px;
  line-height: 0;
}
.logo-mark img {
  height: 46px;
  width: auto;
  display: block;
  border-radius: 6px;
}
/* glow layer: only the "next" lettering; ignites once on page load, then rests */
.logo-mark .logo-glow {
  position: absolute;
  inset: 0;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .logo-mark .logo-glow { animation: next-ignite 2.6s ease-out 0.3s both; }
}
@keyframes next-ignite {
  0%   { opacity: 0;   filter: blur(2px) brightness(1); }
  6%   { opacity: .55; }
  10%  { opacity: .05; }
  16%  { opacity: .85; }
  24%  { opacity: .2; }
  32%,
  60%  { opacity: 1;   filter: blur(2.6px) brightness(1.25) drop-shadow(0 0 14px rgba(255,100,60,0.85)); }
  100% { opacity: 0;   filter: blur(2px) brightness(1); }
}

.nav-primary {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-primary a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding-bottom: 4px;
}

.nav-primary a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
}

.nav-meta {
  display: flex;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
}
.nav-meta span { opacity: 0.4; }
.nav-meta a { opacity: 0.4; transition: opacity 0.15s; }
.nav-meta a:hover { opacity: 0.7; }
.nav-meta a.is-active { opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle i {
  width: 22px; height: 2px;
  background: #fff;
  display: block;
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  /* extra bottom space lifts the headline so "Mit Impact." sits over the water */
  padding: 140px var(--gutter) clamp(64px, 13vh, 150px);
  background:
    linear-gradient(180deg, rgba(14,43,36,0.08) 0%, rgba(9,26,22,0.55) 100%),
    url('../images/hero/HOME-HERO-BG.jpg') center / cover no-repeat,
    radial-gradient(120% 100% at 15% 0%, #1e4a3d 0%, #0e2b24 55%),
    linear-gradient(160deg, #123830, #071a15);
  color: #fff;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(120deg, rgba(200,83,42,0.10) 0px, rgba(200,83,42,0.10) 1px, transparent 1px, transparent 120px);
  opacity: 0.6;
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin: 0 0 24px;
  font-weight: 600;
}

.hero .hero-eyebrow {
  color: #fff;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6.4vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 28px;
  max-width: 18ch;
}

.hero-sub {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  max-width: 46ch;
  margin: 0 0 40px;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-top: 24px;
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.scroll-cue::before {
  content: '';
  width: 22px; height: 1px;
  background: rgba(255,255,255,0.55);
  animation: pulse-line 2s ease-in-out infinite;
}
@keyframes pulse-line {
  0%, 100% { width: 22px; opacity: 0.55; }
  50% { width: 34px; opacity: 1; }
}

/* ---------- page header (non-home) ---------- */

.page-hero {
  padding: 168px var(--gutter) 72px;
  background: var(--ink);
  color: #fff;
}
.page-hero .hero-eyebrow { margin-bottom: 20px; }
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
  max-width: 22ch;
}

/* consistent gap between the page title and the intro paragraph */
.page-hero > h1 { margin-bottom: 20px; }
.page-hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  max-width: 56ch;
  margin: 0;
}

/* ---------- sections ---------- */

section { padding: 108px 0; }
section.tight { padding: 72px 0; }

.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
  max-width: 20ch;
  margin: 0 0 20px;
}

.section-intro {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
}

.on-dark { background: var(--ink); color: #fff; }
.on-dark .section-intro { color: rgba(255,255,255,0.65); }
.on-dim { background: var(--paper-dim); }

/* ---------- pillars / grid cards ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 56px;
}

.pillar {
  background: var(--paper);
  padding: 40px 32px;
}

.pillar-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin: -40px -32px 24px;
}

.pillar-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pillar .num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
}

.pillar h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 18px 0 12px;
  letter-spacing: -0.01em;
}

.pillar p {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0;
}

/* ---------- work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 56px;
  background: var(--line);
}

.work-card {
  background: var(--paper);
  display: block;
  overflow: hidden;
  position: relative;
}

.work-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--grad-a, #d9784f), var(--grad-b, #8a3d1d));
  position: relative;
  overflow: hidden;
}

.work-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.08) 0 2px, transparent 2px 42px);
}

.work-tag {
  position: absolute;
  top: 20px; left: 20px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.28);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.work-body {
  padding: 28px 32px 34px;
}

.work-client {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.work-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.25;
}

.work-card--wide { grid-column: span 2; }
.work-card--wide .work-thumb { aspect-ratio: 21 / 9; }

/* ---------- anonymized cases ---------- */

.anon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.anon-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}

/* keep a linked case clear of the fixed header when jumped to via #anchor */
.anon-card[id] { scroll-margin-top: 100px; }

.anon-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin: 0 0 20px;
}
.anon-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.anon-tag {
  position: static;
  display: inline-block;
  align-self: flex-start;
  background: var(--ink);
  color: #fff;
  margin-bottom: 24px;
}

.tag-teaser {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.tag-teaser .anon-tag { margin-bottom: 0; }
.tag-teaser a.anon-tag { transition: background 0.15s ease; }
.tag-teaser a.anon-tag:hover { background: var(--accent); }

.anon-block {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.anon-block:first-of-type { border-top: none; padding-top: 0; }

.anon-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}

.anon-text {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}

.anon-block--outcome .anon-text {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.02rem;
}
.anon-block--outcome .anon-text em {
  font-style: italic;
}

/* Desktop: lay each case out horizontally — title + illustration on the left,
   then Aufgabe / Lösung / Outcome side by side. Mobile keeps the stacked layout. */
@media (min-width: 901px) {
  .anon-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .anon-card {
    display: grid;
    grid-template-columns: minmax(213px, 0.9fr) 1.2fr 1.5fr 1.2fr;
    grid-template-rows: auto 1fr;
    column-gap: 20px;
    align-items: start;
    padding: 36px 32px;
  }

  .anon-card > *:nth-child(1) {                                                    /* illustration */
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 14px;
    aspect-ratio: 1;   /* source art is square — fill the full column width */
  }
  .anon-card > *:nth-child(2) {                                                    /* title bar */
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    justify-self: center;   /* natural text width, centred under the illustration */
  }
  .anon-card > *:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }  /* Aufgabe  */
  .anon-card > *:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; }  /* Lösung   */
  .anon-card > *:nth-child(5) { grid-column: 4; grid-row: 1 / span 2; }  /* Outcome  */
  .anon-card > *:nth-child(6) { grid-column: 1 / -1; grid-row: 3; margin-top: 20px; }  /* footnote (nur PR-Case) */

  /* column separators instead of the stacked top borders */
  .anon-card > .anon-block {
    border-top: none;
    padding: 0 0 0 24px;
    border-left: 1px solid var(--line);
  }
}

.cta-band {
  padding: 96px 0;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 auto 32px;
  line-height: 1.08;
}

/* Home CTA: the sentence stays on one line (wraps only when the window is
   narrow); "Contact!" always sits on its own line and never breaks. */
.cta-band h2.cta-contact { max-width: none; }
.cta-band h2.cta-contact em { display: block; white-space: nowrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 16px 30px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.btn:hover { background: #b04a25; }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.08); }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-grid h4 {
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 18px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-grid a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-logo-mark {
  height: 38px;
  width: auto;
  display: block;
  border-radius: 5px;
}

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- utility content pages ---------- */

.prose {
  max-width: 68ch;
}
.prose p { color: var(--muted); font-size: 1.05rem; margin: 0 0 20px; }
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 40px 0 14px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 56px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}

.stat-row .stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 4.7vw, 3.6rem);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-row .stat span {
  font-size: 0.9rem;
  color: var(--muted);
}

.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
}

.founder-profile {
  display: grid;
  grid-template-columns: 338px 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 56px;
}

/* EN copy is shorter than DE, so the photo is sized down to keep its
   bottom edge aligned with the last line of bio text (DE is the reference). */
html[lang="en"] .founder-profile {
  grid-template-columns: 312px 1fr;
}

.founder-profile .person-photo {
  margin-bottom: 0;
}

.founder-bio .person-name {
  font-size: 1.6rem;
}

.founder-bio .person-role {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.6em;   /* blank line before the bio text */
}

.founder-text {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0;
}

.person-photo {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #2a4a3e, #0e2b24);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
/* decorative texture only for an empty placeholder box — hidden as soon as
   the box holds a real photo (fixed: was overlaying Max Winiger's portrait) */
.person-photo:not(:has(img))::after {
  content: '';
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.06) 0 2px, transparent 2px 42px);
}
.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
}

.person-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.person-role {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 56px;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}
.contact-detail dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.contact-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.contact-qr img {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}
.contact-qr p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 24ch;
}

.map-embed {
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  overflow: hidden;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(0.15) contrast(1.02);
}

.map-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}
.contact-detail dd {
  margin: 0;
  font-size: 1.15rem;
  font-family: var(--font-display);
  font-weight: 500;
}
.linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}
.linkedin-link:hover { text-decoration: underline; }

.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: 4px;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.required-mark { color: var(--accent); }
.form-note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}
.form-field--honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.95rem;
  margin-top: 20px;   /* sits below the submit button */
}
.form-status--ok {
  background: #e7f3ea;
  color: #1e6b34;
}
.form-status--error {
  background: #fbe9e6;
  color: var(--accent);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .nav-primary {
    display: none;
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(72vw, 320px);
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    padding: 120px 40px;
    z-index: 90;
  }
  .nav-primary.is-open { display: flex; }
  .nav-primary a { font-size: 20px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
  /* the desktop underline sits at the padding-box edge and would overlap the
     next item in the stacked menu — use colour + weight for the active item instead */
  .nav-primary a.is-active::after { display: none; }
  .nav-primary a.is-active { color: var(--accent); font-weight: 600; }
  .nav-toggle { display: flex; position: relative; z-index: 110; }
  .grid-3 { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .anon-grid { grid-template-columns: 1fr; }
  .work-card--wide { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 40px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .people-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .founder-profile { grid-template-columns: 1fr; gap: 24px; max-width: 320px; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .people-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(2rem, 9vw, 5.4rem); }
}
