/* ДОМ — taiga palette + inset content
   Colors from taiga live: warm #f9f7f5, ink/graphite #1a1a1a, white #fff */

:root {
  --white: #ffffff;
  --warm: #f9f7f5;
  --graphite: #1a1a1a;
  --ink: #1a1a1a;
  --ink-soft: #6b6b6b;
  --line: #e2ddd6;
  --media: #e6e1da;
  /* content width ~ red lines on annotation (~92–94vw usable); equal L/R */
  --max: 1680px;
  --pad: clamp(0.75rem, 2.2vw, 1.75rem);
  --font: "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gap: clamp(1.75rem, 4vw, 3rem);
  /* tagline: keep enlarged line from prior pass */
  --tagline-size: 1.36rem;
  --tagline-lh: 1.3;
  /* nav: half of previous 1.84rem → one line */
  --nav-size: 0.92rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Editable copy keeps user-entered spaces and line breaks, but may wrap safely. */
[data-edit-kind="text"] {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* Inset column — mandatory side fields */
.wrap {
  width: min(var(--max), calc(100% - (var(--pad) * 2)));
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* One shared 1440 px coordinate stage for editor and published pages. */
.dom-design-stage {
  width: 100%;
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
  overflow-x: clip;
  overflow-y: visible;
}

/* Structural sections are an invisible scaffold on one continuous white canvas. */
[data-dom-layout-container="true"] {
  background-color: var(--white) !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* Extra safety: page never loses side air on ultra-wide */
.site-header,
main,
.site-footer {
  padding-left: 0;
  padding-right: 0;
}

/* Header — warm like taiga header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  min-height: 140px;
  padding-block: 0.5rem;
}

.logo-link {
  display: block;
  line-height: 0;
  flex-shrink: 0;
}

.logo-link img {
  height: 130px;
  width: auto;
  display: block;
}

/* Right side: menu on top, tagline below, centered */
.header-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Tagline centered under menu, offset down by one line-height */
.brand-tagline {
  margin: 0;
  margin-top: calc(var(--tagline-size) * var(--tagline-lh));
  padding: 0;
  max-width: none;
  white-space: nowrap;
  text-align: center;
  font-size: var(--tagline-size);
  line-height: var(--tagline-lh);
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--ink-soft);
}

.nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 1.1rem;
}

.nav a {
  font-size: var(--nav-size);
  letter-spacing: 0.01em;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  flex-shrink: 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

.nav-cta {
  margin-left: 0.5rem;
}

.nav-toggle {
  display: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--ink);
  padding: 0.2rem 0;
  cursor: pointer;
}

.link-edit {
  display: inline-block;
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.link-edit:hover {
  opacity: 0.65;
}

/* Sections — taiga rhythm: white / warm / graphite */
.section {
  padding: clamp(3.25rem, 8vw, 6.5rem) 0;
  background: var(--white);
}

.section--warm {
  background: var(--white);
}

.section--graphite {
  background: var(--white);
  color: var(--ink);
}

.section--graphite .split-kicker,
.section--graphite .note {
  color: var(--ink-soft);
}

.section--graphite .media-slot {
  background: var(--media);
  color: #7a746c;
}

.section--graphite .link-edit {
  color: var(--ink);
}

.section--graphite .guarantees-block p {
  border-bottom-color: var(--line);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  width: 100%;
  max-width: none;
}

h2 {
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  width: 100%;
}

h3 {
  font-size: 1.1rem;
  font-weight: 500;
}

.lead,
.prose,
.prose p {
  font-size: clamp(1rem, 1.35vw, 1.1rem);
  width: 100%;
  margin: 0;
  color: inherit;
}

/* hero leads — 1.5× кегля (not 2×) */
.hero-copy .lead {
  font-size: clamp(1.45rem, 2.1vw, 1.7rem);
  line-height: 1.4;
  margin: 0;
  color: var(--ink);
}

.section:not(.section--graphite) .prose p,
.section:not(.section--graphite) .lead {
  color: var(--ink);
}

.prose p + p {
  margin-top: 0.95rem;
}

.note {
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin-top: 1.1rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.actions {
  margin-top: 1.5rem;
}

/* Split blocks */
.split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: var(--gap);
  align-items: center;
  width: 100%;
}

.split--top {
  align-items: start;
}

.split--reverse .split-text {
  order: 2;
}

.split--reverse .split-media {
  order: 1;
}

.split-text {
  width: 100%;
  min-width: 0;
}

.split-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
}

.media-slot {
  width: 100%;
  min-width: 0;
  background: var(--media);
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  color: #7a746c;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

.media-slot--wide {
  aspect-ratio: 21 / 9;
}

/* Hero: slider also inset in .wrap */
.hero {
  padding: clamp(1.25rem, 3vw, 2rem) 0 clamp(2.75rem, 6vw, 4.5rem);
  background: var(--white);
}

/* Hero wrap — wider: smaller side padding, equal L/R */
.hero .wrap {
  --pad: clamp(0.45rem, 1.2vw, 0.9rem);
  --max: 1920px;
}

.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--white);
}

.hero-slider .slides {
  display: flex;
  transition: transform 0.5s ease;
  height: min(64vh, 640px);
  min-height: 320px;
}

.hero-slider .slide {
  min-width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(120deg, #ebe7e1 0%, #d4cfc7 100%);
  color: #6a645c;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

/* A resized slide never exposes a neighbouring slide inside the same viewport. */
.hero-slider .slide:not(:first-child) {
  display: none;
}

.hero-slider .slide[data-slide-active="true"] {
  display: grid;
}

.hero-slider .slide[data-slide-active="false"],
.hero-slider .slide[hidden] {
  display: none !important;
}

.hero-controls {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  border: 0;
  background: transparent;
  color: #fff;
  mix-blend-mode: difference;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 2;
}

.hero-dots button {
  width: 7px;
  height: 7px;
  border: 0;
  padding: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button[aria-current="true"] {
  background: #fff;
  width: 22px;
}

/* Hero copy — cascade layout: H1 → lead A → CTA+lead B side by side */
.hero-copy {
  display: flex;
  flex-direction: column;
  padding: clamp(2.5rem, 5vw, 3.75rem) 5.5% 0 5.5%;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

/* H1: two lines, line2 indented right */
.hero-title {
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  font-size: clamp(1.85rem, 4vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 clamp(1.8rem, 3.5vw, 2.5rem) 0;
  width: 100%;
}

.hero-title-a {
  text-align: left;
  max-width: 47%;
}

.hero-title-b {
  text-align: left;
  margin-left: 22%;
  max-width: 54%;
}

/* lead A — left, ~48% width */
.hero-lead-a {
  text-align: left;
  max-width: 48%;
  margin-bottom: clamp(1.2rem, 2.5vw, 1.8rem);
}

/* bottom row: CTA left + lead B right */
.hero-bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

/* CTA — left */
.hero-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

/* lead B — starts at ~44% of viewport */
.hero-lead-b {
  text-align: right;
  max-width: 42%;
  margin-left: auto;
}

.hero-foot .note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.hero-foot .actions {
  margin-top: 0;
}

/* Guarantees: vertical center in split row */
#guarantees .split {
  align-items: center;
  min-height: 280px;
}

#guarantees .split-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.guarantees-block {
  width: 100%;
  display: grid;
  gap: 0.1rem;
  font-size: clamp(1.05rem, 1.55vw, 1.2rem);
  line-height: 1.45;
  margin-top: 0.75rem;
}

.guarantees-block p {
  margin: 0;
  width: 100%;
  padding-block: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.guarantees-block p:last-child {
  border-bottom: 0;
}

.guarantees-block .g-sub {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.58);
}

/* Money */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  width: 100%;
}

.cols-2 > * {
  width: 100%;
  min-width: 0;
}

.money-save {
  margin-top: 0.35rem;
  font-size: 1.08rem;
  font-weight: 500;
}

/* Form on warm */
.form-section {
  background: var(--white);
}

.form-grid {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.75rem;
}

.form-grid label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-grid label > span {
  min-width: 0;
}

.form-grid label.full {
  grid-column: 1 / -1;
}

.form-grid input[type="text"],
.form-grid input[type="tel"],
.form-grid input[type="email"] {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.75rem 0;
  font: inherit;
  color: var(--ink);
  background: transparent;
}

.form-grid input:focus {
  outline: none;
  border-bottom-width: 2px;
}

.check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.check input {
  margin-top: 0.2rem;
}

.form-success {
  display: none;
  width: 100%;
}

.form-shell.is-success .form-grid {
  display: none;
}

.form-shell.is-success .form-success {
  display: block;
}

.placeholder {
  width: 100%;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.75rem 0;
  color: var(--ink-soft);
}

.placeholder strong {
  display: block;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.35rem;
}

/* Footer graphite */
.site-footer {
  background: var(--white);
  color: var(--ink);
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--line);
}

.site-footer .placeholder {
  border-color: var(--line);
  color: var(--ink-soft);
}

.site-footer .placeholder strong {
  color: var(--ink);
}

.site-footer .footer-note {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  width: 100%;
}

.site-footer .logo-link img {
  height: 72px;
}

.site-footer .brand {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.site-footer .brand-tagline {
  margin-top: 0;
  color: var(--ink-soft);
  white-space: normal;
}

.stub {
  min-height: 48vh;
  display: grid;
  align-content: center;
  padding: 5rem 0;
  width: 100%;
  background: var(--white);
}

/* Published editor state. Geometry is supplied by site-runtime.js. */
[data-edit-key] {
  transform-origin: top left;
}


#dom-custom-elements {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1440px, 100%);
  height: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

#dom-custom-elements [data-dom-custom="true"] {
  position: absolute !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  pointer-events: auto;
}

#dom-custom-elements [data-edit-kind="text"] {
  min-width: 20px;
  min-height: 20px;
  color: var(--ink);
  background: transparent;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#dom-custom-elements [data-edit-kind="line"] {
  min-width: 20px;
  background: var(--ink);
}

[data-domlayout-deleted="true"] {
  display: none !important;
}

.domlayout-preserve-space {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.runtime-media {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  object-fit: cover;
}

iframe.runtime-media {
  background: #000;
}

/* Blog: deliberately simple so the future WordPress grid maps cleanly. */
.blog-page {
  min-height: 48vh;
  padding: clamp(3.25rem, 8vw, 6.5rem) 0;
  background: var(--white);
}

.blog-intro {
  margin-bottom: 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, var(--dom-card-width, 1fr)));
  gap: 24px;
  align-items: stretch;
  justify-content: start;
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  padding: 6%;
  background: var(--warm);
}

