/**
 * BMD commercial page styles — premium dark/cream system aligned to Better Mind Daily.
 */
.bmd-page {
  --bmd-ink: #10131a;
  --bmd-muted: #6b7280;
  --bmd-line: rgba(16, 19, 26, 0.1);
  --bmd-cream: #f4f1ea;
  --bmd-cream-2: #ebe6dc;
  --bmd-accent: #9a7b4f;
  --bmd-accent-soft: rgba(154, 123, 79, 0.12);
  --bmd-max: 88rem;
  --bmd-wide: 88rem;
  color: var(--bmd-ink);
  font-family: "Montserrat", system-ui, sans-serif;
  line-height: 1.65;
  background: #fff;
}
.bmd-page * { box-sizing: border-box; }
.bmd-page .bmd-wrap {
  width: min(100% - 2rem, var(--bmd-wide));
  margin-inline: auto;
}
/* Hero base — light Practice panel; theme overrides refine layout/watermark. */
.bmd-page .bmd-hero {
  position: relative;
  padding: clamp(2.75rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 4.5rem);
  color: #141711;
  background: transparent;
  overflow: hidden;
}
.bmd-page .bmd-hero::after {
  content: none;
}
.bmd-page .bmd-hero .bmd-wrap { position: relative; z-index: 1; }
.bmd-page .bmd-hero h1,
.bmd-page .bmd-hero .bmd-lede,
.bmd-page .bmd-hero p:not(.bmd-disclaimer) {
  color: #141711 !important;
}
.bmd-page .bmd-hero .bmd-eyebrow {
  color: #141711 !important;
}

/* Commercial pages use the theme header; hide leftover Elementor chrome. */
body.bmd-has-custom-page {
  --bmd-header-offset: 0px;
}
body.bmd-has-custom-page .elementor-location-header {
  display: none !important;
}
body.bmd-has-custom-page .bmd-page > .bmd-hero {
  padding-top: clamp(2.75rem, 5vw, 4rem);
}
.bmd-page .bmd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #fbf6ee;
  border: 1px solid rgba(20, 23, 17, 0.12);
  color: #141711;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}
