/* ============================================================
   Neuraxom — shared stylesheet · v3 "Dark & Cinematic"
   Palette: Night #0b0d12 · Card #141720 · Text #f2f4f8
   Accent: Violett/Cyan aus dem Logo — als Licht, nicht als Fläche
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-600-italic.woff2") format("woff2");
  font-weight: 600;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --card: #141720;
  --ink: #f2f4f8;
  --muted: #99a1af;
  --green: #9b8afb;      /* accent light violet (from logo) */
  --green-dark: #b9aaff; /* hover shade */
  --green-soft: rgba(155, 138, 251, 0.12);
  --cyan: #22d3ee;
  --border: rgba(255, 255, 255, 0.09);
  --radius: 16px;
  --font-head: "Segoe UI", ui-sans-serif, system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

/* Accessibility: sichtbarer Fokus + Skip-Link */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--cyan); color: #0b0d12; padding: 10px 18px; border-radius: 0 0 10px 0;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* (Seiten-Fäden entfernt — Circuit-Signatur lebt im Hero-Logo, den Lötpunkt-Labels und den CTA-Linien) */

img, svg { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green-dark); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.lead { font-size: 1.18rem; color: #b9c0cc; max-width: 42em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 18, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex; align-items: center; gap: 24px;
  padding-top: 14px; padding-bottom: 14px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 700; font-size: 1.35rem;
  color: #fff; text-decoration: none; letter-spacing: -0.01em;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-logo {
  width: 36px; height: auto; flex: none;
  animation: logo-in 0.7s cubic-bezier(0.2, 0.8, 0.3, 1.1) backwards,
             logo-breathe 4.2s ease-in-out 1.2s infinite;
}
@keyframes logo-in {
  from { opacity: 0; transform: rotate(-10deg) scale(0.7); }
  to   { opacity: 1; transform: rotate(0) scale(1); }
}
@keyframes logo-breathe {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(124, 58, 237, 0)); }
  50%      { filter: drop-shadow(0 0 8px rgba(155, 138, 251, 0.8)); }
}
.brand:hover .brand-logo { filter: drop-shadow(0 0 9px rgba(34, 211, 238, 0.8)); }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-nav a {
  color: #dfe4ee; text-decoration: none; font-size: 0.98rem; font-weight: 500;
  padding: 4px 2px; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); }