.blog-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0.75rem;
  text-align: center;
  color: #7a746c;
  background: var(--media);
  font-size: 0.82rem;
}

.blog-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding-top: 1rem;
}

.blog-card-title {
  display: -webkit-box;
  min-height: 2.6em;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-size: 1.05rem;
  line-height: 1.3;
}

.blog-card-excerpt {
  display: -webkit-box;
  min-height: 4.65em;
  margin: 0.8rem 0 1rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.55;
}

.blog-read {
  align-self: flex-start;
  margin-top: auto;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.3;
}

@media (max-width: 1100px) {
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, var(--dom-card-width, 1fr)));
  }
}

/* Between desktop and mobile the existing 1440 px header shrinks as one layout. */
@media (min-width: 961px) and (max-width: 1439px) {
  .header-bar {
    min-height: 9.7222vw;
    gap: 0.8333vw 2.2222vw;
    padding-block: 0.5556vw;
  }

  .logo-link img {
    height: 9.0278vw;
  }

  .header-right {
    gap: 0.4444vw;
  }

  .nav {
    gap: 0.3889vw 1.2222vw;
  }

  .nav a {
    font-size: 1.0222vw;
    padding-bottom: 0.1389vw;
  }

  .nav-cta {
    margin-left: 0.5556vw;
  }

  .brand-tagline {
    margin-top: 1.9644vw;
    font-size: 1.5111vw;
  }
}

