/* ============== Utilities ============== */

/* Self-hosted Montserrat font (remove external Google Fonts dependency) */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/data/Montserrat/Montserrat-VariableFont_wght.woff2') format('woff2'),
    url('/data/Montserrat/Montserrat-VariableFont_wght.ttf') format('truetype');
}

@font-face {
  font-family: 'Montserrat';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/data/Montserrat/Montserrat-Italic-VariableFont_wght.woff2') format('woff2'),
    url('/data/Montserrat/Montserrat-Italic-VariableFont_wght.ttf') format('truetype');
}

/* Blur helper (used when overlay is open) */
.blurred {
  filter: blur(4px) grayscale(10%);
  pointer-events: none !important;
  user-select: none !important;
  transition: filter 0.2s;
}

/* Skip Links for Accessibility */
.skip-link {
  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;
}

/* 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;
}

/* ============== Theme ============== */

:root {
  /* base + dynamic font-size (a11y scaling). Use --a11y-scale (set by JS) */
  --font-size-base: 1.2rem;
  --a11y-scale: 1;
  --font-size: calc(var(--font-size-base) * var(--a11y-scale));

  /* Palette */
  --c1: #7c9e61;
  --c2: #38472b;
  --c3: #1e2617;
  --cWh: #ebf2e6;
  --cBk: #060d01;
  --bg-light: rgba(255, 255, 255, 0.6);

  --shadow-c1: 0px 0px 15px 0px var(--c1);

  /* Timings & sizes */
  --transition-duration: 0.5s;
  --underline-height: 3px;
  --header-height: 6vh;
  --hero-height: 40vh;
  --footer-height: var(--header-height);
  --nav-active-decoration: none;
  --breathing-scale: 1.05;
  --breathing-duration: 1.5s;
  --padding: 0.75rem;

  --header-logo-scale: 1.4;
  --header-logo-scale-mobile: 1;
  --header-logo-scale-small: 0.7;

  /* Semantic aliases */
  --primary: var(--c1);
  --primary-overlay: rgba(124, 158, 97, 0.525);
  --secondary: var(--c2);
  --text-dark: var(--cBk);
  --text-light: var(--cWh);
  --color-bg: var(--cWh);

  --card-bg: #fff;
  --card-shadow: var(--shadow-c1);
  --card-radius: 0.5rem;
  --border-radius: 8px;
  --gap: 2rem;
  --font-main: 'Montserrat', Arial, sans-serif;

  /* Hero Background Images */
  --hero-bg-druck: url('/data/img/jpg/print_hero.jpg');
  --hero-bg-scan: url('/data/img/jpg/scan_hero.jpg');
  --hero-bg-team: url('/data/img/jpg/team_hero.jpg');
  --hero-bg-preise: url('/data/mockups_placeholder/12.png');
  --hero-bg-kontakt: url('/data/img/jpg/kontakt_hero.jpg');
  --hero-bg-konstruktion: url('/data/img/jpg/engineering_hero.jpg');
  --hero-bg-home: #eaf2fa;
  /* color, not image */

  --topspace: calc(2 * var(--padding) + var(--header-height));
  --footer-padding: 6rem;

  --headercontact-font-size: 1rem;
  --headercontact-font-size-mobile: 0.7rem;
  --headercontact-padding: 0.1rem;
  --headercontact-padding-mobile: 0.1rem 1rem 0.5rem 0;
  --headercontact-font-weight: 500;
  --headercontact-color: var(--c2);

  --card-size: 250px;
}

/* ============== Base ============== */

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  cursor: default;
  overflow-y: scroll;
  /* keep scrollbar to avoid jumps */
}

body {
  background-color: var(--cWh);
  font-family: 'Montserrat', sans-serif;
  font-size: var(--font-size);
  color: var(--c3);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  scrollbar-gutter: stable;
}

/* Stabilize scrollbar gutter across browsers */
html {
  scrollbar-gutter: stable both-edges;
}

/* WebKit scrollbars */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: var(--cWh);
}

::-webkit-scrollbar-thumb {
  background: var(--c1);
  border-radius: 8px;
  border: 2px solid var(--cWh);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--c2);
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 1rem 0;
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0.8rem 0;
}

