/* ============================================
   FiMA Informatik AG — 2026 Modern Website
   CSS Nesting, oklch(), scroll-driven animations,
   container queries, view transitions
   ============================================ */

/* --- Custom Properties --- */
:root {
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* FiMA Brand Colors — based on #014377 / #2A6BBB */
  --primary: oklch(0.35 0.12 250);       /* #014377 dark blue */
  --primary-light: oklch(0.50 0.13 250);  /* #2A6BBB medium blue */
  --primary-dark: oklch(0.28 0.12 250);   /* darker shade */
  --accent: oklch(0.55 0.14 240);         /* lighter blue accent */
  --accent-2: oklch(0.45 0.10 260);       /* secondary accent */

  --bg: oklch(0.995 0.001 250);           /* near-white */
  --bg-alt: oklch(0.97 0.003 250);        /* light gray */
  --bg-dark: oklch(0.18 0.04 250);        /* dark blue-gray for footer */
  --surface: oklch(1.0 0 0);              /* white */
  --surface-hover: oklch(0.97 0.003 250);
  --border: oklch(0.91 0.008 250);

  --text: oklch(0.22 0.02 250);
  --text-muted: oklch(0.50 0.02 250);
  --text-light: oklch(0.98 0 0);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 3px oklch(0 0 0 / 0.04), 0 1px 2px oklch(0 0 0 / 0.06);
  --shadow-md: 0 4px 20px oklch(0 0 0 / 0.06), 0 2px 8px oklch(0 0 0 / 0.04);
  --shadow-lg: 0 12px 40px oklch(0 0 0 / 0.08), 0 4px 16px oklch(0 0 0 / 0.04);
  --shadow-glow: 0 0 40px oklch(0.35 0.12 250 / 0.15);

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

/* Skip to content link (Accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--text-light);
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s ease;

  &:focus {
    top: 1rem;
  }
}

/* Focus visible for keyboard users */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced motion preference */
@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;
  }
}

