/* SchaffLabs website — shared styles.
   Palette "Papier" from the Voice app (sand, anthracite, terracotta). Each project page
   can set its own --accent on <body> so later projects get their own color. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #F7F1E8;
  --bg-soft: #EFE5D8;
  --card: #FFFCF8;
  --ink: #2A211C;
  --muted: #6B5B50;
  --line: #DCCFBF;
  --accent: #D9653B;
  --accent-ink: #B5532E;      /* accent as text on light background */
  --on-accent: #FFF6EF;
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1E1915;
    --bg-soft: #26201B;
    --card: #2A231E;
    --ink: #F7EFE6;
    --muted: #BBA999;
    --line: #3D332C;
    --accent: #F0A07F;
    --accent-ink: #F0A07F;
    --on-accent: #3B1607;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  text-wrap: balance;
  hyphens: auto;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 0 1px var(--line); }
.brand span { font-family: var(--serif); font-size: 1.4rem; font-weight: 500; }
.brand em { font-style: normal; color: var(--accent-ink); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-size: .95rem; }
.nav a:hover { background: var(--bg-soft); }
.nav a[aria-current="page"] { background: var(--bg-soft); font-weight: 600; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px;
  font: 600 1rem/1 var(--sans); text-decoration: none;
  background: var(--accent); color: var(--on-accent);
  border: 0; transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--bg-soft); }
.btn[aria-disabled="true"] { cursor: default; }
.btn svg { width: 20px; height: 20px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--bg-soft); color: var(--muted);
  font-size: .85rem; font-weight: 600; letter-spacing: .02em;
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.chip.live .dot { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .chip.live .dot { animation: none; } }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }

.hero { padding: 72px 0 56px; }
.hero h1 { max-width: 13em; }
.hero .lead { margin-bottom: 32px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Project cards (home) ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.project {
  position: relative; display: flex; flex-direction: column;
  padding: 28px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
a.project:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -24px rgba(42, 33, 28, .45); }
.project .top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 26px; }
.project .icon { width: 64px; height: 64px; border-radius: 18px; }
.project h3 { margin-bottom: .3em; }
.project p { color: var(--muted); }
.project .more { margin-top: auto; font-weight: 600; color: var(--accent-ink); }
.project .more::after { content: " →"; }
.project.placeholder { background: transparent; border-style: dashed; justify-content: center; text-align: center; align-items: center; min-height: 300px; }
.project.placeholder .icon { display: grid; place-items: center; background: var(--bg-soft); color: var(--muted); font: 500 2rem var(--serif); margin-bottom: 18px; }

/* ---------- Feature grid ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.feature { padding: 26px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.feature .ico {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); margin-bottom: 16px;
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.2rem; font-family: var(--sans); font-weight: 700; letter-spacing: 0; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Values strip (home) ---------- */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.values h3 { font-size: 1.3rem; }
.values p { color: var(--muted); }

.band { background: var(--bg-soft); }

/* ---------- Voice hero ---------- */
.product-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 56px 0 72px; }
.product-hero .app-id { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.product-hero .app-id img { width: 56px; height: 56px; border-radius: 16px; }
.product-hero .app-id strong { display: block; font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.product-hero .app-id small { color: var(--muted); }
.phone {
  justify-self: center; width: min(280px, 100%);
  border-radius: 30px; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(42, 33, 28, .55);
}
.note { font-size: .92rem; color: var(--muted); margin-top: 14px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; padding: 28px; border-radius: var(--radius-sm); background: var(--card); border: 1px solid var(--line); }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 16px;
  background: var(--accent); color: var(--on-accent); font: 500 1.3rem var(--serif);
}
.steps strong { display: block; font-size: 1.1rem; margin-bottom: 6px; }
.steps span { color: var(--muted); }

/* ---------- Screenshot gallery ---------- */
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px);
  gap: 18px; overflow-x: auto; padding: 6px 20px 22px; margin: 0 -20px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.gallery img { border-radius: 24px; scroll-snap-align: start; border: 1px solid var(--line); }

