/* AAN Consulting GmbH – Website-Styles
   Layout-Idee: "Prüfprotokoll" – linksbündiges, ruhiges Raster; die AAN-Signallinie
   (durchgehender Zickzack mit Schwellenbalken) ist das wiederkehrende Erkennungsmerkmal. */

@font-face { font-family: "Poppins"; src: url("../fonts/poppins-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/poppins-bold.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  /* Farbe */
  --ink: #12233A;          /* Hafen-Navy: Text, Logo, dunkle Flächen */
  --paper: #F4F6F8;        /* kühles Off-White: Seitengrund */
  --surface: #FFFFFF;      /* Karten, Formulare */
  --line: #D8DEE6;         /* Haarlinien */
  --muted: #55657A;        /* Sekundärtext */
  --signal: #E08A1E;       /* Bernstein: Schwellenbalken, Akzente */
  --signal-text: #9A5A08;  /* Akzent als Text auf hellem Grund (kontraststark) */
  --band: #12233A;         /* dunkle Bänder */
  --band-fg: #EEF2F6;
  --band-muted: #A9B6C5;
  --ok: #2E7D5B;
  --err: #B3261E;

  /* Typo */
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 2.6rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4rem);

  --radius: 6px;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8EDF2; --paper: #0C1622; --surface: #132233; --line: #263A50; --muted: #9AA9BA;
    --signal: #F0A040; --signal-text: #F3B262; --band: #08111B; --band-fg: #EEF2F6; --band-muted: #A9B6C5;
    --ok: #6FCF9F; --err: #FF8A80; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E8EDF2; --paper: #0C1622; --surface: #132233; --line: #263A50; --muted: #9AA9BA;
  --signal: #F0A040; --signal-text: #F3B262; --band: #08111B; --band-fg: #EEF2F6; --band-muted: #A9B6C5;
  --ok: #6FCF9F; --err: #FF8A80; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--step-0); line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem 1rem; z-index: 50; }
.skip:focus { left: 16px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 500; letter-spacing: 0; }
p { margin: 0; max-width: 65ch; }
.lead { font-size: var(--step-1); color: var(--muted); line-height: 1.55; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--signal-text); display: inline-flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 22px; height: 3px; border-radius: 2px; background: var(--signal); }

.wrap {
  max-width: var(--wrap); margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
section { padding-block: clamp(4rem, 3rem + 4vw, 7rem); }
.stack { display: grid; gap: 1.25rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; justify-content: center;
  font-family: var(--font-display); font-weight: 500; font-size: 1rem; text-decoration: none;
  padding: .85rem 1.4rem; border-radius: var(--radius); border: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper); cursor: pointer; transition: transform .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--signal { background: var(--signal); border-color: var(--signal); color: #1A1206; }
.btn svg { width: 18px; height: 18px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 72px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand .logo-light { display: none; } :root:not([data-theme="light"]) .brand .logo-dark { display: block; } }
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark { display: block; }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: .95rem; color: var(--ink); position: relative; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--signal); transition: right .2s; }
.nav a:not(.btn):hover::after, .nav a[aria-current="page"]::after { right: 0; }
.nav .btn { padding: .6rem 1.1rem; color: var(--paper); }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); padding: .5rem; cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem max(20px, env(safe-area-inset-right, 0px)) 1.25rem max(20px, env(safe-area-inset-left, 0px));
  }
  .nav[data-open="false"] { display: none; }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1rem; border-bottom: 0; }
}

/* Signallinie – das Erkennungsmerkmal */
.signal-line { display: flex; align-items: center; gap: 14px; color: var(--line); }
.signal-line span { flex: 1; height: 2px; background: currentColor; }
.signal-line svg { width: 46px; height: 34px; flex: none; }
.signal-line polyline { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linejoin: round; stroke-linecap: round; }
.signal-line .bar { stroke: var(--signal); stroke-width: 3.4; stroke-linecap: round; }

/* Hero */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6.5rem) clamp(3rem, 2rem + 3vw, 5rem); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center; }
.hero h1 em { font-style: normal; position: relative; white-space: nowrap; }
.hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.04em; height: .12em; background: var(--signal); border-radius: 3px; z-index: -1; }
.hero h1 { position: relative; z-index: 0; }
.hero-copy { display: grid; gap: 1.6rem; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; font-family: var(--font-mono); font-size: .82rem; color: var(--muted); margin-top: .6rem; }
.hero-facts span::before { content: "✓ "; color: var(--ok); }