.bmd-page h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.35rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  max-width: 22ch;
  color: #141711;
  font-weight: 400;
}
.bmd-page .bmd-lede {
  margin: 0 0 1.75rem;
  max-width: 54ch;
  color: rgba(20, 23, 17, 0.72);
  font-size: 1.05rem;
}
.bmd-page .bmd-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.bmd-page .bmd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border-radius: 2px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.bmd-page .bmd-btn:hover { transform: translateY(-1px); }
.bmd-page .bmd-btn-primary {
  background: #141711;
  color: #fbf6ee !important;
}
.bmd-page .bmd-hero .bmd-btn-secondary {
  background: transparent;
  color: #141711 !important;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}
.bmd-page .bmd-btn-secondary {
  background: transparent;
  color: var(--bmd-ink) !important;
  border: 1px solid var(--bmd-ink);
}
.bmd-page section {
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.bmd-page section + section {
  border-top: 1px solid var(--bmd-line);
}
.bmd-page h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.bmd-page h3 {
  margin: 1.5rem 0 0.55rem;
  font-size: 1.05rem;
}
.bmd-page p { margin: 0 0 1rem; max-width: 68ch; }
.bmd-page ul {
  margin: 0 0 1rem;
  padding-left: 1.15rem;
  max-width: 68ch;
}
.bmd-page li { margin: 0.35rem 0; }

/* Full-width feature sections: What we deliver + Our process */
.bmd-page section:has(> .bmd-wrap > .bmd-grid) {
  width: 100%;
}
.bmd-page section:has(> .bmd-wrap > .bmd-grid) .bmd-wrap {
  width: min(100% - 2rem, var(--bmd-wide));
  max-width: none;
}
.bmd-page section:has(> .bmd-wrap > .bmd-grid) > .bmd-wrap > h2 {
  margin: 0 0 1.35rem;
  font-size: clamp(1.15rem, 1.7vw, 1.35rem);
  font-weight: 650;
  letter-spacing: -0.01em;
  text-align: center;
}
.bmd-page .bmd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem 1.75rem;
  margin-top: 0.35rem;
  align-items: stretch;
  justify-items: stretch;
}
.bmd-page .bmd-grid article {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
  padding: 1.15rem 1.1rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(16, 19, 26, 0.06);
  border-radius: 2px;
  text-align: left;
}
.bmd-page .bmd-soft .bmd-grid article {
  background: rgba(255, 255, 255, 0.72);
}
.bmd-page .bmd-grid h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--bmd-accent);
}
.bmd-page .bmd-grid h3 a {
  color: inherit;
  text-decoration: none;
}
.bmd-page .bmd-grid p {
  margin: 0;
  max-width: none;
  color: var(--bmd-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}
.bmd-page .bmd-soft {
  background:
    linear-gradient(180deg, var(--bmd-cream) 0%, var(--bmd-cream-2) 100%);
}
.bmd-page .bmd-faq .bmd-faq-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--bmd-line);
}
.bmd-page .bmd-faq-q {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--bmd-ink);
}
.bmd-page .bmd-faq-a {
  margin: 0;
  color: var(--bmd-muted);
}
.bmd-page .bmd-cta-band {
  background:
    radial-gradient(700px 280px at 20% 0%, rgba(154, 123, 79, 0.22), transparent 60%),
    linear-gradient(145deg, #0b0d12, #171b24);
  color: #fff;
  border-top: 0;
}
.bmd-page .bmd-cta-band h2,
.bmd-page .bmd-cta-band p { color: #fff; }
.bmd-page .bmd-cta-band .bmd-btn-primary {
  background: #fff;
  color: var(--bmd-ink) !important;
}
.bmd-page .bmd-cta-band .bmd-btn-secondary {
  border-color: rgba(255,255,255,0.6);
  color: #fff !important;
}
.bmd-page .bmd-disclaimer {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.88rem;
}
.bmd-page .bmd-article-body {
  max-width: 760px;
}
.bmd-page .bmd-article-body h2 {
  margin-top: 2rem;
}
.bmd-page .bmd-article-body h1 { color: #fff; }

.bmd-page .bmd-share {
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--bmd-line);
  background: var(--bmd-cream);
}
.bmd-page .bmd-share h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}
.bmd-page .bmd-share-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 0.75rem;
}
.bmd-page .bmd-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(16, 19, 26, 0.14);
  border-radius: 2px;
  background: #fff;
  color: var(--bmd-ink) !important;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none !important;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.bmd-page .bmd-share-btn:hover {
  transform: translateY(-1px);
  border-color: var(--bmd-accent);
  background: #fff;
}

/* Premium project / portfolio cards */
.bmd-page .bmd-projects {
  width: min(100% - 2rem, var(--bmd-wide));
  margin-inline: auto;
}
.bmd-page .bmd-project {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: stretch;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  padding: clamp(1.25rem, 2.5vw, 1.85rem);
  background:
    linear-gradient(165deg, rgba(255,255,255,0.92) 0%, rgba(244,241,234,0.88) 100%);
  border: 1px solid rgba(16, 19, 26, 0.08);
  border-radius: 4px;
  box-shadow: 0 18px 50px rgba(16, 19, 26, 0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.bmd-page .bmd-project:hover {
  transform: translateY(-4px);
  border-color: rgba(154, 123, 79, 0.35);
  box-shadow: 0 26px 60px rgba(16, 19, 26, 0.1);
}
.bmd-page .bmd-project-media {
  display: grid;
  gap: 0.85rem;
}
.bmd-page .bmd-project-media a {
  display: block;
  overflow: hidden;
  border-radius: 3px;
  background: #0b0d12;
}
.bmd-page .bmd-project-media img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.bmd-page .bmd-project:hover .bmd-project-media img {
  transform: scale(1.03);
}
.bmd-page .bmd-project-hero-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.bmd-page .bmd-project-full-img {
  max-height: 280px;
  object-fit: cover;
  object-position: top center;
}
.bmd-page .bmd-project-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.25rem 0.15rem;
}
.bmd-page .bmd-project-label {
  margin: 0 0 0.75rem;
  color: var(--bmd-accent);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.bmd-page .bmd-project h3 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--bmd-ink);
  font-weight: 650;
}
.bmd-page .bmd-project h3 a {
  color: inherit;
  text-decoration: none;
}
.bmd-page .bmd-project-lede,
.bmd-page .bmd-project-body {
  margin: 0 0 1rem;
  max-width: 52ch;
  color: var(--bmd-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}
.bmd-page .bmd-project-services {
  margin: 0 0 1.35rem;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
}
.bmd-page .bmd-project-services li {
  margin: 0;
  padding-left: 0.9rem;
  position: relative;
  color: var(--bmd-ink);
  font-size: 0.82rem;
  line-height: 1.4;
}
.bmd-page .bmd-project-services li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--bmd-accent);
}
.bmd-page .bmd-project .bmd-cta-row {
  margin-top: 0.25rem;
}

