/* Layout: one 1120px column. Hero = text left, app window right.
   Below: fact strip, feature gallery (gallery.css / gallery.js), script
   example, the jellyqda family (demo, assistant, converter, drift & play
   as four cards), install guide per operating system (install.css /
   install.js), behind jellyqda, footer.
   Fonts: system fonts only, so the page loads nothing from third parties
   (fits an offline, privacy-first tool; Google Fonts would contact Google). */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --ink: #17202c;
  --ink-2: #4f5b6d;
  --line: #dde4ee;
  --blue: #2c6fbb;        /* jellyqda app accent */
  --blue-ink: #ffffff;
  --gold: #9a7400;        /* memo colour in the app */
  --shadow: 0 18px 50px -24px rgba(23, 49, 92, .35);
  /* code family colours = Okabe-Ito palette, the app's defaults */
  --c1: #E69F00; --c2: #56B4E9; --c3: #009E73; --c5: #0072B2; --c7: #CC79A7;
  --mark-alpha: 38%;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --r: 12px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f141c; --surface: #171e29; --surface-2: #1d2633; --ink: #e7ebf2; --ink-2: #9ba8bb;
    --line: #2a3443; --blue: #7fb0e8; --blue-ink: #0d2240; --gold: #d8c26a;
    --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7); --mark-alpha: 45%;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f141c; --surface: #171e29; --surface-2: #1d2633; --ink: #e7ebf2; --ink-2: #9ba8bb;
  --line: #2a3443; --blue: #7fb0e8; --blue-ink: #0d2240; --gold: #d8c26a;
  --shadow: 0 18px 50px -20px rgba(0, 0, 0, .7); --mark-alpha: 45%;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
code, pre { font-family: var(--mono); font-size: .88em; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 750; font-size: 1.08rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; }
.nav nav { display: flex; gap: 22px; }
.nav nav a { color: var(--ink-2); text-decoration: none; font-size: .93rem; }
.nav nav a:hover { color: var(--ink); }
.nav .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pillbtn { height: 34px; min-width: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .82rem var(--font); text-decoration: none; cursor: pointer; }
.pillbtn svg { width: 16px; height: 16px; }
.pillbtn:hover { border-color: var(--blue); }

/* theme button = the diving jellyfish, taken from jellyqda drift & play
   (css/16-logo-und-tauchknopf.css there; the app has the same one).
   Light: the jellyfish floats near the surface of light water.
   Dark (.down, set by main.js): it turns upside down and dives into deep
   blue water. Bubbles rise all the time, the bell squashes a little to swim. */
