/* Tischlerei Otto | Complete theme consistency pass | 2026-11-16
   Semantic surfaces keep EVERY page and customer ribbon in the chosen palette.
   This file loads after the existing CSS. Layout and artwork are unchanged. */
:root {
  --otto-card-sage-rgb:201,211,192;
  --otto-card-sand-rgb:193,187,164;
  --otto-card-moss-rgb:151,148,108;
  --otto-card-dark-rgb:100,97,75;
  --otto-band-rgb:100,97,75;
  --otto-band-accent-rgb:151,148,108;
  --otto-paper-tint:rgba(238,238,229,.06);
  --otto-surface-quiet-rgb:201,211,192;
  --otto-dark-text:#fbf9f3;
  --otto-control-contrast:#fffdf7;
  --otto-contrast-ink:#191c16;
  --otto-contrast-muted:#272b23;
  --otto-contrast-action:#c9d3c0;
  --otto-contrast-action-ink:#191c16;
  --otto-contrast-band:100,97,75;
}
html[data-otto-palette="natur"] {
  --otto-card-sage-rgb:201,211,192;
  --otto-card-sand-rgb:193,187,164;
  --otto-card-moss-rgb:151,148,108;
  --otto-card-dark-rgb:100,97,75;
  --otto-band-rgb:100,97,75;
  --otto-band-accent-rgb:151,148,108;
  --otto-paper-tint:rgba(238,238,229,.05);
  --otto-surface-quiet-rgb:201,211,192;
  --otto-dark-text:#fbf9f3;
  --otto-contrast-ink:#191c16;
  --otto-contrast-muted:#272b23;
  --otto-contrast-action:#c9d3c0;
  --otto-contrast-action-ink:#191c16;
  --otto-contrast-band:100,97,75;
}
html[data-otto-palette="stein"] {
  --otto-card-sage-rgb:214,200,186;
  --otto-card-sand-rgb:176,169,156;
  --otto-card-moss-rgb:160,146,133;
  --otto-card-dark-rgb:96,84,74;
  --otto-band-rgb:96,84,74;
  --otto-band-accent-rgb:176,145,124;
  --otto-paper-tint:rgba(222,207,190,.17);
  --otto-surface-quiet-rgb:214,200,186;
  --otto-dark-text:#fffdf8;
  --otto-contrast-ink:#231e1a;
  --otto-contrast-muted:#352a25;
  --otto-contrast-action:#d6c8ba;
  --otto-contrast-action-ink:#231e1a;
  --otto-contrast-band:96,84,74;
}
html[data-otto-palette="bronze"] {
  --otto-card-sage-rgb:217,215,210;
  --otto-card-sand-rgb:189,169,148;
  --otto-card-moss-rgb:163,145,128;
  --otto-card-dark-rgb:35,40,50;
  --otto-band-rgb:35,40,50;
  --otto-band-accent-rgb:125,92,70;
  --otto-paper-tint:rgba(220,226,231,.18);
  --otto-surface-quiet-rgb:217,215,210;
  --otto-dark-text:#fffdf8;
  --otto-contrast-ink:#171b22;
  --otto-contrast-muted:#2c3039;
  --otto-contrast-action:#d9d7d2;
  --otto-contrast-action-ink:#171b22;
  --otto-contrast-band:35,40,50;
}

/* Preserve the authentic graph paper in the content only. Header/footer remain solid. */
#main-content {
  background-color:var(--cream);
  background-image:linear-gradient(var(--otto-paper-tint),var(--otto-paper-tint)),url("otto-zeichenpapier-architektur.webp");
  background-size:auto,580px 592px;
  background-repeat:repeat;
}

/* One surface system for services, benefits, projects, workflow, contact and legal pages.
   Applies to light and dark panels at every glass setting. */