@media (max-width: 1100px) {
  .bmd-page .bmd-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.35rem;
  }
}
@media (max-width: 900px) {
  .bmd-page .bmd-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .bmd-page section:has(> .bmd-wrap > .bmd-grid) > .bmd-wrap > h2 {
    text-align: left;
  }
  .bmd-page h1 { max-width: 22ch; }
  .bmd-page .bmd-project {
    grid-template-columns: 1fr;
  }
  .bmd-page .bmd-project-services {
    grid-template-columns: 1fr;
  }
  .bmd-page .bmd-project-full-img {
    max-height: 220px;
  }
}

/* Russian landing: longer headings/CTAs without changing the design system */
body.bmd-lang-ru .bmd-page h1,
.bmd-page.bmd-lang-ru h1 {
  max-width: 28ch;
  font-size: clamp(1.7rem, 4vw, 3.1rem);
  line-height: 1.18;
}
body.bmd-lang-ru .bmd-page .bmd-lede,
.bmd-page.bmd-lang-ru .bmd-lede {
  max-width: 70ch;
}
body.bmd-lang-ru .bmd-page .bmd-btn,
.bmd-page.bmd-lang-ru .bmd-btn {
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  max-width: 100%;
}
body.bmd-lang-ru .bmd-page h2,
.bmd-page.bmd-lang-ru h2 {
  max-width: 36ch;
  line-height: 1.28;
}
body.bmd-lang-ru .bmd-page .bmd-grid article h3,
.bmd-page.bmd-lang-ru .bmd-grid article h3 {
  font-size: 0.98rem;
  line-height: 1.35;
}
@media (max-width: 900px) {
  body.bmd-lang-ru .bmd-page h1,
  .bmd-page.bmd-lang-ru h1 {
    max-width: none;
    font-size: clamp(1.55rem, 6.2vw, 2.15rem);
  }
  body.bmd-lang-ru .bmd-page h2,
  .bmd-page.bmd-lang-ru h2 {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bmd-page .bmd-btn,
  .bmd-page .bmd-project,
  .bmd-page .bmd-project-media img { transition: none; }
}

/* Practice layout fixes (1.4.3) — kill false grid-row span dead space */
@media (min-width: 900px) {
  .bmd-page .bmd-soft > .bmd-wrap:not(:has(.bmd-grid)):not(:has(ul)):not(:has(.bmd-steps)):not(:has(form)):not(:has(.bmd-pillars)):has(> h2):has(> p) {
    display: grid !important;
    grid-template-columns: minmax(16rem, 0.9fr) minmax(0, 1.25fr) !important;
    grid-template-rows: auto !important;
    column-gap: clamp(2rem, 5vw, 4.5rem) !important;
    row-gap: 1rem !important;
    align-items: start !important;
  }
  .bmd-page .bmd-soft > .bmd-wrap:not(:has(.bmd-grid)):not(:has(ul)):not(:has(.bmd-steps)):not(:has(form)):not(:has(.bmd-pillars)):has(> h2):has(> p) > h2 {
    grid-column: 1 !important;
    grid-row: 1 !important;
    max-width: 14ch !important;
    margin-bottom: 0 !important;
  }
  .bmd-page .bmd-soft > .bmd-wrap:not(:has(.bmd-grid)):not(:has(ul)):not(:has(.bmd-steps)):not(:has(form)):not(:has(.bmd-pillars)):has(> h2):has(> p) > p {
    grid-column: 2 !important;
    max-width: none !important;
  }
}

/* Spacing tighten 1.4.3b */
.bmd-page section,
.bmd-page .bmd-soft,
.bmd-page section.bmd-soft {
  padding-top: clamp(2rem, 4vw, 3.25rem) !important;
  padding-bottom: clamp(2rem, 4vw, 3.25rem) !important;
}
@media (min-width: 1100px) {
  .bmd-page .bmd-grid {
    grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)) !important;
  }
}