/* Prüfprotokoll-Panel im Hero */
.protocol {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 30px 60px -30px rgba(18, 35, 58, .35); overflow: hidden; min-width: 0;
}
.protocol-head { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.protocol-head b { color: var(--ink); font-weight: 500; }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.protocol ol { list-style: none; margin: 0; padding: .6rem 0; font-family: var(--font-mono); font-size: .86rem; }
.protocol li { display: grid; grid-template-columns: 4.2rem 1fr auto; gap: .8rem; padding: .62rem 1.1rem; align-items: center; border-bottom: 1px dashed var(--line); }
.protocol li:last-child { border-bottom: 0; }
.protocol .id { color: var(--muted); }
.protocol .st { font-size: .74rem; padding: .15rem .5rem; border-radius: 99px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-weight: 600; letter-spacing: .04em; }
.protocol .st.run { background: color-mix(in srgb, var(--signal) 18%, transparent); color: var(--signal-text); }
.protocol-foot { padding: .9rem 1.1rem; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 60%, var(--surface)); }
.protocol-foot svg { width: 100%; height: 46px; display: block; }
.protocol-foot .trace { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.protocol-foot .thr { stroke: var(--signal); stroke-width: 2; stroke-dasharray: 5 5; }
.protocol-foot small { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-top: .35rem; }
@media (prefers-reduced-motion: no-preference) {
  .protocol li { animation: tick .5s both; }
  .protocol li:nth-child(2) { animation-delay: .15s; } .protocol li:nth-child(3) { animation-delay: .3s; }
  .protocol li:nth-child(4) { animation-delay: .45s; } .protocol li:nth-child(5) { animation-delay: .6s; }
  .protocol-foot .trace { stroke-dasharray: 800; stroke-dashoffset: 800; animation: draw 1.6s .4s ease-out forwards; }
}
@keyframes tick { from { opacity: .35; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Abschnittsköpfe */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 4rem; align-items: end; margin-bottom: 3rem; }
.section-head > div { display: grid; gap: 1rem; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* Schwerpunkte */
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.field { padding: 2rem 2rem 2.2rem 0; display: grid; gap: 1rem; align-content: start; min-width: 0; }
.field + .field { padding-left: 2rem; border-left: 1px solid var(--line); }
.field-icon { width: 44px; height: 44px; color: var(--ink); }
.field-icon .acc { stroke: var(--signal); }
.field h3 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.01em; }
.field p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .55rem; font-size: .97rem; }
.checks li { display: grid; grid-template-columns: 1.1rem 1fr; gap: .6rem; }
.checks li::before { content: ""; width: 10px; height: 3px; background: var(--signal); border-radius: 2px; margin-top: .72em; }
@media (max-width: 900px) {
  .fields { grid-template-columns: 1fr; }
  .field, .field + .field { padding: 2rem 0; border-left: 0; }
  .field + .field { border-top: 1px solid var(--line); }
}

/* Vorgehen (echte Reihenfolge → nummeriert) */
.process { background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; counter-reset: s; position: relative; }
.steps li { counter-increment: s; padding: 0 1.5rem 0 0; display: grid; gap: .7rem; align-content: start; min-width: 0; }
.steps li::before {
  content: "0" counter(s); font-family: var(--font-mono); font-size: .8rem; color: var(--signal-text);
  display: flex; align-items: center; gap: .6rem; padding-bottom: 1.1rem; margin-bottom: .3rem;
  border-bottom: 2px solid var(--ink);
}
.steps li:last-child::before { border-bottom-color: var(--signal); }
.steps p { color: var(--muted); font-size: .97rem; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 0; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { padding: 0; } }

/* Über uns */
.about .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.photo { position: relative; border-radius: 8px; overflow: hidden; background: var(--line); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38%; height: 6px; background: var(--signal); }
.principles { display: grid; gap: 1.4rem; margin-top: 1rem; }
.principle { display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem; }
.principle svg { width: 2.4rem; height: 2.4rem; color: var(--ink); }
.principle h3 { margin-bottom: .2rem; }
.principle p { color: var(--muted); font-size: .97rem; }
.leaders { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; padding-top: 1.4rem; margin-top: .4rem; border-top: 1px solid var(--line); }
.leaders div { display: grid; }
.leaders b { font-family: var(--font-display); font-weight: 500; }
.leaders span { font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
@media (max-width: 900px) { .about .wrap { grid-template-columns: 1fr; } }

/* Dunkles Band */
.band { background: var(--band); color: var(--band-fg); position: relative; overflow: hidden; }
.band .eyebrow { color: var(--signal); }
.band .lead, .band p { color: var(--band-muted); }
.band .btn { background: var(--band-fg); color: var(--band); border-color: var(--band-fg); }
.band .btn--ghost { background: transparent; color: var(--band-fg); }
.band-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 3rem; align-items: center; }
.band .signal-line { position: absolute; left: 0; right: 0; bottom: 22px; color: rgba(255, 255, 255, .16); pointer-events: none; }
.roles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid rgba(255,255,255,.18); }
.roles li { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.18); font-family: var(--font-display); font-weight: 500; }
.roles li span { font-family: var(--font-mono); font-size: .78rem; color: var(--band-muted); font-weight: 400; white-space: nowrap; }
@media (max-width: 860px) { .band-grid { grid-template-columns: 1fr; } }

