/* Bilohash Studio — стиль наліпки для теми /wordpress/ (2026-11-12).
   Підключається після theme.css. Папір #fff8e7 + крапки, чорнило #14110f, синій #2447ff, жовтий #ffd84d, м'ятний #7be0c3.
   Темна тема — html[data-theme="dark"]. Підвал — спільний (includes/portfolio-footer.php). */

:root {
  --bh-bg: #fff8e7;
  --bh-surface: #ffffff;
  --bh-text: #14110f;
  --bh-muted: #4f4943;
  --bh-border: #14110f;
  --bh-primary: #2447ff;
  --bh-primary-dark: #14110f;
  --bh-accent: #ff5a4f;
  --bh-radius: 22px;
  --bh-radius-sm: 14px;
  --bh-shadow: 6px 6px 0 #14110f;
  --bh-shadow-lg: 8px 8px 0 #14110f;
  --bh-font: Rubik, system-ui, -apple-system, "Segoe UI", sans-serif;
  --bh-display: Rubik, system-ui, sans-serif;
  --bs-ink: #14110f;
  --bs-card: #fff;
  --bs-line: #14110f;
  --bs-shadow: #14110f;
}
html[data-theme="dark"] {
  --bh-bg: #14110f;
  --bh-surface: #221d1a;
  --bh-text: #fff8e7;
  --bh-muted: #d6ccbd;
  --bh-border: #fff8e7;
  --bh-primary: #9db0ff;
  --bh-primary-dark: #fff8e7;
  --bh-shadow: 6px 6px 0 #000;
  --bh-shadow-lg: 8px 8px 0 #000;
  --bs-ink: #fff8e7;
  --bs-card: #221d1a;
  --bs-line: #fff8e7;
  --bs-shadow: #000;
}

