/*
 * Larixa accessibility refinement
 * Load after style.css and homepage-modern.css on every public page.
 * Keeps the existing rose-and-cream identity while prioritising readable
 * contrast, visible keyboard focus, and comfortable reflow.
 */

:root {
  --a11y-rose-ink: #75484a;
  --a11y-rose-deep: #704649;
  --a11y-focus: #704649;
  --a11y-focus-gap: #fdfcfa;
  --a11y-control-ink: #211c1b;
}

html {
  scroll-padding-block: 6rem 2rem;
}

body {
  overflow-wrap: break-word;
}

/* A focused skip link is the first visible content for keyboard users. */
.skip-link {
  position: fixed;
  z-index: 2000;
  top: .75rem;
  left: .75rem;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: .65rem 1rem;
  transform: translateY(calc(-100% - 1rem));
  border: 2px solid var(--a11y-focus);
  border-radius: 4px;
  background: var(--color-warm-white, #fdfcfa);
  color: var(--a11y-control-ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--a11y-focus);
  outline-offset: 3px;
}

/* Contrast-safe labels and rose text on the established light surfaces. */
.section-label,
.homepage-modern .section-label,
.homepage-modern .home-trust-intro span:first-child,
.homepage-modern .studio-content .section-label,
.homepage-modern .about-text .section-label,
.homepage-modern .services > .container > .section-label,
.homepage-modern .studio-content .studio-photo-note,
.studio-status__eyebrow,
.studio-status__link,
.studio-status--hero .studio-status__eyebrow,
.studio-status--hero .studio-status__link,
.studio-status--contact .studio-status__eyebrow,
.studio-status--contact .studio-status__link {
  color: var(--a11y-rose-ink);
}

.studio-status__link:hover,
.studio-status__link:focus-visible,
.homepage-modern .contact-section .protected-contact a:hover,
.homepage-modern .contact-section .contact-info-row a:hover {
  color: #59383a;
}

.studio-status__link:focus-visible {
  outline: 3px solid var(--a11y-focus);
  outline-offset: 4px;
}

/* Keep original button colours by default; stronger contrast is visitor-selected. */
html.a11y-high-contrast :is(
  .btn-primary,
  .btn-nav,
  .nav-menu a.btn-nav,
  .homepage-modern .contact-box .btn-primary,
  .homepage-modern .cta-content .btn-primary,
  .homepage-modern .cta-content .btn,
  .homepage-modern .contact-form button[type="submit"],
  .homepage-modern .contact-box .contact-btn
) {
  color: var(--a11y-control-ink);
}
.experience-badge,
.service-badge {
  color: var(--a11y-control-ink);
}

html.a11y-high-contrast :is(
  .btn-primary:hover,
  .btn-primary:focus-visible,
  .btn-nav:hover,
  .nav-menu a.btn-nav:hover,
  .homepage-modern .contact-box .btn-primary:hover,
  .homepage-modern .cta-content .btn-primary:hover,
  .homepage-modern .cta-content .btn:hover,
  .homepage-modern .contact-form button[type="submit"]:hover
) {
  background: #e5b5b5;
  border-color: var(--a11y-rose-deep);
  color: var(--a11y-control-ink);
}

html.a11y-high-contrast .btn-share {
  color: var(--a11y-rose-ink);
  border-color: var(--a11y-rose-ink);
}

html.a11y-high-contrast .btn-share:hover,
html.a11y-high-contrast .homepage-modern .contact-box .btn-share:hover {
  background: #e5b5b5;
  color: var(--a11y-control-ink);
}

.legal-page a:not(.btn),
.legal-page a:not(.btn):hover,
.pricing-page .price-group h3,
.pricing-page .price-group h3 .duration,
.pricing-page .price-list .price {
  color: var(--a11y-rose-ink);
}
.legal-page a:not(.btn),
.schulung-form .checkbox-label a { text-decoration: underline; text-underline-offset: .2em; }
.pricing-page .price-note-highlight { color: var(--a11y-control-ink); }
html.a11y-high-contrast .legal-page :is(.pricing-cta, .aftercare-note, .danke-box) a.btn-primary,
html.a11y-high-contrast .legal-page :is(.pricing-cta, .aftercare-note, .danke-box) a.btn-primary:hover {
  color: var(--a11y-control-ink);
}
html.a11y-high-contrast .legal-page .aftercare-download a.btn-share,
html.a11y-high-contrast .legal-page .aftercare-download a.btn-share:hover,
.legal-page em { color: var(--a11y-rose-ink); }
html.a11y-high-contrast .legal-page .aftercare-download a.btn-share:hover { background: #e5b5b5; }

.homepage-modern .aftercare-more,
.homepage-modern .contact-section .protected-contact a,
.homepage-modern .contact-section .contact-info-row a,
.homepage-modern .about-credentials-proof a span {
  color: var(--a11y-rose-ink);
}

html.a11y-high-contrast .homepage-modern .service-btn:hover,
html.a11y-high-contrast .homepage-modern .testimonials-cta .btn:hover {
  background: #e5b5b5;
  border-color: var(--a11y-rose-deep);
  color: var(--a11y-control-ink);
}

/* Secondary pages also use the legacy gold/rose tokens for text labels/links. */
.schulung-page .section-label,
.schulung .section-label,
.schulung-split-text .section-label,
.schulung-cta-row .section-label,
.schulung-page a[href$="agb"],
.schulung-page a[href$="datenschutz"],
.schulung a[href$="agb"],
.schulung a[href$="datenschutz"] {
  color: var(--a11y-rose-ink);
}

/* Keep the video bright; support the existing white text with a light shadow. */
.header { background: var(--color-cream); }
.hero-overlay { background: rgba(26, 22, 21, .32); }
.scroll-indicator { opacity: 1; }
.hero h1 {
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .65);
}

.hero h1 .highlight {
  color: #f4d3d2;
}

.hero h1 .highlight::after {
  background: #f4d3d2;
  opacity: .32;
}

.hero-subtitle {
  color: #fff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .75);
}

.hero-subtitle a,
.hero-content p a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.hero-instagram {
  border-color: #fff;
  background: transparent;
  color: #fff;
  text-shadow: none;
}

.hero-instagram:hover,
.hero-instagram:focus-visible {
  background: rgba(255, 255, 255, .15);
  color: #fff;
  text-shadow: none;
}

/* Visible motion controls without changing the hero/video or rotator layout. */
.motion-toggle,
.hero-motion-toggle,
.motion-controls {
  color: var(--a11y-control-ink);
}

.motion-toggle,
.hero-motion-toggle {
  min-width: 44px;
  min-height: 44px;
  padding: .55rem .8rem;
  border: 1px solid rgba(51, 51, 51, .72);
  border-radius: 4px;
  background: rgba(253, 252, 250, .96);
  font: inherit;
  font-size: .875rem;
  line-height: 1.3;
  cursor: pointer;
}

.hero-motion-toggle {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: .625rem;
  border-radius: 50%;
  z-index: 4;
  top: calc(var(--header-height, 80px) + .75rem);
  right: clamp(1rem, 3vw, 2rem);
}
.hero-motion-toggle .motion-icon-play,
.hero-motion-toggle[aria-pressed="true"] .motion-icon-pause { display: none; }
.hero-motion-toggle[aria-pressed="true"] .motion-icon-play { display: block; }

.motion-toggle:hover,
.hero-motion-toggle:hover {
  background: #e5b5b5;
}

html.motion-paused *,
html.motion-paused *::before,
html.motion-paused *::after {
  animation-play-state: paused;
}

html.motion-paused .hero-video-layer,
html.motion-paused .hero-video-layer.native-parallax {
  animation: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms;
    animation-iteration-count: 1;
    scroll-behavior: auto;
    transition-duration: .01ms;
  }

  .hero-video-layer,
  .hero-video-layer.native-parallax {
    animation: none;
    transform: none;
  }

  .image-rotator .rotator-alt,
  .image-rotator span.rotator-label.rotator-alt {
    animation: none;
    opacity: 0;
  }

  .image-rotator .rotator-label-base {
    animation: none;
    opacity: 1;
  }
}

