/* ============================================================
   psmedia Website Refresh — LIGHT theme
   Modern, hell, einladend. Orange accent (NICHT Gold), sparsam.
   Built on the psmedia Design System (Raleway), re-themed light.
   ============================================================ */

@font-face {
  font-family: 'Raleway';
  src: url('fonts/Raleway-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Raleway';
  src: url('fonts/Raleway-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900; font-style: italic; font-display: swap;
}

:root {
  /* ---- Orange accent (overridable by Tweaks) ---- */
  --accent:        #E7A944;
  --accent-light:  #f1c275;
  --accent-lighter:#f8dca8;
  --accent-deep:   #d8902f;
  --accent-deeper: #c47e22;
  --accent-tint:   rgba(231,169,68,0.12);
  --accent-tint-2: rgba(231,169,68,0.20);

  /* ---- Surfaces (light base) ---- */
  --bg:        #ffffff;
  --bg-soft:   #faf8f4;   /* warm off-white */
  --bg-warm:   #f5f2ec;   /* deeper warm panel */
  --bg-card:   #ffffff;

  /* ---- Text (anthracite) ---- */
  --ink:       #2b2825;   /* headlines */
  --ink-2:     #3B3838;
  --body:      #333333;
  --muted:     #706a62;
  --subtle:    #9b948a;

  /* ---- Lines & elevation ---- */
  --line:        rgba(40,36,30,0.10);
  --line-strong: rgba(40,36,30,0.18);
  --line-accent: var(--accent);
  --shadow-sm:  0 2px 10px rgba(43,40,37,0.05);
  --shadow:     0 12px 40px rgba(43,40,37,0.08);
  --shadow-lg:  0 30px 70px rgba(43,40,37,0.12);
  --shadow-accent: 0 10px 34px rgba(231,169,68,0.30);

  /* ---- Type ---- */
  --font: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --w-regular: 400; --w-medium: 500; --w-semi: 600; --w-bold: 700; --w-black: 800;
  --tr-tight: -0.02em; --tr-label: 0.16em;

  /* ---- Headline weight (overridable by Tweaks) ---- */
  --hl-weight: 800;

  /* ---- Radii ---- */
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-pill: 999px;

  /* ---- Motion (intensity scaled by --anim) ---- */
  --anim: 1;                 /* Tweak: 0 = off … 1.4 = lively */
  --ease: cubic-bezier(.22,1,.36,1);
  --dur-fast: 180ms;
  --dur: calc(420ms * var(--anim) + 60ms);
  --dur-slow: calc(640ms * var(--anim) + 80ms);
  /* scroll-reveal entrances: deliberately slow & gentle */
  --dur-reveal: calc(2600ms * var(--anim) + 500ms);
  --ease-reveal: cubic-bezier(.12,.62,.16,1);

  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--body);
  font-size: 17px;
  line-height: 1.62;
  font-weight: var(--w-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--accent-tint-2); color: var(--ink); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-weight: var(--w-bold);
  font-size: 13px;
  letter-spacing: var(--tr-label);
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; border-radius: 2px;
  background: var(--accent); display: inline-block;
}
.eyebrow.no-rule::before { display: none; }

h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); margin: 0; }
.display {
  font-weight: var(--hl-weight); font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.05; letter-spacing: var(--tr-tight); text-wrap: balance;
}
.h1 { font-weight: var(--hl-weight); font-size: clamp(34px, 4.6vw, 58px); line-height: 1.05; letter-spacing: var(--tr-tight); text-wrap: balance; }
.h2 { font-weight: 700; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; letter-spacing: var(--tr-tight); text-wrap: balance; }
.h3 { font-weight: 700; font-size: clamp(21px, 2vw, 26px); line-height: 1.2; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); font-weight: 400; }
.accent { color: var(--accent-deep); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; width: 100%; }
.section { padding: clamp(72px, 9vw, 132px) 0; position: relative; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font); font-weight: 700; font-size: 15px; letter-spacing: .01em;
  border-radius: var(--r-sm); padding: 15px 26px; border: 1.5px solid transparent;
  cursor: pointer; display: inline-flex; align-items: center; gap: 10px;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  white-space: nowrap; text-decoration: none; line-height: 1;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(231,169,68,0.22); }
.btn-primary:hover { background: var(--accent-deep); box-shadow: var(--shadow-accent); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(1px); background: var(--accent-deeper); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent-deep); transform: translateY(-2px); }
.btn-secondary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--accent-deep); padding: 14px 4px; }
.btn-ghost .arr { transition: transform var(--dur-fast) var(--ease); }
.btn-ghost:hover .arr { transform: translateX(5px); }

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }

/* ---------- Scroll reveal (paint-safe: visible by default) ----------
   Base state is VISIBLE. Below-the-fold elements get .rv-hidden added by JS,
   then .rv-in to animate in. data-rv selects the entrance flavour. */