h3 {
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0.6rem 0;
}

.txtfat {
  font-weight: 900;
}

.txtc1 {
  color: var(--c1);
}

.txtc2 {
  color: var(--c2);
}

.txtc3 {
  color: var(--c3);
}


.bglight {
  background-color: var(--bg-light);
  color: var(--c3);
  padding: 0.5rem;
}

/* ============== Layout Containers ============== */

nav {
  /* previous 'display: flow' was invalid */
  display: block;
}

.content_container {
  display: flex;
  flex: 1 0 auto;
}

/* ============== Header & Navigation ============== */

#header {
  width: 100vw;
  height: var(--header-height);
  padding: var(--padding);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  background: #fff;
  align-items: center;
  box-shadow: var(--shadow-c1);
  z-index: 100;
}

#headertitle {
  padding-left: 10vw;
}

#logo {
  height: calc(var(--header-height) * var(--header-logo-scale));
  width: auto;
  display: flex !important;
}

#logo:hover {
  cursor: pointer;
}

/* Remove focus/active outlines on SVGs */
#logo,
#logo svg,
#logo img {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

#logo:focus,
#logo:active {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

#main-nav {
  position: relative;
  display: flex;
  flex-flow: row;
  justify-content: flex-end;
  z-index: 900;
  margin-right: 1rem;
  align-items: flex-start;
}

#main-nav .menu-item {
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  padding-left: var(--padding);
  padding-right: var(--padding);
  color: var(--c3);
  transition: color var(--transition-duration) ease;
}

#main-nav .underline {
  position: absolute;
  bottom: 0;
  height: var(--underline-height);
  background: var(--c1);
  transition: left var(--transition-duration) ease, width var(--transition-duration) ease;
}

/* Hover animation */
@keyframes breathe {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(var(--breathing-scale));
  }
}

/* Limit hover styles to nav items (was overly broad before) */
#main-nav .menu-item:hover,
#main-nav .menu-item:focus {
  color: var(--c1);
  animation: breathe var(--breathing-duration) ease-in-out infinite;
}

#main-nav .menu-item.active {
  color: var(--c1);
  text-decoration: var(--nav-active-decoration);
}

/* When hovering any menu item, force the .active item back to c3 if it's not hovered */
#main-nav:hover .menu-item.active:not(:hover) {
  color: var(--c3) !important;
}

/* Mobile nav parity */
#mobile-nav:hover .menu-item.active:not(:hover) {
  color: var(--c3) !important;
}

/* Hamburger */
#hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 101;
  position: absolute;
  right: calc(2.5rem + 2 * var(--padding));
}

#hamburger span {
  display: block;
  height: 4px;
  width: 28px;
  background: var(--c2);
  border-radius: 2px;
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
  transform-origin: center;
}

#hamburger.is-active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

#hamburger.is-active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-100%);
}

#hamburger.is-active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

#mobile-site-indicator {
  display: none;
  font-size: 1.1rem;
  font-weight: 600;
  margin-left: 0.7rem;
  transition: color 0.6s;
  min-width: 80px;
  text-align: left;
  vertical-align: middle;
}

#mobile-nav {
  display: none;
}

/* ============== Footer ============== */

.footer-spacer {
  width: 100vw;
  height: calc(1.2 * var(--footer-height));
}

.footer {
  flex-shrink: 0;
  opacity: 1;
  bottom: 0;
  position: relative;
  width: 100vw;
  z-index: 80;
  padding-top: var(--footer-padding);
  padding-bottom: var(--footer-padding);
  background: var(--cWh);
  color: var(--c2);
  text-align: center;
  min-height: var(--footer-height);
  height: fit-content;
  box-shadow: 0px 0px 15px 0px var(--c1);
}

#copyrightinfo {
  font-size: 0.8rem;
  color: var(--c2);
  padding: var(--padding);
  cursor: default;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  gap: calc(var(--font-size) * 1.5);
}

.footer-item {
  cursor: pointer;
  transition: color var(--transition-duration);
}

