/* ==========================================================================
   PotatoCraft – Modern Dark
   ========================================================================== */
:root {
  --bg: #111318;
  --bg-alt: #0d0f13;
  --card: #1A1E25;
  --card-hi: #20252e;
  --line: rgba(255, 255, 255, .08);
  --accent: #35B873;
  --accent-hi: #43cf84;
  --accent-soft: rgba(53, 184, 115, .14);
  --text: #ffffff;
  --text-2: #c3c8d1;
  --muted: #8d94a1;
  --warn: #e3b341;
  --bad: #e5534b;
  --radius: 18px;
  --radius-sm: 10px;
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hi); }
h1, h2, h3 { color: var(--text); line-height: 1.15; margin: 0; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: #07140d; }

.container { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 40px); }
.muted { color: var(--muted); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(17, 19, 24, .78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand img { image-rendering: pixelated; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { color: var(--text-2); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; transition: background .2s, color .2s; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }

/* ---------- Buttons ---------- */
.btn {
  --h: 46px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: var(--h); padding: 0 22px;
  border: 1px solid transparent; border-radius: 12px;
  font: inherit; font-weight: 700; font-size: 1rem; line-height: 1.2; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s;
}
.btn-primary { background: var(--accent); color: #06130c; box-shadow: 0 6px 22px -8px rgba(53, 184, 115, .7), inset 0 -3px 0 rgba(0, 0, 0, .18); }
.btn-primary:hover { background: var(--accent-hi); color: #06130c; transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(53, 184, 115, .85), inset 0 -3px 0 rgba(0, 0, 0, .18); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .09); color: var(--text); transform: translateY(-2px); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: .92rem; }
.btn-lg { --h: 58px; padding: 0 30px; font-size: 1.1rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { background: #2a2f39; color: var(--muted); box-shadow: none; cursor: not-allowed; pointer-events: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 88px 0 96px; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 500px at 78% 20%, rgba(53, 184, 115, .16), transparent 60%),
    radial-gradient(700px 400px at 5% 90%, rgba(53, 184, 115, .07), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 72%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 72%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; }
.eyebrow { display: inline-block; margin: 0 0 14px; color: var(--accent); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(3.2rem, 9vw, 6rem); font-weight: 900; letter-spacing: -.045em; line-height: .95; }
.hero h1::after { content: ""; display: block; width: 84px; height: 8px; margin-top: 22px; background: var(--accent); box-shadow: 8px 8px 0 rgba(53, 184, 115, .3); }
.subtitle { margin: 26px 0 10px; color: var(--text); font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -.02em; }
.lead { max-width: 52ch; font-size: 1.15rem; color: var(--text-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 28px 0 0; color: var(--muted); font-size: .92rem; }
.hero-facts li::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 9px; background: var(--accent); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 340px; }
.hero-visual .glow { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(53, 184, 115, .35), transparent 68%); filter: blur(30px); }
.hero-visual .block { position: relative; width: min(100%, 420px); height: auto; image-rendering: pixelated; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .5)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-16px) rotate(1deg); } }

.pixels { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.pixels i { position: absolute; bottom: -20px; width: 10px; height: 10px; background: var(--accent); opacity: 0; animation: rise 12s linear infinite; }
.pixels i:nth-child(1)  { left: 6%;  animation-delay: 0s;  width: 8px;  height: 8px; }
.pixels i:nth-child(2)  { left: 16%; animation-delay: 3s;  animation-duration: 15s; }
.pixels i:nth-child(3)  { left: 27%; animation-delay: 6s;  width: 6px; height: 6px; }
.pixels i:nth-child(4)  { left: 38%; animation-delay: 1.5s; animation-duration: 14s; width: 12px; height: 12px; }
.pixels i:nth-child(5)  { left: 49%; animation-delay: 8s;  width: 7px; height: 7px; }
.pixels i:nth-child(6)  { left: 58%; animation-delay: 4s;  animation-duration: 16s; }
.pixels i:nth-child(7)  { left: 69%; animation-delay: 9s;  width: 9px; height: 9px; }
.pixels i:nth-child(8)  { left: 78%; animation-delay: 2s;  animation-duration: 13s; width: 6px; height: 6px; }
.pixels i:nth-child(9)  { left: 88%; animation-delay: 5s;  width: 11px; height: 11px; }
.pixels i:nth-child(10) { left: 95%; animation-delay: 10s; width: 7px; height: 7px; }
@keyframes rise { 0% { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: .5; } 80% { opacity: .25; } 100% { transform: translateY(-640px) rotate(90deg); opacity: 0; } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); font-weight: 800; }
.section-head .muted { margin: 14px 0 0; max-width: 60ch; }
.notice { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.fineprint { color: var(--muted); font-size: .88rem; line-height: 1.55; }

/* ---------- Karten ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s var(--ease);
}
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.dl-card { display: flex; flex-direction: column; }
.dl-card:hover { transform: translateY(-6px); border-color: rgba(53, 184, 115, .45); box-shadow: 0 24px 50px -24px rgba(53, 184, 115, .35); }
.dl-featured { background: linear-gradient(180deg, rgba(53, 184, 115, .09), transparent 42%), var(--card); border-color: rgba(53, 184, 115, .3); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 14px; color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(53, 184, 115, .25); transition: transform .3s var(--ease); }
.dl-card:hover .icon { transform: rotate(-6deg) scale(1.06); }
.tag { padding: 5px 12px; border-radius: 99px; font-size: .78rem; font-weight: 700; color: var(--text-2); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.tag-accent { color: var(--accent); background: var(--accent-soft); border-color: rgba(53, 184, 115, .3); }
.dl-card h3 { font-size: 1.55rem; font-weight: 800; }
.filename { margin: 8px 0 14px; }
.filename code { color: var(--accent); font-size: .92rem; background: rgba(0, 0, 0, .3); padding: 3px 9px; border-radius: 6px; word-break: break-all; }
.features { list-style: none; margin: 8px 0 22px; padding: 0; display: grid; gap: 8px; color: var(--text-2); font-size: .98rem; }
.features li { position: relative; padding-left: 28px; }
.features li::before { content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 5px; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='%2335B873' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }

.meta { margin: auto 0 22px; padding: 16px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; font-size: .9rem; }
.meta > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.meta dt { color: var(--muted); flex: none; }
.meta dd { margin: 0; color: var(--text); text-align: right; }
.meta .hash-row { flex-direction: column; align-items: stretch; gap: 8px; }
.meta .hash-row dd { display: flex; align-items: center; gap: 10px; text-align: left; }
.hash { flex: 1; min-width: 0; font-size: .74rem; line-height: 1.5; color: var(--text-2); word-break: break-all; }

.copy { flex: none; padding: 6px 12px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: background .2s, border-color .2s, color .2s; }
.copy:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.copy:disabled { opacity: .4; cursor: not-allowed; }
.copy.done { color: var(--accent); border-color: rgba(53, 184, 115, .5); }

.unavailable .meta dd { color: var(--muted); }

/* ---------- Sicherheit ---------- */
.prose p { color: var(--text-2); }
.prose strong, .callout strong { color: var(--text); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 32px 0 24px; }
.compare-card:hover { transform: translateY(-4px); }
.compare-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; margin-bottom: 14px; }
.compare-card ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: .95rem; }
.compare-card li::marker { color: var(--muted); }
.dot { width: 12px; height: 12px; flex: none; }
.dot-warn { background: var(--warn); box-shadow: 0 0 0 4px rgba(227, 179, 65, .18); }
.dot-bad { background: var(--bad); box-shadow: 0 0 0 4px rgba(229, 83, 75, .18); }
.safety h3 { font-size: 1.3rem; margin-bottom: 18px; }
.check-list { margin: 0 0 20px; padding-left: 22px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.check-list li { min-width: 0; }
.check-list li::marker { color: var(--accent); font-weight: 800; }
.check-list strong { color: var(--text); }
.code-block { margin: 10px 0 8px; padding: 12px 14px; background: #0c0e12; border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.code-block code { font-size: .88rem; color: var(--accent); white-space: nowrap; }
.code-copy { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.callout { margin: 0 0 14px; padding: 14px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; color: var(--text-2); }

/* ---------- Anleitung ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.step { display: flex; gap: 20px; align-items: flex-start; padding: 22px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .3s var(--ease), border-color .3s; }
.step:hover { transform: translateX(6px); border-color: rgba(53, 184, 115, .4); }
.step > div { min-width: 0; flex: 1; }
.num { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-weight: 900; font-size: 1.2rem; color: #06130c; background: var(--accent); border-radius: 10px; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2); }
.step h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step p { margin: 0; font-size: .98rem; }
kbd { padding: 2px 8px; font-size: .85em; color: var(--text); background: #2a2f39; border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; transition: border-color .25s, background .25s; }
.faq details[open] { border-color: rgba(53, 184, 115, .4); background: var(--card-hi); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; color: var(--text); font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq summary:hover { color: var(--accent-hi); }
.answer { padding: 0 22px 20px; animation: fade .35s var(--ease); }
.answer p, .answer ol { margin: 0; }
.answer ol { padding-left: 20px; display: grid; gap: 6px; }
.answer code { color: var(--accent); background: rgba(0, 0, 0, .3); padding: 2px 6px; border-radius: 5px; font-size: .88em; }
.answer strong { color: var(--text); }
@keyframes fade { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Footer ---------- */
.footer { padding: 44px 0 52px; border-top: 1px solid var(--line); background: var(--bg-alt); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); margin-bottom: 10px; }
.footer-brand img { image-rendering: pixelated; }
.footer .fineprint { max-width: 70ch; margin: 0; }

/* ---------- Scroll-Animationen ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .dl-card.reveal.in:hover { transform: translateY(-6px); }
.js .step.reveal.in:hover { transform: translateX(6px); }

/* ---------- 404 ---------- */
.nf { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 40px 20px; }
.nf-block { image-rendering: pixelated; animation: float 6s ease-in-out infinite; }
.nf-code { margin: 0; color: var(--accent); font-weight: 900; font-size: 1.1rem; letter-spacing: .2em; }
.nf h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 64px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; min-height: 240px; }
  .hero-visual .block { width: min(70%, 300px); }
  .cards, .compare { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .hero-actions .btn { width: 100%; }
  .card { padding: 22px; }
  .step { padding: 18px; gap: 14px; }
  .code-copy { flex-direction: column; align-items: stretch; }
  .code-copy code { white-space: normal; word-break: break-all; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