html[data-otto-palette] .tile--sage { --tile-fill:rgba(var(--otto-card-sage-rgb),var(--glass-light-alpha)); }
html[data-otto-palette] .tile--sand { --tile-fill:rgba(var(--otto-card-sand-rgb),var(--glass-light-alpha)); }
html[data-otto-palette] .tile--moss { --tile-fill:rgba(var(--otto-card-moss-rgb),var(--glass-mid-alpha)); }
html[data-otto-palette] .tile--olive { --tile-fill:rgba(var(--otto-card-dark-rgb),var(--glass-dark-alpha)); }
html[data-otto-palette] .tile--olive :is(h2,h3,p,li,.check-list) { color:var(--otto-dark-text); }
html[data-otto-palette] .tile--moss :is(h2,h3,p,li) { color:var(--ink); }
html[data-otto-palette] .tile__outline { stroke:var(--frame); }

/* The customer band is a dark, theme-specific material surface, not a fixed green.
   White original logos need a reliably dark backing even at glass level 100. */
.customer-band .tile__surface {
  background-color:rgba(var(--otto-band-rgb),var(--glass-dark-alpha));
  background-image:linear-gradient(105deg,rgba(var(--otto-band-accent-rgb),.21),rgba(var(--otto-band-accent-rgb),.05) 51%,transparent 93%);
  color:var(--otto-dark-text);
}
.customer-band .tile__outline { stroke:var(--frame); }
.customer-logo__link { color:var(--otto-dark-text); }
.customer-logo__link:hover {
  color:#fff;
  background-color:rgba(255,255,255,.075);
  border-color:rgba(255,255,255,.40);
}
.customer-logo__link:focus-visible { outline-color:#fff; background-color:rgba(255,255,255,.08); }
.customer-band[data-static="true"] .customers-viewport,
.customer-band[data-keyboard="true"] .customers-viewport { scrollbar-color:var(--palette-sage) transparent; }
.customers-toggle,
html[data-otto-palette] .customers-toggle {
  background-color:rgba(var(--otto-surface-quiet-rgb),var(--glass-light-alpha));
  color:var(--ink);
  border-color:var(--frame);
}
.customers-toggle:hover { background-color:var(--palette-sage); }
.customers-heading__note { color:var(--muted); }

/* Buttons, captions, separators and secondary UI follow the active theme. */
.button:not(.button--wood) { background-color:rgba(var(--otto-surface-quiet-rgb),var(--glass-light-alpha)); color:var(--ink); }
.button:not(.button--wood):hover { background-color:var(--palette-sand); }
.references-actions .button { background-color:rgba(var(--otto-surface-quiet-rgb),var(--glass-light-alpha)); }
.project-index a:hover { background-color:rgba(var(--otto-surface-quiet-rgb),.32); }
.legal-card .notice { background-color:rgba(var(--otto-surface-quiet-rgb),.27); border-left-color:var(--palette-taupe); }
:where(a,button,input,summary):focus-visible { outline-color:var(--frame); box-shadow:0 0 0 6px var(--ivory); }
.site-footer .footer-nav > li > :is(a,button):hover { color:var(--accent); }
.appearance-trigger:hover { background-color:rgba(var(--otto-card-dark-rgb),.12); }
#glass-level::-webkit-slider-runnable-track { background:var(--palette-taupe); }
#glass-level::-webkit-slider-thumb { background:var(--palette-taupe); border-color:var(--otto-dialog-bg); box-shadow:0 0 0 1px var(--palette-taupe); }
#glass-level::-moz-range-track { background:var(--palette-taupe); }
#glass-level::-moz-range-thumb { background:var(--palette-taupe); border-color:var(--otto-dialog-bg); box-shadow:0 0 0 1px var(--palette-taupe); }

/* Hero controls retain the user's glass/contrast preference in each palette. */
.hero .button--outline {
  background-color:rgba(var(--otto-control-rgb),var(--hero-control-alpha));
  color:var(--otto-control-contrast);
  border-color:rgba(255,255,255,var(--hero-control-stroke));
}
.hero .video-control,
.hero .hero-partner-logo { background-color:rgba(var(--otto-control-rgb),var(--hero-control-alpha)); }
.hero .button--outline:hover,
.hero .video-control:hover { background-color:rgb(var(--otto-control-rgb)); color:#fff; }
.hero :is(.button--outline,.video-control,.hero-partner-logo):focus-visible { outline-color:#fff; box-shadow:0 0 0 6px rgb(var(--otto-control-rgb)); }

/* Metal Rock is a material accent, not a new opaque layer across light cards.
   The bronze panel receives its own glass-sensitive color treatment. */
html[data-otto-palette="bronze"] .tile--moss .tile__surface {
  background-color:rgba(var(--otto-card-moss-rgb),var(--glass-mid-alpha));
  background-image:linear-gradient(135deg,rgba(255,255,255,var(--glass-highlight)),rgba(160,133,110,.10) 74%),url("otto-brushed-bronze-glas.webp");
  background-position:center;
  background-size:auto,cover;
}
/* Alpha-textured materials keep the glass slider functional and preserve contrast. */
html[data-otto-palette="bronze"] .button--wood {
  background-color:rgba(var(--otto-card-dark-rgb),var(--glass-dark-alpha));
  background-image:url("otto-metal-rock-glas.webp");
  background-position:center;
  background-size:cover;
  color:var(--otto-dark-text);
}
html[data-otto-palette="bronze"] .hero .button--wood {
  background-color:rgba(var(--otto-card-dark-rgb),max(.84,var(--hero-action-alpha)));
  background-image:url("otto-metal-rock-glas.webp");
  color:var(--otto-dark-text);
}
html[data-otto-palette="bronze"] .button--wood:hover,
html[data-otto-palette="bronze"] .hero .button--wood:hover {
  background-color:rgb(var(--otto-card-dark-rgb));
  background-image:url("otto-metal-rock-glas.webp");
  color:#fff;
}

/* The high-contrast switch keeps the current palette, without reverting to green. */
html[data-otto-contrast="more"] {
  --ink:var(--otto-contrast-ink);
  --muted:var(--otto-contrast-muted);
  --frame:var(--otto-contrast-ink);
}
html[data-otto-contrast="more"] #main-content { background:var(--cream); }
html[data-otto-contrast="more"] .customer-band .tile__surface {
  background:rgb(var(--otto-contrast-band));
  color:var(--otto-dark-text);
}
html[data-otto-contrast="more"] .customers-toggle {
  background:var(--palette-sage);
  border-color:var(--frame);
  color:var(--ink);
}
html[data-otto-contrast="more"] .tile__surface { background-image:none; }
html[data-otto-contrast="more"] .hero .button--wood,
html[data-otto-contrast="more"] .button--wood,
html[data-otto-palette="bronze"][data-otto-contrast="more"] .hero .button--wood,
html[data-otto-palette="bronze"][data-otto-contrast="more"] .button--wood {
  background-image:none;
  background-color:var(--otto-contrast-action);
  color:var(--otto-contrast-action-ink);
  border-color:var(--frame);
}
html[data-otto-contrast="more"] .hero :is(.button--outline,.video-control,.hero-partner-logo) {
  background:rgb(var(--otto-control-rgb));
  color:#fff;
  border-color:#fff;
  -webkit-backdrop-filter:none;backdrop-filter:none;
}
html[data-otto-contrast="more"] .tile--moss .tile__surface {
  background-color:var(--palette-sage);
}

/* Respect OS transparency requests even when only CSS controls are available. */
@media (prefers-reduced-transparency:reduce) {
  .customer-band .tile__surface { background-color:rgb(var(--otto-band-rgb)); }
}
@media (forced-colors:active) {
  #main-content { background:Canvas !important; color:CanvasText !important; }
  .customer-band .tile__surface { background:Canvas !important; color:CanvasText !important; }
  .customer-logo__link { color:LinkText !important; }
  .customer-band .tile__outline { stroke:CanvasText !important; }
  .customers-toggle { background:ButtonFace !important; color:ButtonText !important; border-color:ButtonText !important; }
}
@media print {
  #main-content { background-image:none !important; }
  .customer-band .tile__surface { background:transparent !important; color:var(--ink) !important; }
}