.rv-hidden {
  opacity: 0;
  transform: translateY(calc(26px * var(--anim)));
}
.rv-hidden[data-rv="blur"]  { transform: translateY(calc(30px * var(--anim))); filter: blur(10px); }
.rv-hidden[data-rv="scale"] { transform: translateY(calc(20px * var(--anim))) scale(0.94); }
.rv-hidden[data-rv="left"]  { transform: translateX(calc(-44px * var(--anim))); }
.rv-hidden[data-rv="right"] { transform: translateX(calc(44px * var(--anim))); }
.rv-hidden[data-rv="clip"]  { clip-path: inset(0 0 102% 0); transform: none; }
.rv-in {
  animation: revealIn var(--dur-reveal) var(--ease-reveal) var(--reveal-delay, 0ms) both;
}
.rv-in[data-rv="blur"]  { animation-name: revealBlur; }
.rv-in[data-rv="scale"] { animation-name: revealScale; }
.rv-in[data-rv="left"]  { animation-name: revealLeft; }
.rv-in[data-rv="right"] { animation-name: revealRight; }
.rv-in[data-rv="clip"]  { animation-name: revealClip; }
@keyframes revealIn {
  from { opacity: 0; transform: translateY(calc(26px * var(--anim))); }
  to   { opacity: 1; transform: none; }
}
@keyframes revealBlur {
  from { opacity: 0; transform: translateY(calc(30px * var(--anim))); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes revealScale {
  from { opacity: 0; transform: translateY(calc(20px * var(--anim))) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
@keyframes revealLeft {
  from { opacity: 0; transform: translateX(calc(-44px * var(--anim))); }
  to   { opacity: 1; transform: none; }
}
@keyframes revealRight {
  from { opacity: 0; transform: translateX(calc(44px * var(--anim))); }
  to   { opacity: 1; transform: none; }
}
@keyframes revealClip {
  from { opacity: 0.4; clip-path: inset(0 0 102% 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .rv-hidden, .rv-in { opacity: 1 !important; transform: none !important; animation: none !important; filter: none !important; clip-path: none !important; }
}

/* ---------- Link underline grow ---------- */
.ulink { position: relative; text-decoration: none; color: var(--ink-2); transition: color var(--dur-fast); }
.ulink::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.ulink:hover { color: var(--ink); }
.ulink:hover::after { transform: scaleX(1); }

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r-pill);
  padding: 8px 16px; font-size: 14px; font-weight: 600;
  background: var(--accent-tint); color: var(--accent-deeper); border: 1px solid var(--accent-tint-2);
}

/* ---------- Section divider thread ---------- */
.hr-fade { height: 1px; background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent); border: 0; margin: 0; }

/* ---------- Decorative motion ---------- */
@keyframes floatA { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(calc(18px * var(--anim)), calc(-26px * var(--anim))) scale(1.04); } }
@keyframes floatB { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(calc(-22px * var(--anim)), calc(20px * var(--anim))) scale(1.06); } }
@keyframes floatC { 0%,100% { transform: translate(0,0); } 50% { transform: translate(calc(14px * var(--anim)), calc(16px * var(--anim))); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.float-a { animation: floatA calc(11s / (var(--anim) + 0.4)) var(--ease) infinite; }
.float-b { animation: floatB calc(13s / (var(--anim) + 0.4)) var(--ease) infinite; }
.float-c { animation: floatC calc(9s / (var(--anim) + 0.4)) var(--ease) infinite; }

/* hero aurora / mesh drift */
@keyframes auroraDrift {
  0%   { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
  33%  { transform: translate3d(4%, -3%, 0) rotate(8deg) scale(1.08); }
  66%  { transform: translate3d(-3%, 4%, 0) rotate(-6deg) scale(1.04); }
  100% { transform: translate3d(0,0,0) rotate(0deg) scale(1); }
}
.aurora { animation: auroraDrift calc(18s / (var(--anim) + 0.3)) ease-in-out infinite; }

/* conic shimmer for tech / accents */
@keyframes conicSpin { to { transform: rotate(360deg); } }
.conic-spin { animation: conicSpin calc(14s / (var(--anim) + 0.4)) linear infinite; }

/* gradient text sheen */
@keyframes sheenSweep { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- Timeline (chapters on a glowing spine) ---------- */
.tl { position: relative; }
.tl-rail, .tl-fill { position: absolute; left: 42px; width: 4px; border-radius: 4px; }
.tl-rail { top: 26px; bottom: 26px; background: var(--line); }
.tl-fill { top: 26px; height: 0; background: linear-gradient(180deg, var(--accent-light), var(--accent) 60%, var(--accent-deep));
  box-shadow: 0 0 18px var(--accent-tint-2); }
.tl-tip { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-tint), 0 0 22px 5px var(--accent-tint-2); }

.tl-item { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: start; padding: 12px 0; }
.tl-node-col { display: flex; justify-content: center; padding-top: 2px; }
.tl-node { position: relative; z-index: 2; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--bg);
  border: 2px solid var(--line-strong); transition: all .5s var(--ease); }
.tl-num { font-family: var(--font); font-weight: 800; font-size: 15px; color: var(--subtle);
  transition: color .5s var(--ease); }

.tl-card { position: relative; overflow: hidden; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px 26px 24px; box-shadow: var(--shadow-sm);
  transition: border-color .5s var(--ease), box-shadow .5s var(--ease); }
.tl-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform-origin: top; transition: transform .55s var(--ease); }
.tl-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-year { font-family: var(--font); font-weight: 800; font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -.025em; line-height: 1; color: var(--ink); transition: color .5s var(--ease); }
.tl-phase { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); transition: color .5s var(--ease); }
.tl-body { margin: 0; font-size: 16.5px; line-height: 1.68; color: var(--body); text-wrap: pretty; }

/* ---------- Capability icons (animated) ---------- */
.capicon { color: var(--accent-deep); display: block; }
.capicon .nd, .capicon .dt { transform-box: fill-box; transform-origin: center; }
@keyframes ciWave { 0%, 100% { opacity: .2; } 45% { opacity: 1; } }
.ci-pub .w { opacity: .2; animation: ciWave calc(2.6s / (var(--anim) + .4)) var(--ease) infinite; }
.ci-pub .w3, .ci-pub .w4 { animation-delay: calc(.5s / (var(--anim) + .4)); }
@keyframes ciNode { 0%, 100% { transform: scale(.82); opacity: .5; } 50% { transform: scale(1.18); opacity: 1; } }
.ci-net .nd { animation: ciNode calc(2.2s / (var(--anim) + .4)) var(--ease) infinite; }
.ci-net .n2 { animation-delay: calc(.18s / (var(--anim) + .4)); }
.ci-net .n3 { animation-delay: calc(.54s / (var(--anim) + .4)); }
.ci-net .n4 { animation-delay: calc(.36s / (var(--anim) + .4)); }
@keyframes ciFlow { to { stroke-dashoffset: -16; } }
.ci-link .flow { stroke-dasharray: 4 4; animation: ciFlow calc(1.3s / (var(--anim) + .4)) linear infinite; }
@keyframes ciType { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-1.2px); } }
.ci-chat .dt { animation: ciType calc(1.5s / (var(--anim) + .4)) var(--ease) infinite; }
.ci-chat .d2 { animation-delay: calc(.2s / (var(--anim) + .4)); }
.ci-chat .d3 { animation-delay: calc(.4s / (var(--anim) + .4)); }

