/* ==========================================================================
   ENO.Legal — заглушка. Адаптивный одностраничник.
   Мобильный-first: базовые стили — для узких экранов, медиазапросы — вверх.
   ========================================================================== */

:root {
  /* Палитра */
  --green: #176742;
  --green-light: #1e7a50;
  --green-dark: #0e4a2f;
  --green-deep: #0c3f2a;
  --gold: #c2af7c;

  --ink: #151515;
  --ink-soft: #3c4741;
  --muted: #6b7671;
  --muted-light: #8a948f;

  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-hover: #f8fbf9;
  --surface-input: #fbfdfc;

  --line: #e1e8e4;
  --line-strong: #d7e0db;

  --danger: #b3261e;

  /* Ритм */
  --container: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-y: clamp(56px, 11vw, 88px);
  --radius: 4px;
  --radius-lg: 6px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Сброс и база
   -------------------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea { font: inherit; color: inherit; }

a {
  color: var(--green);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
a:hover { color: var(--green-dark); }

::selection { background: #c9ded4; color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  padding: 12px 18px;
  background: var(--surface);
  color: var(--green);
  font-weight: 500;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus-visible {
  left: 0;
  outline-offset: -2px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Логотип
   -------------------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand__mark { flex: none; }
.brand__name {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand--ink { color: var(--green); }
.brand--ink:hover { color: var(--green); }
.brand--ink .brand__name {
  color: var(--ink);
  font-size: 17px;
}

/* --------------------------------------------------------------------------
   Первый экран
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: var(--green);
  background-image: linear-gradient(155deg, var(--green-light) 0%, var(--green) 42%, var(--green-deep) 100%);
  padding-top: env(safe-area-inset-top);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 45%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(105deg, rgba(6, 35, 23, 0.88) 0%, rgba(9, 48, 32, 0.66) 46%, rgba(9, 48, 32, 0.18) 100%);
}

.hero__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: clamp(20px, 5vw, 32px);
}

.hero__contacts {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  white-space: nowrap;
}
.hero__phone {
  color: #fff;
  font-weight: 500;
}
.hero__mail { color: rgba(255, 255, 255, 0.72); }
.hero__phone:hover,
.hero__mail:hover { color: var(--gold); }

.hero__body {
  display: grid;
  gap: clamp(24px, 4vw, 40px);
  justify-items: start;
  padding-top: clamp(56px, 13vw, 120px);
  padding-bottom: clamp(64px, 14vw, 128px);
}

.hero .eyebrow { color: rgba(255, 255, 255, 0.62); }

.hero__title {
  max-width: 920px;
  font-size: clamp(32px, 7.4vw, 84px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
/* На узких экранах заголовок переносится по ширине,
   на широких — по строкам из макета */
.hero__line { display: inline; }

.hero__lede {
  max-width: 640px;
  font-size: clamp(16px, 2.2vw, 20px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  text-wrap: pretty;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.hero__cta svg { transition: transform 0.24s var(--ease); }
.hero__cta:hover {
  background: #fff;
  border-color: #fff;
  color: var(--green-dark);
}
.hero__cta:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Направления
   -------------------------------------------------------------------------- */

.directions {
  background: var(--surface);
  padding-block: var(--section-y) clamp(64px, 12vw, 96px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: clamp(28px, 5vw, 48px);
}
.section-note {
  font-size: 15px;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(268px, 100%), 1fr));
  gap: 1px;
}

.card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 168px;
  padding: 26px 24px 28px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  transition: background-color 0.2s var(--ease);
}
.card:hover { background: var(--surface-hover); }

.card__title {
  font-size: clamp(17px, 2.2vw, 19px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.card__text {
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Контакты и форма
   -------------------------------------------------------------------------- */

.contacts {
  border-top: 1px solid var(--line);
  padding-top: var(--section-y);
}

.contacts__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(36px, 6vw, 64px);
  align-items: start;
}

.contacts__intro {
  display: grid;
  gap: clamp(20px, 3vw, 28px);
  align-content: start;
}

.contacts__lede {
  max-width: 460px;
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.contact-list {
  max-width: 460px;
  border-top: 1px solid var(--line);
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 20px;
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.contact-row:hover { color: var(--green); }
.contact-row__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-row__value {
  font-size: clamp(17px, 2.4vw, 19px);
  font-weight: 500;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 5vw, 36px);
}

.form { display: grid; gap: 18px; }
.form[hidden] { display: none; }

.form__title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.field { display: grid; gap: 8px; }

.field__label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-input);
  color: var(--ink);
  font-size: 16px; /* < 16px вызывает зум на iOS */
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.field__input::placeholder { color: #9aa7a0; }
.field__input:hover { border-color: #c3d0c9; }
.field__input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(23, 103, 66, 0.12);
}
.field__input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.1);
}

.field__error {
  font-size: 13px;
  line-height: 1.4;
  color: var(--danger);
}

/* Ловушка для ботов */
.field--hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.btn {
  height: 56px;
  margin-top: 6px;
  border: none;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn:hover { background: var(--green-dark); }
.btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

.form__note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted-light);
}

.form__status {
  font-size: 14px;
  line-height: 1.45;
  color: var(--danger);
}
.form__status:empty { display: none; }

.form-success {
  display: grid;
  gap: 14px;
  justify-items: start;
  align-content: center;
  min-height: 300px;
}
.form-success[hidden] { display: none; }
.form-success__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e8f0ec;
  color: var(--green);
}
.form-success__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.form-success__text {
  font-size: 16px;
  line-height: 1.5;
  color: #4a5651;
}

.link-button {
  padding: 0;
  border: none;
  background: none;
  color: var(--green);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-button:hover { color: var(--green-dark); }

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */

.footer {
  padding-block: clamp(36px, 8vw, 56px) clamp(32px, 6vw, 48px);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.footer .brand { align-self: center; }

/* --------------------------------------------------------------------------
   Появление секций
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
}
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

/* --------------------------------------------------------------------------
   Контрольные точки
   -------------------------------------------------------------------------- */

@media (max-width: 559px) {
  .hero__mail { display: none; }
  .hero__bar { justify-content: space-between; }
}

@media (max-width: 359px) {
  .hero__contacts { display: none; }
}

@media (min-width: 700px) {
  .hero__line { display: block; }
  .card { padding: 28px 28px 30px; }
}

@media (min-width: 900px) {
  .contacts__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  :root { --gutter: 40px; }
}

/* --------------------------------------------------------------------------
   Доступность и печать
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal,
  .js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  .card { box-shadow: 0 0 0 1px #9fb0a7; }
  .hero__lede { color: rgba(255, 255, 255, 0.92); }
  .card__text { color: #4d5854; }
}

@media print {
  .hero {
    color: var(--ink);
    background: none;
  }
  .hero__media,
  .hero__scrim,
  .hero__cta,
  .form-card { display: none; }
  .hero .eyebrow,
  .hero__lede,
  .hero__phone,
  .hero__mail,
  .brand { color: var(--ink); }
  .card { break-inside: avoid; }
}
