/* ==========================================================================
   OptikamPad — Design-System v2 "SaaS-Referenz"
   Nutzer-gepinnte Referenz: brbase.de (Layout- und Komponentensprache),
   übersetzt in die Optikam-Markenfarben (Weiß / #3aa3dc / #020304).
   Runde, freundliche B2B-SaaS-Sprache: Pill-Buttons, große Radien, weiche
   Schatten, Verlaufs-Hero, Wellen-Trenner, zentrierte Abschnitts-Header.
   ========================================================================== */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/baloo2-var-latin.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: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/baloo2-var-latin-ext.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: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/mulish-var-latin.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: "Mulish";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/mulish-var-latin-ext.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;
}

:root {
  --blue: #3aa3dc;        /* Optikam-Blau (Marke) */
  --blue-deep: #1d7db1;   /* Buttons, Links (kontrastsicher) */
  --navy: #0b3a56;        /* Überschriften, Footer, dunkles Verlaufs-Ende */
  --ink: #020304;         /* Fließtext (Marke) */
  --paper: #ffffff;       /* Grundfläche (Marke) */
  --soft: #eaf5fc;        /* helles Blau-Band für Wechselabschnitte */
  --soft-2: #f6fbfe;      /* noch leiser */
  --line: #d3e7f3;        /* zarte Trennlinien */
  --muted: #3d5a6e;       /* Sekundärtext, blau abgetönt */

  --grad: linear-gradient(115deg, var(--navy) 0%, var(--blue-deep) 48%, var(--blue) 100%);

  --u: 8px;               /* Rastermodul (Altbestand in Seiten-Styles) */
  --radius-xl: 28px;
  --radius: 16px;
  --pill: 999px;
  --shadow-card: 0 12px 34px rgba(11, 58, 86, 0.12);
  --shadow-soft: 0 4px 16px rgba(11, 58, 86, 0.08);

  --font-display: "Baloo 2", "Avenir Next", "Trebuchet MS", sans-serif;
  --font-body: "Mulish", "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------- Grundlage */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 130px; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

img, video { display: block; max-width: 100%; height: auto; }
svg { display: block; max-width: 100%; }

a { color: var(--blue-deep); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: 2px;
  border-radius: 6px;
}

::selection { background: var(--blue); color: var(--paper); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 99;
  background: var(--paper); border-radius: var(--pill);
  box-shadow: var(--shadow-card);
  padding: 10px 20px; font-weight: 800;
}
.skip-link:focus { left: 8px; }

/* ------------------------------------------------------------- Typografie */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { max-width: 68ch; overflow-wrap: break-word; }
.lead { font-size: 1.18rem; color: var(--muted); max-width: 54ch; }
.small { font-size: 0.88rem; color: var(--muted); }

.center { text-align: center; }
.center p, .center .lead { margin-left: auto; margin-right: auto; }

/* Abschnitts-Vorzeile: klare farbige Zwischenüberschrift statt Pille */
.flag {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.15;
  color: var(--navy);
  text-wrap: balance;
}

/* Nach der großen dunklen Überschrift: kleine blaue Unterzeile */
.flag + h1, .flag + h2 {
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  line-height: 1.3;
  color: var(--blue-deep);
}

/* ------------------------------------------------------------------ Layout */

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

main > section { padding: clamp(56px, 8vw, 96px) 0; }
main > section.tight { padding: clamp(32px, 5vw, 56px) 0; }

.band { background: var(--soft-2); }
.band-strong { background: var(--soft); }

/* Wellen-Trenner (Signatur der Referenz) */
.wave { position: relative; }
.wave::before {
  content: "";
  display: block;
  height: 56px;
  margin-top: -56px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56 C240 0 480 0 720 24 C960 48 1200 48 1440 8 L1440 56 Z' fill='%23f6fbfe'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}
.wave-strong::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 56' preserveAspectRatio='none'%3E%3Cpath d='M0 56 C240 0 480 0 720 24 C960 48 1200 48 1440 8 L1440 56 Z' fill='%23eaf5fc'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* Karten */
.sheet {
  background: var(--paper);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.callout {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 28px 28px 24px;
}
.callout::before {
  content: attr(data-tab);
  position: absolute;
  top: -12px; left: 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--blue-deep);
  border-radius: var(--pill);
  padding: 3px 12px;
}

/* Häkchen-Listen (Signatur der Referenz) */
.check-list { list-style: none; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: "";
  flex: 0 0 auto;
  width: 22px; height: 22px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' stroke='%23ffffff' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.check-list.on-dark li::before { background-color: rgba(255, 255, 255, 0.25); }
.check-list.on-dark li { color: var(--paper); }

/* ---------------------------------------------------------------- Knöpfe */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--paper);
  background: var(--blue-deep);
  border: 2px solid transparent;
  border-radius: var(--pill);
  padding: 13px 28px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease-out, box-shadow 150ms ease-out, background 150ms ease-out;
}
.btn:hover {
  background: var(--navy);
  color: var(--paper);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.btn .arrow { font-weight: 800; }

.btn-secondary {
  background: var(--paper);
  color: var(--blue-deep);
  border-color: var(--blue-deep);
}
.btn-secondary:hover { background: var(--soft); color: var(--navy); border-color: var(--navy); }

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.12);
  color: var(--paper);
  border-color: var(--paper);
}
.btn-ghost-light:hover { background: var(--paper); color: var(--navy); }