/* gentle pulse for live dots */
@keyframes livePulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .35; } }
.live-dot { animation: livePulse calc(1.8s / (var(--anim) + 0.4)) var(--ease) infinite; }

/* SVG stroke draw */
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

/* count-flip / odometer is JS-driven; this is the digit rise */
@keyframes digitRise { from { opacity: 0; transform: translateY(0.5em); } to { opacity: 1; transform: none; } }

/* type caret */
@keyframes caretBlink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
.caret { display: inline-block; width: 2px; background: var(--accent); margin-left: 2px; animation: caretBlink 1s steps(1) infinite; }

@media (prefers-reduced-motion: reduce) {
  .float-a, .float-b, .float-c, .spin-slow, .aurora, .conic-spin,
  .live-dot, .caret,
  .ci-pub .w, .ci-net .nd, .ci-link .flow, .ci-chat .dt { animation: none !important; }
}

/* gradient/sheen accent headline word */
.word-sheen {
  background: linear-gradient(100deg, var(--accent-deep) 20%, var(--accent-light) 40%, var(--accent) 50%, var(--accent-deep) 70%);
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: sheenSweep calc(6s / (var(--anim) + 0.4)) linear infinite;
}
@media (prefers-reduced-motion: reduce) { .word-sheen { animation: none !important; } }

/* ---------- Hero entrance stagger (on load) ---------- */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(calc(26px * var(--anim))); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.hero-stagger > * {
  animation: heroRise calc(720ms * var(--anim) + 220ms) var(--ease) both;
  animation-delay: calc(140ms + var(--i, 0) * (130ms * var(--anim) + 40ms));
}
@media (prefers-reduced-motion: reduce) {
  .hero-stagger > * { animation: none !important; }
}

/* ---------- Capability card flourish ---------- */
.cap-card .cap-num {
  position: absolute; right: 18px; bottom: -18px; font-family: var(--font);
  font-weight: 800; font-size: 120px; line-height: 1; color: var(--accent);
  opacity: 0.06; pointer-events: none; transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.cap-card:hover .cap-num { opacity: 0.12; transform: translateY(-6px); }
.cap-card::before {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur) var(--ease);
}
.cap-card:hover::before { transform: scaleX(1); }

/* ---------- Responsive ---------- */
.desk-nav { }
@media (max-width: 860px) {
  .desk-nav { display: none !important; }
  .mob-ctrl { display: flex !important; }
  .mob-drawer { display: block !important; }
  .grid-2 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .grid-4 { grid-template-columns: 1fr 1fr !important; }
  .tl-item { grid-template-columns: 70px 1fr !important; }
  .tl-rail, .tl-fill { left: 33px !important; }
  .tl-node { width: 46px; height: 46px; }
  .wrap { padding: 0 22px; }
}
@media (max-width: 540px) {
  .grid-4 { grid-template-columns: 1fr !important; }
}