.footer-item button {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.footer-item button:focus {
  outline: none;
}

.footer-item:hover {
  color: var(--c1);
  font-weight: 600;
}

/* ============== Overlay ============== */

.info-overlay {
  /* Full-screen backdrop to block/intercept interactions */
  position: fixed;
  inset: 0;
  /* top:0; right:0; bottom:0; left:0 */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  background: var(--primary-overlay);
  /* dim the page behind the dialog */
  opacity: 1;
  transition: opacity var(--transition-duration) ease, visibility 0s linear var(--transition-duration);
  z-index: 1000;
}

.info-overlay.closed {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

/* The white dialog/content inside the backdrop */
.info-overlay .info-content {
  background: #fff;
  width: min(92vw, 1100px);
  max-width: 1100px;
  max-height: calc(100vh - 12vh);
  border-radius: 0.5rem;
  box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.18);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  padding: 1.25rem;
  box-sizing: border-box;

  /* Unified close button styling */
  .info-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    color: var(--c3);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: background .25s ease, transform .2s ease, box-shadow .25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(4px);
  }

  .info-close {
    border-radius: 2rem;
    position: fixed;
    top: 8vh;
    right: 10vw;
    border: none;
    font-weight: 900;
  }

  .info-overlay .info-close:hover,
  .info-overlay .info-close:focus-visible {
    background: var(--c1);
    color: #fff;
    transform: scale(1.05);
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  }

  .info-overlay .info-close:active {
    transform: scale(.95);
  }

  /* High contrast mode adjustment */
  .a11y-high-contrast .info-overlay .info-close {
    background: #000 !important;
    color: #fff !important;
    border-color: #fff;
  }

  @media (max-width: 600px) {
    .info-overlay .info-close {
      width: 34px;
      height: 34px;
      font-size: 1.4rem;
      top: .75rem;
      right: .75rem;
    }
  }
}

/* ============== Shared Sections ============== */

#pagecontent {
  perspective: 1200px;
  position: relative;
  min-height: calc(100vh - var(--header-height));
  background: var(--cWh);
}

.page-inner {
  position: relative;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  transform-origin: center;
  top: var(--topspace);
  left: 0;
  width: 100vw;
  background-color: var(--cBg);
  transition: background-color 1.6s cubic-bezier(0.4, 0, 0.2, 1);
  padding-bottom: var(--footer-padding);
}

.centered {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

#site-loader {
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

#site-loader.hide {
  opacity: 0;
  pointer-events: none;
}

/* CTA Section */
.cta-section {
  background-color: var(--c1);
  padding: 2rem;
  text-align: center;
  border-radius: var(--border-radius);
  max-width: 900px;
  margin: 3rem auto;
}

.cta-section strong {
  font-size: 1.3rem;
}

.cta-section a {
  display: inline-block;
  margin-top: 1rem;
  background: var(--primary);
  color: var(--text-light);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
}

.cta-section a:hover,
.cta-section a:focus {
  background: var(--text-light);
  color: var(--primary);
  border: 1px solid var(--primary);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(25vw, 1fr));
  gap: var(--gap);
  max-width: 80vw;
  margin: 3rem auto;
  text-align: center;
  justify-items: center;
  justify-content: center;
  align-items: stretch;
}

.feature {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--card-size);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.feature strong {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  height: var(--hero-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero-section::before {
  content: "";
  background: var(--primary-overlay);
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-section>div,
.hero-section .slider,
.hero-section .slide,
.hero-section .slide-caption {
  position: relative;
  z-index: 2;
}

.hero-section .slider-btn,
.hero-section .cta-btn {
  z-index: 3;
}

.hero-section>div {
  color: var(--text-light);
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-section p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Logo theming removed to allow the inline SVG to use its embedded fills.
  If you want to force theme colors on the SVG, re-enable and scope these
  selectors carefully (avoid using !important) or add a class like
  `.themed-logo` to the svg and target `#header #logo .themed-logo .st3`.
*/

/* Optional themed logo: when the SVG has class `themed-logo`, use CSS variables.
   This is intentionally scoped and uses !important to override embedded SVG styles
   only when the class is present. */
#header #logo.themed-logo .st3,
#header #logo.themed-logo svg .st3 {
  fill: var(--c1) !important;
}

#header #logo.themed-logo .st0,
#header #logo.themed-logo svg .st0 {
  fill: var(--c2) !important;
}

#header #logo.themed-logo .st4,
#header #logo.themed-logo svg .st4 {
  fill: var(--c3) !important;
}

/* Header contact cluster */
#headercontact-and-menu {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
  padding: var(--headercontact-padding);
  font-size: var(--headercontact-font-size);
  font-weight: var(--headercontact-font-weight);
  color: var(--headercontact-color);
}

