/* Voxel teaser — editorial newsletter layout, blue palette. Element styling
   matched to the design prototype, retuned to our blue palette + fonts
   (Bricolage Grotesque / Hanken Grotesk / JetBrains Mono). Zero third-party. */

:root,
[data-theme='dark'] {
  --bg: #0b0c0d;
  --surface: #141517; /* prototype bg2 */
  --surface-2: #1a1c1f; /* prototype bg3 */
  --hairline: rgba(255, 255, 255, 0.1); /* prototype border */
  --hover: rgba(255, 255, 255, 0.045); /* prototype cardHover */
  --ink: #f3f3f0;
  --muted: #9a9c98;
  --faint: #5c5e5b;
  --accent: #3b82f6;
  --accent-2: #3b82f6;
  --on-accent: #ffffff;
  --ring: rgba(59, 130, 246, 0.42);
  --glow: rgba(59, 130, 246, 0.2);
  --down: #f87171;
  --up: #34d399;
}

[data-theme='light'] {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-2: #fbfbf9;
  --hairline: rgba(0, 0, 0, 0.11);
  --hover: rgba(0, 0, 0, 0.025);
  --ink: #17181b;
  --muted: #5c5e5b;
  --faint: #8a8d88;
  --accent: #2563eb;
  --accent-2: #2563eb;
  --on-accent: #ffffff;
  --ring: rgba(37, 99, 235, 0.3);
  --glow: rgba(59, 130, 246, 0.12);
  --down: #dc2626;
  --up: #1a7a44;
}

:root {
  --maxw: 1120px;
  --gutter: 24px;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
html {
  background: var(--bg);
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}
a {
  color: var(--accent-2);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------- header / nav ---------------- */
.nav {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.42em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
/* inline logo mark (same dot/rings as the favicon) — blue, adapts per theme */
.brand-mark {
  color: var(--accent);
  flex: none;
}
.brand .brand-mark {
  width: 1.05em;
  height: 1.05em;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* theme toggle — rounded pill, segmented (prototype exact: active = ink fill) */
.theme-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface);
}
.theme-toggle button {
  padding: 6px 14px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  background: transparent;
  color: var(--muted);
  transition: all 0.15s ease;
}
.theme-toggle button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}
.nav-cta,
.util-cta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 8px;
  padding: 9px 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.12s ease;
}
.nav-cta:hover,
.util-cta:hover {
  filter: brightness(1.08);
}

/* ---------------- ambient blue glow (hero + CTA) ---------------- */
.glow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.glow--hero {
  top: -160px;
  width: 820px;
  max-width: 120vw;
  height: 540px;
}
.glow--cta {
  bottom: -200px;
  width: 900px;
  max-width: 130vw;
  height: 560px;
}

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: clamp(40px, 7vw, 84px) 0 clamp(46px, 8vw, 92px);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
}
.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px var(--glow);
}
.hero-title {
  margin: 18px auto 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
.hero-sub {
  margin: 18px auto 0;
  max-width: 46ch;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}
.microcopy {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--faint);
}
.platforms {
  margin: 24px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--faint);
}
.platforms .sep {
  opacity: 0.5;
}

/* ---------------- subscribe form (hero + final CTA) ----------------
   Prototype: the form is the flex row with a blue glow ring (box-shadow),
   the status sits below as a sibling. */
.subscribe {
  max-width: 540px;
  margin: 30px auto 0;
}
.sub-form {
  display: flex;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 0 0 5px var(--glow), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.sub-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
}
.sub-input {
  flex: 1 1 200px;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px; /* ≥16px avoids iOS zoom */
  padding: 12px 12px;
}
.sub-input::placeholder {
  color: var(--faint);
}
.sub-btn {
  flex: 0 0 auto;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 9px;
  white-space: nowrap;
  transition: filter 0.15s ease;
}
.sub-btn:hover {
  filter: brightness(1.07);
}
.sub-btn:disabled {
  opacity: 0.75;
  cursor: default;
}
.sub-status {
  min-height: 18px;
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.subscribe[data-state='invalid'] .sub-status,
.subscribe[data-state='error'] .sub-status {
  color: var(--down);
}
.subscribe[data-state='done-subscribed'] .sub-status,
.subscribe[data-state='done-already'] .sub-status {
  color: var(--up);
}

/* optional segment chips (both forms) */
.seg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 0;
}
.seg-cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--faint);
}
.seg-chip {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.seg-chip:hover {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline));
}
.seg-chip[aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ---------------- content bands ---------------- */
.band {
  border-top: 1px solid var(--hairline);
}
.sec {
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) 24px;
}
.sec-why {
  max-width: 820px;
}
.sec-what {
  max-width: 1120px;
}
.sec-who {
  max-width: 900px;
  text-align: center;
  padding: clamp(56px, 8vw, 92px) 24px;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 18px;
}
.sec-who .kicker {
  color: var(--muted);
}
.statement {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.statement .muted {
  color: var(--muted);
}
.st-why {
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.34;
  text-wrap: pretty;
}
.st-who {
  font-size: clamp(20px, 2.8vw, 28px);
  line-height: 1.4;
  text-wrap: balance;
}

/* what you'll get — numbered cards */
.band-head {
  max-width: 720px;
}
.band-title {
  margin: 0 0 38px;
  max-width: 22ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
  padding: 28px 26px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.card:hover {
  background: color-mix(in srgb, var(--ink) 4%, var(--surface));
  border-color: var(--ring);
  transform: translateY(-2px);
}
.card-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* final CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
}
.sec-cta {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(64px, 9vw, 112px) 24px;
  text-align: center;
}
.cta-band h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}
.cta-text {
  margin: 0 auto 24px;
  max-width: 48ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}
.cta-band .subscribe {
  margin: 0 auto;
}

/* ---------------- footer (prototype two-row layout) ---------------- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--hairline);
  background: var(--bg);
}
.footer-row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 38px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
}
.footer-brand .brand-mark {
  width: 17px;
  height: 17px;
}
.footer-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.footer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}
.footer-links {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--ink);
}
.footer-copy {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 32px;
}
.footer-copy span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
}

/* ---------------- legal pages (/privacy, /impressum) ---------------- */
.util {
  border-bottom: 1px solid var(--hairline);
  background: var(--bg);
}
.util-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}
.util-left {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
}
.util-left:hover {
  color: var(--accent-2);
}
.util-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.legal {
  padding: 44px 0 64px;
  max-width: 720px;
}
.legal .back {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
  text-decoration: none;
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 6vw, 42px);
  letter-spacing: -0.03em;
  margin: 18px 0 6px;
  color: var(--ink);
}
.legal .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  margin: 0 0 28px;
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin: 32px 0 10px;
  color: var(--ink);
}
.legal p,
.legal li {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
}
.legal a {
  color: var(--accent-2);
}
.legal ul {
  padding-left: 20px;
}

/* ---------------- motion: hero entrance + scroll reveals ---------------- */
.motion .anim-in {
  opacity: 0;
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.motion .a1 { animation-delay: 0.04s; }
.motion .a2 { animation-delay: 0.1s; }
.motion .a3 { animation-delay: 0.17s; }
.motion .a4 { animation-delay: 0.24s; }
.motion .a5 { animation-delay: 0.3s; }
.motion .a6 { animation-delay: 0.36s; }
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reveal--armed {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal--armed.reveal--in {
  opacity: 1;
  transform: none;
}

/* ---------------- responsive ---------------- */
@media (max-width: 620px) {
  .footer-row {
    justify-content: flex-start;
  }
}

/* ---------------- reduced motion (glows stay; they're static) ---------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .card:hover {
    transform: none;
  }
}