/* One consistent, high-visibility keyboard indicator on every interactive control. */
body :is(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--a11y-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--a11y-focus-gap);
}

.hero :where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible,
.portfolio :where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline-color: #f4d3d2;
  box-shadow: 0 0 0 3px rgba(42, 34, 33, .9);
}

/* Maintain focus visibility when fixed chrome is present. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus {
  scroll-margin-block: 7rem 6rem;
}

body.mobile-booking-visible :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  scroll-margin-bottom: 8rem;
}

/* Controls with an expected tap/click target; inline reading links remain compact. */
button,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea,
.nav-toggle,
.nav-menu .btn,
.hero-buttons .btn,
.contact-form button[type="submit"],
.testimonial-controls button,
.motion-controls button {
  min-height: 44px;
}

.nav-menu a:not(.btn),
.footer a,
.footer-link-btn {
  min-height: 24px;
}

.contact-form :where(input:not([type="checkbox"]), textarea),
.homepage-modern .contact-form :where(input:not([type="checkbox"]), textarea),
.schulung-form :where(input:not([type="checkbox"]), select, textarea) {
  color: #333;
}

.form-error-summary {
  margin: 0 0 1.25rem;
  padding: 1rem 1.15rem;
  border: 2px solid #75484a;
  border-inline-start-width: 5px;
  border-radius: 5px;
  background: #f7e9e7;
  color: #392b2a;
}

