/* ── Fonts (self-hosted, DSGVO-konform) ───────────────────────────────────── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-500-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/hanken-grotesk-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/hanken-grotesk-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/hanken-grotesk-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/hanken-grotesk-700.woff2') format('woff2');
}

/* ── Extended subsets (variable fonts; load only when their glyphs appear) ──
 * latin-ext: Turkish (ş ğ İ ı …) and other extended Latin
 * cyrillic:  Russian / Ukrainian — Cormorant only; Hanken Grotesk has no
 *            Cyrillic upstream, so RU/UK body text falls back to the system
 *            stack via the html[lang] override further down.               */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/hanken-grotesk-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-italic-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-italic-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ── Theme Variables ───────────────────────────────────────────────────────── */
:root {
  /* Brand: Tinte (Navy aus dem Logo) auf warmem Papier, Sand als Akzent */
  --ink:             #1F2A4D;
  --sand:            #CCC2A9;
  --sand-deep:       #85784F;

  --bg:              #FAF8F3;
  --bg-card:         #F1EDE2;
  --bg-nav:          rgba(250, 248, 243, 0.88);
  --text:            #38405A;
  --text-muted:      #707690;
  --border:          #E6E0D0;
  --border-strong:   #D3CCB7;
  --btn-bg:          #1F2A4D;
  --btn-text:        #FAF8F3;
  --accent-bg:       #CCC2A9;
  --accent-text:     #1F2A4D;
  --footer-bg:       #1B2543;
  --footer-text:     #EFEBDE;
  --footer-muted:    rgba(239, 235, 222, 0.55);
  --shadow:          rgba(31, 42, 77, 0.07);

  --font-display:    'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-body:       'Hanken Grotesk', 'Segoe UI', Helvetica, Arial, sans-serif;

  --radius-sm: 7px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* Hanken Grotesk has no Cyrillic — use a clean system stack for RU/UK body
 * text so words don't mix Latin webfont + Cyrillic fallback glyphs.
 * Headings keep the brand serif via the Cormorant cyrillic subset above. */
html[lang="ru"], html[lang="uk"] {
  --font-body: system-ui, 'Segoe UI', Helvetica, Arial, sans-serif;
}

[data-theme="dark"] {
  --ink:             #ECE7D7;
  --sand:            #C8BD9F;
  --sand-deep:       #B3A77E;

  --bg:              #14182B;
  --bg-card:         #1C2237;
  --bg-nav:          rgba(20, 24, 43, 0.92);
  --text:            #C9C7BB;
  --text-muted:      #9A9EAE;
  --border:          #2B3149;
  --border-strong:   #3B425E;
  --btn-bg:          #ECE7D7;
  --btn-text:        #1A2038;
  --accent-bg:       #C8BD9F;
  --accent-text:     #161B2E;
  --footer-bg:       #0F1322;
  --footer-text:     #ECE7D7;
  --footer-muted:    rgba(236, 231, 215, 0.42);
  --shadow:          rgba(0, 0, 0, 0.40);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ──────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

::selection { background: var(--sand); color: var(--ink); }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: 0.005em;
}

h1 em, h2 em {
  font-style: italic;
  font-weight: 500;
  color: var(--sand-deep);
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--sand-deep);
  outline-offset: 3px;
}

/* Kleine Überzeile in Kapitälchen-Optik */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--sand-deep);
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.container {
  width: 90%;
  max-width: 1280px;
  margin: auto;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
header {
  position: fixed;
  width: 100%;
  top: 0;
  background: var(--bg-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background 0.3s, border-color 0.3s;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  gap: 16px;
}

/* ── Nav Brand ─────────────────────────────────────────────────────────────── */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}

.nav-logo {
  /* Both themes use a transparent monogram on an identical 488x610 canvas, so
     the mark stays the same size/position regardless of theme. Height + auto
     width + the flex `align-items: center` on .nav-brand keep it aligned with
     the wordmark at every breakpoint (incl. when the sub-line hides on mobile). */
  height: 34px;
  width: auto;
  content: url("images/logo_mono_light.png?v=2");  /* navy/cream on transparent */
}

[data-theme="dark"] .nav-logo {
  content: url("images/logo_mono_dark.png?v=2");   /* cream on transparent */
}

.nav-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  transition: color 0.3s;
}

.nav-wordmark-top {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--ink);
}

.nav-wordmark-sub {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.46em;
  color: var(--sand-deep);
  margin-top: 4px;
}

/* ── Nav Right ─────────────────────────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-back {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--ink); }

/* ── Theme Toggle ──────────────────────────────────────────────────────────── */
#theme-toggle {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
  color: var(--text);
}
#theme-toggle:hover {
  background: var(--bg-card);
  border-color: var(--ink);
}

/* ── Language switcher ─────────────────────────────────────────────────────── */
.lang-switch { position: relative; flex-shrink: 0; }

.lang-switch-btn {
  background: none;
  border: 1px solid var(--border-strong);
  border-radius: 40px;
  height: 36px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: background 0.2s, border-color 0.2s;
}
.lang-switch-btn:hover {
  background: var(--bg-card);
  border-color: var(--ink);
}
.lang-switch-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.lang-switch-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px var(--shadow);
  padding: 6px;
  min-width: 168px;
  z-index: 9000;
}

.lang-switch-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13.5px;
  color: var(--text);
  text-align: left;
  transition: background 0.15s;
}
.lang-switch-opt:hover, .lang-switch-opt:focus-visible { background: var(--bg); }
.lang-switch-opt[aria-selected="true"]::after {
  content: '✓';
  font-size: 12px;
  color: var(--sand-deep);
}

@media (max-width: 600px) {
  .lang-switch-code { display: none; }
  .lang-switch-btn { width: 36px; padding: 0; justify-content: center; border-radius: 50%; }
}

