/* CalorieApp website. System fonts only, no external requests. Colours follow the app's Pearl (light) and Obsidian (dark) themes. */

:root {
  color-scheme: light dark;
  --bg: #f6f7f2;
  --bg-alt: #eef1ea;
  --surface: #ffffff;
  --surface-2: #ecefe8;
  --text: #161a17;
  --text-2: #4f5751;
  --border: #d5d9d1;
  --accent: #0f7a4a;
  --accent-strong: #0b6a3f;
  --accent-soft: rgba(15, 122, 74, 0.1);
  --on-accent: #ffffff;
  --glow-a: rgba(47, 191, 91, 0.35);
  --glow-b: rgba(20, 160, 140, 0.25);
  --warn-bg: #fff4dc;
  --warn-text: #5c3d00;
  --warn-border: #f0c36a;
  --info-bg: #e8f1fb;
  --info-text: #183a5c;
  --info-border: #a9c7e8;
  --owner-bg: #f3e8ff;
  --owner-text: #45206b;
  --shadow: 0 1px 2px rgba(16, 24, 18, 0.04), 0 8px 24px rgba(16, 24, 18, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d0c;
    --bg-alt: #101412;
    --surface: #161a18;
    --surface-2: #1f2522;
    --text: #f3f6f4;
    --text-2: #a9b3ad;
    --border: #2a322e;
    --accent: #3ddc84;
    --accent-strong: #5be59a;
    --accent-soft: rgba(61, 220, 132, 0.12);
    --on-accent: #04140a;
    --glow-a: rgba(47, 191, 91, 0.28);
    --glow-b: rgba(20, 160, 140, 0.2);
    --warn-bg: #3a2c0c;
    --warn-text: #ffe2a3;
    --warn-border: #7a5a14;
    --info-bg: #13263a;
    --info-text: #cfe3f8;
    --info-border: #2e4f72;
    --owner-bg: #2c1b42;
    --owner-text: #ead9ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 920px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-accent); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.125rem; }
.brand img { border-radius: 9px; }
.brand:hover { color: var(--text); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 999px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 0.975rem;
}
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: 0.95rem; background: var(--surface);
  min-height: 40px;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 2px; opacity: 0.7; }
.lang-switch[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; max-height: min(70vh, 480px); overflow-y: auto;
  list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
}
.lang-menu a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; }
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a[aria-current="true"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 8px 12px; padding-top: 8px; padding-bottom: 8px; }
  .lang-current { display: none; }
  .lang-switch { margin-left: auto; }
  .main-nav { order: 3; margin-left: 0; width: 100%; }
  .main-nav ul { flex-wrap: wrap; justify-content: flex-start; gap: 2px 4px; }
  .main-nav a { padding: 6px 10px; }
  html { scroll-padding-top: 120px; }
}

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: transform 0.15s ease, background 0.15s ease;
}
.button.primary { background: var(--accent); color: var(--on-accent); }
.button.primary:hover { background: var(--accent-strong); color: var(--on-accent); transform: translateY(-1px); }
.button.ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.button.ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 56px 0 40px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--glow-a), transparent 70%); pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; font-weight: 700; color: var(--accent); margin-bottom: 0.75em; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.25rem); letter-spacing: -0.03em; margin-bottom: 0.2em; }
.tagline { font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 600; color: var(--text); max-width: 32ch; }
.lead { font-size: 1.125rem; color: var(--text-2); max-width: 58ch; }
.status-pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent-soft); color: var(--text); font-size: 0.95rem; font-weight: 500;
}
.status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.hero-art { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 420px; }
.art-glow {
  position: absolute; inset: 10% 5% 0; border-radius: 40% 40% 32px 32px;
  background: linear-gradient(160deg, var(--glow-a), var(--glow-b)); filter: blur(2px);
}
.art-companion { position: relative; width: min(100%, 300px); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.18)); }
.art-icon { position: absolute; top: 4%; left: 6%; width: 84px; height: 84px; border-radius: 22px; box-shadow: var(--shadow); z-index: 2; }

@media (max-width: 860px) {
  .hero { padding-top: 32px; }
  .hero-inner { grid-template-columns: 1fr; gap: 16px; }
  .hero-art { min-height: 0; max-width: 340px; margin: 0 auto; width: 100%; }
  .art-companion { width: 240px; }
  .art-icon { width: 64px; height: 64px; border-radius: 16px; }
}

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { font-size: clamp(1.75rem, 3.4vw, 2.4rem); max-width: 24ch; }
.section-lead { color: var(--text-2); font-size: 1.125rem; max-width: 60ch; margin-bottom: 32px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; }
.card p:last-child { margin-bottom: 0; }

.feature-grid, .privacy-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.privacy-grid { grid-template-columns: repeat(2, 1fr); }
.feature p, .privacy-grid p { color: var(--text-2); }
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feature-grid, .privacy-grid { grid-template-columns: 1fr; } .section { padding: 44px 0; } }

