/* ============================================================
   PZTec — stylesheet
   Editorial-technical: warm paper body, deep "instrument panel"
   hero & footer, coral signal accent, Sora + Space Mono.
   All fonts self-hosted — no external requests.
   ============================================================ */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('/assets/fonts/sora-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/spacemono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/spacemono-700-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --paper:      #f4f3ee;
  --paper-2:    #eceae3;
  --card:       #ffffff;
  --ink:        #14171d;
  --ink-2:      #545b68;
  --ink-3:      #8b91a0;
  --line:       rgba(20, 23, 29, 0.12);
  --line-soft:  rgba(20, 23, 29, 0.07);
  --accent:     #e94560;
  --accent-ink: #c62b48;   /* darker coral — accessible for small text */
  --panel:      #0b0e15;   /* deep instrument panel */
  --panel-2:    #0f131c;
  --panel-ink:  #f4f5f7;
  --panel-mut:  #8a94a6;

  --mono: 'Space Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

  --wrap: 1140px;
  --r: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.accent { color: var(--accent); }

.section__title {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 12px 0 0;
}

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 0.98rem;
  padding: 13px 22px; border-radius: 999px;
  border: 1px solid var(--bg);
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--sm { padding: 9px 18px; font-size: 0.9rem; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); }
/* Logo drawn via CSS mask so its colour follows the context (black in the
   header, white on the dark footer). The PZ mark supplies the "PZ"; the
   wordmark adds "Tec" -> reads as "PZTec". */
.brand__mark {
  display: inline-block; flex: none;
  height: 46px; aspect-ratio: 12.843 / 10.477;
  background-color: var(--ink);
  -webkit-mask: url('/assets/logo.svg') center / contain no-repeat;
          mask: url('/assets/logo.svg') center / contain no-repeat;
}
.brand__name {
  font-weight: 700; font-size: 1.9rem; letter-spacing: -0.01em; color: var(--ink);
}
.nav__links { margin-left: auto; display: flex; gap: 30px; }
.nav__links a {
  font-size: 0.96rem; color: var(--ink-2); position: relative; padding: 4px 0;
  transition: color .2s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--accent); transition: width .28s var(--ease);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }

/* ============================================================
   HERO — deep instrument panel
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 80% -10%, var(--panel-2), var(--panel) 60%);
  color: var(--panel-ink);
  padding: clamp(80px, 13vw, 150px) 0 clamp(70px, 10vw, 120px);
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 45%, transparent 85%);
}
.hero__signal {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 22%;
  opacity: 0.45;
  /* Fade the top of the signal band so the trace never reads as if it
     crosses the "01 Web & App …" meta row sitting just above it. */
  -webkit-mask-image: linear-gradient(to top, #000 40%, transparent 74%);
          mask-image: linear-gradient(to top, #000 40%, transparent 74%);
}
.signal-path {
  filter: drop-shadow(0 0 8px rgba(233, 69, 96, 0.6));
  stroke-dasharray: 3600; stroke-dashoffset: 3600;
  animation: trace 3.4s var(--ease) .3s forwards;
}
@keyframes trace { to { stroke-dashoffset: 0; } }

.hero__inner { position: relative; z-index: 2; max-width: 860px; }
.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.02; letter-spacing: -0.03em; font-weight: 700;
  margin: 22px 0 0;
}
.hero__lead {
  margin: 26px 0 0; max-width: 620px;
  font-size: clamp(1.05rem, 1.8vw, 1.28rem); color: #c9cfda; line-height: 1.65;
}
.hero__cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero .btn { --bg: var(--accent); border-color: var(--accent); }
.hero .btn:hover { background: #fff; border-color: #fff; color: var(--panel); }
.hero .btn--ghost { --bg: transparent; color: #fff; border-color: rgba(255,255,255,0.28); }
.hero .btn--ghost:hover { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.6); }

.hero__meta {
  list-style: none; display: flex; flex-wrap: wrap; gap: 14px 34px;
  margin-top: 54px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.12);
  font-family: var(--mono); font-size: 0.9rem; color: var(--panel-mut);
}
.hero__meta li { display: flex; align-items: baseline; gap: 10px; }
.hero__meta span { color: var(--accent); font-weight: 700; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: clamp(72px, 11vw, 128px) 0; }
.section--alt { background: var(--paper-2); border-block: 1px solid var(--line-soft); }
.section__head { max-width: 620px; margin-bottom: 56px; }
.section__sub { margin-top: 18px; color: var(--ink-2); font-size: 1.08rem; }

