/* Startseite: eigenständig, ohne Tailwind. Hell = Tinte auf Papier, Dunkel = Sand auf Schwarz.
   Ohne gesetzte Wahl folgt die Seite dem System; theme-init.js setzt data-theme vor dem Zeichnen. */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Barlow-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/Barlow-500-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/BarlowCondensed-600-latin.woff2') format('woff2');
}

:root {
  --bg: #EEE8DF;
  --tx: #1E1A17;
  --tx-2: #4A413B;
  --tx-3: #6B6058;
  --accent: #8C5A3D;
  --hair: rgba(30, 26, 23, 0.3);
  --footer-line: #1E1A17;
  --footer-bg: rgba(238, 232, 223, 0.85);
  --gutter: clamp(20px, 4.4vw, 64px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0C0B;
    --tx: #F4F1ED;
    --tx-2: #B5ABA1;
    --tx-3: #9A8E83;
    --accent: #C9A184;
    --hair: rgba(244, 241, 237, 0.25);
    --footer-line: rgba(244, 241, 237, 0.14);
    --footer-bg: rgba(14, 12, 11, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0C0B;
  --tx: #F4F1ED;
  --tx-2: #B5ABA1;
  --tx-3: #9A8E83;
  --accent: #C9A184;
  --hair: rgba(244, 241, 237, 0.25);
  --footer-line: rgba(244, 241, 237, 0.14);
  --footer-bg: rgba(14, 12, 11, 0.8);
  color-scheme: dark;
}

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

html, body { margin: 0; background: var(--bg); }

body.home {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--tx);
  font-family: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--tx); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise 1.4s cubic-bezier(.2, .7, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  /* Senkrecht bleibt Scrollen beim Browser, waagrecht dreht das Zeichen. */
  touch-action: pan-y;
}

.top, .signature, .legal { position: relative; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: clamp(24px, 3vw, 44px) var(--gutter) 0;
  pointer-events: none;
}
.brand {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: var(--tx);
}
.brand:hover { color: var(--tx); }
.mark-dot { fill: var(--accent); }
.wordmark {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
}
.dot { color: var(--accent); }

.meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.rule { width: 28px; height: 1px; background: var(--hair); }
.clock { color: var(--tx); font-variant-numeric: tabular-nums; letter-spacing: 0.14em; min-width: 8ch; }
.theme {
  pointer-events: auto;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: transparent;
  color: var(--tx);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.theme:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 559px) { .place, .rule { display: none; } }

.spacer { flex: 1 1 auto; min-height: 420px; pointer-events: none; }
@media (max-width: 639px) { .spacer { min-height: max(300px, 52svh); } }

.signature {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 0 var(--gutter) 18px;
  pointer-events: none;
}
.big {
  font-family: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  font-weight: 600;
  font-size: clamp(56px, 9vw, 132px);
  line-height: 0.82;
  letter-spacing: -0.01em;
  color: var(--tx);
}
.coords {
  padding-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-3);
  font-variant-numeric: tabular-nums;
}

.legal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px 40px;
  padding: 24px var(--gutter) 28px;
  border-top: 1px solid var(--footer-line);
  background: var(--footer-bg);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.item { display: flex; flex-direction: column; gap: 6px; }
.lbl {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.val { font-size: 15px; line-height: 1.5; }
.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}
.links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
@media (max-width: 559px) {
  .legal { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; padding-top: 20px; }
  .item:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .links { grid-column: 1 / -1; justify-content: flex-start; }
}
