/* ============================================================
   MATRYOSHKA — Schicht für Schicht zur Sicherheit
   Diplomarbeit HTL 3 Rennweg · 2026/27
   Zentrales Stylesheet
   ============================================================ */

/* ---------- 1. Design Tokens ---------------------------------- */
:root {
  /* Farben laut Vorgabe */
  --blau:        #1c2e6f;
  --rot:         #8a120f;
  --gold:        #c58312;   /* NUR für Akzente */

  /* Abstufungen (aus den Grundfarben abgeleitet) */
  --blau-tief:   #101c45;
  --nacht:       #070c1e;
  --nacht-2:     #0b1330;
  --rot-tief:    #5c0b09;

  /* Neutrale Töne */
  --bone:        #efe9df;
  --bone-dim:    rgba(239, 233, 223, 0.62);
  --bone-faint:  rgba(239, 233, 223, 0.28);
  --linie:       rgba(239, 233, 223, 0.12);
  --gold-linie:  rgba(197, 131, 18, 0.38);

  /* Typografie */
  --display: "Unbounded", "Trebuchet MS", sans-serif;
  --body:    "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", "Consolas", monospace;

  /* Raster */
  --breite:  1180px;
  --rand:    clamp(20px, 5vw, 56px);
  --kopf-h:  74px;
}

/* ---------- 2. Basis ------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--nacht);
  color: var(--bone);
  font-family: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

figure { margin: 0; }

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

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.14;
  margin: 0;
  letter-spacing: -0.01em;
}

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

::selection { background: var(--gold); color: var(--nacht); }

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

.container {
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--nacht);
  padding: 10px 18px;
  font-family: var(--mono);
  font-size: 12px;
  z-index: 999;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Kleine Mono-Labels ("Eyebrows") */
.label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.label--still { color: var(--bone-dim); }

/* ---------- 3. Kopfzeile -------------------------------------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--kopf-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding-inline: var(--rand);
  background: rgba(7, 12, 30, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.topbar.is-scrolled {
  background: rgba(7, 12, 30, 0.92);
  border-bottom-color: var(--linie);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand img { width: 26px; height: auto; }
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.team-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.2vw, 30px);
  margin-inline: auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.team-nav::-webkit-scrollbar { display: none; }

.team-nav a {
  position: relative;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  color: var(--bone-dim);
  white-space: nowrap;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.team-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.team-nav a:hover { color: var(--bone); }
.team-nav a:hover::after,
.team-nav a[aria-current="page"]::after { transform: scaleX(1); }
.team-nav a[aria-current="page"] { color: var(--bone); }

.imprint-link {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
  transition: color 0.25s ease;
}
.imprint-link:hover,
.imprint-link[aria-current="page"] { color: var(--gold); }

/* ---------- 4. Startseite: Hero ------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: calc(var(--kopf-h) + 40px) var(--rand) clamp(120px, 17vh, 180px);
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(28, 46, 111, 0.62) 0%, rgba(7, 12, 30, 0) 70%),
    radial-gradient(38% 34% at 50% 62%, rgba(138, 18, 15, 0.34) 0%, rgba(7, 12, 30, 0) 72%),
    var(--nacht);
}

/* Signatur: konzentrische Schichten hinter dem Logo */
.hero-rings {
  position: absolute;
  top: 50%; left: 50%;
  width: min(150vh, 165vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.5;
}
.hero-rings circle { fill: none; }
.ring-spin {
  transform-origin: 50% 50%;
  animation: spin 120s linear infinite;
}
.ring-spin--rueck { animation-duration: 190s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 26px;
}

.hero-logo {
  width: clamp(190px, 30vh, 330px);
  filter: drop-shadow(0 26px 60px rgba(0, 0, 0, 0.6));
  animation: rise 1.1s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.hero-title {
  font-size: clamp(1.95rem, 9.6vw, 7.4rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  margin: 0;
  overflow-wrap: anywhere;
  animation: rise 1.1s 0.12s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.hero-title span { color: var(--gold); }

.hero-claim {
  font-size: clamp(0.95rem, 2.2vw, 1.3rem);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone-dim);
  max-width: 42ch;
  animation: rise 1.1s 0.22s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 6px;
  animation: rise 1.1s 0.32s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.hero-meta span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

.scroll-hint {
  position: absolute;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.scroll-hint i {
  display: block;
  width: 1px; height: 44px;
  background: linear-gradient(var(--gold), transparent);
}

/* ---------- 5. Abschnitte ------------------------------------- */
.section { padding: clamp(70px, 11vw, 140px) 0; }
.section--rand { border-top: 1px solid var(--linie); }

.section-kopf {
  display: grid;
  gap: 16px;
  max-width: 62ch;
  margin-bottom: clamp(34px, 5vw, 58px);
}
.section-kopf h2 { font-size: clamp(1.7rem, 4.4vw, 3rem); }
.section-kopf p { color: var(--bone-dim); }

/* ---------- 6. Big Picture ------------------------------------ */
.bigpicture-rahmen {
  position: relative;
  border: 1px solid var(--gold-linie);
  background: #020b16;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55);
}
.bigpicture-rahmen::before,
.bigpicture-rahmen::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--gold);
  z-index: 3;
  pointer-events: none;
}
.bigpicture-rahmen::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.bigpicture-rahmen::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.bigpicture-rahmen iframe {
  display: block;
  width: 100%;
  height: clamp(480px, 80vh, 860px);
  border: 0;
}

.bigpicture-fuss {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}
.bigpicture-fuss p {
  margin: 0;
  font-size: 14px;
  color: var(--bone-dim);
  max-width: 62ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.28s ease, color 0.28s ease;
}
.btn:hover { background: var(--gold); color: var(--nacht); }

/* ---------- 7. Teamübersicht (Startseite) --------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: var(--linie);
  border: 1px solid var(--linie);
}
.team-karte {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 30px 26px 34px;
  background: var(--nacht);
  transition: background 0.3s ease;
}
.team-karte::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}
.team-karte:hover { background: var(--blau-tief); }
.team-karte:hover::after { transform: scaleX(1); }
.team-karte .rolle {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-faint);
}
.team-karte .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.12rem;
  line-height: 1.25;
}
.team-karte .thema { font-size: 14px; color: var(--bone-dim); line-height: 1.5; }

/* ---------- 8. Personenseiten --------------------------------- */
.person-hero {
  padding: calc(var(--kopf-h) + clamp(50px, 9vw, 96px)) 0 clamp(46px, 7vw, 84px);
  background:
    radial-gradient(70% 100% at 12% 0%, rgba(28, 46, 111, 0.55) 0%, rgba(7, 12, 30, 0) 68%),
    radial-gradient(48% 80% at 96% 20%, rgba(138, 18, 15, 0.26) 0%, rgba(7, 12, 30, 0) 70%);
  border-bottom: 1px solid var(--linie);
}

.person-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: clamp(30px, 5vw, 68px);
  align-items: start;
}

/* Bühne: Portrait plus rotierende Signatur-Ringe dahinter */
.portrait-buehne {
  position: relative;
  width: 100%;
}
.portrait-buehne::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 74%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(197, 131, 18, 0.24) 0%, rgba(197, 131, 18, 0) 72%);
  filter: blur(22px);
  z-index: 0;
}
.portrait-ringe {
  position: absolute;
  top: 50%; left: 50%;
  width: 142%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}