/* Formulare */
.contact .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact-info { display: grid; gap: 1.5rem; }
.contact-card { display: grid; gap: .3rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.contact-card dt { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.contact-card dd { margin: 0 0 .9rem; font-family: var(--font-display); font-weight: 500; }
.contact-card dd a { text-decoration-color: var(--signal); text-underline-offset: 4px; }
@media (max-width: 900px) { .contact .wrap { grid-template-columns: 1fr; } }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.4rem, 3vw, 2.4rem); display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.fld { display: grid; gap: .4rem; min-width: 0; }
.fld label, .fld legend { font-family: var(--font-display); font-weight: 500; font-size: .92rem; }
.fld .opt { font-family: var(--font-body); font-weight: 400; color: var(--muted); font-size: .85rem; }
.fld input, .fld select, .fld textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; transition: border-color .15s, background .15s;
}
.fld textarea { min-height: 150px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--ink); background: var(--surface); }
.fld input[type="file"] { padding: .6rem; background: var(--surface); border-style: dashed; cursor: pointer; }
.fld .hint { font-size: .84rem; color: var(--muted); }
.consent { display: grid; grid-template-columns: 1.2rem 1fr; gap: .7rem; font-size: .9rem; color: var(--muted); align-items: start; }
.consent input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; accent-color: var(--ink); }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .95rem; padding: .8rem 1rem; border-radius: var(--radius); }
.form-status.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.form-status.err { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.form .btn { justify-self: start; }

/* Unterseiten */
.page-hero { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) 2.5rem; }
.page-hero .wrap { display: grid; gap: 1.2rem; }
.legal { padding-block: 1rem 6rem; }
.legal .wrap { max-width: 860px; }
.legal h2 { font-size: var(--step-2); margin: 2.6rem 0 .8rem; }
.legal h3 { font-size: var(--step-1); margin: 1.8rem 0 .5rem; }
.legal p, .legal li { color: var(--ink); margin-bottom: .8rem; }
.legal ul { padding-left: 1.2rem; }
.legal address { font-style: normal; line-height: 1.7; margin-bottom: 1rem; }
.todo { background: color-mix(in srgb, var(--signal) 22%, transparent); padding: 0 .3rem; border-radius: 3px; font-family: var(--font-mono); font-size: .9em; }

.career-intro .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2rem; margin-top: 1.4rem; }
.perks div { display: grid; gap: .3rem; padding-top: 1rem; border-top: 2px solid var(--ink); }
.perks p { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .career-intro .wrap { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .perks { grid-template-columns: 1fr; } }
.role-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
.role { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 1.6rem; display: grid; gap: .7rem; align-content: start; }
.role .tag { font-family: var(--font-mono); font-size: .75rem; color: var(--signal-text); letter-spacing: .06em; }
.role p { color: var(--muted); font-size: .96rem; }
@media (max-width: 760px) { .role-grid { grid-template-columns: 1fr; } }
.apply .wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
@media (max-width: 900px) { .apply .wrap { grid-template-columns: 1fr; } }

/* Danke / 404 */
.notice { min-height: 55vh; display: grid; align-items: center; }
.notice .wrap { display: grid; gap: 1.3rem; justify-items: start; }

/* Footer */
.site-footer { background: var(--band); color: var(--band-muted); padding-block: 4rem 2.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.site-footer h4 { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--band-fg); font-weight: 500; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.site-footer a { color: var(--band-muted); text-decoration: none; }
.site-footer a:hover { color: var(--band-fg); }
.site-footer address { font-style: normal; line-height: 1.7; }
.footer-logo { height: 40px; width: auto; margin-bottom: 1.2rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.14); font-family: var(--font-mono); font-size: .78rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 520px) {
  .protocol li { grid-template-columns: 3.3rem minmax(0, 1fr) auto; gap: .5rem; padding: .55rem .8rem; font-size: .8rem; }
  .protocol-head, .protocol-foot { padding-inline: .8rem; }
  .hero h1 em { white-space: normal; }
  .hero-actions .btn { flex: 1 1 100%; }
}
