/* ============================================================
   AT Germany — Base & Reset
   Modern CSS Reset + Typography + Layout Primitives
   ============================================================ */

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

  html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'ss01', 'cv11', 'kern';
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h-desktop);
    overflow-x: hidden;
    overflow-y: scroll;
  }

  /* Lenis steuert Smooth-Scroll → native disable */
  html.lenis,
  html.lenis body {
    height: auto;
  }

  html.lenis-smooth {
    scroll-behavior: auto !important;
  }

  body {
    min-height: 100dvh;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: var(--lh-relaxed);
    font-weight: var(--fw-regular);
    overflow-x: hidden;
    position: relative;
  }

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

  img {
    font-style: italic;  /* Alt-Text Fallback-Styling */
    background-repeat: no-repeat;
    background-size: cover;
  }

  svg {
    fill: currentColor;
    flex-shrink: 0;
  }

  input, button, textarea, select {
    font: inherit;
    color: inherit;
  }

  button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: rgba(0, 172, 171, 0.15);
  }

  /* Reset Lists nur wenn role gesetzt */
  ul[role="list"],
  ol[role="list"] {
    list-style: none;
  }

  /* Bessere Word-Breaks für Headlines */
  h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
    overflow-wrap: break-word;
  }

  p {
    text-wrap: pretty;
    overflow-wrap: break-word;
    max-width: 70ch;
  }
}

@layer base {
  /* ── Headline Hierarchy ───────────────────────────────── */
  h1, .h1 {
    font-family: var(--font-display);
    font-size: var(--fs-5xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    color: var(--fg-strong);
  }

  h2, .h2 {
    font-family: var(--font-display);
    font-size: var(--fs-4xl);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
    color: var(--fg-strong);
  }

  h3, .h3 {
    font-family: var(--font-display);
    font-size: var(--fs-2xl);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-tight);
    color: var(--fg-strong);
  }

  h4, .h4 {
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    color: var(--fg-strong);
  }

  /* ── Focus States (WCAG 2.2 AA) ───────────────────────── */
  :focus-visible {
    outline: 2px solid var(--brand-400);
    outline-offset: 3px;
    border-radius: 4px;
    transition: outline-offset var(--d-fast) var(--e-out);
  }

  :focus:not(:focus-visible) {
    outline: none;
  }

  /* ── Selection ────────────────────────────────────────── */
  ::selection {
    background: var(--brand-500);
    color: var(--text-on-brand);
  }

  /* ── Scrollbar (Webkit + Firefox) ─────────────────────── */
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--brand-600) transparent;
  }

  *::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  *::-webkit-scrollbar-track {
    background: transparent;
  }

  *::-webkit-scrollbar-thumb {
    background: var(--brand-700);
    border-radius: 8px;
    border: 2px solid var(--bg);
  }

  *::-webkit-scrollbar-thumb:hover {
    background: var(--brand-500);
  }
}

@layer base {
  /* ── Container Layout ──────────────────────────────────── */
  .container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad-mobile);
  }

  .container--narrow {
    max-width: var(--container-narrow);
  }

  .container--wide {
    max-width: var(--container-wide);
  }

  @media (min-width: 768px) {
    .container { padding-inline: var(--container-pad-tablet); }
  }

  @media (min-width: 1024px) {
    .container { padding-inline: var(--container-pad-desktop); }
  }

  /* ── Section Spacing ───────────────────────────────────── */
  .section {
    padding-block: clamp(3.5rem, 6vw + 2rem, 7rem);
    position: relative;
  }

  .section--tight {
    padding-block: clamp(2rem, 4vw + 1rem, 4rem);
  }

  /* ── Section Headers ───────────────────────────────────── */
  .section__head {
    text-align: center;
    max-width: 720px;
    margin-inline: auto;
    margin-bottom: clamp(2rem, 3vw + 1rem, 4rem);
  }

  .section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 14px;
    margin-bottom: var(--space-5);
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-full);
    background: rgba(0, 172, 171, 0.06);
    backdrop-filter: blur(var(--blur-sm));
    -webkit-backdrop-filter: blur(var(--blur-sm));
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-wider);
    color: var(--brand-300);
    text-transform: uppercase;
  }

  .section__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--brand-500);
    box-shadow: 0 0 8px var(--brand-500);
    animation: pulse-dot 2.4s var(--e-ease) infinite;
  }

  .section__title {
    font-size: var(--fs-4xl);
    margin-bottom: var(--space-4);
  }

  .section__lead {
    font-size: var(--fs-lg);
    color: var(--fg-muted);
    line-height: var(--lh-relaxed);
    max-width: 56ch;
    margin-inline: auto;
  }

  .text-gradient {
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }

  .text-accent { color: var(--accent); }
  .text-muted  { color: var(--fg-muted); }

  /* ── Visually Hidden (a11y) ────────────────────────────── */
  .sr-only,
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  /* ── Skip-Link ─────────────────────────────────────────── */
  .skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: var(--z-toast);
    padding: 0.75rem 1.25rem;
    background: var(--brand-500);
    color: var(--text-on-brand);
    font-weight: var(--fw-semibold);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: top var(--d-fast) var(--e-out);
  }

  .skip-link:focus-visible {
    top: 1rem;
    outline: 2px solid var(--brand-100);
    outline-offset: 3px;
  }

  /* ── Body-Lock für Modal/Menu ──────────────────────────── */
  body.is-locked {
    overflow: hidden;
    touch-action: none;
  }
}

/* ── Reduced Motion (WCAG 2.2 SC 2.3.3) ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print Styles ───────────────────────────────────────── */
@media print {
  body { background: white; color: black; }
  .header, .footer, .cursor, .hero__bg, [data-reveal] { display: none !important; }
  .container { max-width: none; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}
