/*
 * durchdacht.me, in empty.tokyo's look (2026-11-15): the same ground, greys, type scale and rows as
 * empty.tokyo/legal, Geist and Geist Mono served from here (fonts/OFL.txt), every button a pill.
 * Motion: rows rise once on load (CSS), a language change crossfades with anime.js (app.js).
 * Nothing moves for anybody who asked for less motion.
 */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-1.9.2.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/fonts/geist-mono-1.9.2.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #060608;
  --text: #e9ebee;
  --border: #16181f;
  --accent: #55b8ff;

  --t-label: 11px;
  --t-meta: 12px;
  --t-ui: 13px;
  --t-body: 15px;
  --t-heading: 20px;
  --t-title: 30px;

  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--t-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* empty.tokyo's backdrop: a faint dot grid, a soft light from the top, a vignette at the bottom,
   and the 2 % grain over everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, 0.045), transparent 55%),
    radial-gradient(120% 100% at 50% 115%, rgba(0, 0, 0, 0.55), transparent 55%),
    radial-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px) 0 0 / 30px 30px;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: #050505; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Corners ─────────────────────────────────────────────────────────── */
.top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 28px;
  box-sizing: content-box;
  padding: 32px 32px 0;
}

.mark {
  margin: 0;
  font-size: var(--t-heading);
  font-weight: 200;
  line-height: 1;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mark-dot { color: var(--accent); }

.langs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.langs > span { color: rgba(255, 255, 255, 0.3); }
.langs button {
  appearance: none;
  margin: -8px -6px;
  padding: 8px 6px;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: color 0.15s;
}
.langs button:hover { color: rgba(255, 255, 255, 0.7); }
.langs button[aria-pressed="true"] { color: rgba(255, 255, 255, 0.8); }

/* ── The page ────────────────────────────────────────────────────────── */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: calc(42rem + 48px);
  margin: 0 auto;
  padding: 48px 24px 72px;
}

h1 {
  margin: 0;
  font-size: var(--t-title);
  font-weight: 200;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  margin: 64px 0 0;
  font-size: var(--t-heading);
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  scroll-margin-top: 32px;
}

.date {
  margin: 12px 0 0;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
}

.lede {
  margin: 28px 0 0;
  font-size: var(--t-ui);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.55);
  text-wrap: pretty;
}
h2 + .lede { margin-top: 16px; }

.rows { margin: 40px 0 0; }
h2 + .lede + .rows { margin-top: 32px; }

/* One template for every row, so labels and texts stand in two straight columns; the 11 px label
   sits on the first line of the 13 px text. On a phone the label stands over its text. */
.row {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.row dt {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.6);
}
.row dd {
  margin: 6px 0 0;
  font-size: var(--t-ui);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.5);
  text-wrap: pretty;
}
@media (min-width: 640px) {
  .top { padding: 40px 40px 0; }
  .row {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    align-items: baseline;
    column-gap: 32px;
  }
  .row dd { margin: 0; }
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, 0.25);
  text-underline-offset: 4px;
  transition: text-decoration-color 0.15s;
}
a:hover { text-decoration-color: rgba(255, 255, 255, 0.6); }
.mail { font-family: var(--mono); font-size: 0.96em; }

.mailrow {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 6px;
}

/* ── Pills ───────────────────────────────────────────────────────────── */
.pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.75);
  font: 500 var(--t-meta) / 1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.07s ease;
}
.pill:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: color-mix(in srgb, var(--accent) 40%, rgba(255, 255, 255, 0.2));
  color: var(--text);
}
.pill:active { transform: scale(0.97); }
a.pill { height: 34px; padding: 0 18px; font-size: var(--t-ui); color: var(--text); }

/* Copy: the word and the tick share one cell, so the pill keeps its width while they crossfade. */
.copy { display: inline-grid; place-items: center; }
.copy > * {
  grid-area: 1 / 1;
  transition: opacity 0.15s var(--ease-out), filter 0.15s var(--ease-out);
}
.copy-b { opacity: 0; filter: blur(2px); color: var(--accent); }
.copy[data-done] .copy-a { opacity: 0; filter: blur(2px); }
.copy[data-done] .copy-b { opacity: 1; filter: none; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Arrival ─────────────────────────────────────────────────────────── */
/* As empty.tokyo's .rise: 450 ms, eased out, 40 ms apart, from the ninth step on all at once.
   `backwards`, so nothing shows early and nothing stays a layer once it has arrived. */
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
}
.r {
  animation: rise 450ms var(--ease-out) backwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}
.s1 { --i: 1; } .s2 { --i: 2; } .s3 { --i: 3; } .s4 { --i: 4; }
.s5 { --i: 5; } .s6 { --i: 6; } .s7 { --i: 7; } .s8 { --i: 8; }
[data-settled] .r { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .r { animation: none; }
  .pill:active { transform: none; }
  *, *::before, *::after { transition: none !important; }
}

/* ── Paper ───────────────────────────────────────────────────────────── */
@media print {
  html, body { background: #fff; color: #000; }
  body::before, body::after, .langs, .copy { display: none !important; }
  .top { padding: 0 0 24px; height: auto; }
  main { max-width: none; padding: 0; }
  .r { animation: none; }
  .mark, h1, h2, .date, .lede, .row dt, .row dd { color: #000; }
  .row { border-top-color: #ccc; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  a[href^="https://"]::after { content: " (" attr(href) ")"; }
}