.portrait-ringe circle { fill: none; }

.portrait {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--gold-linie);
  background:
    linear-gradient(150deg, var(--blau) 0%, var(--blau-tief) 52%, var(--rot-tief) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 44px 90px -34px rgba(0, 0, 0, 0.75);
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(195deg, rgba(7, 12, 30, 0.12) 0%, rgba(7, 12, 30, 0) 30%, rgba(7, 12, 30, 0.55) 100%);
  pointer-events: none;
}
.portrait .initialen {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3rem, 8vw, 4.6rem);
  letter-spacing: 0.04em;
  color: rgba(239, 233, 223, 0.22);
}
.portrait-ecken {
  position: absolute;
  inset: -1px;
  z-index: 3;
  pointer-events: none;
}
.portrait-ecken path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  opacity: 0.85;
  vector-effect: non-scaling-stroke;
}
.portrait-marke {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 3;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--bone-dim);
  background: rgba(7, 12, 30, 0.6);
  border: 1px solid var(--gold-linie);
  padding: 4px 9px;
}
.portrait figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
  background: rgba(7, 12, 30, 0.72);
}

.person-kopf { display: grid; gap: 18px; }
.person-kopf h1 {
  font-size: clamp(2rem, 6vw, 3.6rem);
  font-weight: 900;
  letter-spacing: 0.01em;
}
.person-rolle {
  display: inline-block;
  justify-self: start;
  padding: 5px 14px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.person-schwerpunkt {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 1.4rem);
  line-height: 1.4;
  color: var(--bone-dim);
}

.datenblatt {
  margin: 8px 0 0;
  border-top: 1px solid var(--linie);
  font-size: 14.5px;
}
.datenblatt-zeile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: clamp(14px, 3vw, 32px);
  padding: 13px 4px 13px 14px;
  border-bottom: 1px solid var(--linie);
  transition: background 0.3s ease, padding-left 0.3s ease;
}
.datenblatt-zeile:hover { background: rgba(28, 46, 111, 0.18); padding-left: 22px; }
.datenblatt-zeile::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: -1px;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}
.datenblatt-zeile:hover::before { transform: scaleY(1); }
.datenblatt dt {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-faint);
  padding-top: 2px;
}
.datenblatt dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--bone);
}
.datenblatt dd a { border-bottom: 1px solid var(--gold-linie); }
.datenblatt dd a:hover { color: var(--gold); }

