/* Dark mode and shared chrome for the live (light) design system.
   The head boot script sets data-theme before paint. */

html[data-theme="dark"] {
  --paper: #2c2d2f;
  --ink: #F7F6F3;
  --muted: #CFCCC4;
  --line: #55575A;
  --soft: #3a3b3d;
  --teal-dark: #9EE5DD;
  --card: #3a3b3d;
  color-scheme: dark;
  background: #2c2d2f;
  color: #F7F6F3;
}

:root { --card: #fff; }

html[data-theme="dark"] body { background: #2c2d2f; color: #F7F6F3; }

html[data-theme="dark"] .header {
  background: rgba(44, 45, 47, .97);
  border-bottom-color: #55575A;
}

html[data-theme="dark"] .brand img,
html[data-theme="dark"] .footer .brand img,
html[data-theme="dark"] .site-footer .brand img {
  filter: none;
  opacity: 1;
}

html[data-theme="dark"] .offer,
html[data-theme="dark"] .process-section,
html[data-theme="dark"] .service-panel,
html[data-theme="dark"] .human-panel,
html[data-theme="dark"] .price-card,
html[data-theme="dark"] .session-card,
html[data-theme="dark"] .inquiry-panel,
html[data-theme="dark"] .simple-panel,
html[data-theme="dark"] .lab-panel,
html[data-theme="dark"] .article-aside,
html[data-theme="dark"] .catalog-card,
html[data-theme="dark"] .library-empty,
html[data-theme="dark"] .page-cta,
html[data-theme="dark"] .intelligence-panel,
html[data-theme="dark"] .project-summary,
html[data-theme="dark"] .article-content pre,
html[data-theme="dark"] .content-notice {
  background: #3a3b3d;
  color: #F7F6F3;
}

html[data-theme="dark"] .offer.featured,
html[data-theme="dark"] .hub-section,
html[data-theme="dark"] .contact-section {
  background: #1e1f21;
  color: #F7F6F3;
}

html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .sitemap-footer {
  background: #1e1f21;
  color: #F7F6F3;
  border-top-color: #55575A;
}

html[data-theme="dark"] .footer-map a,
html[data-theme="dark"] .footer-brand-row p,
html[data-theme="dark"] .footer-bottom,
html[data-theme="dark"] .footer-address {
  color: #CFCCC4;
}

html[data-theme="dark"] .footer-map a:hover,
html[data-theme="dark"] .text-link { color: #9EE5DD; }

html[data-theme="dark"] .process-grid article,
html[data-theme="dark"] .human-note,
html[data-theme="dark"] .footer-brand-row { border-color: #55575A; }

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: #2c2d2f;
  color: #F7F6F3;
  border-color: #55575A;
}

html[data-theme="dark"] .library-tools input,
html[data-theme="dark"] .library-tools select,
html[data-theme="dark"] .search-field input { background: #2c2d2f; color: #F7F6F3; }

html[data-theme="dark"] .header nav { background: #2c2d2f; }

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.theme-toggle svg { width: 18px; height: 18px; display: block; }
html:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.theme-toggle-mobile { display: none; }

@media (max-width: 900px) {
  .theme-toggle-desktop { display: none; }
  .theme-toggle-mobile { display: inline-flex; margin-left: auto; margin-right: 10px; }
  [data-dh-header] .theme-toggle-desktop { display: inline-flex; }
}

html.dh-ww-open,
html.sm-lock { overflow: hidden; }

.dh-ww-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(49, 49, 49, .55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}

.dh-ww-backdrop.is-open { align-items: center; }

.dh-ww-popup {
  width: min(640px, 100%);
  max-height: min(92vh, 760px);
  overflow: auto;
  background: #f7f6f3;
  color: #313131;
  border: 1px solid #CFCCC4;
  border-radius: 16px;
  padding: 28px 24px 22px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .18);
  position: relative;
}

html[data-theme="dark"] .dh-ww-popup {
  background: #3a3b3d;
  color: #F7F6F3;
  border-color: #55575A;
}

.dh-ww-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line, #CFCCC4);
  background: transparent;
  color: inherit;
  font-size: 22px;
  line-height: 1;
}

.dh-ww-badge {
  margin: 0 36px 8px 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #1E7C73;
}

html[data-theme="dark"] .dh-ww-badge { color: #9EE5DD; }

.dh-ww-popup h2 {
  font-family: Manrope, "DM Sans", sans-serif;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -.03em;
  font-weight: 560;
  margin: 0 0 12px;
}

.dh-ww-questions {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dh-ww-questions li {
  border: 1px solid #CFCCC4;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

html[data-theme="dark"] .dh-ww-questions li { border-color: #55575A; }

.dh-ww-lead { margin: 0 0 16px; line-height: 1.5; }

.dh-ww-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.dh-ww-cards article {
  border: 1px solid #CFCCC4;
  border-radius: 12px;
  padding: 14px;
  background: transparent;
}

html[data-theme="dark"] .dh-ww-cards article { border-color: #55575A; }

.dh-ww-cards h3 { margin: 0 0 6px; font-size: 16px; font-weight: 650; }
.dh-ww-cards p { margin: 0; font-size: 14px; line-height: 1.45; color: #55575A; }
html[data-theme="dark"] .dh-ww-cards p { color: #CFCCC4; }

.dh-ww-when {
  margin-top: 12px !important;
  font-size: 11px !important;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1E7C73 !important;
}

html[data-theme="dark"] .dh-ww-when { color: #9EE5DD !important; }

.dh-ww-date {
  margin-top: 6px !important;
  background: #EAFAF8;
  color: #313131 !important;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px !important;
}

html[data-theme="dark"] .dh-ww-date {
  background: #2c2d2f;
  color: #F7F6F3 !important;
}

.dh-ww-popup .button { display: inline-flex; }

.dh-ww-pill {
  position: fixed;
  z-index: 45;
  right: 16px;
  bottom: 16px;
  background: #fff;
  color: #313131;
  border: 1px solid #CFCCC4;
  border-radius: 999px;
  padding: 10px 16px;
  font: 600 14px/1.2 "DM Sans", sans-serif;
  box-shadow: 0 8px 24px rgba(49, 49, 49, .12);
}

html[data-theme="dark"] .dh-ww-pill {
  background: #3a3b3d;
  color: #F7F6F3;
  border-color: #55575A;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

@media (max-width: 700px) {
  .dh-ww-cards { grid-template-columns: 1fr; }
  .dh-ww-popup h2 { font-size: 26px; }
}

/* ======================================================================
   digihub Corporate Identity (Design-Handbuch / Corporate Colours.xlsx)
   Teal #31BEB0 · Green #DBE470 · Grey #E3E1DB · Light Black #55575A · Black #313131
   Font stays Manrope / DM Sans (decision 2026-10-30), CI colours, pills, headlines.
   ====================================================================== */
:root {
  --paper: #F7F6F3;          /* neutral-50  / bg-subtle */
  --ink: #313131;            /* neutral-900 / fg */
  --muted: #55575A;          /* neutral-600 / fg-secondary */
  --line: #CFCCC4;           /* neutral-300 / border */
  --grey: #E3E1DB;           /* neutral-200 / CI Grey */
  --soft: #EAFAF8;           /* teal-50 */
  --teal: #31BEB0;           /* teal-500 / bg-brand */
  --teal-hover: #46C8BB;     /* teal-400 */
  --teal-press: #259C90;     /* teal-600 / fg-brand */
  --teal-dark: #1E7C73;      /* teal-700 / link, eyebrow */
  --lime: #DBE470;           /* green-500 / highlight */
  --lime-dot: #DBE470;
  --focus: #46C8BB;          /* focus ring */
  --ease-standard: cubic-bezier(.4, 0, .2, 1);
  --dur-fast: 140ms;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Buttons: pill, teal with Black text (5.65:1), hover teal-400 (6.9:1), press scale */
.button, .btn, .sm-submit, .sm-wl { border-radius: 999px; }
.button { font-weight: 600; transition: background var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast); }
.button-dark, .btn-primary, .sm-submit, .sm-wl,
html[data-theme="dark"] .button-dark, html[data-theme="dark"] .btn-primary, html[data-theme="dark"] .sm-submit {
  background: var(--teal); border-color: var(--teal); color: #313131;
}
.button-dark:hover, .btn-primary:hover, .sm-submit:hover, .sm-wl:hover,
html[data-theme="dark"] .button-dark:hover, html[data-theme="dark"] .btn-primary:hover {
  background: var(--teal-hover); border-color: var(--teal-hover); color: #313131;
}
.button:active, .btn:active { transform: scale(.98); }
.button-lime { background: var(--lime); color: #313131; }

/* Headlines: heavier and tighter (CI: bold, tracking −0.02em and tighter for display) */
.hero h1 { font-weight: 700; letter-spacing: -.045em; }
.page-intro h1, main h1 { font-weight: 700; letter-spacing: -.035em; }
main h2 { font-weight: 700; letter-spacing: -.03em; }
main h3 { letter-spacing: -.015em; }
.hero h1 span:after { content: none; }
.hero h1 .hero-accent { color: var(--teal-press); }
html[data-theme="dark"] .hero h1 .hero-accent { color: #6DD6CB; }
.lime-dot { color: var(--lime-dot); display: inline !important; }
.eyebrow, .small-label { color: var(--teal-dark); }
.text-link { color: var(--teal-dark); }
.text-link:hover { color: var(--ink); }

/* Header: search button, DE/EN switch, The Lab */
.nav-search {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; cursor: pointer;
}
.nav-search:hover, .theme-toggle:hover { border-color: var(--teal); }
.nav-search-mobile { display: none; }
.nav-lang {
  display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-shrink: 0;
}
.header nav .nav-lang a { padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; letter-spacing: .06em; line-height: 1.2; color: var(--muted); text-decoration: none; }
.header nav .nav-lang a[aria-current="true"] { background: var(--ink); color: var(--paper); }
html[data-theme="dark"] .header nav .nav-lang a[aria-current="true"] { background: var(--teal); color: #313131; }
.header nav .nav-lang a:not([aria-current]):hover { color: var(--ink); background: var(--grey); }
@media (min-width: 901px) {
  .header nav > a, .header nav .button { white-space: nowrap; flex-shrink: 0; }
  .header nav { gap: 22px; }
  .header nav > a:not(.button) { padding: 8px 0; }
  .header nav .nav-contact { padding: 12px 20px; min-height: 44px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .header nav { gap: 12px; font-size: 13px; }
  .header-inner { gap: 16px; }
  .header .brand img { width: 130px; }
  .header nav .nav-contact { padding: 10px 14px; }
}
@media (max-width: 900px) {
  .nav-search-desktop { display: none; }
  .nav-search-mobile { display: inline-flex; margin-left: auto; margin-right: 8px; }
  .nav-search-mobile ~ .theme-toggle-mobile, .theme-toggle-mobile { margin-left: 0; }
  .theme-toggle-mobile { margin-right: 10px; }
  .header nav .nav-lang { align-self: flex-start; margin: 10px 14px 4px; }
  .header nav .nav-lang a { padding: 8px 16px; font-size: 13px; }
}

/* Search overlay */
html.dh-search-lock { overflow: hidden; }
.dh-search {
  position: fixed; inset: 0; z-index: 120; background: rgba(49, 49, 49, .45);
  display: flex; justify-content: center; align-items: flex-start; padding: min(12vh, 110px) 16px 16px;
}
.dh-search[hidden] { display: none; }
.dh-search-panel {
  width: min(680px, 100%); max-height: min(72vh, 640px); display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(49, 49, 49, .2); overflow: hidden;
}
html[data-theme="dark"] .dh-search-panel { background: #3a3b3d; border-color: #55575a; }
.dh-search-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.dh-search-bar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.dh-search-bar input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 18px; padding: 6px 0; outline: none;
}
.dh-search-bar input::-webkit-search-cancel-button { display: none; }
.dh-search-close { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.dh-search-close kbd { font: 600 12px/1 inherit; }
.dh-search-list { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.dh-search-list li a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.dh-search-list li[aria-selected="true"] a { background: var(--soft); box-shadow: inset 3px 0 0 var(--teal); }
html[data-theme="dark"] .dh-search-list li[aria-selected="true"] a { background: #2c2d2f; }
.dh-sr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.dh-sr-title { font-weight: 650; font-size: 15px; }
.dh-sr-sec { flex-shrink: 0; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-dark); }
.dh-sr-text { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-search-list mark { background: rgba(219, 228, 112, .7); color: inherit; border-radius: 2px; }
.dh-search-status { margin: 0; padding: 0 20px; font-size: 14px; color: var(--muted); }
.dh-search-status:not(:empty) { padding: 14px 20px; }
.dh-search-hint { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (max-width: 600px) {
  .dh-search { padding: 0; }
  .dh-search-panel { max-height: 100dvh; height: 100dvh; border-radius: 0; width: 100%; }
  .dh-search-hint { display: none; }
}

/* Mission / Vision (content from Sara's draft) */
.mv-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; padding-top: 40px; padding-bottom: 72px; }
.mv-item { position: relative; padding-top: 34px; overflow: hidden; }
.mv-ghost {
  position: absolute; top: -18px; left: -4px; z-index: 0; pointer-events: none;
  font-family: Manrope, "DM Sans", sans-serif; font-weight: 800; font-size: clamp(90px, 13vw, 170px); line-height: 1; letter-spacing: -.06em;
  color: rgba(49, 49, 49, .05);
}
html[data-theme="dark"] .mv-ghost { color: rgba(247, 246, 243, .06); }
.mv-item h2 { position: relative; z-index: 1; font-size: clamp(48px, 6.4vw, 88px); line-height: 1; margin: 0 0 22px; letter-spacing: -.05em; }
.mv-item p { position: relative; z-index: 1; font-size: 19px; line-height: 1.6; color: var(--muted); margin: 0; max-width: 520px; }
@media (max-width: 760px) { .mv-split { grid-template-columns: 1fr; gap: 24px; padding-bottom: 48px; } .mv-item p { font-size: 17px; } }

/* Team: captions + 30-minute booking */
.team-book {
  display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 2px; padding: 8px 14px; border-radius: 999px;
  background: var(--teal); color: #313131; font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background var(--dur-fast) var(--ease-standard);
}
.team-book:hover { background: var(--teal-hover); }
.team-card h3 { font-weight: 700; }

/* Offer blocks, lab teaser */
.service-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.service-actions .text-link { margin: 0; }
.service-note { font-size: 13px !important; line-height: 1.55 !important; color: var(--muted); margin: 18px 0 0 !important; padding-right: 96px; padding-bottom: 8px; }
.section-lead { font-size: 17px; line-height: 1.7; color: var(--muted); max-width: 680px; margin: -12px 0 0; }
.lab-teaser { padding-bottom: 0; }
html[data-theme="dark"] .eyebrow, html[data-theme="dark"] .small-label, html[data-theme="dark"] .text-link, html[data-theme="dark"] .dh-sr-sec { color: #9EE5DD; }
.hub-section .eyebrow, .offer.featured .eyebrow, .research-panel .eyebrow { color: inherit; }
@media (min-width: 901px) and (max-width: 1040px) {
  .header nav { gap: 9px; font-size: 12.5px; }
  .header-inner { gap: 10px; }
  .header .brand img { width: 112px; }
  .header nav .nav-contact { padding: 8px 12px; font-size: 12.5px; }
  .header nav .nav-lang a { padding: 4px 7px; }
  .nav-search, .header .theme-toggle-desktop { width: 36px; height: 36px; }
}
.hero-launch .button-dark { background: var(--teal); color: #313131; }
.hero-launch .button-dark:hover { background: var(--teal-hover); color: #313131; }
@media (max-width: 900px) {
  .header-inner { gap: 6px; }
  .theme-toggle-mobile { margin: 0 0 0 auto; }
  .nav-search-mobile { margin: 0; }
  .menu-toggle { margin-left: 4px; }
}
@media (max-width: 420px) {
  .nav-search, .theme-toggle { width: 38px; height: 38px; }
  .menu-toggle { padding: 9px 10px; gap: 6px; font-size: 13px; }
}
@media (max-width: 360px) {
  .brand-lockup, .brand-lockup .brand, .brand-lockup .brand-logo { width: 118px !important; }
  .brand-sections { letter-spacing: 1.5px; gap: 4px; }
  .header-inner { gap: 4px; }
}
@media (max-width: 700px) { .service-note { padding-right: 0; padding-bottom: 72px; } }
