/* rondivo.net: Farben, Schrift und Maße nach marketing/rondivo/brand/BRAND-GUIDE.md (Abschnitte 4, 5, 8). */

/* Rubik variabel 300 bis 900, selbst gehostet (SIL OFL 1.1, siehe fonts/Rubik-OFL.txt). */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/assets/fonts/rubik-latin-ext-wght-normal.woff2) format("woff2-variations"), url(/assets/fonts/rubik-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url(/assets/fonts/rubik-latin-wght-normal.woff2) format("woff2-variations"), url(/assets/fonts/rubik-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --font-sans: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg: #F7F5FC;          /* Mist */
  --surface: #FFFFFF;     /* White */
  --container: #E7E0FF;   /* Lavender */
  --text: #17142B;        /* Ink */
  --muted: #4E4865;       /* Muted */
  --hairline: #D2CCE3;    /* Hairline */
  --primary: #6A4CF6;     /* Rondivo Violet */
  --on-primary: #FFFFFF;
  --link: #4A2FD0;        /* Violet Deep, 6,33:1 auf Lavender, 8,05:1 Weiß darauf */
  --accent: #FF9F43;      /* Today Orange, nur Fläche */
  --on-accent: #2E1500;
  --hero-from: #7B5CFF;
  --hero-to: #4A2FD0;
  --pill-outline: transparent;
  --outline: #7B7493;     /* Outline, Ränder von Bedienelementen */
  --focus: #4A2FD0;       /* Violet Deep: 7,45:1 auf Mist, 6,33:1 auf Lavender */
  --shadow: 0 1px 2px rgba(23, 20, 43, .06), 0 8px 24px rgba(23, 20, 43, .08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #110F1C;        /* Night Base */
    --surface: #1C192B;   /* Night Surface */
    --container: #241F35; /* Night High */
    --text: #E7E3F3;      /* Night Text */
    --muted: #C9C2DC;     /* Night Muted */
    --hairline: #3A3450;  /* Night Hairline */
    --primary: #CBBEFF;   /* Violet Soft */
    --on-primary: #2E1594;
    --link: #CBBEFF;
    --accent: #FFAD5E;    /* Orange Soft */
    --hero-from: #4A2FD0;
    --hero-to: #26157A;
    --pill-outline: #948DAB;
    --outline: #948DAB;   /* Night Outline */
    --focus: #FFAD5E;     /* Orange Soft: 10,27:1 auf Night Base */
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Kopf */
/* Seitenrand kommt von .wrap; das Logo-SVG hat seinen Schutzraum eingebaut (700 von 7589 Einheiten, bei 150 px rund 14 px),
   darum rückt es um diesen Betrag nach links, damit das Icon an der Textkante steht. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 8px; }
.top .brand { display: block; line-height: 0; margin-left: -14px; flex: none; }
.top .brand img { width: 150px; height: auto; }
.langs { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 15px; }
.langs a, .langs span { display: inline-block; padding: 6px 10px; border-radius: 999px; text-decoration: none; }
.langs span { font-weight: 600; background: var(--container); color: var(--text); }
.langs a { color: var(--link); }
.langs a:hover { text-decoration: underline; }
@media (max-width: 379px) {
  .top .brand { margin-left: -12px; }
  .top .brand img { width: 128px; }
  .langs { font-size: 14px; }
  .langs a, .langs span { padding: 6px 8px; }
}

/* Sprachwahl ohne Skript: <details> mit Liste, Sprachnamen in der eigenen Sprache, keine Flaggen */
.langpick { position: relative; flex: none; }
.langpick summary {
  display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--outline); color: var(--link); font-size: 15px; cursor: pointer; list-style: none;
}
.langpick summary::-webkit-details-marker { display: none; }
.langpick summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.langpick[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.langpick .globe { width: 16px; height: 16px; border: 2px solid currentColor; border-radius: 50%; position: relative; flex: none; }
.langpick .globe::before { content: ""; position: absolute; inset: -2px 3px; border: 2px solid currentColor; border-radius: 50%; }
.langpick nav { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; min-width: 220px; max-height: min(80vh, 640px); overflow-y: auto; }
.langpick ul { list-style: none; margin: 0; padding: 0; }
.langpick li a, .langpick li span { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 15px; line-height: 1.3; }
.langpick li a { color: var(--text); }
.langpick li a:hover { background: var(--container); }
.langpick li span { font-weight: 600; background: var(--container); color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Typografie */
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: 36px; font-weight: 700; line-height: 1.08; letter-spacing: -0.01em; }
h2 { font-size: 24px; font-weight: 600; line-height: 1.2; }
h3 { font-size: 19px; font-weight: 600; line-height: 1.3; }
p { margin: 0 0 1em; }
.lead { font-size: 18px; color: var(--muted); max-width: 34em; }
.label { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.small { font-size: 14px; color: var(--muted); line-height: 1.5; }
@media (min-width: 900px) {
  body { font-size: 17px; }
  h1 { font-size: 56px; }
  h2 { font-size: 30px; }
  h3 { font-size: 21px; }
  .lead { font-size: 19px; }
}

/* Knöpfe: eine Hauptaktion, Zweitaktion als Textlink */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary);
  font: inherit; font-weight: 600; font-size: 17px; line-height: 1.2; text-decoration: none;
  box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-quiet { background: var(--surface); color: var(--link); border: 1px solid var(--outline); box-shadow: none; }

/* Offizielles Google-Play-Badge (Partner Marketing Hub, unverändert): Höhe mindestens 28 px, Schutzraum ein Viertel der Höhe */
.badge { display: inline-block; line-height: 0; margin: 14px; border-radius: 8px; }
.badge img { height: 56px; width: auto; }
.actions .badge { margin: 0; padding: 14px; margin-left: -14px; }
.closing .actions .badge { margin-left: 0; }
.trademark { font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 24px 0 12px; }

/* Hero */
.hero { padding: 24px 0 40px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-shot {
  justify-self: center; width: min(300px, 78vw); padding: 18px; border-radius: 32px;
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to)); box-shadow: var(--shadow); overflow: hidden;
}
.hero-shot img { border-radius: 20px; }
@media (min-width: 900px) {
  .hero { padding: 48px 0 64px; }
  .hero-grid { grid-template-columns: 1.25fr 1fr; gap: 56px; }
  .hero-shot { width: 320px; }
}

/* Schichtfarben-Band: Pillen immer mit Kürzel (Brand Guide 4.3) */
.band { background: var(--surface); border-block: 1px solid var(--hairline); padding: 28px 0; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.pill {
  min-width: 44px; padding: 8px 10px; border-radius: 12px; text-align: center;
  font-size: 14px; font-weight: 600; line-height: 1; color: #1B1726; border: 1px solid transparent;
}
.pill-e { background: #F6B73C; }
.pill-l { background: #F07A5B; }
.pill-n { background: #4C47C9; color: #FFFFFF; border-color: var(--pill-outline); }
.pill-o { background: #8E9AAF; }
.band p { margin: 0; color: var(--muted); }

/* Abschnitte und Karten */
.section { padding: 48px 0; }
.cards { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 20px; padding: 22px; }
.card p { margin: 0; color: var(--muted); }
.card .num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.private { background: var(--container); border-radius: 24px; padding: 28px 22px; }
@media (min-width: 760px) { .private { padding: 36px 40px; } }
.private ul { margin: 0 0 16px; padding-left: 1.2em; }
.private li { margin: 0 0 6px; }
.private .site-note { font-weight: 600; margin: 0 0 12px; }

.closing { text-align: center; padding: 56px 0 64px; }
.closing .actions { justify-content: center; }

/* Fließtext-Seiten (Datenschutz) */
.doc { max-width: 46em; padding-top: 24px; padding-bottom: 56px; }
.doc h1 { font-size: 30px; line-height: 1.15; hyphens: manual; }
@media (max-width: 359px) { .doc h1 { font-size: 26px; } }
.doc h2 { font-size: 22px; margin-top: 1.6em; }
@media (min-width: 900px) { .doc h1 { font-size: 40px; } .doc h2 { font-size: 26px; } }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc .meta { color: var(--muted); font-size: 15px; }
.doc .note { background: var(--container); border-radius: 12px; padding: 12px 16px; font-size: 15px; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; background: var(--container); padding: .05em .35em; border-radius: 6px; overflow-wrap: anywhere; }

/* Code-Landeseite /c */
.code-page { max-width: 40em; padding-top: 24px; padding-bottom: 56px; }
.code-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 24px; padding: 24px 20px; box-shadow: var(--shadow); }
@media (min-width: 720px) { .code-card { padding: 32px; } }
.code-card h1 { font-size: 30px; }
@media (min-width: 900px) { .code-card h1 { font-size: 36px; } }
.code-card + .code-card { margin-top: 24px; }
.code-card .steps { margin: 0 0 12px; padding-left: 1.3em; color: var(--muted); }
.code-card .state-bad { display: none; }
html.nocode .code-card .state-bad { display: block; }
html.lang-de .code-card[lang="en"], html.lang-en .code-card[lang="de"] { display: none; }

/* Fuß */
.foot { border-top: 1px solid var(--hairline); padding: 28px 0 36px; font-size: 15px; color: var(--muted); }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 12px; padding: 0; list-style: none; }
.foot p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: filter .15s ease; }
}

/* Sprachen ohne Rubik-Glyphen: Systemschriften als Rückfall (keine externen Schriften), Brand Guide 5.1 und 5.3 */
:lang(ja) { font-family: "Rubik", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif; line-break: strict; }
:lang(ko) { font-family: "Rubik", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR", sans-serif; word-break: keep-all; }
:lang(zh-Hant) { font-family: "Rubik", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", sans-serif; }
:lang(ja) body, :lang(ko) body, :lang(zh-Hant) body { line-height: 1.75; }
:lang(ja) h1, :lang(ko) h1, :lang(zh-Hant) h1, :lang(ja) h2, :lang(ko) h2, :lang(zh-Hant) h2 { letter-spacing: 0; line-height: 1.3; }
:lang(ja) .label, :lang(ko) .label, :lang(zh-Hant) .label { text-transform: none; letter-spacing: 0; font-size: 14px; }
:lang(de) .doc :is(h1, h2), :lang(nl) .doc :is(h1, h2), :lang(pl) .doc :is(h1, h2), :lang(tr) .doc :is(h1, h2), :lang(id) .doc :is(h1, h2), :lang(fr) .doc :is(h1, h2), :lang(it) .doc :is(h1, h2), :lang(es) .doc :is(h1, h2), :lang(pt) .doc :is(h1, h2) { hyphens: auto; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .lead { word-break: auto-phrase; }

/* Keine Waisen in Einleitung, Zweitlink und Fliesstext (Senior-QA 3, N5); Japanisch auch im Fliesstext an Wortgruppen umbrechen (N6) */
.lead, .band p, .card p, .private li, .doc p, .doc li, .code-card p { text-wrap: pretty; }
.actions > a:not(.badge):not(.btn) { text-wrap: balance; }
:lang(ja) body { word-break: auto-phrase; }