.btn-light { background: var(--paper); color: var(--blue-deep); }
.btn-light:hover { background: var(--soft); color: var(--navy); }

/* ------------------------------------------------------------------ Kopf */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  box-shadow: 0 2px 14px rgba(11, 58, 86, 0.08);
}

/* Kopfzeile über der Hauptnavigation */

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand img { height: 54px; width: auto; }
.brand-pad {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--blue-deep);
  background: var(--soft);
  border-radius: var(--pill);
  padding: 2px 12px;
}

.nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin-left: auto; }
.nav a, .nav-drop > summary {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--navy);
  padding: 7px 11px;
  border-radius: var(--pill);
  white-space: nowrap;
}

/* Aktionen rechts in der einen Kopfzeile */
.masthead .wrap { max-width: 1680px; padding-left: clamp(16px, 2vw, 32px); padding-right: clamp(16px, 2vw, 32px); }
.masthead-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: 0 0 auto; }
.masthead-actions .btn { padding: 10px 18px; font-size: 0.9rem; box-shadow: none; white-space: nowrap; }
.masthead .wa {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
}
.masthead .wa:hover { background: #1eb857; color: #ffffff; }
.masthead .wa svg { width: 19px; height: 19px; }

.masthead-actions .login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
}
.masthead-actions .login:hover { background: var(--blue-deep); color: var(--paper); }
.masthead-actions .login svg { width: 18px; height: 18px; }
.masthead-actions .lang a, .masthead-actions .lang span { font-size: 0.72rem; padding: 3px 7px; }
.nav a:hover { background: var(--soft); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--blue-deep); background: var(--soft); }

/* Aufklapp-Menüs */
.nav-drop { position: relative; }
.nav-drop > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}
.nav-drop > summary::-webkit-details-marker { display: none; }
.nav-drop > summary::after, .nav-drop > a::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease-out;
}
.nav-drop[open] > summary::after,
.nav-drop:hover > a::after { transform: rotate(225deg) translateY(1px); }
.nav-drop > summary:hover { background: var(--soft); }
.nav-drop[open] > summary { color: var(--blue-deep); background: var(--soft); }
.nav-drop:hover > a { background: var(--soft); text-decoration: none; }

/* Aufklappen per Mouseover (Tabs selbst sind Links) */
div.nav-drop .drop-sheet { display: none; }
div.nav-drop:hover .drop-sheet,
div.nav-drop:focus-within .drop-sheet { display: grid; }
div.nav-drop:hover::before {
  content: "";
  position: absolute;
  top: 100%; left: 0; right: 0;
  height: 14px;
}

