/* A2G-Patch project page (German index.html, English en/index.html). No external fonts or scripts
   (nothing is loaded from third parties). */

:root {
  --bg: #070b09;
  --bg-2: #0c1310;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e9f1ec;
  --muted: #94a69b;
  --faint: #5f7067;
  --accent: #5cf08a;
  --accent-2: #2ed3c6;
  --accent-ink: #04140a;
  --warm: #ffc65c;
  --code-bg: rgba(0, 0, 0, 0.35);
  --line: rgba(92, 240, 138, 0.10);
  --radius: 18px;
  --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* Light theme: follows the system unless the switch (theme.js) set data-theme on <html>. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f8f6;
    --bg-2: #ffffff;
    --surface: rgba(255, 255, 255, 0.8);
    --surface-hover: #ffffff;
    --border: rgba(10, 40, 25, 0.10);
    --text: #0b1a12;
    --muted: #4c6155;
    --faint: #7d8f84;
    --accent: #12a14a;
    --accent-2: #0d8f86;
    --accent-ink: #ffffff;
    --warm: #b7791f;
    --code-bg: #eef3f0;
    --line: rgba(18, 161, 74, 0.10);
    --shadow: 0 30px 70px -30px rgba(10, 40, 25, 0.35);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f8f6;
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-hover: #ffffff;
  --border: rgba(10, 40, 25, 0.10);
  --text: #0b1a12;
  --muted: #4c6155;
  --faint: #7d8f84;
  --accent: #12a14a;
  --accent-2: #0d8f86;
  --accent-ink: #ffffff;
  --warm: #b7791f;
  --code-bg: #eef3f0;
  --line: rgba(18, 161, 74, 0.10);
  --shadow: 0 30px 70px -30px rgba(10, 40, 25, 0.35);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code, pre {
  font-family: ui-monospace, "Cascadia Code", "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  font-size: 0.88em;
}
:not(pre) > code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.08em 0.4em;
  white-space: nowrap;
}

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
/* Let grid columns shrink below their content (long code lines scroll inside their pre instead). */
.hero-grid > *, .cards > *, .steps > *, .tech > *, .rel > *, .family-grid > * { min-width: 0; }

/* Navigation */

.nav {
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 28px; height: 28px; border-radius: 7px; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--accent) 45%, transparent)); }
.brand-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 16px var(--accent);
}
.nav nav { display: flex; gap: 4px; }
.nav nav a { color: var(--muted); font-size: 0.93rem; padding: 6px 12px; border-radius: 999px; }
.nav nav a:hover { color: var(--text); background: var(--surface-hover); text-decoration: none; }
.nav nav a.nav-gh { color: var(--text); border: 1px solid var(--border); }
.nav nav { align-items: center; }
.nav nav a.nav-lang { color: var(--text); font-weight: 650; letter-spacing: 0.04em; }

/* Theme switch: shows the sun in dark mode, the moon in light mode. Hidden until theme.js runs. */
.theme-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0; border-radius: 999px;
  border: 1px solid var(--border); background: none; color: var(--text); cursor: pointer;
}
.theme-btn[hidden] { display: none; }
.theme-btn:hover { background: var(--surface-hover); }
.theme-btn:focus-visible, .nav nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .moon { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .moon { display: block; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-btn .sun { display: none; }
  :root:not([data-theme="dark"]) .theme-btn .moon { display: block; }
}

@media (max-width: 640px) {
  .nav nav a:not(.nav-gh):not(.nav-lang) { display: none; }
}

/* Hero */

.hero { position: relative; padding: 96px 0 88px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%; z-index: -2;
  background:
    radial-gradient(40% 50% at 20% 20%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(35% 45% at 85% 10%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%);
  filter: blur(10px);
}
/* Faint pitch markings: centre line, centre circle, penalty boxes. */
.pitch {
  position: absolute; inset: 0; z-index: -1; opacity: 0.9;
  background:
    radial-gradient(circle at 50% 50%, transparent 159px, var(--line) 160px, var(--line) 162px, transparent 163px),
    linear-gradient(90deg, transparent calc(50% - 1px), var(--line) calc(50% - 1px), var(--line) calc(50% + 1px), transparent calc(50% + 1px)),
    repeating-linear-gradient(90deg, transparent 0 120px, rgba(255, 255, 255, 0.012) 120px 240px);
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}

.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } .hero { padding-top: 64px; } }

.eyebrow {
  display: inline-block; margin: 0 0 20px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent);
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
h1 {
  margin: 0 0 22px;
  font-size: clamp(2.3rem, 5.6vw, 4.1rem);
  line-height: 1.04; letter-spacing: -0.035em; font-weight: 800;
}
.grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 1.14rem; color: var(--muted); max-width: 36em; margin: 0 0 32px; }
.fine { color: var(--faint); font-size: 0.87rem; margin: 18px 0 0; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 14px;
  font-weight: 650; font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.btn-primary:hover { box-shadow: 0 16px 40px -8px color-mix(in srgb, var(--accent) 75%, transparent); }
.btn-ghost { color: var(--text); background: var(--surface); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-hover); }

