/* =============================================================
   digirelation · Design-Tokens
   -------------------------------------------------------------
   Basis-CSS-Variablen nach CI v0.7.
   Light-Mode ist Default. Dark-Mode via [data-theme="dark"] am <html>.
   Accent: Crystal Arctic (#AECFE4 + Glow + Shimmer).
   ============================================================= */

:root {
  /* ---------- Brand Colors ---------- */
  --c-black:        #070F16;
  --c-body:         #444457;
  --c-background:   #F8F9FA;
  --c-white:        #F2F8FA;

  /* ---------- Accent · Crystal Arctic ---------- */
  --c-accent:       #AECFE4;   /* Primary — luminous glacial */
  --c-accent-top:   #C8DFEF;   /* Gradient-Highlight (oben) */
  --c-accent-hover: #7DAACD;   /* Hover / Active */
  --c-accent-deep:  #4F82A8;   /* Pressed / Deep */
  --c-accent-soft:  #EFF6FB;   /* Soft BG */
  --c-accent-cyan:  #C2E9F2;   /* Crystal Shimmer */
  --c-accent-ink:   #0A2540;   /* Text auf Accent */

  /* Accent-Gradient (oben heller, unten kräftiger) */
  --g-accent:       linear-gradient(180deg, var(--c-accent-top) 0%, var(--c-accent) 100%);

  /* Glow-Tokens (Crystal-Shimmer) */
  --glow-sm:        0 0 18px rgba(174, 207, 228, 0.45);
  --glow-md:        0 0 32px rgba(174, 207, 228, 0.55);
  --glow-lg:        0 0 80px rgba(174, 207, 228, 0.35);
  --glow-dark:      0 0 32px rgba(194, 233, 242, 0.35);

  --c-success:      #10D180;
  --c-warning:      #F59E0B;
  --c-error:        #EF4444;

  /* ---------- Semantic Light (default) ---------- */
  --surface:        var(--c-background);
  --surface-raised: #FFFFFF;
  --text:           var(--c-body);
  --heading:        var(--c-black);
  --muted:          #6B6E7E;
  --light:          #9A9EB0;
  --border:         #E4E7EC;
  --border-soft:    #EEF0F3;
  --hover:          #EDF0F3;

  /* Glass · Light */
  --glass-bg:       rgba(255,255,255,0.55);
  --glass-border:   rgba(255,255,255,0.85);
  --glass-blur:     blur(22px) saturate(160%);
  --glass-shadow:   0 4px 24px rgba(7,15,22,0.06);

  /* ---------- Typography ---------- */
  --font-sans:      'Satoshi', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
  --font-mono:      ui-monospace, 'SF Mono', Menlo, 'Courier New', monospace;

  /* ---------- Radius ---------- */
  --r-sm:   6px;
  --r-md:   8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-pill: 999px;

  /* ---------- Spacing (8-pt grid) ---------- */
  --s-1:   4px;
  --s-2:   8px;
  --s-3:   12px;
  --s-4:   16px;
  --s-5:   24px;
  --s-6:   32px;
  --s-7:   48px;
  --s-8:   64px;
  --s-9:   96px;

  /* ---------- Shadows ---------- */
  --sh-soft:  0 1px 2px rgba(7,15,22,0.06);
  --sh-raise: 0 4px 12px rgba(7,15,22,0.08);
  --sh-big:   0 8px 28px rgba(7,15,22,0.1);

  /* ---------- Motion ---------- */
  --t-fast:   120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-base:   200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow:   320ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ---------- Layout ---------- */
  --container-max: 1280px;
  --gutter:        24px;
  --header-height: 72px;

  /* ---------- Page-Backgrounds ---------- */
  --bg-gradient-dark:
    radial-gradient(circle at 60% 45%, #0f2226 0%, #0a151c 35%, #070F16 75%);
}

/* =============================================================
   Dark Mode
   ============================================================= */
[data-theme="dark"] {
  --surface:        transparent;
  --surface-raised: rgba(242,248,250,0.04);
  --text:           rgba(242,248,250,0.75);
  --heading:        var(--c-white);
  --muted:          rgba(242,248,250,0.55);
  --light:          rgba(242,248,250,0.35);
  --border:         rgba(242,248,250,0.12);
  --border-soft:    rgba(242,248,250,0.06);
  --hover:          rgba(242,248,250,0.06);

  --glass-bg:       rgba(242,248,250,0.05);
  --glass-border:   rgba(242,248,250,0.12);
  --glass-shadow:   0 8px 32px rgba(0,0,0,0.18);

  --sh-soft:  0 1px 2px rgba(0,0,0,0.3);
  --sh-raise: 0 4px 12px rgba(0,0,0,0.35);
  --sh-big:   0 12px 36px rgba(0,0,0,0.5);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--c-background);
  min-height: 100vh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--t-base), color var(--t-base);
  /* App-like: kein Overscroll-Bounce auf der ganzen Seite */
  overscroll-behavior-y: none;
}