.lang-switch {
  flex: none; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--green); text-decoration: none;
  border: 1.5px solid var(--green); border-radius: 999px; padding: 5px 14px;
}
.lang-switch:hover { background: var(--green-soft); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero-cinema {
  padding: 110px 0 96px;
  background:
    linear-gradient(180deg, rgba(11, 13, 18, 0.78) 0%, rgba(11, 13, 18, 0.5) 45%, var(--bg) 97%),
    url("/assets/img/hero-forest.webp") center 32% / cover no-repeat;
}
.hero .accent {
  font-style: italic;
  background: linear-gradient(92deg, #8ea8ff, #b79dff 55%, #39e0f8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-art {
  position: absolute; right: -30px; top: 30px; width: 480px; opacity: 0.85;
  pointer-events: none;
}
@media (max-width: 900px) { .hero-art { display: none; } }

/* Hero logo: traces draw themselves, then keep living (pulsing nodes + data pulses) */
.hero-logo-wrap {
  width: 400px; right: 70px; top: 36px; opacity: 1; aspect-ratio: 240 / 252;
  filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.35));
}
.logo-draw { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-draw .trace { animation-duration: 1.6s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #f2f4f8; color: #0b0d12; box-shadow: none; }
.btn-primary:hover { background: #fff; color: #0b0d12; box-shadow: 0 0 22px rgba(34, 211, 238, 0.45); }
.btn-ghost { border: 1.5px solid rgba(255, 255, 255, 0.3); color: #f2f4f8; }
.btn-ghost:hover { border-color: var(--cyan); color: #fff; background: rgba(34, 211, 238, 0.08); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: #0e1118; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.overline {
  display: block; text-transform: uppercase; letter-spacing: 0.16em;
  font-family: var(--font-mono);
  font-size: 0.76rem; font-weight: 600; color: #8f97a6; margin-bottom: 10px;
}

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; margin-top: 36px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55);
  border-color: rgba(155, 138, 251, 0.35);
  transform: translateY(-2px);
}
.card h3 { margin-top: 18px; }
.card-img {
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  margin-bottom: 18px; border: 1px solid var(--border);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card p { color: var(--muted); margin-bottom: 0; }
.card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: #1a1e29; border: 1px solid var(--border); color: #dfe4ee;
  display: flex; align-items: center; justify-content: center;
}
.card-icon svg { width: 30px; height: 30px; }
.card:hover .card-icon { border-color: var(--cyan); color: var(--cyan); }

/* Project feature card */
.project-feature {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center;
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 44px; margin-top: 36px;
}
@media (max-width: 860px) { .project-feature { grid-template-columns: 1fr; padding: 30px 24px; } }
.project-feature .tags { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.project-feature .tags li, .tag {
  font-family: var(--font-mono);
  font-size: 0.74rem; font-weight: 600; color: #aeb6c4;
  background: #1c202b; border-radius: 999px; padding: 4px 12px;
}
.project-visual {
  background: linear-gradient(160deg, #161a26, #251f3a);
  border: 1px solid var(--border);
  border-radius: 16px; min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-head); font-size: 1.6rem; font-weight: 600;
  text-align: center; padding: 24px;
  text-shadow: 0 0 24px rgba(124, 58, 237, 0.55);
}

/* ---------- Blog ---------- */
.post-meta {
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
  letter-spacing: 0.05em; margin-top: -4px;
}

/* ---------- Prose (legal pages, about) ---------- */
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; font-size: 1.45rem; }
.prose h3 { margin-top: 1.3em; }
.todo-note {
  background: #241c07; border: 1px solid #5c4a15; border-radius: 12px;
  padding: 14px 18px; font-size: 0.95rem; color: #e8c96a; margin-bottom: 28px;
}

/* ---------- Contact ---------- */
.contact-box {
  background: var(--card); border: 1px solid var(--border); border-radius: 20px;
  padding: 44px; text-align: center; margin-top: 36px;
}
.contact-email {
  font-family: var(--font-head); font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 600; word-break: break-all;
}

/* ---------- Contact form ---------- */
.contact-form { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; text-align: left; }
.contact-form label { font-weight: 600; font-size: 0.92rem; margin-top: 12px; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--ink); background: #0e1118;
  padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 10px;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: 2px solid var(--cyan); outline-offset: 1px; border-color: var(--cyan);
}
.contact-form button { margin-top: 18px; align-self: flex-start; border: none; cursor: pointer; }
.form-hint { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* ---------- Device / Lab cards ---------- */
.device-img {
  aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden;
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  color: #333; font-family: var(--font-head); font-weight: 600;
  font-size: 1.05rem; text-align: center; padding: 16px;
}
.device-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.device-specs { margin: 12px 0 0; padding: 0; list-style: none; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.device-specs li { padding-left: 18px; position: relative; }
.device-specs li::before { content: "·"; position: absolute; left: 6px; color: var(--green); font-weight: 700; }

/* ---------- CTA band ---------- */
.cta-band {
  background: #12151e; color: #fff; border-radius: 20px;
  padding: 52px 44px; text-align: center; margin-top: 72px;
  position: relative; overflow: hidden;
  border: 1px solid var(--border);
}
.cta-band::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #22d3ee, #6366f1 40%, #7c3aed 70%, #22d3ee);
}
.cta-band h2 { color: #fff; }
.cta-band .btn-primary { background: #fff; color: #0b0d12; box-shadow: none; }
.cta-band .btn-primary:hover { box-shadow: 0 0 22px rgba(34, 211, 238, 0.45); }

/* ---------- Footer ---------- */
.site-footer {
  background: #07080c; color: #8b93a2; margin-top: 80px;
  padding: 44px 0 36px; font-size: 0.95rem;
  border-top: 1px solid var(--border);
}
.footer-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.site-footer a { color: #fff; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: #fff; }

/* ---------- Circuit animations (logo motif) ---------- */
.trace {
  /* paths carry pathLength="1", so dash values are length-independent */
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: trace-draw 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes trace-draw { to { stroke-dashoffset: 0; } }
.node {
  transform-box: fill-box; transform-origin: center;
  animation: node-pulse 3.2s ease-in-out infinite;
}
@keyframes node-pulse {
  0%, 100% { transform: scale(1); opacity: 0.65; }
  50% { transform: scale(1.4); opacity: 1; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   Responsive: Desktop (>1200) · Tablet (901–1200) · Phone (<900)
   ============================================================ */

/* Tablet & schmalere Desktops: Logo verkleinern, Text bekommt garantiert Platz */
@media (min-width: 901px) and (max-width: 1439px) {
  .hero-logo-wrap { width: 300px; right: 20px; top: 60px; }
  .hero .container { padding-right: 360px; }
}

/* Phone / small tablet */
@media (max-width: 900px) {
  .hero { padding: 36px 0 48px; }
  .hero-cinema { padding: 48px 0 56px; }
  .hero-logo-wrap {
    display: block; position: relative; inset: auto;
    width: min(200px, 55vw); margin: 0 auto 26px;
  }
  .section { padding: 52px 0; }
  .section h2 { font-size: 1.6rem; }
  .cta-band { padding: 40px 24px; margin-top: 48px; }
  .contact-box { padding: 32px 20px; }
  .project-visual { min-height: 180px; font-size: 1.3rem; }
  .card { padding: 24px 20px; }
}

/* Narrow phones: compact header, stacked nav */
@media (max-width: 720px) {
  .nav-row { flex-wrap: wrap; row-gap: 4px; padding-top: 10px; padding-bottom: 10px; }
  .brand { font-size: 1.15rem; }
  .brand-logo { width: 30px; }
  .lang-switch { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 16px; }
  .site-nav a { font-size: 0.94rem; }
  h1 { font-size: clamp(1.9rem, 8.5vw, 2.6rem); }
  .lead { font-size: 1.08rem; }
  .btn { padding: 11px 20px; font-size: 0.95rem; }
  .hero-actions { gap: 10px; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .project-feature { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn { transition: none; }
  .trace { animation: none; stroke-dashoffset: 0; }
  .node { animation: none; }
  .pulse { display: none; }
  .brand-logo { animation: none; }
  .logo-draw .trace { animation: none; stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
