/* ---------------------------------------------------------------
   Netresearch Group — brand-compliant stylesheet
   Colors, typography and spacing follow the Netresearch Brand Guidelines.
--------------------------------------------------------------- */

:root {
  /* Brand colors (canonical --nr-* tokens from the Netresearch brand guide).
     #2F99A4 / #FF4D00 are 3.4:1 on white: surfaces, borders and display type only.
     Text and filled controls under white text use the -text / -fill values. */
  --nr-primary: #2F99A4;
  --nr-primary-fill: #257880;
  --nr-primary-text: #15585E;
  --nr-primary-deep: #0A5057;
  --nr-primary-soft: rgba(47, 153, 164, 0.08);
  --nr-accent: #FF4D00;
  --nr-accent-dark: #CC3D00;
  --nr-accent-text: #9A2E00;
  --nr-text: #585961;
  --nr-text-secondary: #6E6F78;
  --nr-bg: #FFFFFF;
  --nr-bg-alt: #F5F5F5;
  --nr-border: #CCCDCC;
  --nr-border-strong: #8A8B93;
  --nr-border-light: #E5E5E5;

  /* Typography */
  --font-headline: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing scale */
  --sp-xs: 8px;
  --sp-sm: 12px;
  --sp-md: 16px;
  --sp-lg: 24px;
  --sp-xl: 32px;
  --sp-2xl: 48px;
  --sp-3xl: 64px;
  --sp-4xl: 96px;

  /* Radii and shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(47, 153, 164, 0.18);
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--nr-text);
  background: var(--nr-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  color: var(--nr-text);
  line-height: 1.2;
  margin: 0 0 var(--sp-md);
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.3px; margin-bottom: var(--sp-lg); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); font-weight: 600; }
h4 { font-size: 1.125rem; font-weight: 600; }

p { margin: 0 0 var(--sp-md); }

a {
  color: var(--nr-primary-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

a:hover,
a:focus-visible {
  color: var(--nr-primary-deep);
  border-bottom-color: currentColor;
  outline: none;
}

a:focus-visible {
  outline: 2px solid var(--nr-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --------------------------------------------------------------- */
/* Layout                                                           */
/* --------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

.section {
  padding: var(--sp-4xl) 0;
}

.section--tight { padding: var(--sp-3xl) 0; }
.section--alt { background: var(--nr-bg-alt); }
.section--dark {
  background: linear-gradient(135deg, var(--nr-primary-fill) 0%, var(--nr-primary-text) 100%);
  color: #fff;
}
.section--dark h2,
.section--dark h3,
.section--dark p,
.section--dark .eyebrow { color: #fff; }

.section-head {
  max-width: 740px;
  margin: 0 auto var(--sp-2xl);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-headline);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--nr-primary-text);
  margin-bottom: var(--sp-md);
}

.lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--nr-text);
  max-width: 60ch;
}

/* --------------------------------------------------------------- */
/* Navigation                                                       */
/* --------------------------------------------------------------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--nr-border-light);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-lg);
  padding: var(--sp-md) var(--sp-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--font-headline);
  font-weight: 700;
  color: var(--nr-text);
  border-bottom: none;
  font-size: 1.05rem;
}
.brand:hover { color: var(--nr-primary-text); border-bottom: none; }
.brand .logo { width: 48px; height: 48px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-family: var(--font-headline);
  font-size: 0.95rem;
  color: var(--nr-text);
  border-bottom: none;
  padding: 6px 2px;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--nr-primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s ease;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--nr-primary-text);
  border-bottom: none;
}
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

.lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--nr-bg-alt);
  border-radius: 999px;
  font-size: 0.8rem;
  font-family: var(--font-headline);
}
.lang-switch a {
  border-bottom: none;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--nr-text);
  font-weight: 600;
}
.lang-switch a.is-active {
  background: var(--nr-primary-fill);
  color: #fff;
}
.lang-switch a:hover:not(.is-active) {
  background: #fff;
  color: var(--nr-primary-text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--nr-text);
  display: block;
  transition: transform .2s ease;
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    padding: var(--sp-md) var(--sp-lg);
    border-bottom: 1px solid var(--nr-border-light);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease, padding .25s ease;
  }
  .nav-menu[data-open="true"] {
    max-height: 480px;
    padding: var(--sp-lg);
  }
  .nav-menu li { padding: var(--sp-xs) 0; border-bottom: 1px solid var(--nr-border-light); }
  .nav-menu li:last-child { border-bottom: 0; }
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 10vw, 140px) 0 clamp(80px, 12vw, 160px);
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(47, 153, 164, 0.18), transparent 60%),
    radial-gradient(700px 420px at -10% 100%, rgba(255, 77, 0, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f4f8f9 100%);
}

.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(47,153,164,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47,153,164,0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 60% 40%, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-lg);
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-xl); }
}

.hero h1 {
  color: var(--nr-text);
}
.hero h1 .highlight {
  color: var(--nr-primary-fill);
  position: relative;
  white-space: nowrap;
}
.hero h1 .highlight::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 10px;
  background: var(--nr-accent);
  opacity: 0.18;
  z-index: -1;
  transform: skewX(-6deg);
}

.hero .lead { margin-top: var(--sp-md); font-size: 1.2rem; max-width: 52ch; }

.hero-cta {
  margin-top: var(--sp-xl);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

/* --------------------------------------------------------------- */
/* Buttons                                                          */
/* --------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.3px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:focus-visible { outline: 2px solid var(--nr-primary-text); outline-offset: 3px; }

.btn--primary {
  background: var(--nr-primary-fill);
  color: #fff;
}
.btn--primary:hover {
  background: var(--nr-primary-text);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(47, 153, 164, 0.30);
  border-color: transparent;
}

.btn--accent {
  background: var(--nr-accent-dark);
  color: #fff;
}
.btn--accent:hover {
  background: var(--nr-accent-text);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 77, 0, 0.30);
  border-color: transparent;
}

.btn--ghost {
  background: transparent;
  color: var(--nr-primary-text);
  border-color: var(--nr-primary);
}
.btn--ghost:hover {
  background: var(--nr-primary-fill);
  border-color: var(--nr-primary-fill);
  color: #fff;
}

.btn--on-dark {
  background: #fff;
  color: var(--nr-primary-text);
}
.btn--on-dark:hover { background: var(--nr-primary-deep); color: #fff; }

.btn-arrow { transition: transform .2s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

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

.hero-portrait {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 400px;
}
.hero-portrait img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border-bottom: 4px solid var(--nr-primary);
  box-shadow: var(--shadow-lg);
}
.hero-portrait figcaption {
  margin-top: var(--sp-md);
  font-size: 0.92rem;
  color: var(--nr-text-secondary);
}
.hero-portrait figcaption strong {
  display: block;
  font-family: var(--font-headline);
  font-size: 1.05rem;
  color: var(--nr-text);
}
@media (max-width: 900px) {
  .hero-portrait { justify-self: start; max-width: 320px; }
}

/* --------------------------------------------------------------- */
/* Founder                                                          */
/* --------------------------------------------------------------- */

.founder { max-width: 820px; }
.founder-story p { max-width: 62ch; }
.side-note {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--nr-border-light);
  font-size: 0.92rem;
  color: var(--nr-text-secondary);
}

