/* =====================================================================
   АНО «Ай Лав Экономикс» — стили сайта ano.iloveeconomics.ru
   Один файл стилей для всех страниц. Цвета и размеры задаются
   переменными в блоке :root — меняйте их там, а не по всему файлу.
   ===================================================================== */

/* ---------- Шрифты (лежат в assets/fonts, лицензия SIL OFL 1.1) ---------- */
@font-face {
  font-family: "Tilda Sans";
  src: url("../fonts/TildaSans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Tilda Sans";
  src: url("../fonts/TildaSans-Medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Tilda Sans";
  src: url("../fonts/TildaSans-Semibold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Noto Serif Display";
  src: url("../fonts/noto-serif-display-cyrillic-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Noto Serif Display";
  src: url("../fonts/noto-serif-display-latin-300-normal.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Noto Serif Display";
  src: url("../fonts/noto-serif-display-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Noto Serif Display";
  src: url("../fonts/noto-serif-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ---------- Переменные ---------- */
:root {
  --navy-900: #101526;   /* самый тёмный фон: шапка, первый экран, подвал */
  --navy-800: #171d35;   /* фон раздела «Проекты» */
  --slate:    #363d56;   /* фон раздела «Документы», линии на светлом */
  --cream:    #fffaf2;   /* светлый фон */
  --ink:      #1d2340;   /* основной текст на светлом фоне */
  --ink-soft: #363d56;
  --paper:    #ffffff;
  --line-light: rgba(255, 255, 255, .45);
  --muted-light: rgba(255, 255, 255, .72);

  --font-text: "Tilda Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Noto Serif Display", Georgia, "Times New Roman", serif;

  --container: 1160px;
  --gutter: 20px;
  --slant: clamp(24px, 4vw, 56px);  /* высота косого среза между разделами */
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid #f2a24a; outline-offset: 3px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
[id] { scroll-margin-top: 16px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--paper); color: var(--navy-900); padding: 8px 12px; z-index: 10;
}
.skip-link:focus { left: 8px; }

/* ---------- Разделы и косые срезы ---------- */
.section { position: relative; padding: 110px 0 100px; }
.section--dark    { background: var(--navy-900); color: var(--paper); }
.section--navy    { background: var(--navy-800); color: var(--paper); }
.section--slate   { background: var(--slate);    color: var(--paper); }
.section--light   { background: var(--cream);    color: var(--ink); }

/* Косой верхний край раздела (как на прежнем сайте) */
.slant::before {
  content: "";
  position: absolute; left: 0; right: 0;
  top: calc(-1 * var(--slant) + 1px);
  height: var(--slant);
  background: inherit;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  pointer-events: none;
}

/* Заголовок раздела: линейная иконка + заголовок */
.section-head {
  display: flex; align-items: flex-end; gap: 28px;
  margin-bottom: 64px;
}
.section-head__icon { width: 170px; flex: none; }
.section-head__icon--wide { width: 300px; }
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.section-title--plain { text-transform: none; }
.section-head--overlap .section-title { margin-left: -150px; }

/* ---------- Шапка ---------- */
.site-header { background: var(--navy-900); color: var(--paper); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 26px 0 24px;
  border-bottom: 1px solid var(--line-light);
}
.site-header__logo img { width: 110px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 30px; margin: 0; padding: 0; list-style: none; }
.nav a {
  text-decoration: none; text-transform: uppercase;
  font-size: 14px; font-weight: 500; letter-spacing: .02em;
}
.nav a:hover { text-decoration: underline; }
.nav .nav__lang a { opacity: .75; }

/* ---------- Первый экран ---------- */
.hero { padding: 90px 0 150px; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.hero__eyebrow { font-size: 26px; font-weight: 500; margin-bottom: 28px; }
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 7.2vw, 92px);
  line-height: 1.02;
  color: var(--cream);
}
.hero__art { width: 100%; max-width: 480px; justify-self: end; color: #6f7899; }
/* Фото на первом экране: тонкая рамка со сдвигом, как на прежнем сайте */
.hero__photo { margin: 0; justify-self: end; width: 100%; max-width: 520px; position: relative; }
.hero__photo::before { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 1px solid var(--line-light); }
.hero__photo img { position: relative; width: 100%; }

/* ---------- Об организации ---------- */
.about__grid { display: grid; grid-template-columns: 7fr 4fr; gap: 60px; }
.about__mission { font-weight: 500; }
.stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 340px)) 1fr;
  gap: 40px 60px; margin-top: 70px; align-items: start;
}
.stat__num {
  font-family: var(--font-serif); font-weight: 300;
  font-size: clamp(64px, 8vw, 96px); line-height: 1; color: var(--ink-soft);
  margin-bottom: 26px;
}
.stat__label { font-weight: 600; text-transform: uppercase; font-size: 17px; margin-bottom: 12px; }
.stat__text { color: var(--ink-soft); margin: 0; }
.stats__decor { width: 150px; justify-self: end; align-self: end; }
.stats__photo { margin: 0 16px 16px 0; position: relative; align-self: start; }
.stats__photo::before { content: ""; position: absolute; inset: 16px -16px -16px 16px; border: 1px solid var(--ink-soft); }
.stats__photo img { position: relative; width: 100%; }

/* ---------- Фотополоса ЛЭШ ---------- */
.photos { padding: 96px 0 84px; }
.photos__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.photos__grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.photos__caption { margin: 18px 0 0; font-size: 14px; letter-spacing: .02em; color: var(--muted-light); }

/* ---------- Проекты ---------- */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 44px; }
.project { border-top: 1px solid var(--line-light); padding-top: 36px; display: flex; flex-direction: column; }
.project__logo { height: 76px; width: auto; margin-bottom: 30px; object-fit: contain; object-position: left center; }
.project__title { font-size: 26px; font-weight: 500; line-height: 1.2; margin-bottom: 18px; }
.project__text { color: var(--muted-light); font-size: 17px; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border: 1px solid currentColor; border-radius: 6px;
  font-size: 15px; font-weight: 500; line-height: 1.2; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.btn:hover { background: var(--paper); color: var(--navy-900); }
.btn::after { content: "↗"; font-size: .9em; opacity: .8; }
.btn--doc::after { content: none; }

/* ---------- Ключевые лица ---------- */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 60px 80px; }
.person__name { font-size: 32px; font-weight: 500; line-height: 1.15; color: var(--ink-soft); }
.person__role { font-style: italic; margin: 10px 0 24px; }
.person__email { font-style: italic; }

/* ---------- Документы ---------- */
.docs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; align-items: start; }
.docs__title { font-family: var(--font-serif); font-size: clamp(34px, 4.2vw, 50px); line-height: 1.15; }
.docs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.docs__list .btn { padding: 14px 22px; font-size: 16px; justify-content: space-between; width: 100%; max-width: 480px; }
.docs__type { font-size: 12px; letter-spacing: .06em; opacity: .7; }

/* ---------- Реквизиты ---------- */
.requisites__title { font-family: var(--font-serif); font-size: clamp(32px, 4.2vw, 50px); line-height: 1.15; max-width: 820px; margin-bottom: 60px; }
.requisites__grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; align-items: start; }
.req-table { width: 100%; border-collapse: collapse; border: 1px solid var(--ink); font-size: 17px; }
.req-table th, .req-table td { text-align: left; vertical-align: top; padding: 14px 24px; border-bottom: 1px solid var(--ink); }
.req-table th { width: 32%; font-weight: 600; }
.req-table td { color: var(--ink-soft); }
.req-table .num { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.qr { margin: 0; }
.qr img { width: 100%; max-width: 280px; background: var(--paper); }
.qr figcaption { font-size: 14px; margin-top: 12px; color: var(--ink-soft); }

/* ---------- Подвал ---------- */
.site-footer { padding: 90px 0 70px; font-size: 16px; }
.site-footer__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px 80px; align-items: end; }
.site-footer p { margin: 0 0 .3em; }
.site-footer__logo { width: 130px; margin-bottom: 34px; }
.site-footer a { color: var(--paper); }

/* ---------- Страница 404 ---------- */
.notfound { padding: 120px 0 160px; }
.notfound h1 { font-family: var(--font-serif); font-size: clamp(40px, 6vw, 72px); margin-bottom: 24px; color: var(--cream); }

/* ---------- Адаптив ---------- */
@media (max-width: 1000px) {
  .projects { grid-template-columns: 1fr; gap: 56px; }
  .project__text { max-width: 680px; }
  .docs__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body { font-size: 17px; }
  .section { padding: 80px 0 72px; }
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 18px; }
  .nav { gap: 6px 20px; }
  .nav a { font-size: 13px; }
  .hero { padding: 56px 0 110px; }
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { max-width: 240px; justify-self: start; order: -1; }
  .about__grid, .people, .requisites__grid, .site-footer__grid { grid-template-columns: 1fr; }
  .about__grid { gap: 8px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats__decor { display: none; }
  .stats__photo { grid-column: 1 / -1; max-width: 560px; }
  .hero__photo { justify-self: stretch; max-width: 560px; }
  .hero__photo::before { inset: 14px -14px -14px 14px; }
  .photos { padding: 72px 0 64px; }
  .photos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .section-head { gap: 18px; margin-bottom: 44px; }
  .section-head__icon { width: 110px; }
  .section-head__icon--wide { width: 220px; }
  .section-head--overlap .section-title { margin-left: -110px; }
  .qr { max-width: 240px; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .hero__eyebrow { font-size: 21px; }
  .hero__title { font-size: clamp(40px, 12.5vw, 52px); }  /* длинные слова (approachable) не вылезают за край */
  .stats { grid-template-columns: 1fr; margin-top: 48px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head--overlap .section-title { margin-left: 0; }
  .req-table, .req-table tbody, .req-table tr, .req-table th, .req-table td { display: block; width: 100%; }
  .req-table th { padding: 14px 16px 2px; border-bottom: 0; }
  .req-table td { padding: 0 16px 14px; overflow-wrap: anywhere; }
  .person__name { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