.shot { position: relative; margin: 0; }
.shot-glow {
  position: absolute; inset: 10% 5%; z-index: -1; border-radius: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  filter: blur(60px); opacity: 0.28;
}
.shot img {
  display: block; width: 100%; height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: perspective(1400px) rotateY(-7deg) rotateX(3deg);
  transition: transform 0.5s ease;
}
.shot:hover img { transform: none; }
@media (max-width: 920px) { .shot img { transform: none; } }

/* Sections */

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-title {
  display: flex; align-items: baseline; gap: 16px;
  margin: 0 0 36px;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -0.025em; font-weight: 750;
}
.section-title span {
  font: 600 0.9rem/1 ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--accent); letter-spacing: 0.05em;
}
.intro { color: var(--muted); max-width: 46em; margin: -16px 0 28px; }

/* Patch cards */

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 920px) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--surface-hover); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card h3 { margin: 0 0 10px; font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--muted); }
.icon { width: 30px; height: 30px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-alt .icon { stroke: var(--warm); }
.card-alt:hover { border-color: color-mix(in srgb, var(--warm) 40%, var(--border)); }

.tag {
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.tag-fix { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tag-opt { color: var(--warm); background: color-mix(in srgb, var(--warm) 14%, transparent); }
.tag-gog { color: var(--text); background: color-mix(in srgb, var(--text) 10%, transparent); }

/* Scoreboard digits */
.score {
  display: flex; align-items: center; gap: 12px; margin-top: 20px;
  font: 700 1.6rem/1 ui-monospace, "Cascadia Code", Consolas, monospace;
}
.score .old, .score .new { padding: 8px 12px; border-radius: 10px; background: var(--code-bg); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.score .old { color: var(--faint); text-decoration: line-through; text-decoration-thickness: 2px; }
.score .new { color: var(--warm); text-shadow: 0 0 18px color-mix(in srgb, var(--warm) 60%, transparent); }
.score .arrow { color: var(--faint); font-size: 1.2rem; }

/* Steps */

.steps { list-style: none; counter-reset: step; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 920px) { .steps { grid-template-columns: 1fr; } }
.steps li {
  counter-increment: step;
  position: relative; padding: 26px 26px 26px 26px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), transparent);
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 40px; height: 40px; margin-bottom: 16px; border-radius: 12px;
  font-weight: 800; color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.steps b { display: block; font-size: 1.08rem; margin-bottom: 6px; }
.steps span { color: var(--muted); }

.sub { font-size: 1.25rem; margin: 0 0 18px; letter-spacing: -0.01em; }

.releases { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rel { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 22px 26px; background: var(--bg-2); }
@media (max-width: 720px) { .rel { grid-template-columns: 1fr; gap: 8px; } }
.rel-head { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.rel-head b { font-size: 1.05rem; }
.rel-head code { font-size: 0.82rem; }
.rel p { margin: 0; color: var(--muted); }

/* FAQ and tech details */

.faq { display: grid; gap: 12px; max-width: 860px; }
details {
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface);
  transition: border-color 0.2s ease, background 0.2s ease;
}
details[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); background: var(--surface-hover); }
summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px; font-weight: 600;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; margin-left: auto; flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
details[open] > summary::after { transform: rotate(-135deg); }
details > :not(summary) { margin: 0 22px 20px; }
details p { color: var(--muted); }

.tech { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 920px) { .tech { grid-template-columns: 1fr; } }
.tech-item summary b { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--accent); font-size: 0.95rem; }
.tech-item summary span { color: var(--muted); font-weight: 500; }
@media (max-width: 520px) { .tech-item summary { flex-wrap: wrap; gap: 4px 14px; } }

pre {
  overflow-x: auto;
  padding: 16px 18px; border-radius: 12px;
  background: var(--code-bg); border: 1px solid var(--border);
  line-height: 1.6; color: var(--text);
}
pre i { color: var(--faint); font-style: normal; }

.more { margin: 24px 0 0; }

/* Sister projects */

.family {
  padding: 40px; border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(60% 100% at 0% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent),
    var(--surface);
}
@media (max-width: 520px) { .family { padding: 24px; } }
.family h2 { margin: 0 0 22px; font-size: 1.5rem; letter-spacing: -0.02em; }
.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .family-grid { grid-template-columns: 1fr; } }
.fam {
  display: block; padding: 20px 22px; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.fam:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.fam b { display: block; margin-bottom: 4px; }
.fam b::after { content: " →"; color: var(--accent); }
.fam span { color: var(--muted); font-size: 0.95rem; }

/* Footer */

.foot { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--faint); font-size: 0.88rem; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .shot img { transform: none; }
}
