/*
 * Das eine Stylesheet der Startseite.
 *
 * Übernommen aus sharepoint-mcp (src/web/styles.ts), damit beide Server gleich
 * aussehen. Quelle dort ist der AlphaPet CI / Style Guide v2.4 (Confluence FD,
 * Seite 4006740089); die Begründungen der Abweichungen stehen dort. Die zwei,
 * die man beim Ändern kennen muss:
 *
 * - APV Blue (#46c0e9) hat auf Weiß nur 2.10:1. Nie Textfarbe auf hellem
 *   Grund, nur Flächen, Linien und Akzente. Auf Navy ist es 7.25:1 und darf
 *   Text sein.
 * - Die Schriften liegen selbst gehostet unter /assets/fonts (Fontsource,
 *   SIL OFL 1.1, Lizenzen daneben). Keine Anfrage an Google Fonts.
 *
 * Ausgeliefert unter /assets/app-<hash>.css; der Hash kommt aus dem Inhalt,
 * die Datei ist also unveränderlich und darf ewig im Cache liegen.
 */

:root {
  color-scheme: light;

  --accent: #46c0e9;
  --navy: #002060;
  --navy-hover: #001440;
  --navy-light: #2b4563;

  --text: #002060;
  --text-muted: #2b4563;
  --on-navy: #ffffff;
  --on-navy-muted: #b9c7dd;
  --accent-on-navy: #46c0e9;

  --bg: #f2f2f2;
  --surface: #ffffff;
  --surface-sunken: #f7f9fb;
  --border: #e5e5e5;
  --border-strong: #d8d8d8;

  --error-ink: #c62828;

  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", var(--font-body);
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --text-base: 1rem;
  --text-ratio: 1.125;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: var(--text-base);
  --text-lg: calc(var(--text-base) * var(--text-ratio));
  --text-xl: calc(var(--text-lg) * var(--text-ratio));
  --text-2xl: calc(var(--text-xl) * var(--text-ratio) * var(--text-ratio));

  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-normal: 1.55;

  --label-size: var(--text-xs);
  --label-weight: 700;
  --label-tracking: 0.16em;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --container: 1100px;
  --measure: 68ch;
  --card-pad: clamp(1rem, 3.5vw, 2rem);
  --band-pad: clamp(1.25rem, 4vw, 2.5rem);

  --radius-badge: 6px;
  --radius-control: 8px;
  --radius-card: 12px;
  --radius-round: 50%;

  --shadow-card: 0 1px 3px rgba(0, 32, 96, 0.06);
  --shadow-raised: 0 12px 32px rgba(0, 32, 96, 0.1);

  --texture-step: 8px;
  --texture-dot: rgba(70, 192, 233, 0.22);
}

/* --- Schriften: unicode-range hält latin-ext vom Netz fern, solange kein Name es braucht --- */
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-400-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; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-ext-400-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: "DM Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-500-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; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-ext-500-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: "DM Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-700-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; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/dm-sans-latin-ext-700-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: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-600-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; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-ext-600-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: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-700-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; }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/space-grotesk-latin-ext-700-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; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

/* --- Das Navy-Band ------------------------------------------------------ */
.band {
  background-color: var(--navy);
  background-image: radial-gradient(var(--texture-dot) 1px, transparent 1px);
  background-size: var(--texture-step) var(--texture-step);
  color: var(--on-navy);
  padding: var(--band-pad) 0;
  border-bottom: 3px solid var(--accent);
}
.band-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Logos gehören auf Weiß, der Kopf ist Navy: das Logo bekommt eine eigene Plakette. */
.plaque {
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-control);
  background-color: var(--surface);
  background-image: url("/assets/alphapet.svg");
  background-size: 72% 72%;
  background-position: center;
  background-repeat: no-repeat;
}

.band-titles { flex: 1 1 16rem; min-width: 0; }
.band h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin: 0;
}
.band .tagline {
  margin: var(--space-1) 0 0;
  color: var(--on-navy-muted);
  font-size: var(--text-sm);
}

.badge {
  flex: none;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--label-weight);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-on-navy);
  border: 1px solid var(--accent-on-navy);
  border-radius: var(--radius-badge);
  padding: var(--space-1) var(--space-3);
  white-space: nowrap;
}

/* --- Seite -------------------------------------------------------------- */
main {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-10) var(--space-5) var(--space-16);
}

p { margin: 0 0 var(--space-4); max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-4);
}
h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  margin: 0 0 var(--space-3);
}

.label {
  font-family: var(--font-display);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  text-transform: uppercase;
  letter-spacing: var(--label-tracking);
  color: var(--navy-light);
  margin: 0 0 var(--space-3);
}

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

:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 2px;
  border-radius: var(--radius-badge);
}

/* --- Karten ------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--card-pad);
  margin: 0 0 var(--space-6);
}
.card:last-child { margin-bottom: 0; }
.card > :last-child { margin-bottom: 0; }
.card-action { border-left: 4px solid var(--accent); box-shadow: var(--shadow-raised); }
.card-quiet { box-shadow: none; }

/* --- Was er kann -------------------------------------------------------- */
.groups {
  display: grid;
  align-items: start;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  margin: 0 0 var(--space-6);
}

.tools { list-style: none; margin: 0; padding: 0; }
.tools li {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
  color: var(--text-muted);
}
.tools li:first-child { border-top: none; padding-top: 0; }
.tools b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  color: var(--text);
}

/* --- Kann nicht / gut zu wissen: gezeichnete Marken statt Emoji ----------- */
.marks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.marks li { display: flex; gap: var(--space-3); align-items: flex-start; }
.marks .icon { flex: none; width: 1.375rem; height: 1.375rem; margin-top: 0.1rem; }
.marks-no .icon { color: var(--error-ink); }
.marks-info .icon { color: var(--navy-light); }
.marks b { font-weight: 700; }
.marks p { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--text-muted); }

.icon { display: inline-block; vertical-align: middle; fill: none; stroke: currentColor;
        stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sprite { display: none; }

/* --- Clients unter der Adresse ------------------------------------------ */
.clients {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.clients b { display: block; font-family: var(--font-display); font-weight: 600; color: var(--text); }

/* --- Adresse und Code --------------------------------------------------- */
.endpoint {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-md);
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-control);
  padding: var(--space-4);
  margin: 0 0 var(--space-4);
  overflow-wrap: anywhere;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-badge);
  padding: 0.1em 0.35em;
  overflow-wrap: anywhere;
}

/* --- Beispielfragen ----------------------------------------------------- */
.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.examples li {
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  padding: var(--space-3) var(--space-4);
}

/* --- Fuß ---------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--border-strong);
  margin-top: var(--space-12);
  padding-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
footer p { margin: 0; max-width: none; }

/* Breakpoints bleiben Literale: Custom Properties wirken in Media Queries nicht. */
@media (max-width: 576px) {
  .band h1 { font-size: var(--text-xl); }
  .groups { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
