/* Quartio — quartio.org
   Keine externen Ressourcen: passt zur strikten CSP in public/_headers. */

:root {
  --bg:          #faf9f6;
  --bg-elev:     #ffffff;
  --ink:         #14161a;
  --ink-2:       #4c5361;
  --ink-3:       #838a97;
  --line:        #e6e2d9;
  --line-strong: #d5d0c4;
  --accent:      #16584a;
  --accent-ink:  #ffffff;
  --accent-soft: #e8f0ec;
  --danger:      #9b2c1f;

  --glow-a: rgba(22, 88, 74, .16);
  --glow-b: rgba(198, 148, 90, .16);

  --radius:    14px;
  --radius-lg: 20px;
  --shadow:    0 1px 2px rgba(20, 22, 26, .05), 0 12px 32px -18px rgba(20, 22, 26, .35);

  --ff: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 60ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0d0f12;
    --bg-elev:     #15181d;
    --ink:         #f1f3f5;
    --ink-2:       #a8b0bc;
    --ink-3:       #79818e;
    --line:        #23272e;
    --line-strong: #333941;
    --accent:      #57c6a6;
    --accent-ink:  #07231c;
    --accent-soft: #10231e;
    --danger:      #ef9a8c;

    --glow-a: rgba(87, 198, 166, .12);
    --glow-b: rgba(198, 148, 90, .10);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -20px rgba(0, 0, 0, .9);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.6;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Hintergrund ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.backdrop::before,
.backdrop::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.backdrop::before {
  width: 60vmax; height: 60vmax;
  top: -26vmax; right: -18vmax;
  background: radial-gradient(circle at center, var(--glow-a), transparent 68%);
}
.backdrop::after {
  width: 52vmax; height: 52vmax;
  bottom: -28vmax; left: -20vmax;
  background: radial-gradient(circle at center, var(--glow-b), transparent 68%);
}

/* ---------- Grundbausteine ---------- */

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  padding: .7rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* ---------- Kopfzeile ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
  padding: 1.75rem 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}
.mark {
  width: 26px; height: 26px;
  color: var(--accent);
  flex: none;
}
.wordmark {
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.015em;
}

.header-link {
  font-size: .875rem;
  color: var(--ink-3);
  text-decoration: none;
  transition: color .18s ease;
}
.header-link:hover { color: var(--ink); }
@media (max-width: 30rem) { .header-link { display: none; } }

/* ---------- Held ---------- */

main { flex: 1 0 auto; }

.hero {
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
  padding: clamp(4rem, 13vh, 8.5rem) 0 clamp(3.5rem, 8vh, 5.5rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.5rem;
  padding: .34rem .8rem .34rem .6rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-elev) 70%, transparent);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent);
  animation: pulse 2.8s ease-out infinite;
}
@keyframes pulse {
  0%        { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  70%, 100% { box-shadow: 0 0 0 7px transparent; }
}

h1 {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(2.35rem, 1.35rem + 4.4vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 640;
  text-wrap: balance;
}
@media (max-width: 46rem) { .br-lg { display: none; } }

.lead {
  margin: 1.5rem 0 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem);
  line-height: 1.62;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* ---------- Anmeldung ---------- */

.signup { margin-top: clamp(2.25rem, 5vh, 3rem); }

.signup-form { max-width: 34rem; }

.field {
  display: flex;
  gap: .5rem;
  align-items: stretch;
}

input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  padding: .85rem 1rem;
  font: inherit;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .18s ease, box-shadow .18s ease;
}
input[type="email"]::placeholder { color: var(--ink-3); }
input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
input[type="email"][aria-invalid="true"] { border-color: var(--danger); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: none;
  padding: .85rem 1.2rem;
  font: inherit;
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}
.btn:hover { filter: brightness(1.09); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-icon { width: 16px; height: 16px; flex: none; }

@media (max-width: 30rem) {
  .field { flex-direction: column; }
  .btn { justify-content: center; }
}

.consent {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-top: .95rem;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--ink-3);
}
.consent input {
  margin: .2rem 0 0;
  flex: none;
  accent-color: var(--accent);
  width: 15px; height: 15px;
}
.consent a { color: var(--ink-2); text-underline-offset: 2px; }
.consent a:hover { color: var(--ink); }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.status {
  margin: .9rem 0 0;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-2);
  min-height: 0;
}
.status:empty { display: none; }
.status[data-state="ok"]    { color: var(--accent); font-weight: 520; }
.status[data-state="error"] { color: var(--danger); }

.fineprint {
  margin: .75rem 0 0;
  font-size: .8125rem;
  color: var(--ink-3);
}

/* ---------- Säulen ---------- */

.pillars {
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
  padding: clamp(2rem, 6vh, 3.5rem) 0 clamp(4rem, 10vh, 6rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}

.pillar h2 {
  margin: 0 0 .5rem;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pillar p {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.62;
  color: var(--ink-3);
  max-width: 34ch;
  text-wrap: pretty;
}

/* ---------- Fußzeile ---------- */

.site-footer {
  flex: none;
  width: min(100% - 2.5rem, 1120px);
  margin: 0 auto;
  padding: 1.75rem 0 2.25rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  font-size: .8125rem;
  color: var(--ink-3);
}
.copy { margin: 0; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-nav a {
  text-decoration: none;
  transition: color .18s ease;
}
.footer-nav a:hover { color: var(--ink); }

/* ---------- Inhaltsseiten (Impressum, Datenschutz, Danke) ---------- */

.prose {
  width: min(100% - 2.5rem, 720px);
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 5rem) 0 clamp(3rem, 8vh, 4.5rem);
}
.prose h1 {
  max-width: none;
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 1.75rem;
}
.prose h2 {
  margin: 2.5rem 0 .6rem;
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.012em;
}
.prose h3 {
  margin: 1.75rem 0 .4rem;
  font-size: .9375rem;
  font-weight: 600;
}
.prose p, .prose li {
  color: var(--ink-2);
  max-width: var(--measure);
  text-wrap: pretty;
}
.prose p { margin: 0 0 1rem; }
.prose ul { margin: 0 0 1rem; padding-left: 1.15rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--accent); text-underline-offset: 2px; }
.prose .meta {
  margin-top: 3rem;
  font-size: .8125rem;
  color: var(--ink-3);
}
.back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 2rem;
  font-size: .875rem;
  color: var(--ink-3);
  text-decoration: none;
}
.back:hover { color: var(--ink); }

.todo {
  display: block;
  padding: .9rem 1.05rem;
  margin: 0 0 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: .875rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
