/* ============================================================
   lebeninschweiz.ch — Global Design System
   Swiss Alpine Modern · Dark · Glass · Premium
   ============================================================ */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- CSS CUSTOM PROPERTIES --- */
:root {
  /* Colors — Background */
  --bg-deep: #060912;
  --bg-primary: #0a0e17;
  --bg-secondary: #0f131f;
  --bg-card: #141924;
  --bg-card-hover: #1a1f2e;
  --bg-glass: rgba(20, 25, 36, 0.65);
  --bg-glass-hover: rgba(26, 31, 46, 0.78);
  --bg-glass-strong: rgba(15, 19, 31, 0.82);

  /* Colors — Text */
  --text-primary: #e8ecf1;
  --text-secondary: #a1a9b4;
  --text-muted: #6b7280;
  --text-inverse: #0a0e17;

  /* Colors — Accent */
  --red: #e63946;
  --red-hover: #c1121f;
  --red-glow: rgba(230, 57, 70, 0.18);
  --gold: #c9a96e;
  --gold-hover: #b8964a;
  --gold-glow: rgba(201, 169, 110, 0.12);
  --blue: #4b8cf7;
  --blue-hover: #3b7de6;
  --blue-glow: rgba(75, 140, 247, 0.15);
  --green: #34d399;
  --green-glow: rgba(52, 211, 153, 0.1);

  /* Colors — Gradients */
  --grad-hero: linear-gradient(160deg, #060912 0%, #0d111f 30%, #0a0e17 60%, #0f1322 100%);
  --grad-blue: linear-gradient(135deg, #4b8cf7 0%, #2b6de8 100%);
  --grad-red: linear-gradient(135deg, #e63946 0%, #c1121f 100%);
  --grad-gold: linear-gradient(135deg, #c9a96e 0%, #a67c3c 100%);
  --grad-card-border: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  --grad-glow-red: radial-gradient(ellipse at center, rgba(230,57,70,0.12) 0%, transparent 70%);
  --grad-glow-blue: radial-gradient(ellipse at center, rgba(75,140,247,0.08) 0%, transparent 70%);
  --grad-glow-gold: radial-gradient(ellipse at center, rgba(201,169,110,0.08) 0%, transparent 70%);

  /* Borders */
  --border-hairline: rgba(255, 255, 255, 0.05);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);

  /* Typography */
  --font-heading: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Font Sizes (clamp for fluid) */
  --text-xs: clamp(0.69rem, 0.66rem + 0.13vw, 0.78rem);
  --text-sm: clamp(0.83rem, 0.80rem + 0.16vw, 0.94rem);
  --text-base: clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --text-md: clamp(1.13rem, 1.07rem + 0.28vw, 1.33rem);
  --text-lg: clamp(1.28rem, 1.19rem + 0.41vw, 1.60rem);
  --text-xl: clamp(1.53rem, 1.38rem + 0.67vw, 2.00rem);
  --text-2xl: clamp(1.84rem, 1.59rem + 1.03vw, 2.57rem);
  --text-3xl: clamp(2.20rem, 1.82rem + 1.55vw, 3.30rem);
  --text-4xl: clamp(2.64rem, 2.07rem + 2.28vw, 4.20rem);

  /* Spacing */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Border Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 72px rgba(0, 0, 0, 0.7);
  --shadow-red: 0 0 40px rgba(230, 57, 70, 0.12);
  --shadow-gold: 0 0 24px rgba(201, 169, 110, 0.08);
  --shadow-blue: 0 0 32px rgba(75, 140, 247, 0.1);

  /* Glass */
  --glass-bg: rgba(20, 25, 36, 0.60);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-blur: saturate(180%) blur(20px);
  --glass-blur-strong: saturate(180%) blur(30px);

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-xl: 600ms;

  /* Layout */
  --max-width: 1280px;
  --max-width-narrow: 960px;
  --header-height: 72px;
  --header-height-mobile: 64px;

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;
}

/* ============================================================
   RESET
   ============================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-secondary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); letter-spacing: -0.03em; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

::selection {
  background: var(--red);
  color: #fff;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  background: rgba(230, 57, 70, 0.12);
  border-bottom: 1px solid rgba(230, 57, 70, 0.18);
  height: 32px;
  display: flex;
  align-items: center;
  font-size: var(--text-xs);
  color: #bcc3cd;
  letter-spacing: 0.02em;
}

.top-bar-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.top-bar-sep {
  color: rgba(255,255,255,0.08);
}

@media (max-width: 600px) {
  .top-bar {
    height: auto;
    padding-block: 0.35rem;
    font-size: 0.65rem;
  }
  .top-bar-sep {
    display: none;
  }
  .top-bar-inner {
    gap: 0.3rem 0.6rem;
    justify-content: center;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container-narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.section {
  padding-block: var(--space-4xl);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--text-md);
  color: var(--text-secondary);
  max-width: 560px;
  margin-inline: auto;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.75em 1.5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-base) var(--ease-out-quint);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--duration-base) ease;
}

.btn:hover::after {
  opacity: 1;
}

.btn-primary {
  background: var(--grad-red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(230, 57, 70, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(230, 57, 70, 0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-medium);
  color: var(--text-primary);
}
.btn-secondary:hover {
  border-color: var(--border-strong);
  background: rgba(255,255,255,0.03);
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--grad-gold);
  color: #1a1206;
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.25);
}
.btn-gold:hover {
  box-shadow: 0 6px 24px rgba(201, 169, 110, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5em 1em;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

.btn-lg {
  padding: 0.9em 2em;
  font-size: var(--text-base);
}

.btn-sm {
  padding: 0.45em 1em;
  font-size: var(--text-xs);
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all var(--duration-slow) var(--ease-out-quint);
}

.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.glass-card-strong {
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  backdrop-filter: var(--glass-blur-strong);
  -webkit-backdrop-filter: var(--glass-blur-strong);
}

/* ============================================================
   BADGE / TAG
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.35em 0.9em;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
  border: 1px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
}

.tag-red {
  background: rgba(230, 57, 70, 0.1);
  border-color: rgba(230, 57, 70, 0.2);
  color: var(--red);
}

.tag-gold {
  background: rgba(201, 169, 110, 0.08);
  border-color: rgba(201, 169, 110, 0.2);
  color: var(--gold);
}

.tag-blue {
  background: rgba(75, 140, 247, 0.08);
  border-color: rgba(75, 140, 247, 0.18);
  color: var(--blue);
}

.tag-green {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.25);
  color: #10b981;
}

/* ============================================================
   LINK ARROW
   ============================================================ */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gold);
  transition: gap var(--duration-base) ease;
}
.link-arrow:hover {
  gap: 0.6em;
}
.link-arrow svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}
.link-arrow-red {
  color: var(--red);
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.divider {
  width: 100%;
  height: 1px;
  background: var(--border-subtle);
  border: none;
}

.divider-gradient {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium) 20%, var(--border-medium) 80%, transparent);
  border: none;
}

/* ============================================================
   ANIMATIONS — Scroll Reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-xl) var(--ease-out-quint),
              transform var(--duration-xl) var(--ease-out-quint);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.19s; }
.reveal-delay-4 { transition-delay: 0.26s; }
.reveal-delay-5 { transition-delay: 0.33s; }
.reveal-delay-6 { transition-delay: 0.40s; }
.reveal-delay-7 { transition-delay: 0.47s; }
.reveal-delay-8 { transition-delay: 0.54s; }

/* ============================================================
   FOCUS STYLES
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #c9a96e #1a1d25;
}
/* Webkit scrollbar - slim and consistent */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #1a1d25;
}
::-webkit-scrollbar-thumb {
  background: #c9a96e;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #dc2626;
}

/* ============================================================
   RESPONSIVE — Spacing adjustments
   ============================================================ */
@media (max-width: 768px) {
  .section {
    padding-block: var(--space-3xl);
  }
  .section-header {
    margin-bottom: var(--space-2xl);
  }
}

@media (max-width: 480px) {
  .section {
    padding-block: var(--space-2xl);
  }
  .section-header {
    margin-bottom: var(--space-xl);
  }
}