/* Notice on legal pages when a non-German language is active */
.lang-legal-note {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 28px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ── Button ────────────────────────────────────────────────────────────────── */
.btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 14px 30px;
  border-radius: 40px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-block;
  border: 1px solid var(--btn-bg);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, background 0.3s, color 0.3s;
  font-family: var(--font-body);
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--ink); opacity: 1; }

/* ── Product tile grid (shared: privatkunden, firmenkunden, faq) ───────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
}

/* Tiles with long titles span 2 columns so they "puzzle" together */
.product-tile--wide { grid-column: span 2; }

.product-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.2s ease;
}

.product-tile:hover {
  transform: translateY(-3px);
  border-color: var(--sand);
  box-shadow: 0 12px 32px var(--shadow);
}
.product-tile:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--shadow);
  transition-duration: 0.08s;
}

.product-tile[open] {
  grid-column: 1 / -1;
  box-shadow: 0 16px 40px var(--shadow);
}

.product-tile summary {
  list-style: none;
  cursor: pointer;
  padding: 26px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  user-select: none;
}
.product-tile summary::-webkit-details-marker { display: none; }

.product-tile-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--sand-deep);
  line-height: 1;
  display: block;
}

.product-tile h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
  padding-right: 28px;
}

.product-tile-tagline {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

/* + / − indicator (top-right) */
.product-tile summary::after {
  content: '+';
  position: absolute;
  top: 22px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}
.product-tile[open] summary::after {
  content: '−';
  color: var(--text);
  border-color: var(--text);
  transform: rotate(180deg);
}

/* Expanded detail */
.product-detail {
  padding: 4px 28px 30px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px 28px;
}

.product-detail-block h5 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin: 22px 0 8px;
}

.product-detail-block p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.75;
}

@media (max-width: 800px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .product-tile--wide { grid-column: span 1; }
}

@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-tile summary { padding: 22px 20px; }
  .product-tile h4 { font-size: 17px; }
  .product-detail { padding: 4px 22px 24px; grid-template-columns: 1fr; }
}

/* ── Statistik-Kacheln — clickable tiles linking to the source site ────────── */
.stat-band {
  display: grid;
  /* auto-fill (not auto-fit) so tiles keep the product-tile width and line up
   * with the product grid columns instead of stretching to fill the row */
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin: 0 0 18px;
}
.stat-band--after { margin: 18px 0 0; }

/* Tile = product-tile look, but a faint sand wash + sand border to read as a
 * distinct "facts & figures" surface. Whole tile is a link to the source. */
.stat-tile {
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-decoration: none;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px 22px 14px;
  color: var(--text);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
              background 0.3s ease,
              border-color 0.3s ease;
}
.stat-tile:hover {
  transform: translateY(-3px);
  background: var(--bg-card);
  border-color: var(--sand);
}
.stat-tile:active { transform: translateY(-1px); transition-duration: 0.08s; }

/* Stat tiles and closed product tiles share one minimum height so stat bands
 * and product grids interlock as one continuous tile system. */
.stat-tile,
.product-tile summary { min-height: 190px; }

.stat-tile-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--sand-deep);
}

.stat-tile-head { display: flex; align-items: center; gap: 14px; }
.stat-tile-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.stat-tile-label {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.stat-tile-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
}
.stat-tile-arrow {
  color: var(--sand-deep);
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.stat-tile:hover .stat-tile-arrow { transform: translate(2px, -2px); }

/* ── Mini-graphics (pure CSS, static) ── */
.stat-mini { flex-shrink: 0; }

/* row of dots — "1 von 4" */
.stat-mini-dots { display: flex; gap: 6px; }
.stat-mini-dots i {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
}
.stat-mini-dots i.on { background: var(--sand-deep); }

/* row of vertical bars */
.stat-mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 32px; }
.stat-mini-bars i {
  width: 8px;
  border-radius: 2px 2px 0 0;
  background: var(--sand-deep);
}
.stat-mini-bars i:not(:first-child) { background: var(--ink); opacity: 0.32; }

/* single horizontal progress bar */
.stat-mini-bar {
  width: 72px;
  height: 8px;
  border-radius: 5px;
  background: var(--border);
  overflow: hidden;
}
.stat-mini-bar i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--sand-deep);
}

@media (max-width: 800px) {
  .stat-tile-num { font-size: 32px; }
  .stat-band { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
@media (max-width: 480px) {
  .stat-band { grid-template-columns: 1fr; }
  /* single column: natural heights, no forced equalising */
  .stat-tile, .product-tile summary { min-height: 0; }
}

/* ── Footer ────────────────────────────────────────────────────────────────── */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 10px 0;
  transition: background 0.3s;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body { padding-bottom: 50px; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-logo {
  font-size: 12px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--footer-text);
  white-space: nowrap;
}

.footer-address {
  color: var(--footer-muted);
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
a.footer-address:hover { color: var(--footer-text); }

.footer-contact a,
.footer-links a {
  color: var(--footer-muted);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.footer-contact a:hover,
.footer-links a:hover { color: var(--footer-text); }

.footer-links { display: flex; gap: 18px; }

/* ── Mobile ────────────────────────────────────────────────────────────────── */
@media (max-width: 800px) {
  .nav-wordmark-top { font-size: 16px; letter-spacing: 0.26em; }
  .nav-wordmark-sub { font-size: 7.5px; letter-spacing: 0.38em; }
  .nav-logo { height: 26px; }

  footer {
    position: static;
    margin-top: auto;
  }
  body { padding-bottom: 0; }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
  }
}

@media (max-width: 480px) {
  .nav-wordmark-sub { display: none; }
}