@media (max-width: 960px) {
  :root {
    --pad: clamp(0.75rem, 3.5vw, 1.25rem);
    --tagline-size: 1rem;
    --nav-size: 0.92rem;
  }

  .logo-link img {
    height: 72px;
  }

  .brand-tagline {
    white-space: normal;
    max-width: 16rem;
  }

  .header-bar {
    min-height: 110px;
    flex-wrap: wrap;
  }

  .site-header .header-right {
    flex: 1 0 100%;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .site-header .brand-tagline {
    display: none;
    margin-top: 0;
    max-width: 100%;
    text-align: left;
  }

  .site-header .nav.is-open + .brand-tagline {
    display: block;
  }

  .nav {
    flex-wrap: wrap;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    gap: clamp(0.8rem, 2vw, 1.2rem);
    padding: clamp(1.5rem, 3vw, 2rem) 4% 0 4%;
  }

  .hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
    margin-bottom: clamp(0.8rem, 2vw, 1.2rem);
  }

  .hero-title-a {
    max-width: 100%;
  }

  .hero-title-b {
    margin-left: 15%;
    max-width: none;
  }

  .hero-lead-a {
    max-width: 100%;
    margin-bottom: clamp(0.6rem, 1.5vw, 1rem);
  }

  .hero-bottom {
    flex-direction: column;
    gap: clamp(0.6rem, 1.5vw, 1rem);
  }

  .hero-lead-b {
    max-width: 100%;
    text-align: left;
  }

  .hero-copy .lead {
    font-size: clamp(1.2rem, 4vw, 1.45rem);
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 0.75rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav-cta {
    margin-left: 0;
  }

  .split,
  .split--reverse,
  .cols-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .split--reverse .split-text,
  .split--reverse .split-media {
    order: initial;
  }

  #guarantees .split {
    min-height: 0;
  }

  .hero-slider .slides {
    height: min(48vh, 420px);
    min-height: 240px;
  }

  .blog-grid {
    gap: 16px;
  }

  [data-edit-key] {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
