/* ============================================================
   NF COSMETICS GMBH — LEGAL PAGES v2
   ============================================================ */

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

:root {
  --bg-base:        #030705;
  --bg-mid:         #071209;
  --glass-bg:       rgba(255, 255, 255, 0.022);
  --glass-border:   rgba(255, 255, 255, 0.07);
  --silver:         linear-gradient(135deg, #96a4b6 0%, #d8e2ee 30%, #eef3f8 50%, #ccd6e4 70%, #a0afc2 100%);
  --silver-flat:    #c8d4e0;
  --silver-light:   #eaf0f6;
  --silver-dim:     #8a9cb0;
  --text-primary:   #f0f4f8;
  --text-secondary: #b0bec8;
  --text-muted:     #607080;
  --font:           -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --transition:     200ms ease;
  --radius:         2px;
  --container-max:  760px;
  --container-pad:  clamp(24px, 5vw, 80px);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(46, 150, 76, 0.12) 0%, transparent 52%),
    radial-gradient(ellipse at 4% 60%, rgba(36, 120, 60, 0.07) 0%, transparent 42%);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.09); border-radius: 2px; }

::selection { background: rgba(46,150,76,0.22); color: var(--silver-light); }

/* ── HEADER ── */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), border-color var(--transition);
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo-link {
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  opacity: 0.92;
  transition: opacity var(--transition);
}

.logo-link:hover { opacity: 1; }

.header-logo {
  height: 52px;
  width: 52px;
  display: block;
  object-fit: contain;
}

.back-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  justify-self: start;
  white-space: nowrap;
  padding: 12px 14px 12px 0;
}

.back-link:hover { color: var(--silver-flat); }

.back-link span { display: none; }

.back-link::before {
  content: '';
  display: inline-block;
  width: 26px;
  height: 11px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 11' fill='none'%3E%3Cline x1='24.5' y1='5.5' x2='1' y2='5.5' stroke='black' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M7.5 1L1 5.5L7.5 10' stroke='black' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 11' fill='none'%3E%3Cline x1='24.5' y1='5.5' x2='1' y2='5.5' stroke='black' stroke-width='1' stroke-linecap='round'/%3E%3Cpath d='M7.5 1L1 5.5L7.5 10' stroke='black' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  opacity: 0.65;
  transition: opacity var(--transition);
  flex-shrink: 0;
}

.back-link:hover::before { opacity: 1; }

/* ── LANG SWITCH ── */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
}

.lang-btn {
  background: none;
  border: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #a0b4c8;
  cursor: pointer;
  padding: 6px 6px;
  transition: color var(--transition);
}

.lang-btn:hover  { color: #f0f4f8; }
.lang-btn.active { color: #f0f4f8; }

.lang-divider {
  color: var(--text-muted);
  font-size: 11px;
  opacity: 0.45;
}

/* ── MAIN ── */

main {
  flex: 1;
  padding: 148px var(--container-pad) 110px;
  max-width: calc(var(--container-max) + var(--container-pad) * 2);
  margin: 0 auto;
  width: 100%;
}

.page-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
  display: block;
}

.page-title {
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 300;
  letter-spacing: -0.028em;
  line-height: 1.12;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.page-meta {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 68px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--glass-border);
}

/* ── LEGAL CONTENT ── */

.legal-body {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.88;
}

.legal-body h3 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 44px 0 14px;
}

.legal-body h3:first-child { margin-top: 0; }

.legal-body p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.legal-body p:last-child { margin-bottom: 0; }

.legal-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-body a {
  color: var(--silver-flat);
  text-decoration: none;
  border-bottom: 1px solid rgba(200, 212, 224, 0.2);
  transition: border-color var(--transition), color var(--transition);
}

.legal-body a:hover {
  color: var(--silver-light);
  border-bottom-color: rgba(200, 212, 224, 0.5);
}

.legal-section {
  padding: 44px 0;
  border-bottom: 1px solid var(--glass-border);
}

.legal-section:last-child { border-bottom: none; }

