/* ─────────────────────────────────────────────────────────────────────
   alexander-schink.com — Swiss Typographic
   Single-file CSS, no preprocessor.
   ───────────────────────────────────────────────────────────────────── */

/* OPTIONAL fonts — drop woff2 files into /assets/fonts/ to upgrade.
   Site falls back gracefully to system stack if files are absent. */
@font-face {
  font-family: "Inter Tight";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: local("Inter Tight Bold"), url("/assets/fonts/InterTight-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: local("Inter Regular"), url("/assets/fonts/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local("Inter Medium"), url("/assets/fonts/Inter-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: local("JetBrains Mono Medium"), url("/assets/fonts/JetBrainsMono-Medium.woff2") format("woff2");
}

/* ── tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:        #FAFAF7;
  --ink:       #0E0E0C;
  --muted:    #6B6B66;
  --rule:     #1A1A18;
  --rule-soft: rgba(26, 26, 24, 0.12);
  --accent:   #E04E1A;

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --max:   1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --rhythm: 8px;

  --t-fast: 180ms;
  --t-base: 280ms;
  --t-slow: 420ms;
  --ease:   cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ── reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ol, ul, dl, dd, figure, blockquote {
  margin: 0;
  padding: 0;
}
ol, ul { list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

/* ── base ────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
html, body { background: var(--bg); color: var(--ink); }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11", "tnum" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--bg); }

/* ── language toggle ────────────────────────────────────────────── */
html[lang="en"] [data-lang="de"],
html[lang="de"] [data-lang="en"] { display: none; }

/* ── skip link ──────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  background: var(--ink);
  color: var(--bg);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  z-index: 100;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: 12px; outline: none; }

/* ── focus ring ─────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

/* ── header ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--gutter);
  align-items: center;
  padding: 20px var(--gutter);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 18px;
  padding: 6px 8px;
  margin: -6px -8px;
}
.site-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 32px);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.site-nav a {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
.site-nav a .num { color: var(--muted); transition: color var(--t-fast) var(--ease); }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transition: right var(--t-base) var(--ease);
}
.site-nav a:hover::after,
.site-nav a:focus-visible::after { right: 0; }
.site-nav a:hover .num,
.site-nav a:focus-visible .num { color: var(--accent); }
.site-nav a[aria-current]::after { right: 0; }
.site-nav a[aria-current] .num { color: var(--accent); }

@media (max-width: 720px) {
  .site-nav { display: none; }
}

.lang-toggle {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  margin: -8px -10px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lang-toggle .lang-sep { color: var(--muted); }
html[lang="en"] .lang-toggle .lang-en { color: var(--ink); }
html[lang="en"] .lang-toggle .lang-de { color: var(--muted); }
html[lang="de"] .lang-toggle .lang-de { color: var(--ink); }
html[lang="de"] .lang-toggle .lang-en { color: var(--muted); }
.lang-toggle:hover .lang-en,
.lang-toggle:hover .lang-de { color: var(--accent); }

/* ── layout primitives ──────────────────────────────────────────── */
.section {
  padding: clamp(64px, 10vw, 160px) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--rule-soft);
  position: relative;
}
.section:first-of-type { border-top: 0; }
.section-head {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  gap: 16px;
  align-items: baseline;
  margin-bottom: clamp(32px, 5vw, 64px);
  letter-spacing: 0;
}
.section-head .num {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.section-head .meta-spacer {
  flex: 1;
  height: 1px;
  background: var(--rule-soft);
  align-self: center;
  margin: 0 8px;
}
.section-head .meta-year {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ── HERO ────────────────────────────────────────────────────────── */
.section--hero {
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(80px, 12vw, 160px);
}
.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 13vw, 184px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin-bottom: clamp(32px, 5vw, 64px);
  color: var(--ink);
}
.display-row { display: block; }
.char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.18em);
  animation: char-rise 720ms calc(var(--i, 0) * 28ms + 80ms) var(--ease) forwards;
  will-change: transform, opacity;
}
@keyframes char-rise {
  to { opacity: 1; transform: translateY(0); }
}

.lead {
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.5;
  max-width: 38em;
  color: var(--ink);
  margin-bottom: clamp(28px, 4vw, 40px);
}

/* CTAs */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  min-height: 48px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  border: 1px solid var(--ink);
  background: transparent;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  position: relative;
}
.cta--primary {
  background: var(--ink);
  color: var(--bg);
}
.cta--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.cta--ghost {
  color: var(--ink);
}
.cta--ghost:hover {
  background: var(--ink);
  color: var(--bg);
}
.cta-arrow {
  font-family: var(--font-mono);
  font-size: 16px;
  display: inline-block;
  transition: transform var(--t-base) var(--ease);
}
.cta:hover .cta-arrow { transform: translateX(4px); }
.cta--primary:hover .cta-arrow { transform: translateY(2px); }

/* inline link */
.link {
  position: relative;
  text-decoration: none;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: background-size var(--t-base) var(--ease), color var(--t-fast) var(--ease);
  padding-bottom: 1px;
}
.link:hover {
  color: var(--accent);
  background-image: linear-gradient(var(--accent), var(--accent));
}