/* Aufgaben — gestapelte "Schichten" */
.schichten { display: grid; gap: 0; border-top: 1px solid var(--linie); }

.schicht {
  position: relative;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: clamp(14px, 3vw, 40px);
  padding: 30px 0 30px clamp(0px, 1.4vw, 18px);
  border-bottom: 1px solid var(--linie);
  transition: padding-left 0.35s ease, background 0.35s ease;
}
.schicht:hover { padding-left: clamp(10px, 2.6vw, 34px); background: rgba(28, 46, 111, 0.18); }
.schicht::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: -1px;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}
.schicht:hover::before { transform: scaleY(1); }

.schicht-kennung {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--gold);
  padding-top: 4px;
}
.schicht h3 { font-size: 1.16rem; font-weight: 700; margin-bottom: 9px; }
.schicht h3, .schicht p { max-width: 72ch; }
.schicht p { font-size: 15px; color: var(--bone-dim); margin: 0; }
.schicht--optional .schicht-kennung { color: var(--bone-faint); }

.zurueck {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: clamp(40px, 6vw, 70px);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.zurueck:hover { color: var(--gold); }

/* Nächste Person */
.naechste {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 34px 0;
  border-top: 1px solid var(--linie);
  margin-top: clamp(40px, 6vw, 70px);
}
.naechste .name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.3rem, 4vw, 2.1rem);
}
.naechste:hover .name { color: var(--gold); }

/* ---------- 9. Impressum -------------------------------------- */
.doc-hero {
  padding: calc(var(--kopf-h) + clamp(50px, 9vw, 92px)) 0 clamp(30px, 5vw, 52px);
  background: radial-gradient(65% 100% at 15% 0%, rgba(28, 46, 111, 0.5) 0%, rgba(7, 12, 30, 0) 70%);
  border-bottom: 1px solid var(--linie);
}
.doc-hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 900; margin-top: 14px; }

.section--doc { padding-top: clamp(26px, 4vw, 48px); }
.doc { padding-bottom: clamp(50px, 8vw, 96px); }
.doc-block > * { max-width: 74ch; }
.doc-block { padding: 34px 0; border-bottom: 1px solid var(--linie); }
.doc-block:last-child { border-bottom: 0; }
.doc-block h2 {
  font-size: 1.18rem;
  margin-bottom: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
}
.doc-block p, .doc-block li { color: var(--bone-dim); font-size: 15.5px; }
.doc-block ul { margin: 0 0 1em; padding-left: 20px; }
.doc-block li { margin-bottom: 6px; }
.doc-block a { border-bottom: 1px solid var(--gold-linie); }
.doc-block a:hover { color: var(--gold); }
.doc-block strong { color: var(--bone); font-weight: 600; }

.hinweis {
  margin-top: 10px;
  padding: 16px 18px;
  border: 1px dashed var(--gold-linie);
  font-size: 14px;
  color: var(--bone-dim);
}

/* ---------- 10. Fußzeile -------------------------------------- */
.footer {
  border-top: 1px solid var(--linie);
  padding: 46px 0 40px;
  background: var(--nacht);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-marke { display: flex; align-items: center; gap: 12px; }
.footer-marke img { width: 30px; }
.footer-marke span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--bone-faint);
}
.footer a:hover { color: var(--gold); }

/* ---------- 11. Einblenden beim Scrollen ---------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.25, 1);
}
.reveal.is-sichtbar { opacity: 1; transform: none; }

/* ---------- 12. Responsiv ------------------------------------- */
@media (max-width: 900px) {
  .person-grid { grid-template-columns: 1fr; }
  .portrait-buehne { max-width: 300px; margin-inline: auto; }
  .schicht { grid-template-columns: 1fr; gap: 6px; }
  .schicht-kennung { padding-top: 0; }
}

@media (max-width: 480px) {
  .datenblatt-zeile { grid-template-columns: 1fr; gap: 4px; }
}

@media (max-width: 720px) {
  :root { --kopf-h: 64px; }
  body { font-size: 16px; }
  .topbar { gap: 14px; }
  .brand-name { display: none; }
  .team-nav {
    margin-inline: 0;
    justify-content: flex-start;
    padding-right: 16px;
    -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 82%, transparent 100%);
  }
  .team-nav a { font-size: 12.5px; }
  .imprint-link { font-size: 10px; letter-spacing: 0.1em; }
  .bigpicture-rahmen iframe { height: 66vh; min-height: 420px; }
  .scroll-hint { display: none; }
}

/* ---------- 13. Reduzierte Bewegung --------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