/* ── FOOTER ── */

.footer {
  border-top: 1px solid var(--glass-border);
  padding: 52px 0;
  margin-top: auto;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  display: inline-block;
}

.footer-link:hover { color: var(--silver-flat); }

.footer-link.active { color: var(--silver-flat); }

.footer-copy {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.09em;
  opacity: 0.5;
}

/* ── RESPONSIVE ── */

@media (max-width: 640px) {
  main { padding-top: 138px; }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .footer-links { justify-content: center; }

  .header-inner { padding: 0 20px; height: 80px; }

  .back-link { font-size: 9px; }

}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */

.header-spacer { display: flex; align-items: center; }

.header-left-group {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: start;
}

.theme-toggle {
  background: rgba(36, 40, 44, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 1px 0 rgba(255, 255, 255, 0.06);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  position: relative;
  border-radius: 14px;
  width: 54px;
  height: 26px;
  flex-shrink: 0;
  transition:
    background   0.38s ease,
    border-color 0.38s ease,
    box-shadow   0.38s ease;
}

.theme-toggle:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 0 2.5px rgba(255, 255, 255, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.06);
}

.theme-toggle-icon {
  position: absolute;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(150deg, #2e3f37 0%, #1c2c24 55%, #233028 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.13) inset,
    0 -0.5px 0 rgba(0, 0, 0, 0.26) inset,
    0 2px 6px rgba(0, 0, 0, 0.54),
    0 0 0 0.5px rgba(0, 0, 0, 0.30);
  display: block;
  transition:
    left       0.44s cubic-bezier(0.26, 1.38, 0.54, 1),
    background 0.35s ease,
    box-shadow 0.32s ease;
}

/* Sun: filled core disc + 8 line rays — inline SVG (dark mode) */
.theme-toggle-icon::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='2.5' fill='rgba(255,255,255,.9)'/%3E%3Cg stroke='rgba(255,255,255,.76)' stroke-width='1.1' stroke-linecap='round'%3E%3Cline x1='7' y1='3' x2='7' y2='1'/%3E%3Cline x1='9.83' y1='4.17' x2='11.24' y2='2.76'/%3E%3Cline x1='11' y1='7' x2='13' y2='7'/%3E%3Cline x1='9.83' y1='9.83' x2='11.24' y2='11.24'/%3E%3Cline x1='7' y1='11' x2='7' y2='13'/%3E%3Cline x1='4.17' y1='9.83' x2='2.76' y2='11.24'/%3E%3Cline x1='3' y1='7' x2='1' y2='7'/%3E%3Cline x1='4.17' y1='4.17' x2='2.76' y2='2.76'/%3E%3C/g%3E%3C/svg%3E") no-repeat center;
  transition: opacity 0.28s ease;
}

/* Moon: crescent — two-arc SVG path, mirrored right-open (light mode) */
.theme-toggle-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px;
  transform: scaleX(-1);
  opacity: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='rgba(22,38,30,.82)' d='M3.4 3.84A6.2 6.2 0 1 1 3.4 12.16A4.8 4.8 0 1 0 3.4 3.84Z'/%3E%3C/svg%3E") no-repeat center;
  transition: opacity 0.28s ease;
}

html[data-theme="light"] .theme-toggle {
  background: rgba(138, 155, 150, 0.84);
  border-color: rgba(0, 0, 0, 0.09);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.13),
    inset 0 0 0 1px rgba(0, 0, 0, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.40);
}

html[data-theme="light"] .theme-toggle:hover {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.13),
    inset 0 0 0 1px rgba(0, 0, 0, 0.07),
    0 0 0 2.5px rgba(0, 0, 0, 0.07),
    0 1px 0 rgba(255, 255, 255, 0.40);
}