.divebtn { padding: 0; overflow: hidden; }
.divebtn svg { width: 32px; height: 32px; }
.divebtn .tw { fill: #bfeaf7; transition: fill .6s; }
.divebtn .tbell { fill: #fff; stroke: #4c3fb0; stroke-width: 2; }
.divebtn .ttent { stroke: #7a6ee0; stroke-width: 3; fill: none; stroke-linecap: round; }
.divebtn .teye { fill: #4c3fb0; }
.divebtn .tbubs circle { fill: none; stroke: #2a9ac6; stroke-width: 1.4; animation: tbub 2.6s linear infinite; }
.divebtn .tbubs circle:nth-child(2) { animation-delay: -.9s; }
.divebtn .tbubs circle:nth-child(3) { animation-delay: -1.7s; }
@keyframes tbub { from { transform: translateY(8px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(-46px); opacity: 0; } }
.divebtn .tj { transform-box: view-box; transform-origin: 32px 32px; transition: transform .8s cubic-bezier(.5,-0.3,.4,1.4); transform: translateY(-3px); }
.divebtn .tj-in { animation: tjswim 1.6s ease-in-out infinite; transform-box: view-box; transform-origin: 32px 32px; }
@keyframes tjswim { 50% { transform: translateY(-2.5px) scale(1.04, .96); } }
.divebtn.down .tj { transform: translateY(4px) rotate(180deg); }
.divebtn.down .tw { fill: #0b2a4a; }
.divebtn.down .tbubs circle { stroke: #6fc6ef; }
.divebtn.down .tbell { fill: #e8e4ff; }
@media (prefers-reduced-motion: reduce) { .divebtn .tbubs circle, .divebtn .tj-in { animation: none; } }

/* ---------- hero ---------- */
.hero { padding-block: 64px 40px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 18px; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.15rem); line-height: 1.34; letter-spacing: -.028em; font-weight: 780; margin: 0 0 20px; text-wrap: balance; }
/* the headline is "coded" like a transcript in jellyqda */
.cm { position: relative; padding: 0 .08em; border-radius: 3px; background: color-mix(in srgb, var(--c) var(--mark-alpha), transparent); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.cm::after { content: attr(data-code); position: absolute; left: 0; top: -1.05em; font: 700 .6rem/1 var(--font); letter-spacing: .02em; color: var(--c); white-space: nowrap; text-transform: none; }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 34em; margin: 0 0 28px; }
.install { display: flex; align-items: stretch; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); overflow: hidden; max-width: 100%; }
.install pre { margin: 0; padding: 12px 14px; overflow-x: auto; flex: 1; min-width: 0; white-space: pre; color: var(--ink); }
.install pre .p { color: var(--ink-2); user-select: none; }
.copy { border: 0; border-left: 1px solid var(--line); background: var(--surface-2); color: var(--ink); padding: 0 16px; font: 600 .85rem var(--font); cursor: pointer; display: flex; gap: 6px; align-items: center; }
.copy svg { width: 15px; height: 15px; }
.copy.ok { color: var(--c3); }
.small { font-size: .86rem; color: var(--ink-2); margin: 10px 0 0; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 650; font-size: .95rem; text-decoration: none; border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.btn.primary { background: var(--blue); color: var(--blue-ink); border-color: var(--blue); }
.btn:hover { filter: brightness(1.05); }
.btn svg { width: 17px; height: 17px; }

.window { border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.window .bar { height: 30px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.window .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.window .bar span { margin-left: 10px; font: .75rem var(--mono); color: var(--ink-2); }
.window img { display: block; width: 100%; height: auto; }
.window img.shot-dark { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .window img.shot-dark { display: block; } :root:not([data-theme="light"]) .window img.shot-light { display: none; } }
:root[data-theme="dark"] .window img.shot-dark { display: block; } :root[data-theme="dark"] .window img.shot-light { display: none; }

/* ---------- fact strip ---------- */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); margin-block: 24px 0; }
.fact { padding: 22px 22px 22px 0; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; }
.fact + .fact { padding-left: 22px; border-left: 1px solid var(--line); }
.fact svg { width: 22px; height: 22px; color: var(--blue); margin-top: 2px; }
.fact b { display: block; font-size: .98rem; }
.fact span { font-size: .88rem; color: var(--ink-2); }

/* ---------- sections ---------- */
section { padding-block: 84px 0; }
.sechead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: end; margin-bottom: 34px; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.18; letter-spacing: -.02em; margin: 0; text-wrap: balance; }
.sechead p { margin: 0; color: var(--ink-2); }

/* script example */
.script { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.script p { color: var(--ink-2); margin: 14px 0 0; }
.code { border-radius: var(--r); background: #121925; color: #dfe6f1; padding: 20px 22px; overflow-x: auto; font-size: .86rem; line-height: 1.7; margin: 0; border: 1px solid var(--line); }
.code .c { color: #7d8aa2; } .code .f { color: #82b4ff; } .code .s { color: #a6dba0; } .code .n { color: #f5b971; }

/* hint line (install section) */
.hint { margin-top: 18px; font-size: .9rem; color: var(--ink-2); border-left: 3px solid var(--gold); padding: 2px 0 2px 14px; }

/* the jellyqda family (#tools): four cards in a 2 x 2 grid, each with its
   own coloured jellyfish (assets/family/*.svg; the demo uses the main logo) */
#tools .sechead { margin-bottom: 22px; }
.toolgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.tool { padding: 28px 28px 28px 0; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.tool:nth-child(even) { padding: 28px 0 28px 28px; border-left: 1px solid var(--line); }
.tool > .toollogo { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 4px 12px -6px rgba(0,0,0,.45); }
.tool h3 { margin: 4px 0 0; font-size: 1.05rem; }
.tool p { margin: 8px 0 0; font-size: .92rem; color: var(--ink-2); }
.tool .toolnote { font-size: .84rem; margin-top: 14px; }
.toolbtns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.toolbtns .btn { height: 38px; padding: 0 14px; font-size: .88rem; }
.toolbtns .btn svg { width: 15px; height: 15px; }
.install.mini { margin-top: 8px; }
.install.mini pre { padding: 9px 12px; font-size: .8rem; }
.install.mini .copy { padding: 0 12px; font-size: .8rem; }
section[id] { scroll-margin-top: 72px; }
/* footer */
footer { margin-top: 96px; border-top: 1px solid var(--line); padding-block: 40px 56px; }
.foot { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot h4 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: .92rem; }
.foot a { color: var(--ink); text-decoration: none; }
.foot a:hover { color: var(--blue); }
.foot p { font-size: .88rem; color: var(--ink-2); margin: 10px 0 0; max-width: 30em; }

@media (max-width: 900px) {
  .hero, .sechead, .script { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .hero { padding-top: 40px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
  .toolgrid { grid-template-columns: minmax(0, 1fr); }
  .tool, .tool:nth-child(even) { padding: 26px 0; border-left: 0; }
  .foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav nav { display: none; }
}
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact, .fact + .fact { padding-left: 0; border-left: 0; }
  .fact + .fact { border-top: 1px solid var(--line); }
  .copy span { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* German page: longer headline, slightly smaller h1 */
html[lang="de"] h1 { font-size: clamp(1.9rem, 3.6vw, 2.55rem); hyphens: manual; }

/* Behind jellyqda (#about): motivation on the left, AI transparency and
   thanks as two cards on the right */
.about { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; align-items: start; }
.about > div > p { color: var(--ink-2); margin: 14px 0 0; }
.values { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.values b { display: block; font-size: .96rem; }
.values span { font-size: .9rem; color: var(--ink-2); }
.aboutcards { display: grid; gap: 16px; }
.aboutcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.aboutcard h3 { margin: 0 0 8px; font-size: 1rem; }
.aboutcard p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.aboutcard.thanks { background: linear-gradient(135deg, color-mix(in srgb, #a78bfa 14%, var(--surface)), color-mix(in srgb, #38bdf8 12%, var(--surface))); }
@media (max-width: 900px) { .about { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
@media (max-width: 520px) { .values { grid-template-columns: minmax(0, 1fr); } }

/* privacy note at the bottom of the footer (#privacy) */
.privfoot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.privfoot p { margin: 0; font-size: .84rem; color: var(--ink-2); max-width: 62em; }
#privacy { scroll-margin-top: 80px; }

/* "Join the bloom" button in the header (links to join/ or de/mitmachen/):
   family gradient, a mini jellyfish swimming in a bubble, a soft pulsing
   ring. Without motion when the visitor asks for reduced motion. */
.bloombtn { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px 0 4px; border-radius: 999px;
  background: linear-gradient(120deg, #a78bfa, #38bdf8); color: #fff; font: 700 .84rem var(--font); text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 16px -8px rgba(76, 63, 176, .7); animation: bb-pulse 2.8s ease-out infinite; transition: transform .2s; }
.bloombtn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.bloombtn:focus-visible { outline-offset: 3px; }
.bb-water { width: 27px; height: 27px; border-radius: 50%; background: rgba(255, 255, 255, .22); overflow: hidden; flex: none; display: grid; place-items: center; }
.bb-water svg { width: 25px; height: 25px; overflow: visible; }
.bb-jelly { transform-box: view-box; transform-origin: 12px 12px; animation: bb-swim 3.6s ease-in-out infinite; }
.bb-short { display: none; }
@keyframes bb-pulse {
  0% { box-shadow: 0 6px 16px -8px rgba(76, 63, 176, .7), 0 0 0 0 rgba(167, 139, 250, .55); }
  70%, 100% { box-shadow: 0 6px 16px -8px rgba(76, 63, 176, .7), 0 0 0 10px rgba(167, 139, 250, 0); }
}
@keyframes bb-swim {
  0%   { transform: translate(-3px, 1px) rotate(-8deg) scale(1, 1); }
  20%  { transform: translate(-1px, -2px) rotate(-4deg) scale(1.06, .9); }
  45%  { transform: translate(3px, 0) rotate(8deg) scale(1, 1); }
  70%  { transform: translate(1px, -2px) rotate(4deg) scale(1.06, .9); }
  100% { transform: translate(-3px, 1px) rotate(-8deg) scale(1, 1); }
}
@media (max-width: 520px) {
  .bb-long { display: none; } .bb-short { display: inline; }
  .nav .tools { gap: 6px; }
  .bloombtn { gap: 5px; padding: 0 10px 0 4px; }
}
/* very narrow phones: only the swimming jellyfish (the link keeps its aria-label) */
@media (max-width: 379px) { .bb-short { display: none; } .bloombtn { padding: 0 4px; } }
@media (prefers-reduced-motion: reduce) { .bloombtn, .bb-jelly { animation: none; } }