body {
  background: #fff8e7 radial-gradient(rgba(20, 17, 15, .09) 1.6px, transparent 2px) 0 0 / 26px 26px;
  color: var(--bh-text);
  font-family: var(--bh-font);
  overflow-x: hidden;
}
html[data-theme="dark"] body { background: #14110f radial-gradient(rgba(255, 248, 231, .07) 1.6px, transparent 2px) 0 0 / 26px 26px; }
h1, h2, h3, h4, .bh-hero__title { font-family: var(--bh-display); letter-spacing: -.02em; color: var(--bh-text); }
h1, h2, .bh-hero__title { font-weight: 900; }
main a:focus-visible, header a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #2447ff; outline-offset: 3px; }
html[data-theme="dark"] :focus-visible { outline-color: #ffd84d !important; }
.bh-skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: #ffd84d; color: #14110f; border: 3px solid #14110f; border-radius: 12px; padding: 10px 14px; font-weight: 800; }
.bh-skip:focus { left: 12px; }

/* Шапка */
.bh-header { background: rgba(255, 248, 231, .97); backdrop-filter: none; border-bottom: 3px solid #14110f; }
html[data-theme="dark"] .bh-header { background: rgba(20, 17, 15, .97); border-bottom-color: #fff8e7; }
.bh-header__inner { min-height: 68px; }
.bs-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.bs-logo img { width: 40px; height: 40px; flex: none; }
.bs-logo b { display: block; font: 900 19px/1 Rubik, system-ui, sans-serif; color: #14110f; letter-spacing: -.01em; }
.bs-logo small { display: block; font: 700 11px/1.2 Rubik, system-ui, sans-serif; color: #4f4943; margin-top: 2px; white-space: nowrap; }
html[data-theme="dark"] .bs-logo b { color: #fff8e7; }
html[data-theme="dark"] .bs-logo small { color: #d6ccbd; }
.bh-nav { gap: 12px; }
.bh-nav-list { gap: 1.1rem; }
.bh-nav-list a { color: var(--bh-text); font-weight: 700; padding: 6px 2px; border-bottom: 3px solid transparent; }
.bh-nav-list a:hover, .bh-nav-list .current-menu-item a { color: var(--bh-text); border-bottom-color: #ffd84d; }
.bh-lang__btn { border: 3px solid var(--bs-line); border-radius: 12px; background: var(--bs-card); color: var(--bh-text); box-shadow: 3px 3px 0 var(--bs-shadow); font-weight: 800; min-height: 42px; }
.bh-lang__menu { background: var(--bs-card); border: 3px solid var(--bs-line); border-radius: 14px; box-shadow: 5px 5px 0 var(--bs-shadow); }
.bh-lang__menu a { color: var(--bh-text); font-weight: 700; }
.bh-lang__menu a:hover { background: #ffd84d; color: #14110f; }
.bh-lang__menu a.is-active { background: #7be0c3; color: #14110f; }
.bh-theme { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border: 3px solid var(--bs-line); border-radius: 12px; background: var(--bs-card); color: var(--bh-text); box-shadow: 3px 3px 0 var(--bs-shadow); cursor: pointer; font-size: 16px; flex: none; }
.bh-theme .fa-sun { display: none; }
html[data-theme="dark"] .bh-theme .fa-sun { display: inline; }
html[data-theme="dark"] .bh-theme .fa-moon { display: none; }
.bh-nav-toggle { border: 3px solid var(--bs-line); border-radius: 12px; background: var(--bs-card); box-shadow: 3px 3px 0 var(--bs-shadow); }
.bh-nav-toggle span { background: var(--bh-text); }

/* Кнопки */
.bh-btn { border: 3px solid #14110f; border-radius: 16px; font-weight: 800; box-shadow: 4px 4px 0 #14110f; color: #14110f; background: #fff; min-height: 48px; }
.bh-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #14110f; }
.bh-btn--primary { background: #ffd84d; color: #14110f; box-shadow: 4px 4px 0 #14110f; }
.bh-btn--secondary, .bh-btn--ghost { background: #fff; color: #14110f; border-color: #14110f; }
.bh-btn--light { background: #14110f; color: #fff8e7; }
.bh-btn--outline-light { background: #fff; color: #14110f; border-color: #14110f; }
.bh-btn--lic { background: #ffd84d; color: #14110f; min-height: 42px; box-shadow: 3px 3px 0 #14110f; }
html[data-theme="dark"] .bh-btn { border-color: #fff8e7; box-shadow: 4px 4px 0 #000; }
html[data-theme="dark"] .bh-btn--secondary, html[data-theme="dark"] .bh-btn--ghost { background: #221d1a; color: #fff8e7; }
.bh-icon--btn { fill: currentColor; }

/* Наліпки */
.bh-badge, .bh-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: #7be0c3; color: #14110f; border: 3px solid #14110f; border-radius: 999px; padding: 5px 14px; font-weight: 800; font-size: 13px; letter-spacing: .02em; box-shadow: 3px 3px 0 #14110f; transform: rotate(-1.5deg); text-transform: none; }
.bh-section:nth-of-type(2n) .bh-eyebrow { background: #ffd84d; }
html[data-theme="dark"] .bh-badge, html[data-theme="dark"] .bh-eyebrow { border-color: #fff8e7; box-shadow: 3px 3px 0 #000; }
.bh-section__head h2, .bh-faktura-showcase__copy h2, .bh-about__content h2, .bh-ecosystem h2 { font-weight: 900; }
.bh-section__head h2::after, .bh-faktura-showcase__copy h2::after, .bh-about__content h2::after { content: ""; display: block; width: 92px; height: 10px; margin-top: 12px; background: #ffd84d; border: 2px solid var(--bs-line); border-radius: 6px; transform: rotate(-1.2deg); }

/* Перший екран */
.bh-hero { background: transparent; }
.bh-hero__bg { display: none; }
.bh-hero__title { font-size: clamp(36px, 5.4vw, 62px); line-height: 1.03; letter-spacing: -.03em; }
.bh-hero__title span { background: linear-gradient(transparent 58%, #ffd84d 58%); -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: currentColor; color: var(--bh-text); padding: 0 .08em; }
html[data-theme="dark"] .bh-hero__title span { background: linear-gradient(transparent 58%, #b8860b 58%); }
.bh-hero__lead { color: var(--bh-muted); font-size: 18px; }
.bh-hero-constellation__field, .bh-eco-constellation { background: #2447ff radial-gradient(rgba(255, 255, 255, .16) 1.6px, transparent 2px) 0 0 / 22px 22px; border: 3px solid #14110f; box-shadow: 8px 8px 0 #14110f; }
html[data-theme="dark"] .bh-hero-constellation__field, html[data-theme="dark"] .bh-eco-constellation { border-color: #fff8e7; box-shadow: 8px 8px 0 #000; background-color: #1a2fb8; }
.bh-hero-constellation__mesh { display: none; }
.bh-hero-constellation__core-orb, .bh-eco-core__orb { background: #ffd84d; color: #14110f; border: 3px solid #14110f; box-shadow: 3px 3px 0 #14110f; }
.bh-hero-constellation__node-orb, .bh-eco-planet__orb { border: 2px solid #14110f; box-shadow: 2px 2px 0 #14110f; }
.bh-hero-constellation__badge { background: #fff; color: #14110f; border: 2px solid #14110f; }
.bh-hero-constellation__core strong, .bh-eco-core__label { color: #fff; }

/* Цифри */
.bh-stats__grid { background: var(--bs-card); border: 3px solid var(--bs-line); border-radius: 22px; box-shadow: 6px 6px 0 var(--bs-shadow); }
.bh-stat strong { color: #2447ff; font-weight: 900; }
html[data-theme="dark"] .bh-stat strong { color: #9db0ff; }
.bh-stat span { color: var(--bh-muted); font-weight: 600; }

/* Секції й картки */
.bh-section, .bh-section--alt, .bh-faktura-showcase, .bh-ecosystem { background: transparent; }
.bh-plugin-card, .bh-project-card, .bh-eco-card, .bh-eco-panel, .bh-faq__item, .bh-seo-region, .bh-post-card, .bh-faktura-demo-card, .bh-plugin-carousel__sidebar, .bh-hero-card {
  background: var(--bs-card); color: var(--bh-text); border: 3px solid var(--bs-line) !important; border-radius: 22px; box-shadow: 6px 6px 0 var(--bs-shadow);
}
.bh-project-card:hover, .bh-seo-region:hover, .bh-eco-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--bs-shadow); }
.bh-seo-region.is-active { background: #ffd84d; color: #14110f; }
.bh-seo-region.is-active em { color: #14110f; }
.bh-project-card__icon, .bh-plugin-card__icon, .bh-eco-card__icon { background: #ffd84d !important; color: #14110f !important; border: 2px solid #14110f; border-radius: 14px; }
.bh-project-card:nth-child(2) .bh-project-card__icon { background: #7be0c3 !important; }
.bh-project-card:nth-child(3) .bh-project-card__icon { background: #ffb4ad !important; }
.bh-project-card p, .bh-plugin-card__desc, .bh-eco-card p, .bh-eco-panel__desc, .bh-seo-region em { color: var(--bh-muted); }
.bh-plugin-stack::before { display: none; }
.bh-plugin-card__status { border: 2px solid #14110f; color: #14110f; font-weight: 800; }
.bh-plugin-card__status--live { background: #7be0c3; }
.bh-plugin-card__status--review { background: #ffd84d; }
.bh-plugin-card__tags span, .bh-tech-stack span, .bh-faktura-demo-pills span { background: var(--bs-card); color: var(--bh-text); border: 2px solid var(--bs-line); border-radius: 10px; font-weight: 700; }
.bh-tech-stack span:nth-child(3n+2) { background: #ffd84d; color: #14110f; }
.bh-tech-stack span:nth-child(3n) { background: #7be0c3; color: #14110f; }
.bh-plugin-carousel__menu-btn { background: var(--bs-card); color: var(--bh-text); border: 3px solid var(--bs-line); border-radius: 14px; box-shadow: 3px 3px 0 var(--bs-shadow); }
.bh-plugin-carousel__menu-btn[aria-selected="true"], .bh-plugin-carousel__menu-btn.is-active { background: #ffd84d; color: #14110f; }
.bh-plugin-carousel__menu-icon { background: #2447ff; border: 2px solid #14110f; }
.bh-carousel-btn { background: var(--bs-card); color: var(--bh-text); border: 3px solid var(--bs-line); box-shadow: 3px 3px 0 var(--bs-shadow); }
.bh-carousel-dot { border: 2px solid var(--bs-line); background: var(--bs-card); }
.bh-carousel-dot.is-active { background: #ffd84d; }
.bh-faktura-showcase__list li, .bh-about__list li { color: var(--bh-text); font-weight: 600; }
.bh-faktura-showcase__list .bh-icon, .bh-about__list .bh-icon { background: #7be0c3; color: #14110f; border: 2px solid #14110f; border-radius: 6px; padding: 2px; }
.bh-faktura-demo-card__head { background: #ffd84d; color: #14110f; border-bottom: 3px solid #14110f; }
.bh-faktura-demo-card__head span { background: #fff; border: 2px solid #14110f; }
.bh-faktura-demo-total { background: #7be0c3; color: #14110f; border: 2px solid #14110f; }
.bh-faktura-demo-services button { background: var(--bs-card); color: var(--bh-text); border: 2px solid var(--bs-line); }
.bh-faktura-showcase__embed iframe { border: 3px solid var(--bs-line); border-radius: 18px; box-shadow: 6px 6px 0 var(--bs-shadow); background: #fff; }
.bh-code-card { border: 3px solid #14110f; box-shadow: 8px 8px 0 #14110f; border-radius: 20px; }
html[data-theme="dark"] .bh-code-card { border-color: #fff8e7; box-shadow: 8px 8px 0 #000; }
.bh-code-card__dots { background: #ffd84d; border-bottom: 3px solid #14110f; }
.bh-faq__item summary { font-weight: 800; color: var(--bh-text); }
.bh-faq__item p { color: var(--bh-muted); }
.bh-seo-regions__note a, .bh-ecosystem__foot a { color: var(--bh-primary); font-weight: 700; }

/* Заклик унизу */
.bh-cta { background: transparent; }
.bh-cta__inner { background: #ffd84d; color: #14110f; border: 3px solid #14110f; border-radius: 26px; box-shadow: 8px 8px 0 #14110f; }
.bh-cta__inner h2, .bh-cta__inner p { color: #14110f; }
html[data-theme="dark"] .bh-cta__inner { background: #2e2615; border-color: #ffd84d; box-shadow: 8px 8px 0 #000; }
html[data-theme="dark"] .bh-cta__inner h2, html[data-theme="dark"] .bh-cta__inner p { color: #fff8e7; }
html[data-theme="dark"] .bh-btn--light { background: #ffd84d; color: #14110f; }

/* Темна тема: білі поверхні з theme.css */
html[data-theme="dark"] .bh-plugin-card, html[data-theme="dark"] .bh-project-card, html[data-theme="dark"] .bh-eco-card, html[data-theme="dark"] .bh-eco-panel,
html[data-theme="dark"] .bh-faq__item, html[data-theme="dark"] .bh-seo-region:not(.is-active), html[data-theme="dark"] .bh-faktura-demo-card, html[data-theme="dark"] .bh-stats__grid { background: #221d1a; color: #fff8e7; }
html[data-theme="dark"] .bh-seo-region.is-active { background: #ffd84d; }

/* Бургер раніше, щоб шапка не переповнювалась */
@media (max-width: 1100px) {
  .bh-nav-toggle { display: block; }
  .bh-nav { position: fixed; inset: 72px 1rem auto; display: none; flex-direction: column; align-items: stretch; background: var(--bs-card); border: 3px solid var(--bs-line); border-radius: 18px; padding: 1rem; box-shadow: 6px 6px 0 var(--bs-shadow); max-height: calc(100vh - 90px); overflow: auto; }
  .bh-nav.is-open { display: flex; }
  .bh-nav-list { flex-direction: column; align-items: stretch; gap: .35rem; }
  .bh-nav-list a { display: block; padding: .65rem .4rem; }
  .bh-nav .bh-theme { align-self: flex-start; }
}
@media (max-width: 480px) {
  .bs-logo small { display: none; }
  .bh-hero__title { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .bh-btn:hover, .bh-project-card:hover, .bh-seo-region:hover { transform: none; }
}

/* WCAG 2.1 AA fixes (2026-11-13) */
html[data-theme="dark"] .bh-plugin-carousel__menu-btn.is-active :is(strong,em),
html[data-theme="dark"] .bh-plugin-carousel__menu-btn[aria-selected="true"] :is(strong,em){color:#14110f}
html[data-theme="dark"] .bh-plugin-carousel__menu-btn:not(.is-active) em{color:#d6ccbd}
html[data-theme="dark"] .bh-plugin-card__tagline{color:#ffd84d}
html[data-theme="dark"] .bh-faktura-demo-services button em{color:#9db0ff}
html[data-theme="dark"] .bh-faktura-demo-services button:is(.is-active,[aria-pressed="true"]) em{color:#14110f}

/* 2026-11-13: колонки «Про мене» не ширші за екран телефона (текст обрізався на 375 px) */
.bh-about > * { min-width: 0; }
.bh-about__content, .bh-about__content * { overflow-wrap: anywhere; }
@media (max-width: 900px) { .bh-about { grid-template-columns: minmax(0, 1fr); } }