.drop-sheet {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 60;
  min-width: 240px;
  display: grid;
  gap: 2px;
  padding: 10px;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.drop-sheet a {
  display: block;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 9px 14px;
  border-radius: 10px;
  white-space: nowrap;
}
.drop-sheet a:hover { background: var(--soft); color: var(--blue-deep); text-decoration: none; }

/* ------------------------------------------------------------- Seitenkopf */

.page-hero {
  background: var(--grad);
  color: var(--paper);
  padding: clamp(40px, 7vw, 72px) 0 clamp(48px, 8vw, 80px);
}
.page-hero h1 { color: var(--paper); }
.page-hero .lead { color: rgba(255, 255, 255, 0.88); }
.page-hero .flag { color: var(--paper); }
.page-hero .flag + h1 { color: rgba(255, 255, 255, 0.85); }

/* ------------------------------------------------------------------ Fuß */

.footer {
  background: linear-gradient(150deg, var(--navy) 0%, #072235 70%);
  color: rgba(255, 255, 255, 0.85);
  padding: clamp(48px, 7vw, 72px) 0 0;
  margin-top: 64px;
}
.footer a { color: rgba(255, 255, 255, 0.85); }
.footer a:hover { color: var(--paper); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  align-items: flex-start;
  padding-bottom: 40px;
}
.footer img { height: 38px; width: auto; background: var(--paper); border-radius: 10px; padding: 5px 10px; }
.footer h4 { color: var(--paper); font-size: 1rem; margin-bottom: 12px; }
.footer nav { display: flex; flex-direction: column; gap: 8px; }
.footer nav a { font-size: 0.95rem; }
.footer .small { color: rgba(255, 255, 255, 0.6); max-width: 34ch; }
.footer address { font-style: normal; font-size: 0.95rem; line-height: 1.8; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 18px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* --------------------------------------------------------- Sprachumschalter */

.lang-drop > summary {
  border: 1.5px solid var(--line);
  font-size: 0.88rem;
}
.lang-drop .drop-sheet { left: auto; right: 0; min-width: 210px; }
.lang-drop .fl { font-size: 1.05rem; margin-right: 2px; }
.lang-drop .drop-sheet .lang-on,
.lang-drop .drop-sheet .lang-off {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--navy);
}
.lang-drop .drop-sheet .lang-on { background: var(--soft); }
.lang-drop .drop-sheet .lang-off { color: var(--muted); cursor: not-allowed; }
.lang-drop .drop-sheet em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--pill);
  padding: 1px 8px;
  white-space: nowrap;
}

/* ------------------------------------------- iPad-Kompatibilitäts-Ampel */

.ipad-status { display: none; border-radius: 12px; padding: 14px 16px; font-size: 0.95rem; line-height: 1.5; }
.ipad-status strong { display: block; font-family: var(--font-display); }
.ipad-status.green  { display: block; background: #e3f4e8; color: #14532d; }
.ipad-status.yellow { display: block; background: #fdf3d4; color: #713f12; }
.ipad-status.orange { display: block; background: #ffe8d4; color: #7c2d12; }
.ipad-status.red    { display: block; background: #fddfdf; color: #7f1d1d; }

@media (max-width: 1500px) {
  .nav a, .nav-drop > summary { font-size: 0.86rem; padding: 6px 7px; }
  .masthead-actions .btn { padding: 8px 12px; font-size: 0.8rem; }
  .masthead-actions { gap: 4px; }
  .brand img { height: 46px; }
}

/* ------------------------------------------------------------- Responsiv */

@media (max-width: 980px) {
  .masthead { position: static; }
  [id] { scroll-margin-top: 16px; }
  .masthead-inner { flex-wrap: wrap; gap: 10px; }
  .nav { margin-left: 0; width: 100%; order: 3; }
  .masthead-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  .nav-drop { position: static; }
  .drop-sheet {
    position: absolute;
    left: clamp(8px, 4vw, 48px);
    right: clamp(8px, 4vw, 48px);
    min-width: 0;
  }
  .drop-sheet a { white-space: normal; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