/* ---------- Callout ---------- */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  padding: 34px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent);
}
.callout h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .3em; }
.callout p { margin: 0; opacity: .92; }
.callout .badge { font: 500 3.2rem/1 var(--serif); }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.6rem/1 var(--serif); color: var(--accent-ink); transition: rotate .2s ease; }
.faq details[open] summary::after { rotate: 45deg; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* ---------- Legal pages ---------- */
.legal { padding: 56px 0 88px; }
.legal h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.legal h2 { font-size: 1.5rem; margin-top: 2em; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 1em 0 1.5em; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { background: var(--bg-soft); }
.legal .table-scroll { overflow-x: auto; }
.draft {
  padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 2em;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.ph { background: color-mix(in srgb, var(--accent) 22%, transparent); padding: 0 4px; border-radius: 4px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  section { padding: 64px 0; }
  .product-hero { grid-template-columns: 1fr; gap: 40px; padding-top: 32px; }
  .phone { width: min(260px, 75%); }
  .steps { grid-template-columns: 1fr; }
  .callout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-header .wrap { height: 64px; }
  .brand span { font-size: 1.2rem; }
  .nav a { padding: 8px 10px; }
  .nav.optional { display: none; }
  h1 { font-size: 2.25rem; }
  .hero { padding: 48px 0 40px; }
}

/* =====================================================================
   "Lab" theme — SchaffLabs main site (home, impressum, datenschutz).
   Dark, technical, neon cyan + violet from the SchaffLabs logo.
   Project pages (e.g. Voice) keep their own theme.
   ===================================================================== */
body.lab {
  --bg: #223241;            /* = logo background, so the mascot blends in */
  --bg-soft: #2A3B4C;
  --card: #263646;
  --ink: #EAF6FA;
  --muted: #9DB2C2;
  --line: #36495B;
  --accent: #1EE8F2;
  --accent-ink: #1EE8F2;
  --on-accent: #0D1C26;
  --violet: #8B7CF6;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Roboto Mono", monospace;
  --heading: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: dark;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(30, 232, 242, .10), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(139, 124, 246, .10), transparent 60%),
    var(--bg);
}
/* faint circuit grid */
body.lab::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(158, 200, 230, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(158, 200, 230, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
body.lab h1, body.lab h2, body.lab h3 { font-family: var(--heading); font-weight: 700; letter-spacing: -0.02em; }
body.lab .eyebrow { font-family: var(--mono); font-weight: 500; letter-spacing: .08em; color: var(--accent); }
body.lab .eyebrow::before { content: "// "; color: var(--violet); }
body.lab .site-header { background: color-mix(in srgb, #1B2834 80%, transparent); border-bottom-color: var(--line); }
body.lab .brand img.wordmark { width: auto; height: 22px; border-radius: 0; box-shadow: none; }
body.lab .brand img.avatar { box-shadow: 0 0 0 1.5px rgba(30, 232, 242, .5), 0 0 16px rgba(30, 232, 242, .25); border-radius: 50%; }
body.lab .nav a { font-family: var(--mono); font-size: .9rem; }
body.lab .nav a:hover, body.lab .nav a[aria-current="page"] { background: rgba(30, 232, 242, .08); color: var(--accent); }

body.lab .btn { box-shadow: 0 0 0 1px rgba(30, 232, 242, .6), 0 8px 30px -8px rgba(30, 232, 242, .55); }
body.lab .btn.ghost { box-shadow: inset 0 0 0 1.5px var(--line); }
body.lab .btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); background: transparent; color: var(--accent); }
body.lab .chip { font-family: var(--mono); font-weight: 500; background: rgba(30, 232, 242, .08); color: var(--accent); box-shadow: inset 0 0 0 1px rgba(30, 232, 242, .25); }
body.lab .chip .dot { box-shadow: 0 0 8px var(--accent); }

/* Hero with mascot */
.lab-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 40px 0 24px; }
.lab-hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
.lab-hero h1 .glow { color: var(--accent); text-shadow: 0 0 28px rgba(30, 232, 242, .45); }
.lab-hero .lead { margin-bottom: 32px; }
.lab-hero .actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mascot {
  justify-self: center; width: min(520px, 100%);
  /* soft edges so the JPEG blends into the page background */
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }

/* Terminal-style status line */
.terminal {
  margin-top: 28px; padding: 14px 18px; border-radius: 14px; max-width: 30em;
  font: .9rem/1.7 var(--mono); color: var(--muted);
  background: rgba(13, 28, 38, .55); border: 1px solid var(--line);
}
.terminal .ok { color: var(--accent); }
.terminal .wip { color: var(--violet); }
.terminal .cursor { display: inline-block; width: .55em; height: 1.05em; vertical-align: -2px; background: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .terminal .cursor { animation: none; } }

/* Project cards: glowing border on hover, each project keeps its own icon color */
body.lab .project { background: linear-gradient(180deg, rgba(38, 54, 70, .9), rgba(30, 44, 58, .9)); }
body.lab a.project:hover { box-shadow: 0 0 0 1px rgba(30, 232, 242, .55), 0 20px 50px -20px rgba(30, 232, 242, .35); }
body.lab .project .tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
body.lab .project .tags span { font: .78rem var(--mono); color: var(--muted); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
body.lab .project.placeholder { background: transparent; }
body.lab .project.placeholder .icon { font-family: var(--mono); color: var(--violet); background: rgba(139, 124, 246, .1); }

body.lab .band { background: rgba(13, 28, 38, .35); border-block: 1px solid var(--line); }
body.lab .values > div { padding: 26px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: rgba(38, 54, 70, .5); }
body.lab .values .ico { font: 1.1rem var(--mono); color: var(--accent); margin-bottom: 12px; }

body.lab .draft { background: rgba(139, 124, 246, .12); border-color: rgba(139, 124, 246, .45); }
body.lab .ph { background: rgba(139, 124, 246, .25); }
body.lab .legal th { background: var(--bg-soft); }

@media (max-width: 860px) {
  .lab-hero { grid-template-columns: 1fr; padding-top: 16px; }
  .mascot { width: min(380px, 90%); grid-row: 1; }
}
@media (max-width: 560px) {
  body.lab .brand img.wordmark { height: 18px; }
}
