/* hero.css — статичный первый экран, перенесён из Next-проекта loyerlanding
   (components/ProtectionJourney.tsx → секция .architecture-hero + app/globals.css).
   Ни один класс отсюда не пересекается с style.min.css клона — проверено. */

:root {
  /* В Next это подставлял next/font. Здесь оставляем Manrope, который у клона
     уже self-hosted в /fonts. Без этой строки var(--font-sans-var) была бы
     невалидной и весь font-family отваливался бы в наследование. */
  --font-sans-var: "Manrope";
  --font-display: Georgia, "Times New Roman", serif;

  --page: #04060e;
  --text: #ffffff;
  --muted: #a9b3cd;
  --quiet: #96a0ba;
  --accent-soft: #9db2ff;
  --brand-gradient: linear-gradient(135deg, #7b4bff 0%, #2f6bff 100%);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --photo-grade: saturate(0.82) contrast(1.06) brightness(0.92);
}

/* ── каркас ───────────────────────────────────────────────────────────── */

/* z-index 2 поднимает hero над фиксированными слоями клона: канвас .themis
   и заливка .color сидят на z-index -3, поэтому перекрываются естественно. */
.architecture-hero {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: calc(100svh - var(--header-h, 5.2rem));
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-sans-var), "Manrope", system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.008em;
  -webkit-font-smoothing: antialiased;
}

.architecture-hero * { box-sizing: border-box; }

.container-site {
  width: min(100%, 90rem);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 4.5rem);
}

/* ── портрет ──────────────────────────────────────────────────────────── */

.architecture-portrait {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  width: min(66vw, 82rem);
  height: 100%;
  overflow: hidden;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 22%, #000 100%),
    linear-gradient(to bottom, transparent 0, #000 6%, #000 100%);
  mask-image:
    linear-gradient(to right, transparent 0, #000 22%, #000 100%),
    linear-gradient(to bottom, transparent 0, #000 6%, #000 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* В Next это делал <Image fill>. Здесь тот же эффект вручную. */
.architecture-portrait img {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  top: auto;
  width: 100%;
  height: 94%;
  object-fit: cover;
  object-position: center top;
  filter: var(--photo-grade);
}

.architecture-portrait-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--page), transparent 30%, transparent 78%, rgba(0, 0, 0, 0.72)),
    linear-gradient(0deg, var(--page), transparent 34%, transparent 100%);
}

/* ── текстовая колонка ────────────────────────────────────────────────── */

.architecture-hero-content {
  position: relative;
  z-index: 7;
  display: flex;
  flex: 1;
  min-height: inherit;
  align-items: center;
}

.architecture-hero-copy {
  width: min(54rem, 66vw);
  padding-block: clamp(4rem, 8vh, 7rem);
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--accent-soft);
  opacity: 0.95;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.font-display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
}

.architecture-hero-title {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: clamp(4.2rem, 5.8vw, 6.25rem);
  line-height: 1.01;
  letter-spacing: -0.03em;
}

.architecture-hero-title > span { width: max-content; max-width: 100%; white-space: nowrap; }
.architecture-hero-title > span:not(:first-child) { font-weight: 400; letter-spacing: -0.035em; }

.text-brand-highlight {
  position: relative;
  width: max-content;
  max-width: 100%;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.text-brand-highlight::before {
  position: absolute;
  z-index: -1;
  inset: 18% -10% 6%;
  background: rgba(109, 60, 255, 0.28);
  filter: blur(3rem);
  content: "";
}

.architecture-lead {
  max-width: 42rem;
  margin: 2rem 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.75;
}

/* ── кнопки ───────────────────────────────────────────────────────────── */

.hero-actions { display: flex; align-items: center; gap: 2rem; margin-top: 2.15rem; flex-wrap: wrap; }

.btn-primary, .btn-text {
  display: inline-flex;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.095em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  position: relative;
  border: 0;
  border-radius: 0.55rem;
  padding-inline: 1.9rem;
  background: var(--brand-gradient);
  box-shadow: 0 0.9rem 2.2rem rgba(79, 62, 255, 0.32);
  color: #fff;
  transition: box-shadow 220ms ease, transform 220ms var(--ease-out), filter 220ms ease;
}

.btn-primary:hover { box-shadow: 0 1.1rem 2.8rem rgba(79, 62, 255, 0.48); filter: saturate(1.1) brightness(1.06); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0) scale(0.985); }

