/* SH1FT-W shared design, version 2 (https://sh1ft-w.github.io/theme/v2/theme.css)
 *
 * One stylesheet for the start page and every project page. Same markup contract as v1 (navigation,
 * light/dark button, DE/EN switch, bilingual spans, .reveal), so a page moves over by changing the
 * two URLs in <head>. New in v2:
 *
 *   - Archivo (variable, width 62 to 125, weight 100 to 900, upright and italic) served from this
 *     folder. No request to a third party, no Google Fonts.
 *   - Brand colours taken from the logo: magenta, red, orange.
 *   - The lanes: three slanted bars, the shape of the S in the logo. The one loud element of a page.
 *     .s-lanes > .s-lane > .s-track, see below. A project page colours them with --lane-a / --lane-b.
 *   - .reveal no longer animates. Content is there when the page is.
 *
 * WHAT A PAGE MAY OVERRIDE (custom properties on :root, light and dark):
 *   --accent, --accent-ink, --on-accent    project colour (buttons, links, focus ring)
 *   --lane-a, --lane-b                     start and end colour of the lanes
 *   --bg, --bg-2, --card, --card-2         surfaces
 *   --ink, --ink-2, --ink-3                text, from strong to faint
 *   --line, --chip                         hairlines and soft fills
 *   --max, --gutter                        layout
 */

@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Archivo"; font-style: italic; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-ext-wdth-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: italic; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(fonts/archivo-latin-wdth-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: light;
  /* Brand, sampled from the logo */
  --magenta: #c9166d; --pink: #ee2276; --red: #fd2a2a; --orange: #fd8923;
  --brand: linear-gradient(90deg, var(--magenta), var(--pink) 34%, var(--red) 68%, var(--orange));
  --bg: #ffffff; --bg-2: #f5f3f6; --card: #ffffff; --card-2: #f5f3f6;
  --ink: #17111b; --ink-2: #5d5563; --ink-3: #8b8490;
  --line: rgba(23,17,27,0.11); --chip: rgba(23,17,27,0.055);
  --accent: #c9166d; --accent-ink: #b81262; --on-accent: #ffffff;
  --lane-a: var(--magenta); --lane-b: var(--orange);
  --glass: rgba(255,255,255,0.78); --glass-line: rgba(23,17,27,0.09);
  --shadow: 0 1px 2px rgba(23,17,27,0.05), 0 14px 34px -18px rgba(23,17,27,0.22);
  --shadow-lg: 0 2px 6px rgba(23,17,27,0.05), 0 44px 90px -40px rgba(23,17,27,0.4);
  --radius: 20px; --radius-lg: 28px; --gutter: clamp(20px, 5vw, 56px); --max: 1200px;
  --font: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-display: var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --skew: -24deg; --unskew: 24deg;
  --nav-top: 12px; --nav-h: 56px; --nav-gap: 18px; --nav-pad: 0 10px 0 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #100c13; --bg-2: #17121b; --card: #1c1621; --card-2: #241d2a;
    --ink: #f6f2f8; --ink-2: #b3aab9; --ink-3: #7d7584;
    --line: rgba(246,242,248,0.11); --chip: rgba(246,242,248,0.08);
    --accent: #ff5c9d; --accent-ink: #ff7fb2; --on-accent: #17111b;
    --glass: rgba(28,22,33,0.74); --glass-line: rgba(246,242,248,0.1);
    --shadow: 0 14px 34px -16px rgba(0,0,0,0.6); --shadow-lg: 0 44px 90px -36px rgba(0,0,0,0.85);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #100c13; --bg-2: #17121b; --card: #1c1621; --card-2: #241d2a;
  --ink: #f6f2f8; --ink-2: #b3aab9; --ink-3: #7d7584;
  --line: rgba(246,242,248,0.11); --chip: rgba(246,242,248,0.08);
  --accent: #ff5c9d; --accent-ink: #ff7fb2; --on-accent: #17111b;
  --glass: rgba(28,22,33,0.74); --glass-line: rgba(246,242,248,0.1);
  --shadow: 0 14px 34px -16px rgba(0,0,0,0.6); --shadow-lg: 0 44px 90px -36px rgba(0,0,0,0.85);
}

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Type: one family. Headlines are wide and heavy like the wordmark; only h1 leans. */
h1, h2, h3 { margin: 0; color: var(--ink); font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: clamp(40px, 5.6vw, 76px); line-height: 1.02; font-weight: 800; font-stretch: 118%; font-style: italic; letter-spacing: -0.025em; }
h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; font-weight: 750; font-stretch: 112%; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 700; font-stretch: 106%; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }

/* Bilingual: static text exists twice, the page language hides the other one */
html[lang="de"] .en, html[lang="en"] .de { display: none !important; }

/* Navigation: one floating bar */
.navwrap { position: sticky; top: var(--nav-top); z-index: 10; padding: 0 var(--gutter); pointer-events: none; }
.nav { pointer-events: auto; max-width: var(--max); margin: 0 auto; height: var(--nav-h); padding: var(--nav-pad);
  display: flex; align-items: center; gap: var(--nav-gap); border-radius: 16px;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
  box-shadow: inset 0 0 0 1px var(--glass-line), var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 750; font-stretch: 110%; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; flex: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand img.logo { width: auto; height: 34px; border-radius: 0; }
.nav-links { display: flex; gap: 2px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav-links a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 10px; transition: background .2s, color .2s; }
.nav-links a:hover { color: var(--ink); background: var(--chip); text-decoration: none; }

.iconbtn { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center; transition: background .2s, color .2s; }
.iconbtn:hover { background: var(--chip); color: var(--ink); }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn .sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .iconbtn .moon { display: none; } :root:not([data-theme="light"]) .iconbtn .sun { display: block; } }
:root[data-theme="dark"] .iconbtn .moon { display: none; } :root[data-theme="dark"] .iconbtn .sun { display: block; }
:root[data-theme="light"] .iconbtn .moon { display: block; } :root[data-theme="light"] .iconbtn .sun { display: none; }

.lang { flex: none; display: inline-flex; padding: 2px; border-radius: 10px; background: var(--chip); }
.lang button { font: inherit; font-size: 13px; font-weight: 600; border: 0; background: none; color: var(--ink-2); padding: 5px 10px; border-radius: 8px; cursor: pointer; }
.lang button.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 12px; border: 0; cursor: pointer;
  font: 650 16px/1 var(--font); font-stretch: 104%; text-decoration: none; white-space: nowrap; background: var(--accent); color: var(--on-accent); transition: transform .2s, filter .2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); filter: brightness(1.07); }
.btn.ghost { background: var(--chip); color: var(--ink); }
.btn.dark { background: var(--ink); color: var(--bg); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* The lanes: three slanted bars, the S of the logo. Markup:
 *   <div class="s-lanes"><div class="s-lane"><div class="s-track">…items…</div></div> ×3</div>
 * The whole block is skewed once, so the left ends of all bars lie on one slanted line.
 * Items stand upright (they are skewed back). .s-lanes.drift lets the tracks move slowly; the page
 * doubles each track's items so the loop has no seam. */
.s-lanes { display: grid; gap: clamp(10px, 1.4vw, 16px); transform: skewX(var(--skew)); }
.s-lane { height: clamp(64px, 7.4vw, 96px); overflow: hidden; border-radius: 6px;
  background: linear-gradient(90deg, var(--lane-a), var(--lane-b)); }
.s-track { height: 100%; display: flex; align-items: center; gap: clamp(12px, 1.6vw, 20px); padding: 0 clamp(18px, 2.4vw, 32px); width: max-content; }
.s-track > * { transform: skewX(var(--unskew)); flex: none; }
.s-lanes.drift .s-track { animation: lane-drift 70s linear infinite; }
.s-lanes.drift .s-lane:nth-child(2) .s-track { animation-direction: reverse; animation-duration: 90s; }
.s-lanes.drift .s-lane:nth-child(3) .s-track { animation-duration: 80s; }
.s-lanes.drift:hover .s-track { animation-play-state: paused; }
@keyframes lane-drift { to { transform: translateX(-50%); } }

/* v1 pages mark blocks with .reveal; v2 shows them at once */
.reveal { opacity: 1; transform: none; }

@media (max-width: 960px) { .nav-links a.opt { display: none; } }
@media (max-width: 640px) {
  .navwrap { top: 8px; padding: 0 10px; }
  .nav { height: 52px; gap: 8px; }
  .nav-links { display: none; }
  .nav > .btn { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .s-lanes.drift .s-track { animation: none; }
}