/* Kein horizontaler Scroll durch Bilder/Videos/iframe */
img, video, iframe, svg { max-width: 100%; }

/* Touch-Targets: min 44px auf Mobile-Buttons */
@media (pointer: coarse) {
  .btn, .btn-sm, .theme-switcher, .nav-toggle,
  .faq-q, .pf-chip, .journal-cat, .contact-chip label,
  .nav-primary > li > a, .nav-submenu li a {
    min-height: 44px;
  }
  /* iOS: Input-Zoom verhindern — kein font-size < 16px in Formfeldern */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
  /* Active tap feedback für Cards */
  .benefit-card:active,
  .audience-card:active,
  .service-link:active,
  .svc-card:active,
  .pf-card-link:active,
  .journal-card-link:active,
  .journal-feature-card:active,
  .danke-product-card:active { opacity: 0.85; }
}

[data-theme="dark"] body {
  background: var(--bg-gradient-dark);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  color: var(--heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.035em; }
h2 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

p  { color: var(--text); }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
  /* Kein graues Tap-Highlight auf Mobile */
  -webkit-tap-highlight-color: transparent;
  /* Kein 300ms Delay */
  touch-action: manipulation;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.tabular { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* =============================================================
   Container
   ============================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Gutter auf kleinen Screens reduzieren */
@media (max-width: 560px) {
  :root { --gutter: 18px; }
}

/* =============================================================
   Button-Primitives (später via Material Tailwind)
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base);
  white-space: nowrap;
}
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-primary { background: var(--heading); color: var(--c-white); }
.btn-primary:hover { filter: brightness(1.2); transform: translateY(-1px); }
.btn-ghost  { background: transparent; color: var(--muted); }
.btn-ghost:hover  { background: var(--hover); color: var(--heading); }

/* Outline — zurückhaltend, CI-konform */
.btn-outline {
  background: transparent;
  color: var(--c-accent-deep);
  border-color: rgba(174,207,228,0.45);
}
.btn-outline:hover {
  background: var(--c-accent-soft);
  border-color: rgba(174,207,228,0.7);
  transform: translateY(-1px);
}
[data-theme="dark"] .btn-outline {
  color: rgba(174,207,228,0.85);
  border-color: rgba(174,207,228,0.18);
}
[data-theme="dark"] .btn-outline:hover {
  background: rgba(174,207,228,0.06);
  border-color: rgba(174,207,228,0.38);
  transform: translateY(-1px);
}

/* Accent — sanftere Schrift, leichtere Optik */
.btn-accent {
  background: linear-gradient(160deg, #daeef8 0%, var(--c-accent) 100%);
  color: #1e537a;
  border-color: rgba(174,207,228,0.25);
  box-shadow: 0 2px 14px rgba(174,207,228,0.28), inset 0 1px 0 rgba(255,255,255,0.72);
}
.btn-accent:hover {
  background: linear-gradient(160deg, var(--c-accent) 0%, var(--c-accent-hover) 100%);
  color: #174266;
  box-shadow: var(--glow-md), inset 0 1px 0 rgba(255,255,255,0.55);
  transform: translateY(-2px);
}
[data-theme="dark"] .btn-accent {
  background: linear-gradient(160deg, rgba(200,223,239,0.16) 0%, rgba(174,207,228,0.1) 100%);
  color: rgba(174,207,228,0.9);
  border-color: rgba(174,207,228,0.22);
  box-shadow: 0 0 20px rgba(174,207,228,0.06), inset 0 1px 0 rgba(255,255,255,0.05);
}
[data-theme="dark"] .btn-accent:hover {
  background: linear-gradient(160deg, rgba(200,223,239,0.22) 0%, rgba(174,207,228,0.15) 100%);
  color: var(--c-accent);
  border-color: rgba(174,207,228,0.4);
  box-shadow: var(--glow-dark);
  transform: translateY(-2px);
}

.btn-dark {
  background: #0A2540;
  color: var(--c-accent);
  border-color: rgba(174,207,228,0.15);
  box-shadow: 0 2px 12px rgba(7,15,22,0.3);
}
.btn-dark:hover {
  background: #0d2f4e;
  border-color: rgba(174,207,228,0.3);
  box-shadow: 0 0 36px rgba(174,207,228,0.22), 0 4px 18px rgba(7,15,22,0.4);
  transform: translateY(-2px);
}

/* =============================================================
   Glass Utility
   ============================================================= */
.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