html[data-theme="light"] .theme-toggle-icon {
  left: 31px;
  background: linear-gradient(150deg, #f4f5f4 0%, #e8eceb 55%, #dce4e2 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.90) inset,
    0 -0.5px 0 rgba(0, 0, 0, 0.08) inset,
    0 2px 6px rgba(20, 40, 32, 0.16),
    0 0 0 0.5px rgba(0, 0, 0, 0.10);
}

html[data-theme="light"] .theme-toggle-icon::before { opacity: 0; }
html[data-theme="light"] .theme-toggle-icon::after  { opacity: 1; }

/* ============================================================
   LIGHT MODE — Variable & Element Overrides
   ============================================================ */

html[data-theme="light"] {
  --bg-base:        #e9eeed;
  --bg-mid:         #dfe7e3;
  --glass-bg:       rgba(20, 40, 32, 0.020);
  --glass-border:   rgba(20, 40, 32, 0.10);
  --silver:         linear-gradient(135deg, #3a4e5a 0%, #1e2e3a 30%, #0e1e2a 50%, #2a3a48 70%, #4a5e6a 100%);
  --silver-flat:    #2a3a4a;
  --silver-light:   #0e1e2a;
  --silver-dim:     #5a6e7a;
  --text-primary:   #141e1a;
  --text-secondary: #2e4050;
  --text-muted:     #506070;
}

html[data-theme="light"] body {
  background-color: #e9eeed;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(46, 150, 76, 0.042) 0%, transparent 50%),
    radial-gradient(ellipse at 4% 60%, rgba(36, 120, 60, 0.025) 0%, transparent 40%);
  color: #141e1a;
}

html[data-theme="light"] ::-webkit-scrollbar-track { background: #e9eeed; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(20,40,32,0.14); }

html[data-theme="light"] .back-link        { color: var(--text-muted); }
html[data-theme="light"] .back-link:hover  { color: var(--text-primary); }
html[data-theme="light"] .lang-btn         { color: #486070; }
html[data-theme="light"] .lang-btn:hover,
html[data-theme="light"] .lang-btn.active  { color: var(--text-primary); }
html[data-theme="light"] .lang-divider     { color: var(--text-muted); }

html[data-theme="light"] .page-label  { color: var(--text-muted); }
html[data-theme="light"] .page-title  { color: var(--text-primary); }
html[data-theme="light"] .page-meta   { color: var(--text-muted); border-color: var(--glass-border); }

html[data-theme="light"] .legal-body         { color: var(--text-secondary); }
html[data-theme="light"] .legal-body h3      { color: var(--text-primary); }
html[data-theme="light"] .legal-body p       { color: var(--text-secondary); }
html[data-theme="light"] .legal-body strong  { color: var(--text-primary); }
html[data-theme="light"] .legal-body a       { color: var(--silver-flat); }
html[data-theme="light"] .legal-section      { border-color: var(--glass-border); }

html[data-theme="light"] .footer            { border-color: rgba(20,40,32,0.08); }
html[data-theme="light"] .footer-link       { color: var(--text-muted); }
html[data-theme="light"] .footer-link:hover { color: var(--text-primary); }
html[data-theme="light"] .footer-link.active { color: var(--text-primary); }
html[data-theme="light"] .footer-copy       { color: var(--text-muted); }

/* ── SCROLL TO TOP ── */
.scroll-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(36, 40, 44, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 20px rgba(0, 0, 0, 0.48),
    0 1px 4px rgba(0, 0, 0, 0.32);
  color: var(--silver-flat);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition:
    opacity 300ms ease,
    transform 300ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}
.scroll-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 6px 28px rgba(0, 0, 0, 0.52),
    0 2px 6px rgba(0, 0, 0, 0.36),
    0 0 0 2.5px rgba(255, 255, 255, 0.06);
}
html[data-theme="light"] .scroll-top {
  background: rgba(230, 236, 232, 0.92);
  border-color: rgba(20, 40, 32, 0.12);
  color: var(--silver-flat);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 1px 4px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .scroll-top:hover {
  border-color: rgba(20, 40, 32, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    0 6px 24px rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.10),
    0 0 0 2.5px rgba(20, 40, 32, 0.06);
}
