/* SPDX-License-Identifier: AGPL-3.0-only */
/* Copyright (C) 2026 Stefan Diethelm */
/* babyphone-cam product page. System fonts only, no external resources. */

:root {
  --bg: #f6f7fc;
  --bg-alt: #eceffa;
  --panel: #ffffff;
  --text: #151a33;
  --muted: #4b5375;
  --border: #d5dbef;
  --accent: #2b3a7a;
  --link: #2a49b8;
  --green: #1d8a4c;
  --green-soft: #d8f3e3;
  --moon: #ffd46b;
  --night1: #2b3a7a;
  --night2: #121735;
  --code-bg: #121735;
  --code-text: #e6eaff;
  --shadow: 0 10px 30px rgba(18, 23, 53, 0.12);
  --radius: 16px;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1128;
    --bg-alt: #121838;
    --panel: #182046;
    --text: #e8ebf8;
    --muted: #a9b1d3;
    --border: #2a3462;
    --accent: #9fb1ff;
    --link: #a9bbff;
    --green: #4fd884;
    --green-soft: #173a2a;
    --code-bg: #080b1d;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .92em; background: var(--bg-alt); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--panel); color: var(--text); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--night2) 92%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-row { display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
.brand img { border-radius: 9px; }
.main-nav { margin-left: auto; }
.main-nav ul, .lang ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a, .lang a { color: #dfe4ff; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .95rem; display: inline-block; }
.main-nav a:hover, .lang a:hover { background: rgba(255, 255, 255, .1); }
.lang a { font-weight: 600; font-size: .85rem; padding: 6px 8px; }
.lang a[aria-current="page"] { background: rgba(62, 207, 110, .2); color: #8ff0b4; }
@media (max-width: 980px) { .main-nav { display: none; } .lang { margin-left: auto; } }
@media (max-width: 380px) { .brand span { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(1200px 500px at 15% 0%, #3a4c9a 0%, transparent 60%), linear-gradient(180deg, var(--night1), var(--night2));
  padding: 56px 0 96px;
}
.stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .7;
  background-image:
    radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 30% 70%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 55% 15%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 75% 40%, #fff 50%, transparent 51%),
    radial-gradient(2.5px 2.5px at 90% 12%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 42% 45%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 85% 80%, #fff 50%, transparent 51%);
}
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1.15fr; } }
.hero h1 { display: flex; align-items: center; gap: 16px; font-size: clamp(2rem, 1.4rem + 3vw, 3.3rem); letter-spacing: -.02em; overflow-wrap: anywhere; }
.hero-logo { border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); flex: none; width: clamp(52px, 10vw, 72px); }
.claim { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); font-weight: 600; color: var(--moon); margin-bottom: .6em; }
.sub { color: #d6dcf5; max-width: 38em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.btn-primary { background: #3ecf6e; color: #0b2416; }
.btn-primary:hover { background: #5be08a; }
.btn-ghost { color: #fff; border: 2px solid rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { font-size: .85rem; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); color: #e6eaff; }
.hero-shot img { display: block; width: 100%; border-radius: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .12); }
.hero-waves { position: absolute; left: 0; bottom: -1px; width: 100%; height: 60px; display: block; }
.hero-waves path { fill: var(--bg); }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 46em; margin-bottom: 32px; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card p { color: var(--muted); margin: 0; }
.ico { width: 36px; height: 36px; color: var(--green); background: var(--green-soft); border-radius: 10px; padding: 6px; margin-bottom: 12px; }

/* diagram */
.diagram-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.diagram { display: block; width: 100%; height: auto; font-family: var(--font); }
.diagram-tall { display: none; max-width: 420px; margin: 0 auto; }
@media (max-width: 720px) { .diagram-wide { display: none; } .diagram-tall { display: block; } }
.d-zone { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 8 7; }
.d-zone-label { fill: var(--green); font-weight: 700; font-size: 16px; }
.d-dev { fill: var(--accent); }
.d-dev-stroke { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.d-screen { fill: var(--night2); }
.d-tile { fill: #2f3f8f; }
.d-tile-on { fill: #2f3f8f; stroke: #3ecf6e; stroke-width: 2; }
.d-server { fill: var(--night1); stroke: var(--green); stroke-width: 2; }
.d-line { stroke: #8fa0dc; stroke-width: 3; stroke-linecap: round; }
.d-line-inv { stroke: #c9d3ff; stroke-width: 4; stroke-linecap: round; }
.d-wave { fill: none; stroke: #3ecf6e; stroke-width: 3; stroke-linecap: round; }
.d-accent { fill: #3ecf6e; }
.d-arrow { stroke: var(--green); stroke-width: 3; fill: none; }
.d-arrow-back { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 5; fill: none; }
.d-arrowhead { fill: var(--muted); }
.d-arrow + text, .d-h { fill: var(--text); }
.d-h { font-weight: 700; font-size: 18px; }
.d-small { fill: var(--muted); font-size: 14px; }
.d-mono { fill: var(--text); font-family: var(--mono); font-size: 14px; }
.d-muted { font-style: italic; }
.d-cloud path:first-child { fill: none; stroke: var(--muted); stroke-width: 2.5; }
.d-cross { stroke: #e5484d; stroke-width: 3; stroke-linecap: round; }

/* screenshots */
.shots { display: grid; gap: 20px; margin-bottom: 24px; }
.shots-wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.shots-phone { grid-template-columns: repeat(auto-fit, minmax(min(46%, 200px), 1fr)); }
.shot { margin: 0; }
.shot a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); background: #0f1115; }
.shot img { display: block; width: 100%; transition: transform .2s; }
.shot a:hover img { transform: scale(1.015); }
.shot-wide img { aspect-ratio: auto; }
.shot figcaption { font-size: .92rem; color: var(--muted); margin-top: 8px; }

/* privacy */
.privacy { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.privacy li { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.privacy .ico { flex: none; margin: 0; }
.privacy p { color: var(--muted); margin: 0; }

/* install */
.install-grid { display: grid; gap: 32px; }
.install-grid > * { min-width: 0; }
@media (min-width: 960px) { .install-grid { grid-template-columns: 1fr 1fr; } }
.steps { padding-left: 1.4em; margin: 0 0 28px; }
.steps li { margin-bottom: .7em; padding-left: .2em; }
.steps li::marker { color: var(--green); font-weight: 700; }
.req { padding-left: 1.2em; color: var(--muted); }
.req li { margin-bottom: .4em; }
.note { color: var(--muted); font-size: .95rem; }
.code { background: var(--code-bg); color: var(--code-text); border-radius: 12px; padding: 18px; overflow-x: auto; font: 13.5px/1.55 var(--mono); max-width: 100%; border: 1px solid var(--border); }
.code code { background: none; padding: 0; font-size: inherit; overflow-wrap: normal; }
.code .c { color: #8fa0dc; }

/* faq */
details { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
summary { cursor: pointer; padding: 16px 18px; font-weight: 600; }
details p { padding: 0 18px 16px; margin: 0; color: var(--muted); }

/* footer */
.site-footer { background: var(--night2); color: #c9d0ef; padding: 32px 0; font-size: .95rem; }
.site-footer a { color: #b8c6ff; }
.site-footer img { vertical-align: middle; border-radius: 6px; margin-right: 4px; }
.site-footer .muted { color: #98a2cc; }
.footer-row p { margin: 0 0 .6em; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(5, 8, 20, .88); }
.lightbox img { display: block; max-width: 96vw; max-height: 90vh; width: auto; height: auto; border-radius: 10px; }
.lb-close { position: fixed; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-close:hover { background: rgba(255, 255, 255, .28); }

/* root language picker */
.picker { min-height: 100vh; display: grid; place-items: center; text-align: center; color: #fff; background: linear-gradient(180deg, var(--night1), var(--night2)); padding: 24px var(--gutter); }
.picker ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.picker a { color: #fff; }
.picker .btn-ghost { min-width: 130px; }

/* ---------- donate ---------- */
.wishlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.wish { display: flex; flex-direction: column; height: 100%; color: var(--text); text-decoration: none; transition: transform .15s ease; }
.wish:hover, .wish:focus-visible { transform: translateY(-4px) rotate(-1deg); }
.wish h3 { margin: 0 0 4px; }
.wish p { flex: 1; }
.wish-ico { font-size: 2.4rem; line-height: 1; margin-bottom: 12px; }
.wish:hover .wish-ico { animation: wiggle .5s ease; }
.wish-chf { align-self: flex-start; margin-top: 14px; padding: 4px 12px; border-radius: 999px; font-weight: 700; background: var(--green-soft); color: var(--green); }
.donate-cta { margin: 28px 0 8px; }
.btn-donate { background: var(--moon); color: #2a1f00; }
.btn-donate:hover { background: #ffe08f; }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { .wish { transition: none; } .wish:hover, .wish:focus-visible { transform: none; } .wish:hover .wish-ico { animation: none; } }