.btn-text { justify-content: flex-start; color: var(--text); }
.btn-text span { color: currentColor; transition: transform 220ms var(--ease-out); }
.btn-text:hover span { transform: translate(0.15rem, -0.15rem); }

/* ── реестровые данные ────────────────────────────────────────────────── */

.architecture-proof { display: flex; gap: clamp(2rem, 5vw, 5rem); margin: clamp(2.5rem, 5vh, 4.75rem) 0 0; padding: 0; }
.architecture-proof div { position: relative; padding-left: 1rem; }
.architecture-proof div::before { position: absolute; top: 0.2rem; bottom: 0.2rem; left: 0; width: 2px; background: var(--brand-gradient); content: ""; }
.architecture-proof dt { color: var(--quiet); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.architecture-proof dd { margin: 0.25rem 0 0; font-size: 1rem; }

/* ── стык с клоном ────────────────────────────────────────────────────── */

/* Рельса точек и кнопка «Написать» ведут себя как 3D-фигура: они всегда
   на странице, никуда не «появляются», а просто лежат СЛОЕМ НИЖЕ hero.
   Прокрутка сдвигает hero вверх — и они выезжают из-под него.

   Раньше здесь был переключатель видимости по классу past-hero: рельса
   возникала на пороге скролла. Это читалось как всплывающий элемент и
   успевало наложиться на hero. Слой решает ту же задачу без скрипта,
   без порога и без кадра, в котором меню лежит поверх первого экрана.

   Канвас .themis и заливка .color сидят на z-index -3, hero — на 2.
   Ставим обвязку между ними: над сценой, под hero.

   Только для широких экранов: на узких .dots — это не рельса, а панель,
   которую открывает бургер, и она обязана быть поверх всего. */
@media (min-width: 769px) {
  .dots,
  .to-contact {
    z-index: 1;
  }
}

/* ── адаптив (перенесён как есть) ─────────────────────────────────────── */

@media (max-width: 1180px) {
  .architecture-hero-title { font-size: clamp(3.6rem, 6.4vw, 5.5rem); }
}

@media (max-width: 900px) {
  .architecture-portrait { width: 74vw; opacity: 0.72; }
  .architecture-hero-copy { width: 78vw; }
  .architecture-portrait-shade {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.9), transparent 74%),
      linear-gradient(180deg, rgba(4, 6, 14, 0.34) 0%, rgba(4, 6, 14, 0.26) 16%, rgba(4, 6, 14, 0.74) 36%, var(--page) 74%);
  }
}

@media (max-width: 767px) {
  .architecture-hero { min-height: calc(100svh - var(--header-h, 5.2rem)); padding-block: 0; }
  .architecture-portrait {
    width: 100%;
    opacity: 0.58;
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0, #000 60%, transparent 100%);
  }
  /* Вертикальная шторка в зоне текста: без неё надзаголовок ложился на светлую
     скулу и давал 3.67:1 при норме 4.5:1. Лицо в верхней трети остаётся открытым. */
  .architecture-portrait-shade {
    background:
      linear-gradient(90deg, rgba(0, 0, 0, 0.88), transparent 78%),
      linear-gradient(180deg, rgba(4, 6, 14, 0.34) 0%, rgba(4, 6, 14, 0.24) 16%, rgba(4, 6, 14, 0.72) 36%, var(--page) 74%);
  }
  .architecture-hero-content { align-items: flex-end; }
  .architecture-hero-copy { width: 100%; padding-block: 5rem 3rem; }
  .architecture-hero-title { font-size: clamp(3rem, 13.8vw, 4.5rem); line-height: 1.01; }
  .architecture-hero-title > span { white-space: normal; }
  .architecture-lead { max-width: 31rem; font-size: 0.95rem; }
  .architecture-proof { gap: 1.5rem; margin-top: 2.5rem; }
}

@media (max-width: 430px) {
  .architecture-hero-title { font-size: clamp(2.75rem, 13vw, 3.55rem); }
  .architecture-hero-copy { padding-bottom: 2.5rem; }
  .architecture-proof { flex-direction: column; gap: 1rem; }
}