/* --- Container --- */
.container {
  width: min(1200px, 100% - 3rem);
  margin-inline: auto;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

.gradient-text {
  background: linear-gradient(135deg, #014377, #1476c6, #3a9ae0);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;

  &:hover {
    transform: translateY(-2px);
  }

  &:active {
    transform: translateY(0);
  }
}

.btn-primary {
  background: linear-gradient(135deg, #014377, #1476c6, #3a9ae0);
  color: #fff;
  box-shadow: var(--shadow-md), var(--shadow-glow);

  &:hover {
    box-shadow: var(--shadow-lg), 0 0 60px oklch(0.35 0.12 250 / 0.25);
  }
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  backdrop-filter: blur(8px);

  &:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: oklch(0.35 0.12 250 / 0.05);
  }
}

.btn-secondary {
  background: #fff;
  color: #1476c6;
  border: 2px solid #1476c6;

  &:hover {
    background: linear-gradient(135deg, #014377, #1476c6, #3a9ae0);
    border-color: transparent;
    color: #fff;
  }
}

.btn-nav {
  padding: 0.6rem 1.4rem;
  background: #1476c6;
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 500;

  &:hover {
    background: #1060a8;
  }
}

.btn-full {
  width: 100%;
}

/* ============================================
   HEADER / NAV
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: oklch(0.995 0.001 250 / 0.8);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid oklch(0 0 0 / 0.05);
  transition: all var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 95px;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 55px;
  width: auto;
}

.footer-logo-img {
  height: 38px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;

  & a {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
    position: relative;

    &:hover {
      color: var(--text);
    }

    &::after {
      content: '';
      position: absolute;
      bottom: -4px;
      left: 0;
      width: 0;
      height: 2px;
      background: #1476c6;
      border-radius: 2px;
      transition: width var(--transition);
    }

    &:hover::after {
      width: 100%;
    }
  }

  & .btn {
    color: #fff;

    &:hover {
      color: #fff;
    }

    &::after {
      display: none;
    }
  }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;

  & span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition);
  }
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 95px;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2rem;
    gap: 0;
    background: #fff;
    border-top: 1px solid oklch(0.91 0.008 250);
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    z-index: 999;

    & a {
      font-size: 1.15rem;
      padding: 1rem 1.5rem;
      width: 100%;
      text-align: center;
      color: var(--text);
      border-bottom: 1px solid oklch(0.93 0.005 250);
    }

    & .btn {
      margin-top: 1rem;
      width: auto;
      border-bottom: none;
    }

    &.open {
      transform: translateY(0);
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
    }
  }

  .nav-toggle.active {
    & span:nth-child(1) {
      transform: rotate(45deg) translate(5px, 5px);
    }
    & span:nth-child(2) {
      opacity: 0;
    }
    & span:nth-child(3) {
      transform: rotate(-45deg) translate(5px, -5px);
    }
  }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 10rem 0 5rem;
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Hero image slider */
.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;

  &::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      135deg,
      oklch(0.995 0.001 250 / 0.92) 0%,
      oklch(0.995 0.001 250 / 0.75) 50%,
      oklch(0.995 0.001 250 / 0.6) 100%
    );
    z-index: 1;
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s ease;

  &.active {
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* Hero tagline - plain text, not a button */
.hero-tagline {
  font-size: 0.94rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #1476c6;
  margin-bottom: 1.5rem;
  animation: fade-in-up 0.8s ease both;
}

.hero h1 {
  margin-bottom: 1.5rem;
  animation: fade-in-up 0.8s ease 0.1s both;
}

.hero-text {
  max-width: 600px;
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  animation: fade-in-up 0.8s ease 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fade-in-up 0.8s ease 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  animation: fade-in-up 0.8s ease 0.4s both;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #014377, #1476c6, #3a9ae0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.08rem;
  margin-top: 1rem;
}

/* --- Scroll-driven reveal animations --- */
.about-card,
.service-card,
.team-card,
.location-card,
.ref-group,
.partner-badge {
  animation: reveal linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 30%;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fallback for browsers without scroll-driven animations */
@supports not (animation-timeline: view()) {
  .about-card,
  .service-card,
  .team-card,
  .location-card,
  .ref-group,
  .partner-badge {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .js-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .js-reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   ABOUT
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.about-card {
  container-type: inline-size;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #014377, #1476c6);
    opacity: 0;
    transition: opacity var(--transition);
  }

  &:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: oklch(0.35 0.12 250 / 0.2);

    &::before {
      opacity: 1;
    }
  }
}

.about-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: oklch(0.35 0.12 250 / 0.08);
  color: var(--primary);
  margin-bottom: 1.2rem;
}

.about-card h3 {
  margin-bottom: 0.6rem;
}

.about-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  container-type: inline-size;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #014377, #1476c6);
    opacity: 0;
    transition: opacity var(--transition);
  }

  &:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);

    &::before {
      opacity: 1;
    }
  }
}

.service-number {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, oklch(0.35 0.12 250 / 0.12), oklch(0.50 0.13 250 / 0.08));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 1rem;
}

.service-card h3 {
  margin-bottom: 0.8rem;
}

.service-card > p {
  color: var(--text-muted);
  font-size: 0.93rem;
  flex: 1;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  align-self: flex-end;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1476c6;
  text-transform: uppercase;
  letter-spacing: 0.04em;

  & li {
    display: inline;
  }

  & li:not(:last-child)::after {
    content: ' / ';
    color: oklch(0.75 0.01 250);
  }
}

/* Container query for small service cards */
@container (max-width: 300px) {
  .service-number {
    font-size: 2rem;
  }
}

/* ============================================
   PARTNERS
   ============================================ */
.partners-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin-inline: auto;
}

@media (max-width: 768px) {
  .partners-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .partners-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.partner-badge {
  padding: 1.2rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;

  & img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition);
  }

  &:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);

    & img {
      filter: grayscale(0%);
      opacity: 1;
    }
  }
}

.partner-badge-lg {
  & img {
    height: 48px;
  }
}

/* ============================================
   TEAM
   ============================================ */
.team-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.team-category {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.team-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);

  &:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
  }
}

.team-photo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--border);
}

.team-info {
  & h4 {
    font-size: 0.98rem;
    margin-bottom: 0.15rem;
  }
}