/* ---------- Leistungen cards ---------- */
.cards {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 30px 26px 28px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 40px -24px rgba(20,23,29,0.45); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card__no {
  font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3);
  position: absolute; top: 24px; right: 24px;
}
.card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  margin-bottom: 20px;
}
.card__icon svg { width: 25px; height: 25px; }
.card h3 { font-size: 1.24rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { color: var(--ink-2); font-size: 0.98rem; }

/* ---------- Profil ---------- */
.profil {
  display: grid; gap: clamp(40px, 6vw, 72px);
  grid-template-columns: 1fr 1fr; align-items: start;
}
.profil__intro p { color: var(--ink-2); margin-top: 18px; }
.profil__intro strong { color: var(--ink); font-weight: 600; }

.timeline { list-style: none; position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent), var(--line));
}
.timeline li { position: relative; padding-bottom: 30px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--paper-2); border: 3px solid var(--accent);
}
.timeline__tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-ink);
}
.timeline h3 { font-size: 1.1rem; font-weight: 600; margin: 4px 0 4px; letter-spacing: -0.01em; }
.timeline p { color: var(--ink-2); font-size: 0.96rem; }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.contact__card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 32px 30px;
}
.contact__label {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px;
}
.contact__value { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
a.contact__value:hover { color: var(--accent); }
.contact__addr { font-style: normal; font-weight: 500; font-size: 1.02rem; line-height: 1.75; color: var(--ink); }
.contact__btn { margin-top: 22px; }

/* ============================================================
   FOOTER — deep panel
   ============================================================ */
.footer { background: var(--panel); color: var(--panel-ink); padding: 54px 0; }
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 26px 40px; align-items: center; justify-content: space-between;
}
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer__brandrow { display: flex; align-items: center; gap: 4px; }
.footer .brand__mark { height: 38px; background-color: #fff; }
.footer .brand__name { color: #fff; font-weight: 700; font-size: 1.55rem; }
.footer__tag { font-family: var(--mono); font-size: 0.78rem; color: var(--panel-mut); }
.footer__links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer__links a { color: #c9cfda; font-size: 0.95rem; transition: color .2s var(--ease); }
.footer__links a:hover { color: var(--accent); }
.footer__copy { font-family: var(--mono); font-size: 0.82rem; color: var(--panel-mut); }

/* ============================================================
   LEGAL PAGES (Impressum / Datenschutz)
   ============================================================ */
.legal { padding: clamp(60px, 9vw, 104px) 0 clamp(64px, 9vw, 110px); }
.legal__wrap { max-width: 760px; }
.legal__back {
  font-family: var(--mono); font-size: 0.82rem; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 30px;
}
.legal__back:hover { color: var(--accent); }
.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; font-weight: 700; line-height: 1.05;
}
.legal__updated { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-3); margin-top: 14px; }
.legal h2 {
  font-size: 1.35rem; font-weight: 600; letter-spacing: -0.01em;
  margin: 46px 0 12px; padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.legal h3 { font-size: 1.05rem; font-weight: 600; margin: 26px 0 8px; }
.legal p, .legal li { color: var(--ink-2); margin-top: 12px; }
.legal ul { margin: 8px 0 0; padding-left: 22px; }
.legal li { margin-top: 8px; }
.legal a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--accent); }
.legal address { font-style: normal; line-height: 1.8; }
.legal strong { color: var(--ink); font-weight: 600; }

/* ============================================================
   REVEAL animation
   ============================================================ */
/* Only hide-before-reveal when JS is active; without JS everything shows. */
.js .reveal { opacity: 0; transform: translateY(22px); }
.reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .signal-path { stroke-dashoffset: 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .profil { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__inner { gap: 12px; }
  .hero__meta { gap: 12px 22px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
