/* Stach Digital: shared styles for stachdigital.com and stachdigital.de.
   Light is the primary design; [data-theme="dark"] swaps the tokens. */

@font-face { font-family: "Manrope"; src: url("/fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --sunk: #EEF1F5;
  --ink: #0D1015;
  --muted: #5D6471;
  --soft: #8A919C;
  --faint: #B4BAC3;
  --hair: rgba(13, 16, 21, 0.08);
  --hair-strong: rgba(13, 16, 21, 0.14);
  --blue: #2450E8;
  --orange: #F25A14;
  --on-blue: #FFFFFF;
  --mark-tile: #0D1015;
  --mark-s: #FFFFFF;
  --icon-ring: transparent;
  --shadow-lift: 0 1px 2px rgba(13, 16, 21, 0.04), 0 6px 16px -6px rgba(13, 16, 21, 0.08);
  --shadow-device: 0 2px 6px rgba(13, 16, 21, 0.06), 0 24px 48px -20px rgba(13, 16, 21, 0.28);
  --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017 19.7%, 1.051 22.6%, 1.059 25.8%, 1.035 33.3%, 1.004 42.1%, 0.997 50.9%, 1);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --max: 1200px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0B0D11;
  --surface: #13161B;
  --sunk: #1A1D23;
  --ink: #EEF1F5;
  --muted: #8E95A0;
  --soft: #6B717C;
  --faint: #3F444D;
  --hair: rgba(238, 241, 245, 0.08);
  --hair-strong: rgba(238, 241, 245, 0.14);
  --blue: #3D6BFF;
  --orange: #FF6B2C;
  --mark-tile: #EEF1F5;
  --mark-s: #0D1015;
  --icon-ring: rgba(238, 241, 245, 0.1);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-device: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 420ms var(--ease), color 420ms var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.wrap { width: min(var(--max), 100% - clamp(40px, 8vw, 96px)); margin-inline: auto; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 10px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Mark ---------- */
.mark-tile { fill: var(--mark-tile); transition: fill 420ms var(--ease); }
.mark-s { fill: none; stroke: var(--mark-s); stroke-width: 4; transition: stroke 420ms var(--ease); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  border-radius: 14px;
  border: 1px solid var(--hair-strong);
  background: var(--surface);
  font-weight: 650; font-size: 15px;
  box-shadow: var(--shadow-lift);
  transition: transform 420ms var(--spring), box-shadow 200ms var(--ease), background-color 420ms var(--ease), border-color 420ms var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.985); box-shadow: none; transition-duration: 90ms; }
.btn.primary { background: var(--blue); border-color: transparent; color: var(--on-blue); box-shadow: 0 1px 2px rgba(13, 16, 21, 0.12), inset 0 -2px 0 rgba(0, 0, 0, 0.14); }
.btn svg { width: 16px; height: 16px; transition: transform 420ms var(--spring); }
.btn:hover svg { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 100%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 300ms var(--ease), background-color 420ms var(--ease);
}
.nav.scrolled { border-bottom-color: var(--hair); }
.nav .wrap { height: 64px; display: flex; align-items: center; gap: 24px; }
.lockup { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 16px; letter-spacing: -0.02em; white-space: nowrap; min-height: 44px; }
.lockup svg { width: 28px; height: 28px; flex: none; }
.lockup span { color: var(--muted); font-weight: 600; }
.nav ul { display: flex; gap: 2px; margin-left: auto; }
.nav ul a {
  display: flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.nav ul a:hover { color: var(--ink); background: var(--sunk); }
/* Language switch: a link to the other domain, sits next to the theme toggle. */
.lang-switch {
  height: 44px; min-width: 44px; padding: 0 12px; display: grid; place-items: center; flex: none;
  border-radius: 12px; font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted);
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.lang-switch:hover { color: var(--ink); background: var(--sunk); }
.lang-switch + .toggle-theme { margin-left: -16px; }
.toggle-theme {
  width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border-radius: 12px; border: 1px solid var(--hair); background: var(--surface); color: var(--ink);
  transition: transform 380ms var(--spring), background-color 420ms var(--ease), border-color 420ms var(--ease);
}
.toggle-theme:hover { transform: translateY(-1px); }
.toggle-theme:active { transform: translateY(1px) scale(0.95); transition-duration: 90ms; }
.toggle-theme svg { width: 18px; height: 18px; transition: transform 600ms var(--spring); }
.toggle-theme .sun { display: none; }
:root[data-theme="dark"] .toggle-theme .sun { display: block; }
:root[data-theme="dark"] .toggle-theme .moon { display: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: clamp(48px, 9vh, 96px) 0 clamp(40px, 7vh, 72px); }
.hero .wrap { display: grid; justify-items: center; }
.hero-mark { width: clamp(88px, 9vw, 112px); height: auto; aspect-ratio: 1; margin-bottom: clamp(28px, 4vh, 40px); overflow: visible; }
.hero-mark rect { fill: var(--blue); transform-box: fill-box; transform-origin: center; animation: settle 1000ms var(--spring) 80ms both; }
.hero-mark path { fill: none; stroke: #FFFFFF; stroke-width: 4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 900ms var(--ease) 380ms forwards; }
@keyframes settle { from { transform: scale(0.82) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
h1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 760;
  text-wrap: balance;
}
.lede {
  margin-top: 22px;
  font-size: clamp(16.5px, 1.5vw, 19px); color: var(--muted); max-width: 46ch; font-weight: 500; text-wrap: balance;
}
.hero .btn { margin-top: 32px; }
.hero .btn:hover svg { transform: translateY(2px); }

/* ---------- Products: one calm section each, the screen is the hero ---------- */
.product { padding: clamp(88px, 10vw, 140px) 0; border-top: 1px solid var(--hair); overflow-x: clip; }
.product > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  grid-template-areas: ". vis" "head vis" "feats vis" ". vis";
  column-gap: clamp(48px, 7vw, 112px);
}
.product.wide > .wrap { grid-template-columns: minmax(0, 35fr) minmax(0, 65fr); column-gap: clamp(48px, 5vw, 72px); }

.p-head { grid-area: head; }
.app-icon { display: block; width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px var(--icon-ring); margin-bottom: 26px; }
.p-name { font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -0.045em; font-weight: 760; }
/* werkstattklar shows its own wordmark; the text stays for screen readers and search. */
.p-name.wordmark { line-height: 0; }
.p-name.wordmark img { height: clamp(40px, 4.2vw, 56px); width: auto; }
.p-name.wordmark .on-dark { display: none; }
:root[data-theme="dark"] .p-name.wordmark .on-light { display: none; }
:root[data-theme="dark"] .p-name.wordmark .on-dark { display: block; }
.p-desc { margin-top: 16px; font-size: clamp(17px, 1.5vw, 19px); font-weight: 500; color: var(--muted); max-width: 34ch; text-wrap: pretty; }
.status { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.status i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); flex: none; }

.p-feats { grid-area: feats; margin-top: clamp(40px, 5vw, 56px); max-width: 40ch; }
.p-feats ul { display: grid; gap: 22px; }
.p-feats h3 { font-size: 16.5px; font-weight: 720; letter-spacing: -0.015em; line-height: 1.35; }
.p-feats p { margin-top: 3px; font-size: 15.5px; font-weight: 500; color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.p-feats .p-detail { margin-top: 28px; font-size: 12.5px; color: var(--soft); }

.p-visual { grid-area: vis; display: flex; justify-content: center; align-items: center; }
.product.wide .p-visual { justify-content: flex-end; }

/* ---------- Devices ---------- */
.browser {
  width: 100%; border-radius: 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--hair-strong);
  box-shadow: var(--shadow-device);
}
.browser .bar { height: 34px; display: flex; align-items: center; padding-left: 12px; border-bottom: 1px solid var(--hair); background: var(--sunk); }
.browser .url { font-size: 11px; color: var(--muted); height: 22px; padding: 0 14px; border-radius: 7px; background: var(--surface); display: inline-flex; align-items: center; border: 1px solid var(--hair); }
.browser img { width: 100%; height: auto; background: #FFFFFF; }

/* ---------- Product layout on smaller screens: heading, screen, features ---------- */
@media (max-width: 899.98px) {
  .product > .wrap, .product.wide > .wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "head" "vis" "feats";
  }
  .p-visual { margin-top: 44px; }
  .p-feats { margin-top: 44px; }
  /* The desktop screen keeps a readable size and runs off the right edge instead of shrinking. */
  .product.wide .p-visual { justify-content: flex-start; }
  .product.wide .browser { width: max(640px, 100%); flex: none; }
}
@media (max-width: 560px) {
  .app-icon { width: 52px; height: 52px; border-radius: 12px; margin-bottom: 22px; }
}

/* ---------- Sections ---------- */
section.band { padding: clamp(88px, 11vw, 144px) 0; border-top: 1px solid var(--hair); }
h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.04; letter-spacing: -0.04em; font-weight: 760; text-wrap: balance; }

/* Statement: words light up as they scroll into place */
.statement p { font-size: clamp(28px, 3.8vw, 50px); line-height: 1.15; letter-spacing: -0.035em; font-weight: 720; max-width: 22ch; }
.statement p span { color: var(--faint); transition: color 300ms var(--ease); }
.statement p span.lit { color: var(--ink); }
.statement p span.lit.a { color: var(--blue); }
.statement p span.lit.b { color: var(--orange); }

footer { border-top: 1px solid var(--hair); padding: 28px 0 36px; font-size: 13.5px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
footer .lockup { font-size: 14px; min-height: 0; gap: 9px; color: var(--ink); }
footer .lockup svg { width: 22px; height: 22px; }
footer nav { display: flex; gap: 4px 20px; flex-wrap: wrap; align-items: center; }
footer nav a { display: inline-flex; align-items: center; min-height: 44px; transition: color 200ms var(--ease); }
footer nav a:hover { color: var(--ink); }
footer .lang { color: var(--ink); }

/* Reveal on scroll */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 900ms var(--spring); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 80ms; } .rv.d2 { transition-delay: 160ms; } .rv.d3 { transition-delay: 240ms; } .rv.d4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  html { scroll-behavior: auto; }
}

@media (max-width: 720px) {
  .nav ul { display: none; }
  .nav .lang-switch { margin-left: auto; }
  footer .wrap { flex-direction: column; align-items: flex-start; }
}