.team-role {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.team-skills {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ============================================
   REFERENCES
   ============================================ */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.ref-group h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.ref-list {
  list-style: none;

  & li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.93rem;
    color: var(--text-muted);
    transition: color var(--transition);

    &:hover {
      color: var(--primary);
    }

    &:last-child {
      border-bottom: none;
    }
  }
}

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.contact-locations {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.location-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);

  & h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  & p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;

    & a {
      color: var(--primary);
      font-weight: 500;
      transition: opacity var(--transition);

      &:hover {
        opacity: 0.8;
      }
    }
  }
}

.location-hours {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 1rem 1.5rem;
  background: oklch(0.35 0.12 250 / 0.05);
  border-radius: var(--radius-sm);
}

.location-email {
  & a {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
    transition: opacity var(--transition);

    &:hover {
      opacity: 0.8;
    }
  }
}

/* --- Contact Form --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.form-row {
  display: grid;
  gap: 1rem;
}

.form-row-2 {
  grid-template-columns: 1fr 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;

  & label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
  }

  & input,
  & select,
  & textarea {
    font-family: var(--font);
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg);
    color: var(--text);
    transition: all var(--transition);
    outline: none;

    &:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px oklch(0.35 0.12 250 / 0.1);
    }
  }

  & textarea {
    resize: vertical;
    min-height: 120px;
  }

  & select {
    cursor: pointer;
  }
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-dark);
  color: oklch(0.8 0.01 250);
  padding: 4rem 0 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: wrap;
  padding-bottom: 3rem;
}

.footer-brand {
  max-width: 300px;

  & .nav-logo {
    margin-bottom: 1rem;
  }

  & p {
    font-size: 0.9rem;
    color: oklch(0.75 0.01 250);
  }
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;

  & h4 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: oklch(0.65 0.01 250);
    margin-bottom: 0.5rem;
  }

  & a {
    font-size: 0.9rem;
    color: oklch(0.78 0.01 250);
    transition: color var(--transition);

    &:hover {
      color: oklch(0.95 0 0);
    }
  }
}

.footer-bottom {
  padding: 1.5rem 0;
  border-top: 1px solid oklch(0.2 0.01 260);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;

  & p {
    font-size: 0.82rem;
    color: oklch(0.6 0.01 250);
  }
}

.footer-legal {
  font-size: 0.82rem;
  color: oklch(0.65 0.01 250);
  transition: color var(--transition);

  &:hover {
    color: oklch(0.8 0 0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .hero-stats {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .team-cards {
    grid-template-columns: 1fr;
  }

  .contact-form {
    padding: 1.5rem;
  }

  .footer-links {
    gap: 2rem;
  }
}

/* ============================================
   REMOTE SUPPORT
   ============================================ */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
  margin-inline: auto;
}

.support-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #014377, #1476c6);
    opacity: 0;
    transition: opacity var(--transition);
  }

  &:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);

    &::before {
      opacity: 1;
    }
  }
}

.support-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: oklch(0.35 0.12 250 / 0.08);
  color: #1476c6;
  margin-bottom: 1.2rem;
}

.support-card h3 {
  margin-bottom: 0.4rem;
}

.support-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
}

.support-download {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, #014377, #1476c6);
  color: #fff;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ============================================
   LEGAL PAGE (Datenschutz)
   ============================================ */
.legal-page {
  padding-top: 8rem;
  padding-bottom: 4rem;

  & h1 {
    margin-bottom: 0.5rem;
  }

  & h2 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 0.8rem;
  }

  & h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
  }

  & p {
    margin-bottom: 1rem;
    color: var(--text-muted);
    max-width: 750px;
  }

  & ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: var(--text-muted);
    max-width: 750px;

    & li {
      margin-bottom: 0.3rem;
    }
  }

  & a {
    color: #1476c6;
    text-decoration: underline;
    text-underline-offset: 2px;

    &:hover {
      color: #014377;
    }
  }
}

.legal-updated {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* ============================================
   ANIMATED GRAIN / NOISE OVERLAY (subtle)
   ============================================ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #1476c6;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 900;

  &:hover {
    background: #014377;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  &.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .scroll-top {
    bottom: 1.2rem;
    right: 1.2rem;
    width: 42px;
    height: 42px;
  }
}

/* ============================================
   VIEW TRANSITIONS
   ============================================ */
@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.3s;
}