.feature-icon {
  display: inline-block; width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  background: var(--accent-soft); position: relative;
}
.feature-icon::after {
  content: ""; position: absolute; inset: 10px; background: var(--accent);
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}
.icon-text { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v2H4zm0 6h16v2H4zm0 6h10v2H4z'/%3E%3C/svg%3E"); }
.icon-camera { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 3 7.2 5H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-3.2L15 3H9zm3 5a4.5 4.5 0 1 1 0 9 4.5 4.5 0 0 1 0-9zm0 2a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z'/%3E%3C/svg%3E"); }
.icon-check { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1.2 14.2-4-4 1.4-1.4 2.6 2.6 5.6-5.6 1.4 1.4-7 7z'/%3E%3C/svg%3E"); }
.icon-chart { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 20h18v2H3zM5 11h3v7H5zm5.5-5h3v12h-3zM16 14h3v4h-3z'/%3E%3C/svg%3E"); }
.icon-chat { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h16a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zm3 6v2h2V9H7zm4 0v2h2V9h-2zm4 0v2h2V9h-2z'/%3E%3C/svg%3E"); }
.icon-calendar { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2h2v2h6V2h2v2h3a1 1 0 0 1 1 1v15a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a1 1 0 0 1 1-1h3V2zM5 9v11h14V9H5zm2 2h4v4H7v-4z'/%3E%3C/svg%3E"); }

.also { margin-top: 28px; padding: 22px 24px; border-radius: var(--radius); border: 1px dashed var(--border); }
.also h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-2); }
.also ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.also li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 0.95rem; }

.google-card { margin-top: 16px; border-left: 4px solid var(--accent); }
.google-card p { color: var(--text-2); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.note-card h2, .help-card h2 { font-size: 1.35rem; }
.note-card p { color: var(--text-2); }
.help-card { background: linear-gradient(150deg, var(--accent-soft), var(--surface) 70%); }

/* Inner pages */
.page-head { padding: 48px 0 20px; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 8px 0 0; color: var(--text-2); font-size: 0.95rem; }
.doc-meta div { display: flex; gap: 6px; }
.doc-meta dt { font-weight: 600; }
.doc-meta dt::after { content: ":"; }
.doc-meta dd { margin: 0; }

.banner { border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 14px; font-size: 0.975rem; border: 1px solid; }
.banner-draft { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-border); font-weight: 500; }
.banner-info { background: var(--info-bg); color: var(--info-text); border-color: var(--info-border); }

.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; margin: 24px 0 64px; }
.toc { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; font-size: 0.9rem; }
.toc h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); }
.toc ol { margin: 0; padding-left: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 8px; border-radius: 8px; color: var(--text-2); text-decoration: none; }
.toc a:hover { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; gap: 16px; }
  .toc { position: static; max-height: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
}

.prose { max-width: 72ch; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; padding-top: 0.25em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: 0.3em 0; }
.prose blockquote { margin: 0 0 1em; padding: 12px 16px; border-left: 4px solid var(--border); background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--text-2); }
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface-2); }
.prose code { font-size: 0.9em; background: var(--surface-2); padding: 0.1em 0.35em; border-radius: 5px; }
.back-top { margin-top: 2em; font-size: 0.95rem; }

.flag { border-radius: 6px; padding: 0.1em 0.4em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.flag-unverified { background: var(--warn-bg); color: var(--warn-text); outline: 1px dashed var(--warn-border); }
.flag-owner { background: var(--owner-bg); color: var(--owner-text); outline: 1px dashed currentColor; }

/* Support */
.support { display: grid; gap: 16px; padding-bottom: 64px; }
.contact-card { background: linear-gradient(150deg, var(--accent-soft), var(--surface) 70%); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.email-text { font-weight: 600; }
.steps { padding-left: 1.4em; margin: 0 0 1em; }
.steps li { margin: 0.45em 0; }
.muted { color: var(--text-2); font-size: 0.975rem; }
.faq h2 { margin-top: 16px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.faq-item summary { cursor: pointer; padding: 16px 48px 16px 18px; font-weight: 600; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--accent); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 18px 16px; margin: 0; color: var(--text-2); }
.support-links { display: flex; gap: 10px; flex-wrap: wrap; }

.not-found { padding-bottom: 80px; }
.legal-pending { padding-bottom: 80px; }
.pending-card .lead { margin-top: 0; }
.pending-card .hero-actions { margin: 20px 0 0; }
.lang-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lang-list a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 36px 0 28px; font-size: 0.95rem; color: var(--text-2); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 32px; align-items: start; }
.footer-brand { display: flex; gap: 12px; }
.footer-brand img { border-radius: 8px; flex: none; align-self: flex-start; height: auto; }
.footer-brand p { margin: 0 0 4px; }
.footer-name { font-weight: 700; color: var(--text); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-note { grid-column: 1 / -1; margin: 0; font-size: 0.875rem; }
@media (max-width: 620px) { .footer-inner { grid-template-columns: 1fr; } }

/* Long words (German compounds, URLs) must never widen the page on small screens. */
h1, h2, h3 { overflow-wrap: break-word; hyphens: auto; }
.hero-inner > *, .feature-grid > *, .privacy-grid > *, .two-col > *, .legal-layout > *, .footer-inner > * { min-width: 0; }