/* Ensure the wrapper also centers its children */
#headercontact-and-menu {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 !important;
  gap: 0.15rem !important;
}

#header-contact .contact-item {
  font-size: 0.95rem !important;
}

#header-contact {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.contact-icon {
  font-size: 1rem;
}

.contact-item a {
  color: var(--headercontact-color);
  text-decoration: none;
  transition: color 0.3s ease;
  text-wrap: nowrap;
}

.contact-item a:hover {
  color: var(--c1);
}

#headercontact-and-menu .header-contact-link {
  color: var(--headercontact-color);
  text-decoration: none;
  padding: var(--headercontact-padding);
  transition: color 0.3s ease;
}

.cta-btn {
  background: var(--cWh);
  color: var(--primary);
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s;
}

.cta-btn:hover,
.cta-btn:focus {
  background: var(--primary);
  color: var(--secondary);
}

/* ============== Responsive ============== */

/* Intermediate tweak */
@media (max-width: 1300px) {
  #header-contact {
    flex-flow: column;
    gap: 0.5rem;
  }

  #header-contact .contact-item {
    font-size: 0.9rem;
  }

  #main-nav .menu-item {
    font-size: 1.1rem;
    padding-left: calc(var(--padding) * 0.8);
    padding-right: calc(var(--padding) * 0.8);
  }
}

/* Mobile switch / hamburger */
@media (max-width: 1100px) {
  #logo {
    height: calc(var(--header-height) * var(--header-logo-scale-mobile));
  }

  /* Reserve space for hamburger + indicator */
  #headercontact-and-menu {
    margin-right: 10rem;
  }

  #mobile-nav {
    position: absolute;
    transform: translateY(-100%);
    opacity: 1;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  #mobile-nav.open {
    position: absolute;
    width: 100vw;
    text-align-last: center;
    top: var(--topspace);
    right: 0;
    background: #fff;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 1rem;
    padding-bottom: 1rem;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  #mobile-nav .menu-item {
    display: block;
    background: transparent;
    padding: 1rem 2rem;
    border-bottom: 1px solid #eee;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    text-decoration: none;
    color: var(--c3);
    font-size: 1.3rem;
    font-weight: 600;
  }

  #hamburger {
    display: flex;
    padding-right: 2rem;
    z-index: 101;
  }

  #mobile-site-indicator {
    display: inline-block !important;
    position: fixed;
    top: calc(var(--header-height) / 2 + var(--padding) - 0.6rem);
    right: 7rem;
    text-align: right;
    margin: 0;
    white-space: nowrap;
    z-index: 100;
  }

  #main-nav .underline {
    display: none !important;
  }

  #main-nav {
    display: none !important;
  }

  #mobile-nav {
    display: flex;
    flex-direction: column;
    width: 100vw;
    background: #fff;
    position: absolute;
    padding-top: var(--topspace);
    left: 0;
    z-index: 90;
    text-decoration: none;
  }

  .services-grid {
    grid-template-columns: repeat(auto-fit, minmax(60vw, 1fr));
  }
}

/* Footer/typography tweaks on small devices */
@media (max-width: 600px) {
  #logo {
    height: calc(var(--header-height) * var(--header-logo-scale-small));
  }

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

  h2 {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.2rem;
    line-height: 1.4;
  }

  body {
    font-size: 0.95rem;
  }

  .cta-btn {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }

  .info-overlay .info-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
  }

  .footer {
    padding-top: 2rem;
  }

  .footer-list {
    flex-direction: column;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1.1rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .slide-caption h1 {
    font-size: 1.3rem;
  }

  .slide-caption p {
    font-size: 1rem;
  }
}

/* Medium small screens - adjust indicator position slightly */
@media (max-width: 500px) and (min-width: 471px) {
  #mobile-site-indicator {
    right: 5rem !important;
    font-size: 1rem !important;
  }
}