/* ── ABOUT ───────────────────────────────────────────────────────── */
.section--about {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 5vw, 56px);
}
.hd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.prose {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.65;
  max-width: 62ch;
  color: var(--ink);
}
.prose p + p { margin-top: 1em; }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px 32px;
  font-size: 14px;
  border-top: 1px solid var(--rule-soft);
  padding-top: 32px;
}
.facts > div { display: flex; flex-direction: column; gap: 4px; }
.facts dt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.facts dd { color: var(--ink); }

/* ── SERVICES ────────────────────────────────────────────────────── */
.services {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}
.services > li {
  grid-column: span 6;
  background: var(--bg);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background var(--t-base) var(--ease);
  position: relative;
  min-height: 220px;
}
.services > li:hover { background: var(--ink); color: var(--bg); }
.services > li:hover .num,
.services > li:hover p { color: inherit; }
.services > li .num {
  font-size: 13px;
  color: var(--muted);
  transition: color var(--t-base) var(--ease);
}
.services > li h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-top: auto;
}
.services > li p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 38ch;
  transition: color var(--t-base) var(--ease);
}

@media (min-width: 900px) {
  .services > li { grid-column: span 4; }
}
@media (max-width: 600px) {
  .services > li { grid-column: span 12; }
}

/* ── CRYPTEDMOON tile ────────────────────────────────────────────── */
.cm-tile {
  display: block;
  padding: clamp(36px, 5vw, 72px);
  background: var(--ink);
  color: var(--bg);
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease);
}
.cm-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
  pointer-events: none;
}
.cm-tile:hover::after { opacity: 1; }
.cm-tile__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 13px;
  color: color-mix(in srgb, var(--bg) 60%, transparent);
  margin-bottom: clamp(32px, 5vw, 56px);
}
.cm-tile__hd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4.4vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 20ch;
  margin-bottom: clamp(16px, 2vw, 24px);
}
.cm-tile__lede {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.6;
  max-width: 60ch;
  color: color-mix(in srgb, var(--bg) 78%, transparent);
}
.cm-tile__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 24px;
  margin-top: clamp(32px, 5vw, 56px);
  padding-top: 32px;
  border-top: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
}
.cm-tile__stats > div { display: flex; flex-direction: column; gap: 4px; }
.cm-tile__stats dt {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--bg) 55%, transparent);
}
.cm-tile__stats dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.025em;
}
.cm-tile__cta {
  margin-top: clamp(32px, 4vw, 48px);
  font-family: var(--font-mono);
  font-size: 14px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 30%, transparent);
  padding-bottom: 4px;
  transition: border-color var(--t-base) var(--ease);
}
.cm-tile:hover .cm-tile__cta {
  border-color: var(--bg);
}

/* ── CONTACT ─────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--rule-soft);
}
.contact-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr auto;
  align-items: baseline;
  padding: clamp(20px, 2.4vw, 28px) 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: clamp(16px, 1.4vw, 19px);
  gap: 24px;
  transition: padding-left var(--t-base) var(--ease);
}
.contact-row__label {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-row__value { color: var(--ink); }
.contact-row--primary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3.4vw, 44px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  position: relative;
}
.contact-row--primary .contact-row__value {
  font-family: var(--font-display);
}
.contact-row--primary .contact-row__arrow {
  font-family: var(--font-mono);
  font-weight: 500;
  transition: transform var(--t-base) var(--ease), color var(--t-fast) var(--ease);
}
.contact-row--primary:hover .contact-row__arrow { transform: translateX(8px); color: var(--accent); }
.contact-row--primary:hover .contact-row__value { color: var(--accent); }

@media (max-width: 600px) {
  .contact-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ── FOOTER ──────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--rule-soft);
  padding: 32px var(--gutter) 64px;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.site-footer__brand { display: flex; gap: 12px; align-items: baseline; }
.site-footer__brand .num { color: var(--ink); }
.site-footer__nav { display: flex; gap: 24px; flex-wrap: wrap; }
.site-footer__nav a { transition: color var(--t-fast) var(--ease); }
.site-footer__nav a:hover { color: var(--accent); }

/* ── reveal animation ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  will-change: transform, opacity;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── legal pages ─────────────────────────────────────────────────── */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 120px) var(--gutter);
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5.6vw, 72px);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: -0.02em;
  margin-top: clamp(36px, 4vw, 56px);
  margin-bottom: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
}
.legal p, .legal address, .legal ul {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 12px;
  color: var(--ink);
}
.legal address { font-style: normal; }
.legal ul { padding-left: 20px; }
.legal ul li { list-style: disc; margin-bottom: 4px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--accent); }
.legal .back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 32px;
  color: var(--muted);
}
.legal .back:hover { color: var(--accent); text-decoration: none; }

/* ── prefers-reduced-motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .char { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ── print ──────────────────────────────────────────────────────── */
@media print {
  .site-header, .lang-toggle, .cta-row, .site-footer__nav { display: none; }
  body { color: #000; background: #fff; }
  .section { page-break-inside: avoid; }
}