/* --------------------------------------------------------------- */
/* Company timeline: every company gets the same weight             */
/* --------------------------------------------------------------- */

.timeline {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 820px;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 8px; bottom: 8px;
  left: 87px;
  width: 2px;
  background: var(--nr-border);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--sp-xl);
  padding: var(--sp-md) 0;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 82px; top: 24px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--nr-primary);
}
.timeline li.timeline-now::before { background: var(--nr-primary); }
.timeline-year {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--nr-primary-text);
  text-align: right;
  padding-top: 12px;
}
.timeline h3 { font-size: 1.15rem; margin-bottom: 4px; padding-top: 10px; }
.timeline p { margin: 0; color: var(--nr-text); }
@media (max-width: 560px) {
  .timeline::before { left: 5px; }
  .timeline li { grid-template-columns: 1fr; gap: 0; padding-left: var(--sp-xl); }
  .timeline li::before { left: 0; top: 26px; }
  .timeline-year { text-align: left; }
}

/* --------------------------------------------------------------- */
/* What's next / contact                                            */
/* --------------------------------------------------------------- */

.next { max-width: 820px; }
.next h2 { max-width: 22ch; }
.next p { max-width: 62ch; font-size: 1.1rem; }

.contact { text-align: center; }
.contact .lead { margin-bottom: var(--sp-xl); }

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

.footer {
  background: var(--nr-text);
  color: #fff;
  padding: var(--sp-3xl) 0 var(--sp-lg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
  font-family: var(--font-headline);
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: var(--sp-md);
  letter-spacing: 0.04em;
}
/* Anthracite is 6.96:1 under white; keep footer text near-white to stay above 4.5:1. */
.footer p, .footer li { color: rgba(255,255,255,0.9); font-size: 0.92rem; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: var(--sp-xs); }
.footer a { color: #fff; border-bottom: none; }
.footer a:hover,
.footer a:focus-visible { color: #fff; border-bottom: 1px solid currentColor; }
.footer a:focus-visible { outline-color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-md);
  padding-top: var(--sp-lg);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.85);
}
.footer-bottom a { color: inherit; }
.footer-brand {
  color: #fff;
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 1.1rem;
}

/* --------------------------------------------------------------- */
/* Doc pages (imprint / privacy)                                    */
/* --------------------------------------------------------------- */

.doc {
  padding: var(--sp-3xl) 0;
  max-width: 820px;
}
.doc h1 { margin-bottom: var(--sp-lg); }
.doc h2 { margin-top: var(--sp-2xl); font-size: 1.5rem; }
.doc h3 { margin-top: var(--sp-xl); font-size: 1.15rem; }
.doc p, .doc li { font-size: 1rem; }
.doc .placeholder {
  display: inline-block;
  background: rgba(255, 77, 0, 0.08);
  border: 1px dashed var(--nr-accent);
  color: var(--nr-accent-text);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.92em;
}
.doc .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--sp-lg);
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 0.95rem;
}
.doc .back-link::before { content: '←'; }

/* --------------------------------------------------------------- */
/* Utilities                                                        */
/* --------------------------------------------------------------- */

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

.skip-link {
  position: absolute;
  top: -60px; left: 12px;
  background: var(--nr-primary-fill);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border-bottom: none;
  z-index: 200;
  transition: top .2s ease;
  font-family: var(--font-headline);
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------- */
/* 404                                                              */
/* --------------------------------------------------------------- */

.not-found { padding: var(--sp-4xl) 0; }
.not-found .container { max-width: 760px; }
.broken-link {
  width: 100%;
  max-width: 320px;
  margin-bottom: var(--sp-2xl);
}
.broken-link circle { fill: var(--nr-primary); }
.broken-link path {
  fill: none;
  stroke: var(--nr-primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.not-found h1 { margin-bottom: var(--sp-lg); }
.not-found-de {
  margin-top: var(--sp-3xl);
  padding-top: var(--sp-2xl);
  border-top: 1px solid var(--nr-border-light);
}
.not-found-de h2 { font-size: 1.5rem; }