/* Very small screens */
@media (max-width: 470px) {
  /* header contact hidden on very small screens is intentionally not applied by default */

  /* Stack header vertically */
  #header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.25rem !important;
    padding: calc(var(--padding) * 0.6) !important;
    height: auto !important;
    min-height: calc(var(--header-height) + 2vh) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    z-index: 100 !important;
    overflow: visible !important;
  }

  #logo {
    padding: 0 !important;
    order: 1 !important;
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    max-height: calc(var(--header-height) * 2.5) !important;
  }

  #logo img,
  #logo svg {
    max-height: calc(var(--header-height) * 2.2) !important;
    height: auto !important;
    width: auto !important;
    display: block !important;
  }

  #hamburger {
    padding: 0 !important;
    order: 2 !important;
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    position: static !important;
    right: auto !important;
    top: auto !important;
    z-index: 105 !important;
    width: 40px !important;
  }

  #mobile-site-indicator {
    order: 3 !important;
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: auto !important;
    z-index: 3 !important;
    font-size: 0.95rem !important;
    margin: 0.25rem 0 !important;
    background: var(--card-bg) !important;
    padding: 0.35rem 0.6rem !important;
    box-shadow: none !important;
    border-bottom: none !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
  }

  /* (These rules were accidentally nested before — now correctly scoped) */
  h1 {
    font-size: 1.8rem;
    line-height: 1.1;
  }

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

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

  body {
    font-size: 0.9rem;
  }

  .cta-btn {
    font-size: 0.9rem;
    padding: 0.7rem 1.2rem;
  }

  #fragmentContainer {
    margin-top: calc(var(--header-height) + 2.5rem) !important;
  }

  header {
    position: relative;
    z-index: 100;
  }

  #header {
    height: calc(var(--header-height) + 2vh);
  }

  .info-content {
    background: none;
    padding: var(--padding);
    max-height: 94%;
    overflow-y: auto;
    position: relative;
    border-radius: 8px;
  }

  .info-overlay .info-close {
    position: sticky;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 1010;
    float: right;
    border-radius: 50%;
  }

  .info-body {
    margin-top: 1.5rem;
    color: var(--color-secondary);
    line-height: 1.6;
  }
}

/* Narrower grids */
@media (max-width: 1280px) {
  .features-grid>*:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {

  .features-grid,
  .gallery-grid {
    gap: 1rem;
    grid-template-columns: 1fr;
  }

  .feature {
    padding: 1rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.3rem;
  }

  .cta-section {
    margin: 2rem 1rem;
  }

  .services-grid {
    gap: 1rem;
    margin: 2rem 1rem;
  }

  .about-short,
  .cta-section {
    margin: 2rem 1rem;
  }

  .team-section {
    margin: 2rem 1rem;
  }

  .process-slider {
    flex-direction: column;
    gap: 1rem;
  }
}

.seo-keywords {
  display: none;
}

/* ================= A11y Preference Classes ================= */
:root.a11y-high-contrast {
  --c1: #000000;
  --c2: #111111;
  --c3: #000000;
  --cWh: #ffffff;
  --cBk: #000000;
  --primary-overlay: rgba(0, 0, 0, 0.5);
  color-scheme: light dark;
}

:root.a11y-reduced-motion *,
:root.a11y-reduced-motion *::before,
:root.a11y-reduced-motion *::after {
  animation: none !important;
  transition-duration: 0s !important;
  scroll-behavior: auto !important;
}

:root.a11y-underline-links a,
:root.a11y-underline-links .menu-item {
  text-decoration: underline !important;
}

:root.a11y-readable-font {
  font-family: 'Montserrat', Arial, sans-serif;
  /* Placeholder: could swap to OpenDyslexic if self-hosted */
  letter-spacing: 0.02em;
  word-spacing: 0.05em;
}

/* A11y panel controls */
.a11y-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
  max-width: 680px;
}

.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.a11y-label {
  font-weight: 600;
  min-width: 180px;
}

.a11y-control {
  flex: 1;
}

.a11y-font button {
  margin-right: 0.4rem;
}

.a11y-font span {
  min-width: 3.5rem;
  display: inline-block;
  text-align: center;
}

.a11y-close-btn {
  margin-top: .5rem;
}