/* Accessibility-focused styles for remm augenoptik */

/* Base font sizes - minimum 16pt as specified */
:root {
  --base-font-size: 16px;
  --large-font-size: 18px;
  --heading-font-size: 24px;
  --big-heading-font-size: 32px;
  --line-height: 1.6;
  --letter-spacing: 0.02em;

  /* Color palette for accessibility */
  --primary-color: #1468b9;
  --primary-dark: #0d5aa7;
  --text-color: #2c3e50;
  --text-light: #495057;
  --background-color: #ffffff;
  --background-light: #f8f9fa;
  --border-color: #e0e0e0;
  --focus-color: var(--primary-color);
  --success-color: #28a745;
  --error-color: #dc3545;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;

  /* Border radius */
  --border-radius: 8px;
  --border-radius-large: 12px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

html {
  font-size: var(--base-font-size);
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography - Large fonts for accessibility */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
  letter-spacing: var(--letter-spacing);
}

h1 {
  font-size: 2rem;
  line-height: 1.1;
}

h2 {
  font-size: 2rem;
  line-height: 1.2;
}

h3 {
  font-size: 1.75rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.125rem;
}

p {
  font-size: 1.125rem;
  line-height: var(--line-height);
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

/* High contrast mode */
.high-contrast {
  background: #000000 !important;
  color: #ffffff !important;
}

.high-contrast * {
  background: #000000 !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
}

.high-contrast a {
  color: #00ff00 !important;
  text-decoration: underline !important;
}

.high-contrast button {
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #ffffff !important;
}

.high-contrast img {
  filter: invert(1) hue-rotate(180deg);
}

/* Focus styles - highly visible */
*:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

.inverted-focus:focus {
  outline: 3px solid var(--background-color);
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Button styles - large tap targets */

/* Link styles */
a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: var(--transition-normal);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Skip links for screen readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: var(--border-radius);
  z-index: 1000;
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only content */
.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;
}

/* Mobile-first responsive design */

/* Grid system */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

/* Persistent call button for mobile */
.call-button-mobile {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: none;
  background: var(--success-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
  text-decoration: none;
  align-items: center;
  justify-content: center;
}

.call-button-mobile:hover {
  background: #218838;
  transform: scale(1.1);
}

.call-button-mobile:focus {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --base-font-size: 16px;
    --large-font-size: 18px;
    --heading-font-size: 22px;
    --big-heading-font-size: 28px;
  }

  .call-button-mobile {
    display: flex;
  }

  /* Larger tap targets on mobile */

  /* Stack elements on mobile */

  /* Reduce margins on mobile */
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1rem;
  }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --base-font-size: 17px;
    --large-font-size: 19px;
    --heading-font-size: 26px;
    --big-heading-font-size: 30px;
  }
}

/* Desktop styles */
@media (min-width: 1025px) {
  :root {
    --base-font-size: 18px;
    --large-font-size: 20px;
    --heading-font-size: 28px;
    --big-heading-font-size: 36px;
  }
}

/* Large desktop styles */
@media (min-width: 1200px) {
  :root {
    --base-font-size: 19px;
    --large-font-size: 21px;
    --heading-font-size: 30px;
    --big-heading-font-size: 38px;
  }
}

/* Accessibility media queries */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (prefers-contrast: high) {
  :root {
    --primary-color: #0052cc;
    --text-color: #000000;
    --border-color: #333333;
  }

  a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
  }
}

/* Print styles */
@media print {
  * {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  a {
    text-decoration: underline;
  }

  .call-button-mobile {
    display: none !important;
  }

  .nav-menu {
    display: none !important;
  }
}

/* Utility classes */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
