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

:root {
  --bg: #E8EEF5;
  --surface: #FFFFFF;
  --text: #0C1B33;
  --muted: #5A6B82;
  --accent: #2563EB;
  --accent-soft: #93C5FD;
  --line: rgba(37, 99, 235, 0.18);
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

html { height: 100%; overflow: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100svh;
  max-height: 100svh;
  -webkit-font-smoothing: antialiased;
}

.slant-bg {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 48%, rgba(37, 99, 235, 0.06) 48%, rgba(37, 99, 235, 0.06) 52%, transparent 52%),
    linear-gradient(180deg, #F8FAFC 0%, var(--bg) 100%);
  pointer-events: none;
  z-index: 0;
}

.hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 46% 54%;
  height: 100svh;
  max-height: 100svh;
  overflow: hidden;
  opacity: 0;
}

.hero__panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--surface);
  border-right: none;
  box-shadow: 8px 0 40px rgba(12, 27, 51, 0.06);
  overflow: hidden;
}

.panel-head { flex-shrink: 0; opacity: 0; }

.panel-head__brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.panel-head__brand em { font-style: italic; color: var(--accent); }

.panel-head__route {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.panel-head__tag {
  font-size: clamp(0.86rem, 1.3vw, 0.98rem);
  color: var(--muted);
  line-height: 1.55;
  max-width: 22rem;
  padding-left: 0.85rem;
  border-left: 2px solid var(--accent-soft);
}

.panel-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 1rem 0;
  opacity: 0;
}

.panel-main__title {
  font-family: var(--font-body);
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.6rem;
  max-width: 26ch;
  letter-spacing: -0.02em;
}

.panel-main__lead {
  font-size: clamp(0.84rem, 1.25vw, 0.94rem);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.15rem;
  max-width: 28rem;
}

.panel-main__btn {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.9rem 1.75rem;
  margin-bottom: 1.25rem;
  background: var(--text);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.panel-main__btn:hover { background: var(--accent); }

.slide-show { opacity: 0; }

.slide-show__head {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
}

.slide-show__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--accent);
  font-style: italic;
}

.slide-show__of {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.slide-show__stage {
  position: relative;
  min-height: clamp(5.5rem, 11vw, 6.75rem);
}

.slide-phrase {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-28px);
  pointer-events: none;
}

.slide-phrase.is-active {
  visibility: visible;
  pointer-events: auto;
}

.slide-phrase__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.slide-phrase__text {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
}

.panel-foot { flex-shrink: 0; opacity: 0; }

.panel-foot__text { font-size: 0.72rem; color: var(--muted); }

.hero__visual {
  position: relative;
  overflow: hidden;
  height: 100%;
  background: #CBD5E1;
}

.hero-image {
  position: absolute;
  inset: 0;
  clip-path: polygon(8% 0, 100% 0, 100% 100%, 0 100%);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.hero__slant {
  position: absolute;
  top: 0;
  left: 0;
  width: 12%;
  height: 100%;
  background: var(--surface);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 2;
}

.hero__btn-wrap { display: none; }

.hero__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.65rem;
  background: var(--text);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  opacity: 0;
  transform: translateY(12px);
  cursor: pointer;
}

.hero__btn:hover { background: var(--accent); }

@media (max-width: 768px) {
  html, body { height: auto; min-height: 100svh; max-height: none; overflow-x: hidden; overflow-y: auto; }

  .hero {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100svh;
    max-height: none;
    overflow: visible;
  }

  .hero__visual {
    order: 1;
    height: 65svh;
    min-height: 65svh;
    max-height: 65svh;
    flex-shrink: 0;
  }

  .hero-image { clip-path: none; }

  .hero__slant { display: none; }

  .hero__panel {
    order: 2;
    height: auto;
    flex: none;
    justify-content: flex-start;
    padding: 1.15rem;
    padding-bottom: max(4.5rem, calc(1.15rem + env(safe-area-inset-bottom)));
    box-shadow: none;
    border-top: 1px solid var(--line);
    overflow: visible;
  }

  .panel-main {
    flex: none;
    min-height: auto;
    justify-content: flex-start;
    overflow: visible;
    padding: 0;
  }

  .panel-main__title {
    font-size: 1.2rem;
    line-height: 1.32;
    margin-bottom: 0.5rem;
    max-width: none;
  }

  .panel-main__lead {
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
  }

  .slide-show {
    flex-shrink: 0;
    overflow: visible;
  }

  .slide-show__stage {
    min-height: 0;
    height: auto;
  }

  .slide-phrase {
    position: relative;
    inset: auto;
    display: none;
    transform: none;
  }

  .slide-phrase.is-active {
    display: block;
  }

  .slide-phrase__text {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .panel-main__btn { display: none; }
  .panel-foot { display: none; }

  .hero__btn-wrap {
    display: flex;
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    justify-content: center;
    z-index: 3;
    padding: 0 1rem;
    pointer-events: none;
  }

  .hero__btn {
    pointer-events: auto;
    max-width: 100%;
    text-align: center;
    white-space: normal;
  }

  .site-foot--dock {
    padding-bottom: max(0.65rem, env(safe-area-inset-bottom));
  }
}

.requisites { position: relative; display: inline-flex; }

.requisites__btn {
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  padding: 0.38rem 0.7rem;
  cursor: pointer;
}

.requisites__popup {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 0;
  min-width: 15rem;
  padding: 0.8rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(12, 27, 51, 0.12);
  z-index: 200;
}

.requisites__popup[hidden] { display: none !important; }

.requisites__label {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.12rem;
}

.requisites__field { font-size: 0.78rem; line-height: 1.4; }
.requisites__field + .requisites__field { margin-top: 0.5rem; }
.requisites--panel { margin-top: 0.6rem; }

.site-foot--dock {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: 0.65rem 0.85rem;
  pointer-events: none;
}

.site-foot--dock .requisites { pointer-events: auto; }

@media (min-width: 769px) { .site-foot--dock { display: none; } }
@media (max-width: 768px) { .requisites--panel { display: none; } }

.thanks-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow: auto;
}

.thanks {
  width: min(100%, 26rem);
  padding: 2.5rem 1.5rem 5rem;
  text-align: center;
  opacity: 0;
}

.thanks__icon {
  position: relative;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.5rem;
}

.thanks__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  background: var(--surface);
}

.thanks__check {
  position: absolute;
  inset: 0;
  width: 55%;
  height: 55%;
  margin: auto;
  color: var(--accent);
}

.thanks__title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5vw, 2rem);
  margin-bottom: 0.85rem;
}

.thanks__text {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.thanks__back {
  display: inline-flex;
  padding: 0.9rem 1.65rem;
  background: var(--text);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.site-foot--thanks {
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 0.75rem 1rem;
  opacity: 0;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lead-modal[hidden] { display: none !important; }

.lead-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 27, 51, 0.5);
  backdrop-filter: blur(4px);
}

.lead-modal__dialog {
  position: relative;
  width: min(100%, 22rem);
  padding: 1.5rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(12, 27, 51, 0.15);
}

.lead-modal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.lead-modal__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.15rem;
  padding-right: 1.75rem;
}

.lead-form__field { display: block; margin-bottom: 0.85rem; }

.lead-form__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.lead-form__input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
}

.lead-form__input:focus { outline: none; border-color: var(--accent); }

.lead-form__textarea { resize: vertical; min-height: 4.5rem; }

.lead-form__submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.9rem;
  background: var(--text);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.lead-form__submit:hover { background: var(--accent); }

body.lead-modal-open { overflow: hidden; }
