/* ═══════════════════════════════════════════════════════════
   SwitzerHealth — Shared Base Styles
   Variables, reset, header/nav, buttons, footer, back-to-top,
   skip-link, focus states, reduced-motion.
   Extracted from the v2.0 (2026-05-12) WCAG-AA pass.
   Used by every page on switzerhealth.com.
   ═══════════════════════════════════════════════════════════ */

    /* ═══════════════════════════════════════════════════════════
       SwitzerHealth: Dieter Rams Edition
       "Good design is as little design as possible."
       v2.0 (2026-05-12): WCAG-AA contrast pass; skip-link; reduced motion respect.
       ═══════════════════════════════════════════════════════════ */

    :root {
      --red: #D52B1E;
      --red-hover: #B82019;
      --charcoal: #2D2D2D;
      --black: #1B2A4A;
      --gray-900: #333;
      --gray-700: #555;
      --gray-500: #6B6B6B;        /* was #888: bumped for WCAG AA on white (~5.3:1) */
      --gray-300: #CCC;
      --gray-200: #E5E5E5;
      --gray-100: #F5F5F5;
      --white: #FFF;
      --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
      --max: 1080px;
      --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; font-size: 16px; }

    body {
      font-family: var(--font);
      color: var(--charcoal);
      line-height: 1.72;
      background: var(--white);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    a { color: inherit; text-decoration: none; }
    img, svg { display: block; max-width: 100%; }

    .container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

    /* ─── Skip-link (visible on focus only) ─── */
    .skip-link {
      position: absolute;
      left: -9999px;
      top: 0;
      background: var(--red);
      color: #FFF;
      padding: 12px 18px;
      font-weight: 600;
      letter-spacing: 0.04em;
      z-index: 10000;
      text-decoration: none;
    }
    .skip-link:focus { left: 12px; top: 12px; outline: 3px solid #FFF; outline-offset: 2px; }

    /* ─── Top Bar ─── */
    .top-bar {
      background: var(--black);
      color: rgba(255,255,255,0.85);   /* was 0.7: bumped for AA on navy */
      font-size: 0.78rem;
      letter-spacing: 0.04em;
      padding: 7px 0;
    }
    .top-bar .container { display: flex; gap: 32px; align-items: center; }
    .top-bar a { color: rgba(255,255,255,0.85); transition: color 0.2s var(--ease); display: inline-flex; align-items: center; gap: 6px; }
    .top-bar a:hover { color: #FFF; }
    .top-bar svg { width: 13px; height: 13px; fill: currentColor; flex-shrink: 0; }

    /* ─── Header ─── */
    header {
      position: sticky;
      top: 0;
      z-index: 100;
      background: rgba(255,255,255,0.97);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--gray-200);
      transition: box-shadow 0.3s var(--ease);
    }
    header.scrolled { box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
    header .container {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 72px;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 1.25rem;
      font-weight: 700;
      letter-spacing: -0.025em;
    }
    .logo-mark {
      width: 34px; height: 34px;
      border-radius: 5px;
      overflow: hidden;
      flex-shrink: 0;
    }
    .logo-mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
    .logo-text span { color: var(--red); }

    nav { display: flex; align-items: center; gap: 32px; }
    nav a.nav-link {
      font-size: 0.82rem;
      font-weight: 500;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--gray-700);
      transition: color 0.2s var(--ease);
    }
    nav a.nav-link:hover, nav a.nav-link.active { color: var(--charcoal); }
    nav a.nav-link:focus-visible, .btn:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: var(--font);
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      padding: 10px 24px;
      border-radius: 4px;
      border: none;
      cursor: pointer;
      transition: all 0.2s var(--ease);
    }
    .btn-primary { background: var(--red); color: #FFF; }
    .btn-primary:hover { background: var(--red-hover); }
    .btn-outline { background: transparent; color: var(--charcoal); border: 1.5px solid var(--gray-300); }
    .btn-outline:hover { border-color: var(--charcoal); }
    .btn-white { background: #FFF; color: var(--charcoal); }
    .btn-white:hover { background: var(--gray-100); }
    .btn svg { width: 14px; height: 14px; fill: currentColor; }
    .btn:disabled { opacity: 0.7; cursor: not-allowed; }

    .nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
    .nav-toggle span { display: block; width: 22px; height: 1.5px; background: var(--charcoal); margin: 5px 0; transition: 0.2s; }

    @media (max-width: 768px) {
      header .container { position: relative; }
      .nav-toggle { display: block; }
      nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #FFFFFF;
        flex-direction: column;
        padding: 24px 32px;
        gap: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        border-top: 1px solid var(--gray-200);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
        z-index: 9999;
      }
      nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
      }
      nav a.nav-link { font-size: 1rem; padding: 6px 0; }
      nav .btn-primary { text-align: center; justify-content: center; margin-top: 4px; }
    }


    /* ─── Footer ─── */
    footer {
      background: var(--black);
      color: rgba(255,255,255,0.75);    /* was 0.5: AA */
      padding: 48px 0;
      font-size: 0.85rem;
    }
    .footer-inner {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 20px;
    }
    .footer-left { display: flex; align-items: center; gap: 10px; }
    .footer-left .logo-mark { width: 28px; height: 28px; border-radius: 4px; }
    .footer-left .logo-mark svg { width: 14px; height: 14px; }
    .footer-left span { font-weight: 600; color: rgba(255,255,255,0.92); }
    .footer-links { display: flex; gap: 24px; }
    .footer-links a { color: rgba(255,255,255,0.75); transition: color 0.2s; }
    .footer-links a:hover { color: #FFF; }
    .footer-bottom {
      margin-top: 28px;
      padding-top: 20px;
      border-top: 1px solid rgba(255,255,255,0.12);
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      font-size: 0.8rem;
      color: rgba(255,255,255,0.7);     /* was 0.3: AA */
    }
    .footer-bottom a { color: rgba(255,255,255,0.7); }
    .footer-bottom a:hover { color: #FFF; }
    .footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
    .footer-address { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 10px; }

    /* ─── Back to Top ─── */
    .btt {
      position: fixed; bottom: 24px; right: 24px;
      width: 40px; height: 40px;
      background: var(--charcoal);
      border: none; border-radius: 4px;
      color: #FFF; cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      opacity: 0; pointer-events: none;
      transition: opacity 0.3s var(--ease);
      z-index: 50;
    }
    .btt.visible { opacity: 1; pointer-events: auto; }
    .btt:hover { background: var(--red); }
    .btt:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
    .btt svg { width: 16px; height: 16px; fill: #FFF; }

    /* ─── Reduced-motion respect ─── */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    }
