/* ========================================================================
   shared.css — projekt pioniere redesign
   Editorial Operator — Anti-AI-Pattern baseline for all pages
   ======================================================================== */

@font-face {
  font-family: 'Cabin'; font-style: normal; font-weight: 400 700;
  font-display: swap;
  src: url('assets/fonts/cabin-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto'; font-style: normal; font-weight: 300 700;
  font-display: swap;
  src: url('assets/fonts/roboto-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
}

:root {
  --off:        #eeebe4;
  --off-deep:   #e6e2d8;
  --sand:       #ebd9c7;
  --sand-soft:  #f2ebe2;
  --navy:       #21253f;
  --orange:     #d08038;
  --orange-hv:  #b86e28;
  --teal:       #6ccdd0;
  --line:       rgba(33, 37, 63, 0.12);
  --line-soft:  rgba(33, 37, 63, 0.07);
  --line-dark:  rgba(255, 255, 255, 0.10);
  --muted:      rgba(33, 37, 63, 0.6);
  --muted-2:    rgba(33, 37, 63, 0.45);
  --muted-d:    rgba(255, 255, 255, 0.6);
  --muted-d2:   rgba(255, 255, 255, 0.4);
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  12px;
  /* ---- Motion tokens (see SKILL.md step 6) ---- */
  --dur-fast:   120ms;
  --dur-base:   180ms;
  --dur-slow:   320ms;
  --dur-draw:   700ms;
  --ease-standard: cubic-bezier(0.25, 0.1, 0.25, 1.0);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--off);
  color: var(--navy);
  font-family: 'Roboto', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
::selection { background: var(--teal); color: var(--navy); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ==================== PLACEHOLDER MARKER (visible) ====================
   Any spot that needs real material from Boris is wrapped in a .todo
   pill so reviewers immediately see what's still missing.
   ==================================================================== */
.todo {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--orange);
  background: rgba(208, 128, 56, 0.08);
  border: 1px dashed rgba(208, 128, 56, 0.5);
  padding: 3px 8px; border-radius: var(--r-sm);
  vertical-align: middle;
}
.todo::before { content: "TODO"; font-weight: 500; }
.todo--dark {
  color: #ffc98e;
  background: rgba(208, 128, 56, 0.12);
  border-color: rgba(255, 201, 142, 0.5);
}

/* ==================== NAV ==================== */
.pp-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--off);
  border-bottom: 1px solid var(--line-soft);
}
.pp-nav--dark {
  background: var(--navy);
  border-bottom-color: var(--line-dark);
}
.pp-nav-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 18px 32px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: 'Cabin', sans-serif; font-weight: 700; font-size: 16px;
  letter-spacing: -0.02em; color: var(--navy);
}
.pp-nav--dark .logo { color: #fff; }
.logo-dot { color: var(--orange); }
.pp-nav-links {
  display: flex; gap: 32px; list-style: none; margin: 0; padding: 0;
}
.pp-nav-links a {
  font-size: 13.5px; color: var(--muted); transition: color .2s;
}
.pp-nav--dark .pp-nav-links a { color: var(--muted-d); }
.pp-nav-links a:hover,
.pp-nav-links a.active { color: var(--navy); }
.pp-nav--dark .pp-nav-links a:hover,
.pp-nav--dark .pp-nav-links a.active { color: #fff; }
.pp-nav-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted-2); letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 10px;
}
.pp-nav--dark .pp-nav-meta { color: var(--muted-d2); }
.pp-nav-meta .dot { opacity: 0.5; }
.pp-nav-meta a.cta {
  color: var(--navy); border-bottom: 1px solid var(--orange);
  font-family: 'Cabin', sans-serif; font-weight: 600; font-size: 13px;
  letter-spacing: -0.01em; padding-bottom: 2px;
}
.pp-nav--dark .pp-nav-meta a.cta { color: #fff; }

/* ==================== SECTION FRAME ==================== */
.section { padding: 120px 32px; }
.section--sand { background: var(--sand-soft); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section--navy { background: var(--navy); color: #fff; }
.section-inner { max-width: 1240px; margin: 0 auto; }
.section-inner--narrow { max-width: 800px; margin: 0 auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted-2); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px; background: var(--orange); display: inline-block;
}
.eyebrow--dark { color: rgba(255,255,255,0.55); }
.eyebrow--dark::before { background: var(--teal); }
.eyebrow--teal { color: var(--teal); }
.eyebrow--teal::before { background: var(--teal); }

.section-head {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 72px;
  align-items: end;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 48px;
}
.section--navy .section-head { border-bottom-color: var(--line-dark); }

h2.section-title {
  font-family: 'Cabin', sans-serif; font-weight: 700;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.02; letter-spacing: -0.032em;
  color: var(--navy); margin: 0; text-wrap: balance;
}
.section--navy h2.section-title { color: #fff; }

.section-sub {
  font-family: 'Roboto', sans-serif; font-weight: 300;
  font-size: 17px; line-height: 1.6;
  color: var(--muted); margin: 0; max-width: 520px;
}
.section--navy .section-sub { color: var(--muted-d); }

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Cabin', sans-serif; font-weight: 600; font-size: 14px;
  padding: 12px 20px; border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer; line-height: 1;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-cta { background: var(--orange); color: #fff; border-color: var(--orange); }
.btn-cta:hover { background: var(--orange-hv); border-color: var(--orange-hv); }
.btn-outline { background: transparent; color: var(--navy); border-color: rgba(33, 37, 63, 0.22); }
.btn-outline:hover { border-color: var(--navy); }
.btn-outline-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.btn-outline-dark:hover { border-color: rgba(255,255,255,0.6); }

.tlink {
  font-family: 'Cabin', sans-serif; font-weight: 600; font-size: 13.5px;
  color: var(--navy); letter-spacing: -0.005em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px; transition: border-color .15s, color .15s;
}
.tlink:hover { border-color: var(--orange); }
.tlink .arr { display: inline-block; transition: transform .15s; }
.tlink:hover .arr { transform: translateX(2px); }
.tlink--dark {
  color: #fff; border-color: rgba(255,255,255,0.25);
}
.tlink--dark:hover { border-color: var(--teal); }

/* ==================== FOOTER ==================== */
.footer { padding: 48px 32px 32px; background: var(--navy); color: #fff; }
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 32px; border-bottom: 1px solid var(--line-dark);
  margin-bottom: 24px;
}
.footer-brand {
  font-family: 'Cabin', sans-serif; font-weight: 700; font-size: 17px;
  color: #fff; letter-spacing: -0.01em; margin-bottom: 10px;
}
.footer-brand .dot { color: var(--orange); }
.footer-blurb {
  font-family: 'Roboto', sans-serif; font-size: 13.5px;
  color: var(--muted-d2); line-height: 1.6; max-width: 280px; margin: 0;
}
.footer h4 {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  font-weight: 500; color: rgba(255,255,255,0.55); margin: 0 0 16px;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 10px; }
.footer li a {
  font-family: 'Roboto', sans-serif; font-size: 13.5px; color: rgba(255,255,255,0.7);
  transition: color .2s;
}
.footer li a:hover { color: var(--orange); }
.footer-meta {
  max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  color: var(--muted-d2); letter-spacing: 0.08em; text-transform: uppercase;
}

/* ==================== TOOL-SHOT (annotated screenshot placeholder) ==================== */
.tool-shot {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-family: 'JetBrains Mono', monospace;
}
.tool-shot .chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: #f3efea;
  border-bottom: 1px solid var(--line);
  font-size: 10.5px; color: var(--muted-2);
  letter-spacing: 0.04em;
}
.tool-shot .chrome .dots {
  display: inline-flex; gap: 5px; margin-right: 8px;
}
.tool-shot .chrome .dots span {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(33,37,63,0.15);
  display: inline-block;
}
.tool-shot .tool-canvas {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #fafaf7;
  background-image:
    linear-gradient(to right, rgba(33, 37, 63, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(33, 37, 63, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  padding: 32px;
}
.tool-shot svg { display: block; width: 100%; height: 100%; }
.tool-shot .caption {
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px; color: var(--muted-2);
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* Annotation styles — mimic hand-drawn red marker */
.ann-circle {
  fill: none;
  stroke: #d04040;
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.85;
}
.ann-arrow {
  fill: none;
  stroke: #d04040;
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.85;
}
.ann-text {
  /* Self-hosted/system stack only — no Google-Fonts-CDN (DSGVO).
     Annotations are not used on the current pages; system cursive is fine. */
  font-family: 'Comic Sans MS', 'Bradley Hand', cursive;
  fill: #d04040;
  font-size: 16px;
  opacity: 0.95;
}

/* ==================== BURGER / MOBILE NAV ==================== */
/* Hidden on desktop. Shown when nav-links collapse. */
.pp-burger {
  display: none;
  background: transparent; border: 1px solid var(--line);
  padding: 9px 11px; border-radius: var(--r-sm);
  cursor: pointer; line-height: 0;
  color: var(--navy);
}
.pp-nav--dark .pp-burger {
  border-color: rgba(255,255,255,0.2); color: #fff;
}
.pp-burger svg { display: block; width: 18px; height: 14px; }

/* Full-screen overlay nav — flat, matches editorial tone */
.pp-mobile-nav {
  position: fixed; inset: 0; z-index: 100;
  background: var(--off);
  display: flex;
  flex-direction: column;
  padding: 20px 24px 40px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity var(--dur-base) var(--ease-standard),
    transform var(--dur-base) var(--ease-out);
}
.pp-mobile-nav.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.pp-mobile-nav--dark { background: var(--navy); color: #fff; }
.pp-mobile-nav-top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 20px; margin-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}
.pp-mobile-nav--dark .pp-mobile-nav-top { border-bottom-color: var(--line-dark); }
.pp-mobile-nav-close {
  background: transparent; border: 1px solid var(--line);
  padding: 8px 10px; border-radius: var(--r-sm);
  cursor: pointer; line-height: 0; color: var(--navy);
}
.pp-mobile-nav--dark .pp-mobile-nav-close {
  border-color: rgba(255,255,255,0.2); color: #fff;
}
.pp-mobile-nav-close svg { display: block; width: 16px; height: 16px; }
.pp-mobile-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.pp-mobile-nav li {
  border-top: 1px solid var(--line);
}
.pp-mobile-nav--dark li { border-top-color: var(--line-dark); }
.pp-mobile-nav li:last-child { border-bottom: 1px solid var(--line); }
.pp-mobile-nav--dark li:last-child { border-bottom-color: var(--line-dark); }
.pp-mobile-nav a {
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Cabin', sans-serif; font-weight: 600;
  font-size: 22px; letter-spacing: -0.01em;
  color: var(--navy);
  padding: 22px 0;
}
.pp-mobile-nav--dark a { color: #fff; }
.pp-mobile-nav a .idx {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted-2); font-weight: 400;
  letter-spacing: 0.04em;
}
.pp-mobile-nav--dark a .idx { color: var(--muted-d2); }
.pp-mobile-nav-cta {
  margin-top: auto; padding-top: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.pp-mobile-nav-meta {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  color: var(--muted-2); letter-spacing: 0.04em;
  margin-top: 24px;
}
.pp-mobile-nav--dark .pp-mobile-nav-meta { color: var(--muted-d2); }

/* Prevent body scroll when mobile nav is open */
body.is-mobile-nav-open { overflow: hidden; }

/* ==================== RESPONSIVE ==================== */
/* -------- Tablet & small-desktop (≤ 1100px) -------- */
@media (max-width: 1100px) {
  .pp-nav-inner { padding: 16px 24px; }
  .section { padding: 96px 28px; }
  .section-head { gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; gap: 40px; }
  .footer-brand-col { grid-column: 1 / -1; }
}

/* -------- Mobile (≤ 760px) --------
   Main breakpoint. Replaces old 960px. Keeps in sync
   with per-page rules; pages mostly inherit from here. */
@media (max-width: 760px) {
  /* Nav: hide link list + meta-strip, show burger */
  .pp-nav-inner { padding: 14px 20px; }
  .pp-nav-links,
  .pp-nav-meta { display: none; }
  .pp-burger { display: inline-flex; }

  /* Section frame */
  .section { padding: 64px 20px; }
  .section-head {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-bottom: 28px;
    margin-bottom: 32px;
  }
  .section-sub { max-width: none; font-size: 15.5px; }
  h2.section-title { font-size: clamp(28px, 7.5vw, 40px); letter-spacing: -0.025em; }

  /* Eyebrow: keep visible, tighter */
  .eyebrow { margin-bottom: 20px; font-size: 10.5px; }

  /* Buttons: larger tap-targets */
  .btn { padding: 14px 22px; font-size: 14.5px; min-height: 48px; }
  .tlink { font-size: 14px; }

  /* Footer */
  .footer { padding: 40px 20px 28px; }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 28px;
  }
  .footer-brand-col { grid-column: auto; }
  .footer-blurb { max-width: none; }
  .footer-meta {
    flex-direction: column; align-items: flex-start; gap: 10px;
    font-size: 10px;
  }

  /* Tool-shot — smaller chrome, smaller grid,
     and switch annotations from SVG pins to mobile list.
     Individual pages can opt in with .tool-shot--has-mobile-list */
  .tool-shot .chrome { padding: 9px 12px; font-size: 10px; }
  .tool-shot .tool-canvas { padding: 20px; aspect-ratio: 4 / 3; background-size: 24px 24px; }
  .tool-shot .caption { padding: 12px 14px; font-size: 10px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .ann-text { font-size: 12px; }

  /* Mobile annotation-list: hidden by default, shown when present */
  .tool-shot--has-mobile-list .ann-svg { display: none; }
  .tool-shot-annotations {
    display: none;
    padding: 16px; background: #fff;
    border-top: 1px solid var(--line);
    font-family: 'Roboto', sans-serif;
  }
  .tool-shot--has-mobile-list .tool-shot-annotations { display: block; }
  .tool-shot-annotations ol { margin: 0; padding: 0 0 0 24px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
  .tool-shot-annotations li + li { margin-top: 10px; }
  .tool-shot-annotations li::marker {
    font-family: 'JetBrains Mono', monospace; font-weight: 500;
    color: #d04040;
  }

  /* Form-elements: min 48px tap-targets, full-width */
  input, select, textarea, button {
    font-size: 16px; /* prevents iOS zoom */
  }

  /* Utility reflow pattern for mono-meta rails:
     sidebars go ABOVE main content on mobile */
  .meta-rail { order: -1; }

  /* Any 3+ col hairline grid → stack with bottom hairlines */
  .stack-mobile > * {
    border-right: none !important;
    border-bottom: 1px solid var(--line);
    padding: 20px 0 !important;
  }
  .stack-mobile > *:last-child { border-bottom: none; }
  .stack-mobile > * + * { padding-left: 0 !important; }
}

/* -------- Small phones (≤ 380px) -------- */
@media (max-width: 380px) {
  .section { padding: 52px 16px; }
  .pp-nav-inner { padding: 12px 16px; }
  h2.section-title { font-size: 28px; }
  .logo { font-size: 15px; }
}

/* -------- Print / PDF -------- */
@media print {
  .pp-nav, .footer, .pp-burger, .pp-mobile-nav { display: none; }
  body { background: #fff; color: #000; }
  .section { padding: 24px 0; page-break-inside: avoid; }
}

/* ========================================================================
   Motion — see SKILL.md step 6. Everything below is opt-in via classes.
   Base rule: no decorative motion, no scroll parallax, no count-ups.
   ======================================================================== */

/* --- Annotation draw-in ---------------------------------------------------
   Use on the orange SVG annotation strokes inside .tool-shot-annot.
   Container gets .is-visible (via IntersectionObserver in shared.js)
   when scrolled into view — the paths then draw themselves once, ~700ms. */

.anno-path {
  stroke-dasharray: var(--anno-len, 800);
  stroke-dashoffset: var(--anno-len, 800);
}
.anno-text {
  opacity: 0;
  transform: translateY(4px);
}
.anno-container.is-visible .anno-path {
  transition: stroke-dashoffset var(--dur-draw) var(--ease-out);
  stroke-dashoffset: 0;
}
.anno-container.is-visible .anno-text {
  transition:
    opacity var(--dur-base) linear var(--dur-draw),
    transform var(--dur-base) var(--ease-out) var(--dur-draw);
  opacity: 1;
  transform: translateY(0);
}

/* --- Canvas-Architect flow demo ------------------------------------------
   Events flow as small circles along three canvas branches.
   Pure CSS keyframes on .flow-token; staggered with --i custom prop. */

@keyframes flow-travel {
  0%   { offset-distance: 0%;   opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
.flow-token {
  offset-path: path(var(--flow-path, "M0,0 L400,0"));
  offset-rotate: 0deg;
  animation: flow-travel 3.4s linear infinite;
  animation-delay: calc(var(--i, 0) * -1.13s);
}
@keyframes flow-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1.0; }
}
.flow-branch-label {
  animation: flow-pulse 3.4s ease-in-out infinite;
}

/* --- Reduced-motion respect ----------------------------------------------
   Hard kill switch: strip durations to ~0ms, freeze all keyframe anims
   on the last frame. Editorial tone is already calm — this is a no-op
   for 99% of the page, but guards the three motion moments. */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .anno-container .anno-path { stroke-dashoffset: 0; }
  .anno-container .anno-text { opacity: 1; transform: none; }
  .flow-token { animation: none; offset-distance: 100%; opacity: 0; }
}

