/* =========================================================================
   Simon Reichl — Entwickler-Website
   Konzept "Buehnenlicht": unbunte, warm-neutrale Basis; Farbe erscheint
   nur in den App-Sektionen und "geht an" beim Hereinscrollen.
   Pure Vanilla CSS. Dark-first + Light via prefers-color-scheme.
   ========================================================================= */

/* ----- Design-Tokens: neutrale Basis (Dark, Default) --------------------- */
:root {
  --bg-0:#0F0E0C;   /* Seitenhintergrund, warmes Fast-Schwarz */
  --bg-1:#161412;   /* Karten, Header, Device-Rahmen */
  --bg-2:#1E1B18;   /* Hover / erhoehte Flaechen */
  --line:#2A2622;   /* Hairlines, Divider (immer 1px) */
  --ink-1:#F2EFEA;  /* Primaertext, Headlines */
  --ink-2:#A8A29A;  /* Fliesstext sekundaer */
  --ink-3:#6E6862;  /* Captions, Eyebrows */

  --maxw:1100px;
  --pad:24px;
  --r-s:10px;       /* Buttons, Chips, Karten */
  --r-lg:36px;      /* Device */

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, monospace;

  --t-hover:180ms ease-out;
  --t-reveal:550ms cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

@media (min-width:768px){ :root{ --pad:40px; } }

/* ----- Neutrale Basis (Light) ------------------------------------------- */
@media (prefers-color-scheme: light){
  :root{
    --bg-0:#FBFAF8;
    --bg-1:#FFFFFF;
    --bg-2:#F3F1ED;
    --line:#E4E0DA;
    --ink-1:#1C1917;
    --ink-2:#57534E;
    --ink-3:#8A857E;
    color-scheme: light;
  }
}

/* ----- App-Akzente (nur innerhalb der jeweiligen Sektion) ---------------- */
.app--caputo{
  --accent:#B71C1C;
  --accent-2:#F9A825;
  --accent-ink:#F1998F;
  --accent-wash:rgba(183,28,28,.10);
  --accent-cream:#FFF3C4;
  --base-rot:-2deg;
}
.app--dnd{
  --accent:#D4AF37;
  --accent-2:#0D0D0D;
  --accent-ink:#D4AF37;
  --accent-wash:rgba(212,175,55,.08);
  --base-rot:2deg;
}
@media (prefers-color-scheme: light){
  .app--caputo{ --accent-ink:#9E1815; --accent-wash:rgba(183,28,28,.06); }
  .app--dnd{ --accent-ink:#7A6019; --accent-wash:rgba(212,175,55,.10); }
}

/* ----- Reset / Grundgeruest --------------------------------------------- */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  font-family:var(--font);
  font-size:1.0625rem;      /* 17px */
  line-height:1.65;
  color:var(--ink-2);
  background:var(--bg-0);
  overflow-x:clip;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* dezentes Korn fuer Tiefe (self-contained data-URI, ~0 Laufzeitkosten) */
body::after{
  content:"";
  position:fixed; inset:0; z-index:9999; pointer-events:none;
  opacity:.025;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: light){ body::after{ opacity:.04; } }

h1,h2,h3{ color:var(--ink-1); font-weight:700; letter-spacing:-0.02em; margin:0; }
p{ margin:0; }
a{ color:inherit; }
img,svg{ display:block; max-width:100%; }
:focus-visible{ outline:2px solid var(--ink-1); outline-offset:3px; border-radius:4px; }

.container{ width:100%; max-width:var(--maxw); margin-inline:auto; padding-inline:var(--pad); }

.eyebrow{
  font-family:var(--mono);
  font-size:.75rem; font-weight:500;
  letter-spacing:.08em; text-transform:uppercase;
  color:var(--ink-3);
  margin:0 0 1rem;
}

/* ----- Scroll-Progress-Hairline ----------------------------------------- */
.progress{
  position:fixed; top:0; left:0; right:0; height:2px; z-index:60;
  transform:scaleX(var(--progress,0)); transform-origin:left;
  background:var(--ink-3);
  transition:background-color 600ms ease;
}
@media (prefers-reduced-motion: reduce){ .progress{ transition:none; } }

/* ----- Header ------------------------------------------------------------ */
.site-header{
  position:sticky; top:0; z-index:50;
  background:color-mix(in srgb, var(--bg-0) 80%, transparent);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  height:60px;
}
.wordmark{
  font-family:var(--mono); font-size:.875rem; font-weight:500;
  color:var(--ink-1); text-decoration:none; letter-spacing:.02em;
}
.nav{ display:flex; gap:clamp(14px,4vw,32px); }
.nav a{
  font-family:var(--mono); font-size:.8125rem; letter-spacing:.02em;
  color:var(--ink-2); text-decoration:none; transition:color var(--t-hover);
}
.nav a:hover{ color:var(--ink-1); }

/* ----- Buttons ----------------------------------------------------------- */
.btn{
  display:inline-flex; align-items:center; gap:.5rem;
  font-family:var(--mono); font-size:.875rem; letter-spacing:.01em;
  padding:.75rem 1.25rem; border-radius:var(--r-s);
  text-decoration:none; cursor:pointer;
  border:1px solid var(--line); background:transparent; color:var(--ink-1);
  transition:transform var(--t-hover), background-color var(--t-hover), border-color var(--t-hover);
}
.btn:hover{ transform:translateY(-2px); background:var(--bg-2); }
.btn--primary{
  background:var(--ink-1); color:var(--bg-0); border-color:var(--ink-1);
}
.btn--primary:hover{ background:var(--ink-1); opacity:.9; }
@media (prefers-reduced-motion: reduce){ .btn:hover{ transform:none; } }

/* ----- Hero -------------------------------------------------------------- */
.hero{
  min-height:calc(100svh - 60px);
  display:flex; align-items:center;
  padding-block:clamp(64px,10vh,120px);
}
.hero .container{ max-width:900px; }
.hero h1{
  font-size:clamp(2.5rem, 7vw + 1rem, 4.25rem);
  line-height:1.05; letter-spacing:-0.025em; font-weight:800;
  margin:0 0 1.25rem;
}
.hero .lead{
  font-size:1.125rem; line-height:1.55; color:var(--ink-2);
  max-width:56ch; margin:0 0 2rem;
}
.hero-cta{ display:flex; gap:.75rem; flex-wrap:wrap; }

/* ----- Sektionen --------------------------------------------------------- */
section{ padding-block:clamp(96px, 14vh, 150px); }
.section-head{ max-width:62ch; margin-bottom:clamp(40px,6vh,64px); }
.section-head h2{
  font-size:clamp(1.75rem, 3.5vw + .5rem, 2.5rem); line-height:1.15;
}
.section-head p{ margin-top:1rem; color:var(--ink-2); }

/* ----- App-Sektionen (Buehnenlicht) ------------------------------------- */
.app{ position:relative; isolation:isolate; overflow-x:clip; }
.app + .app{ padding-top:clamp(64px,10vh,110px); }
.app::before{
  content:""; position:absolute; z-index:-1; inset:-15% -25%;
  background:radial-gradient(ellipse 60% 55% at 70% 32%, var(--accent-wash), transparent 68%);
  opacity:0; transition:opacity 800ms ease;
}
.app[data-lit]::before{ opacity:1; }
@media (prefers-reduced-motion: reduce){
  .app::before{ opacity:.5; transition:none; }
}

.app-grid{
  display:grid; gap:clamp(40px,6vw,64px); align-items:center;
  grid-template-columns:1fr;
}
@media (min-width:900px){
  .app-grid{ grid-template-columns:1.2fr 1fr; }
  .app--dnd .app-grid{ grid-template-columns:1fr 1.2fr; }
  .app--dnd .app-copy{ order:2; }
  .app--dnd .app-visual{ order:1; }
}

.app-head{ display:flex; align-items:center; gap:1rem; margin-bottom:1.25rem; }
.app-icon{ width:56px; height:56px; flex:0 0 auto; border-radius:14px;
  box-shadow:0 6px 20px rgba(0,0,0,.35); }
@media (prefers-color-scheme: light){ .app-icon{ box-shadow:0 6px 20px rgba(0,0,0,.12); } }
.app-head h3{ font-size:clamp(1.5rem,2.5vw + .5rem,2rem); line-height:1.2; letter-spacing:-0.01em; }
.app-head .eyebrow{ margin:.25rem 0 0; color:var(--accent-ink); }

.app-lead{ font-size:1.125rem; color:var(--ink-2); margin-bottom:1.5rem; max-width:52ch; }

/* Feature-Liste: Marker = kurzer Strich in Akzentfarbe */
.features{ list-style:none; margin:0 0 1.75rem; padding:0; display:grid; gap:.85rem; }
.features li{ position:relative; padding-left:2rem; color:var(--ink-2); max-width:52ch; }
.features li::before{
  content:""; position:absolute; left:0; top:.72em;
  width:14px; height:2px; background:var(--accent-2); border-radius:2px;
}
.app--dnd .features li::before{ background:var(--accent); }
.features b{ color:var(--ink-1); font-weight:600; }

/* "Bald im Play Store"-Badge */
.badge{
  display:inline-flex; align-items:center; gap:.6rem;
  font-family:var(--mono); font-size:.75rem; letter-spacing:.06em; text-transform:uppercase;
  color:var(--accent-ink);
  border:1px solid var(--accent-ink); border-radius:999px;
  padding:.4rem .85rem; background:transparent;
}
.badge .dot{
  width:6px; height:6px; border-radius:50%; background:var(--accent);
  animation:pulse 2.4s ease-in-out infinite;
}
@keyframes pulse{ 0%,100%{opacity:.4;} 50%{opacity:1;} }
@media (prefers-reduced-motion: reduce){ .badge .dot{ animation:none; opacity:1; } }

.app-actions{ display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.app-privacy-link{
  font-family:var(--mono); font-size:.75rem; letter-spacing:.02em;
  color:var(--ink-3); text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color var(--t-hover), border-color var(--t-hover);
}
.app-privacy-link:hover{ color:var(--ink-1); border-color:var(--line); }

/* ----- Device-Mockup ----------------------------------------------------- */
.app-visual{ display:flex; flex-direction:column; align-items:center; }
.device{
  position:relative;
  width:clamp(240px, 26vw, 300px);
  aspect-ratio:9 / 19.5;
  background:var(--bg-1);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:10px;
  box-shadow:0 30px 60px -30px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.04);
  transform:perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) rotate(var(--base-rot,0deg));
  transition:transform 240ms ease-out;
}
@media (prefers-color-scheme: light){
  .device{ box-shadow:0 30px 60px -30px rgba(0,0,0,.35); }
}
.device::before{ /* Punch-Hole-Kamera */
  content:""; position:absolute; top:22px; left:50%; transform:translateX(-50%);
  width:10px; height:10px; border-radius:50%;
  background:var(--bg-0); z-index:3;
}
.device-screen{
  position:relative; width:100%; height:100%;
  border-radius:26px; overflow:hidden; background:var(--bg-2);
}
/* echte Screenshots: liegen ueber dem Skeleton, Crossfade-Galerie */
.device-shot{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:2; opacity:0; transition:opacity 700ms ease; }
.device-shot.is-active{ opacity:1; }
@media (prefers-reduced-motion: reduce){ .device-shot{ transition:none; } }

/* Galerie-Punkte unter dem Geraet */
.shot-dots{ display:flex; justify-content:center; gap:9px; margin-top:20px; }
.dot-btn{
  width:7px; height:7px; padding:0; border:0; border-radius:50%; cursor:pointer;
  background:var(--line);
  transition:background-color var(--t-hover), transform var(--t-hover);
}
.dot-btn:hover{ background:var(--ink-3); }
.dot-btn.is-active{ background:var(--accent); transform:scale(1.3); }

/* --- Skeleton-UI Caputo --- */
.mock-caputo{ position:absolute; inset:0; background:#FFF3C4; padding:14px 12px; display:flex; flex-direction:column; gap:10px; }
.mock-caputo .bar{ height:26px; border-radius:8px; background:#B71C1C; }
.mock-caputo .field{ height:34px; border-radius:8px; background:#fff; border:1px solid rgba(0,0,0,.10); }
.mock-caputo .result{ margin-top:auto; height:120px; border-radius:12px; background:#fff; border:1px solid rgba(0,0,0,.10);
  display:flex; align-items:flex-end; padding:12px; }
.mock-caputo .chip{ height:22px; width:64px; border-radius:999px; background:#F9A825; }

/* --- Skeleton-UI DND --- */
.mock-dnd{ position:absolute; inset:0; background:#0D0D0D; padding:16px 12px; display:flex; flex-direction:column; gap:12px; }
.mock-dnd .rule{ height:2px; width:60%; background:#D4AF37; border-radius:2px; }
.mock-dnd .wave{ flex:0 0 auto; height:70px; display:flex; align-items:center; gap:3px; }
.mock-dnd .wave i{ display:block; width:3px; background:#D4AF37; border-radius:2px; }
.mock-dnd .card{ height:44px; border-radius:8px; background:#1A1A1A; border:1px solid rgba(212,175,55,.45); }
.mock-dnd .card:last-child{ margin-top:auto; }

/* ----- Ueber mich -------------------------------------------------------- */
.about-grid{ display:grid; gap:clamp(32px,5vw,56px); grid-template-columns:1fr; }
@media (min-width:900px){ .about-grid{ grid-template-columns:1.4fr 1fr; align-items:start; } }
.about-prose p{ max-width:62ch; }
.about-prose p + p{ margin-top:1rem; }
.facts{ list-style:none; margin:0; padding:0; display:grid; gap:0; }
.facts li{ display:grid; gap:.15rem; padding:1rem 0; border-top:1px solid var(--line); }
.facts li:last-child{ border-bottom:1px solid var(--line); }
.facts .k{ font-family:var(--mono); font-size:.72rem; letter-spacing:.08em; text-transform:uppercase; color:var(--ink-3); }
.facts .v{ color:var(--ink-1); }

/* ----- Arbeitsweise ------------------------------------------------------ */
.chips{ display:flex; flex-wrap:wrap; gap:.6rem; margin:0 0 clamp(32px,5vh,48px); padding:0; list-style:none; }
.chips li{
  font-family:var(--mono); font-size:.8125rem; letter-spacing:.02em;
  color:var(--ink-2); border:1px solid var(--line); border-radius:999px;
  padding:.4rem .9rem;
}
.principles{ list-style:none; margin:0; padding:0; max-width:70ch; }
.principles li{ padding:1.1rem 0; border-top:1px solid var(--line); }
.principles li:last-child{ border-bottom:1px solid var(--line); }
.principles .p-title{ color:var(--ink-1); font-weight:600; }
.principles .p-desc{ color:var(--ink-2); font-size:.9375rem; }

/* ----- Kontakt ----------------------------------------------------------- */
.contact-inner{ max-width:56ch; }
.contact-inner .btn{ margin-top:1.5rem; font-size:.9375rem; }
.contact-note{ margin-top:1rem; font-size:.875rem; color:var(--ink-3); }

/* ----- Footer ------------------------------------------------------------ */
.site-footer{ border-top:1px solid var(--line); padding-block:2rem; }
.site-footer .container{
  display:flex; flex-wrap:wrap; gap:.5rem 1rem; align-items:center; justify-content:space-between;
}
.site-footer, .site-footer a{ font-family:var(--mono); font-size:.8125rem; color:var(--ink-3); }
.site-footer a{ text-decoration:none; transition:color var(--t-hover); }
.site-footer a:hover{ color:var(--ink-1); }
.footer-links{ display:flex; gap:1.25rem; }

/* ----- Scroll-Reveal (nur wenn JS aktiv) -------------------------------- */
.js [data-reveal]{
  opacity:0; transform:translateY(14px);
  transition:opacity var(--t-reveal), transform var(--t-reveal);
  transition-delay:calc(var(--i,0) * 70ms);
}
.js [data-reveal].is-visible{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .js [data-reveal]{ opacity:1; transform:none; transition:none; }
}

/* ----- Legal-Unterseiten ------------------------------------------------- */
.legal{ padding-block:clamp(48px,8vh,96px); overflow-wrap:break-word; hyphens:auto; }
.legal .container{ max-width:70ch; }
.legal a{ word-break:break-word; }
.draft-note{ overflow-wrap:anywhere; }
.legal h1{ font-size:clamp(2rem,4vw,2.75rem); margin-bottom:1.5rem; }
.legal h2{ font-size:1.25rem; margin:2rem 0 .5rem; }
.legal p, .legal address{ color:var(--ink-2); font-style:normal; margin-bottom:.75rem; }
.legal a{ color:var(--ink-1); }
.draft-note{
  border:1px dashed var(--line); border-radius:var(--r-s);
  padding:1rem 1.25rem; margin-bottom:2rem;
  font-family:var(--mono); font-size:.8125rem; color:var(--ink-3);
}
.back-link{ font-family:var(--mono); font-size:.8125rem; color:var(--ink-2); text-decoration:none; }
.back-link:hover{ color:var(--ink-1); }
