/* Shared adjustments, loaded after the page styles. */
:root {
  --header: 92px;
}

body.services-dialog-open {
  overflow: hidden;
}

/* The complete approved artwork keeps its original colors and proportions.
   Transparent canvas around the artwork remains visible and is not clipped. */
:root .brand {
  --brand-image-width: 282px;
  position: relative;
  display: inline-block;
  width: var(--brand-image-width);
  min-width: 0;
  max-width: 100%;
  height: calc(var(--brand-image-width) * 0.217);
  overflow: visible;
}

:root .brand .brand__logo {
  position: absolute;
  top: calc(50% - 1.5mm);
  left: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
  filter: none;
  pointer-events: none;
  transform: translateY(-44.1%);
}

:root [data-client-form] .fk-honeypot {
  position: absolute;
  width: 1px;
  min-width: 0;
  max-width: 1px;
  height: 1px;
  min-height: 0;
  max-height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

:root [data-field-error]:not([hidden]) {
  display: block;
  margin: 7px 0 0;
  color: #a8322a;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

:root :is([data-request-status], [data-booking-status]) {
  color: #325548;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

:root :is([data-request-status], [data-booking-status]):is([data-state="error"], .is-error) {
  color: #a8322a;
}

:root .site-header {
  height: var(--header);
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  padding: 0 32px;
}

:root .site-header .brand {
  --brand-image-width: 282px;
  flex: none;
  margin-left: 54px;
}

:root .site-header .nav {
  position: static;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8mm;
  width: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:root .site-header .nav a:not(.button) {
  flex-shrink: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

:root .site-header .button--nav {
  box-sizing: border-box;
  margin-inline-start: 7mm;
  flex-shrink: 0;
  min-width: max-content;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: nowrap;
  overflow: visible;
}

:root .site-header .lang-switch {
  justify-self: end;
  flex-shrink: 0;
  transform: none;
}

:root .site-header .lang-switch__btn {
  min-width: 36px;
  min-height: 36px;
  padding: 8px;
}

:root .site-header .menu-toggle {
  display: none;
  flex: none;
}

/* Scope state colors to CTA components so navigation hover cannot recolor them. */
:root .button,
:root .button:is(:hover, :active, :focus-visible, :visited, :disabled, [aria-disabled="true"], [aria-busy="true"]),
:root .site-header .nav .button,
:root .site-header .nav .button:is(:hover, :active, :focus-visible, :visited) {
  color: #fff;
  text-align: center;
  overflow-wrap: anywhere;
}

:root .button:is(.button--primary, .button--gold):hover {
  background: var(--green-700);
  border-color: var(--green-700);
}

/* Keep an opaque base under the gradient while the hover color transitions. */
:root .button--gold {
  background-color: var(--green-800);
}

:root .button:is(.button--primary, .button--gold):active {
  background: var(--green-900);
  border-color: var(--green-900);
  transform: none;
}

:root .button--glass:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

:root .button--glass:active {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.7);
}

:root .button:focus-visible {
  outline: 3px solid #4c9270;
  outline-offset: 4px;
}

:root :is(.home-submit, .home-send, .benefits-cta__button, .services-cta__button, .contacts-button, .services-booking__request, .services-booking__submit, .services-booking__contact),
:root :is(.home-submit, .home-send, .benefits-cta__button, .services-cta__button, .contacts-button, .services-booking__request, .services-booking__submit, .services-booking__contact):is(:hover, :active, :focus-visible, :visited, :disabled, [aria-busy="true"]),
:root .fk-footer--reference .fk-footer__request button,
:root .fk-footer--reference :is(.fk-footer__copy, .fk-footer__send):is(:hover, :active, :focus-visible, :visited) {
  color: #fff;
}

:root :is(.button, .home-submit, .home-send, .benefits-cta__button, .services-cta__button, .contacts-button, .services-booking__request, .services-booking__submit, .services-booking__contact, .fk-footer__request button, .fk-footer__copy, .fk-footer__send) :is(span, svg) {
  color: inherit;
}

:root :is(.button, .home-submit, .home-send, .services-booking__request, .services-booking__submit):is(:disabled, [aria-busy="true"]) {
  color: #fff;
  background: #426b57;
  border-color: #426b57;
  opacity: 1;
}

:root :is(.home-copy, .home-contact__telegram):is(:hover, :active, :focus-visible, :visited) {
  color: #2c6331;
  border-color: #477e3d;
}

/* Brand-led hero: restrained copy on the quiet side of the photograph. */
:root .hero {
  min-height: clamp(510px, 41.67vw, 650px);
  background: var(--green-950);
}

:root .hero__media picture {
  display: block;
  width: 100%;
  height: 100%;
}

:root .hero__media img {
  object-position: center;
}

:root .hero__shade {
  background: linear-gradient(90deg, rgba(7, 31, 24, 0.93) 0%, rgba(7, 31, 24, 0.84) 28%, rgba(7, 31, 24, 0.6) 40%, rgba(7, 31, 24, 0.08) 48%, transparent 58%);
}

:root .hero__inner {
  width: min(550px, calc(100% - 64px));
  max-width: 550px;
  margin-left: max(28px, calc((100vw - 1364px) / 2));
  margin-right: auto;
  padding: 54px 0;
}

:root .hero h1 {
  max-width: 550px;
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 3.35vw, 3.025rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}

:root .hero .lead {
  max-width: 525px;
  margin-bottom: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
}

:root .hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

:root .hero__actions .button {
  min-height: 48px;
  padding: 13px 18px;
  font-size: 0.91rem;
  line-height: 1.4;
  box-shadow: none;
}

:root .hero .trust-line {
  display: block;
  max-width: 470px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  backdrop-filter: none;
}

:root :is(.benefits-banner__title, .services-banner__title, .contacts-banner__title, .benefits-intro__title, .benefits-help-card__title, .services-card__title, .contacts-details__title) {
  overflow-wrap: anywhere;
  hyphens: auto;
}

:root .topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

:root .topic-pill {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

:root .topic-pill > span:not(.icon) {
  min-width: 0;
}

:root .topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

:root .topic-pill {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}

:root .topic-pill > span:not(.icon) {
  min-width: 0;
}

@media (max-width: 1535px) {
  :root .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
  }

  :root .site-header .brand {
    margin-left: 0;
  }

  :root .site-header .nav {
    position: fixed;
    justify-self: stretch;
    top: var(--header);
    left: 24px;
    right: 24px;
    display: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: auto;
    max-height: calc(100vh - var(--header) - 24px);
    max-height: calc(100dvh - var(--header) - 24px);
    padding: 18px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  :root body.menu-open .site-header .nav {
    display: grid;
  }

  :root .site-header .nav a:not(.button),
  :root .site-header .nav .button {
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin-inline-start: 0;
    padding: 13px 16px;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  :root .site-header .menu-toggle {
    display: block;
  }
}

/* The tablet view retains the whole desktop team photograph; phones use
   the separate crop supplied in the picture element. Copy sits below it. */
@media (max-width: 1024px) {
  :root .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :root .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  :root .hero {
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #fff;
  }

  :root .hero__media {
    position: relative;
    inset: auto;
    z-index: 0;
    flex: none;
    width: 100%;
    height: clamp(300px, 41.67vw, 420px);
  }

  :root .hero__shade {
    display: none;
  }

  :root .hero__inner {
    width: min(720px, calc(100% - 48px));
    max-width: none;
    margin-inline: auto;
    padding: 34px 0 40px;
  }

  :root .hero h1 {
    max-width: 700px;
    color: var(--green-950);
    font-size: clamp(1.9rem, 4.2vw, 2.5rem);
  }

  :root .hero .lead,
  :root .hero .trust-line {
    max-width: 650px;
    color: #52615c;
  }

  :root .hero__actions .button--glass {
    background: var(--green-700);
    border-color: var(--green-700);
    backdrop-filter: none;
  }

  :root .hero__actions .button--glass:hover {
    background: var(--green-800);
    border-color: var(--green-800);
  }

  :root .hero__actions .button--glass:active {
    background: var(--green-900);
    border-color: var(--green-900);
  }
}

@media (max-width: 720px) {
  :root {
    --header: 80px;
  }

  :root .site-header {
    gap: 10px;
    padding-inline: 16px;
  }

  :root .topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  :root .topic-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  :root .site-header .brand {
    --brand-image-width: 250px;
    margin-left: 0;
  }

  :root .site-header .menu-toggle {
    width: 42px;
    height: 42px;
    padding: 10px;
    border-radius: 10px;
  }

  :root .site-header .nav {
    left: 12px;
    right: 12px;
    padding: 12px;
  }

  :root .hero__media {
    height: clamp(220px, 66.67vw, 260px);
  }

  :root .hero__media img {
    width: 100%;
    object-position: center;
  }

  :root .hero__inner {
    width: calc(100% - 40px);
    padding: 28px 0 34px;
  }

  :root .hero h1 {
    margin-bottom: 16px;
    font-size: clamp(1.7rem, 7.6vw, 2.125rem);
    line-height: 1.15;
  }

  :root .hero .lead {
    font-size: 0.96rem;
    line-height: 1.6;
  }

  :root .hero__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-top: 24px;
  }

  :root .hero__actions .button {
    width: 100%;
    min-height: 48px;
    padding-inline: 14px;
  }

  :root :is(.benefits-banner, .benefits-banner__inner, .services-banner, .services-banner__inner, .contacts-banner, .contacts-banner__inner) {
    min-height: 220px;
  }

  :root :is(.benefits-banner__title, .services-banner__title, .contacts-banner__title) {
    max-width: 100%;
    font-size: clamp(1.7rem, 7.2vw, 2rem);
    line-height: 1.2;
  }

  :root .services-intro__photo img,
  :root .benefits-photo:not(.benefits-photo--team),
  :root .home-person__photo {
    width: 100%;
    max-height: 230px;
    object-fit: cover;
  }

  :root .benefits-photo--team {
    width: 100%;
    height: 280px;
    max-height: 300px;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

/* Two rows keep the raised artwork and language targets inside the header. */
@media (max-width: 560px) {
  :root {
    --header: 92px;
  }

  :root .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 56px 36px;
    gap: 0 10px;
    padding: 0 16px;
  }

  :root .site-header .brand {
    --brand-image-width: 230px;
    grid-column: 1;
    grid-row: 1;
  }

  :root .site-header .menu-toggle {
    grid-column: 2;
    grid-row: 1;
  }

  :root .site-header .lang-switch {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: end;
    gap: 2px;
    padding: 0;
    border: 0;
    background: transparent;
  }

  :root .site-header .lang-switch__btn {
    min-width: 36px;
    min-height: 36px;
    padding: 8px;
  }
}

:root .consultation-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}
:root .consultation-hero__copy { min-width: 0; }
:root .consultation-hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.15; overflow-wrap: anywhere; }
:root .consultation-hero img { width: 100%; min-width: 0; max-height: 340px; object-fit: cover; }
@media (max-width: 900px) {
  :root .consultation-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  :root .consultation-hero img { max-height: 230px; }
}