.form-error-summary :where(h2, h3, p, li) {
  color: inherit;
}

.form-error-summary a,
.form-required-note a {
  color: #59383a;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.form-required-note {
  color: #4a4a4a;
}

.a11y-status,
.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;
}

/* Real links in the footer and prose stay recognisable without colour alone. */
.footer a,
.homepage-modern .footer a,
.footer-contact a,
.footer-links a,
.footer p a,
.homepage-modern .contact-form .checkbox-label a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.footer a,
.footer-contact a,
.footer-links a,
.footer p a {
  color: #f4d3d2;
}

.footer a:hover,
.footer a:focus-visible,
.footer-contact a:hover,
.footer-links a:hover,
.footer p a:hover {
  color: #fff;
}

/* Footer contact title becomes an h2 in the accessible markup; retain its old scale. */
.footer-content h2 {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Let compact editorial rows reflow instead of clipping at 320px or 200% zoom. */
@media (max-width: 600px) {
  .homepage-modern .about-values {
    flex-wrap: wrap;
    justify-content: center;
    gap: .7rem 1rem;
  }

  .homepage-modern .about-values .value {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: clamp(.7rem, 2.85vw, .95rem);
  }

  .homepage-modern .studio-features {
    grid-template-columns: minmax(0, 1fr);
  }

  .homepage-modern .studio-feature {
    min-width: 0;
    align-items: flex-start;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: max(.875rem, 2.8vw);
  }

  .homepage-modern .studio-feature > :not(.studio-icon) {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .hero-motion-toggle {
    top: calc(var(--header-height, 80px) + .5rem);
    right: .75rem;
    min-height: 44px;
    padding-inline: .6rem;
    font-size: .78rem;
  }
}

@media (max-width: 360px) {
  .homepage-modern .container,
  .homepage-modern .testimonials-container {
    width: min(100% - 1.5rem, 720px);
  }

  .homepage-modern .about-values {
    justify-content: center;
  }

  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.5rem);
  }

  .hero-content {
    padding-inline: .75rem;
  }

  .hero-buttons {
    gap: .6rem;
  }
}

@media (min-width: 601px) {
  .homepage-modern .about-values {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .hero-motion-toggle,
  .hero-motion-toggle:hover,
  .hero-motion-toggle:focus-visible {
    width: 44px;
    height: 44px;
    padding: 14px;
    right: 8px;
    border: 0;
    background: transparent;
    color: #fff;
  }
  .hero-motion-toggle::before {
    content: "";
    position: absolute;
    width: 28px;
    height: 28px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    pointer-events: none;
  }
  .hero-motion-toggle svg {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
  }
}
