/* ==========================================================================
   IQ007 — филиал «Ленинский» (Челябинск)
   Статический лендинг: только этот файл + index.html. Без CDN, без шрифтов,
   без JS. Всё оформление — системные шрифты и чистый CSS.
   ========================================================================== */

/* --- Токены бренда ------------------------------------------------------- */
:root {
  --orange:      #FF541F;   /* фирменный оранжевый */
  --orange-dark: #D93D0A;   /* затемнённый — для текста/ховеров */
  --orange-soft: #FFF1EB;
  --navy:        #393F61;   /* фирменный тёмно-синий */
  --navy-deep:   #262B45;
  --blue:        #008EC6;   /* фирменный голубой (графика, крупный текст) */
  --blue-ink:    #00719A;   /* затемнённый голубой — для мелкого текста (AA) */
  --white:       #FEFEFE;

  --ink:         #393F61;
  --ink-soft:    #565D80;
  --line:        rgba(57, 63, 97, .12);
  --page:        #F7F8FC;

  --radius-sm: 12px;
  --radius:    18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(38, 43, 69, .06), 0 4px 12px rgba(38, 43, 69, .06);
  --shadow:    0 10px 30px rgba(38, 43, 69, .10);
  --shadow-lg: 0 20px 50px rgba(38, 43, 69, .16);

  --container: 1160px;
  --header-h:  72px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", "Liberation Sans", sans-serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- База ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
  background-image:
    radial-gradient(880px 460px at 12% -8%, rgba(255, 84, 31, .09), transparent 65%),
    radial-gradient(760px 420px at 92% 4%, rgba(0, 142, 198, .09), transparent 62%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { height: auto; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* --- Кнопки -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-sm { padding: 9px 18px; font-size: .95rem; }

/* Основная кнопка: белый жирный текст «крупного» размера — контраст AA */
.btn-lg { padding: 16px 32px; font-size: 1.1875rem; }

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(255, 84, 31, .32);
}
.btn-primary:hover { background: var(--orange-dark); color: var(--white); }

.btn-navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-navy:hover { background: var(--navy-deep); color: var(--white); }

.btn-ghost {
  background: rgba(254, 254, 254, .06);
  color: var(--white);
  border-color: rgba(254, 254, 254, .55);
}
.btn-ghost:hover {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 12px 26px rgba(38, 43, 69, .22);
}
.btn-white:hover { background: var(--white); color: var(--orange-dark); }

/* --- Шапка --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(254, 254, 254, .88);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: block;
  width: 44px;
  height: 31px;
  flex: 0 0 auto;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s var(--ease);
}
.brand:hover .brand-mark img { transform: rotate(-4deg) scale(1.05); }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; }
.brand-sub {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue-ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}
.nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-weight: 600;
  font-size: .98rem;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav a:hover { background: rgba(255, 84, 31, .08); color: var(--orange-dark); text-decoration: none; }
.nav a:hover::after { transform: scaleX(1); }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 108px);
  background:
    radial-gradient(760px 420px at 78% 10%, rgba(255, 84, 31, .34), transparent 62%),
    radial-gradient(620px 380px at 6% 92%, rgba(0, 142, 198, .28), transparent 62%),
    linear-gradient(165deg, #40476E 0%, var(--navy) 45%, #2C3250 100%);
  color: var(--white);
  border-bottom-left-radius: clamp(20px, 4vw, 44px);
  border-bottom-right-radius: clamp(20px, 4vw, 44px);
}

.hero-glow {
  position: absolute;
  inset: auto -10% -55% 40%;
  height: 60%;
  background: radial-gradient(closest-side, rgba(255, 84, 31, .45), transparent 72%);
  filter: blur(24px);
  z-index: -1;
  pointer-events: none;
}

.hero-inner { position: relative; max-width: 900px; }

.hero-wordmark {
  display: block;
  width: clamp(210px, 34vw, 340px);
  height: auto;
  margin-bottom: clamp(18px, 3vw, 30px);
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, .3));
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 16px;
  border: 1px solid rgba(254, 254, 254, .32);
  border-radius: var(--radius-pill);
  background: rgba(254, 254, 254, .08);
  color: var(--white);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.1rem, 6.2vw, 4rem);
  font-weight: 800;
  color: var(--white);
}
.hero h1 .accent {
  color: #FFB199;                 /* светлый оттенок бренда: контраст на тёмном */
  background: linear-gradient(100deg, #FF7A4D, var(--orange) 60%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          color: transparent;
}

.hero-sub {
  margin-top: 18px;
  max-width: 42ch;
  font-size: clamp(1.02rem, 2.1vw, 1.25rem);
  font-weight: 600;
  color: #E6E9F7;                 /* 9:1 на тёмно-синем */
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(26px, 4vw, 38px);
}

.hero-note {
  margin-top: 18px;
  font-size: .98rem;
  color: #C9CEE4;
}

/* Для браузеров без background-clip:text — видимый светлый текст */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 .accent {
    color: #FFB199;
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

/* --- Секции -------------------------------------------------------------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }

.eyebrow {
  margin-bottom: 12px;
  color: var(--blue-ink);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.6rem, 4.2vw, 2.5rem);
  font-weight: 800;
}
.section-lead {
  margin-top: 14px;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
}
.section > .container > .section-lead + .cards { margin-top: clamp(28px, 4vw, 44px); }

/* --- Карточки направлений ------------------------------------------------ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease),
              border-color .24s var(--ease);
}
.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(255, 84, 31, .35);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 18px;
  background: linear-gradient(150deg, var(--orange-soft), #FFE4D9);
  font-size: 27px;
  line-height: 1;
  transition: transform .24s var(--ease), background-color .24s var(--ease);
}
.card:hover .card-icon { transform: translateY(-2px) rotate(-6deg) scale(1.06); }

.card-title { font-size: 1.16rem; font-weight: 700; }
.card-text {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: .97rem;
}

/* --- О центре ------------------------------------------------------------ */
.section-about { background: linear-gradient(180deg, transparent, rgba(0, 142, 198, .06)); }

.about {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.about-text p { margin-top: 16px; color: var(--ink-soft); }

.about-list { margin-top: 22px; display: grid; gap: 10px; }
.about-list li {
  position: relative;
  padding-left: 30px;
  font-weight: 600;
}
.about-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .45em;
  width: 16px;
  height: 9px;
  border-left: 3px solid var(--orange);
  border-bottom: 3px solid var(--orange);
  transform: rotate(-45deg) scale(.9) translateY(-2px);
  border-radius: 1px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
}

.stat {
  padding: 22px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .24s var(--ease), box-shadow .24s var(--ease);
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.stat-num {
  display: block;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--orange);            /* крупный текст — контраст ≥ 3:1 */
}
.stat-label {
  display: block;
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: .93rem;
  font-weight: 600;
}

/* --- CTA-полоса ---------------------------------------------------------- */
.cta-wrap { padding-top: 0; }

.cta {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: clamp(30px, 5vw, 52px);
  border-radius: clamp(20px, 3.5vw, 34px);
  background:
    radial-gradient(520px 300px at 88% 12%, rgba(254, 254, 254, .26), transparent 60%),
    linear-gradient(120deg, #FF6B3D, var(--orange) 55%, #EF4313);
  box-shadow: 0 24px 54px rgba(255, 84, 31, .32);
  color: var(--white);
}

.cta-text { max-width: 46ch; }
.cta h2 {
  font-size: clamp(1.4rem, 3.6vw, 2.05rem);
  font-weight: 800;
  color: var(--white);
}
.cta p {
  margin-top: 10px;
  font-size: 1.1875rem;   /* крупный размер → контраст AA на оранжевом */
  font-weight: 700;
  color: var(--white);
}

/* --- Подвал -------------------------------------------------------------- */
.site-footer {
  padding: clamp(44px, 7vw, 72px) 0 26px;
  background: linear-gradient(180deg, #333A5B, var(--navy-deep));
  color: #D3D8EC;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: clamp(26px, 4vw, 48px);
}

.footer-logo {
  display: block;
  width: clamp(150px, 22vw, 200px);
  height: auto;
  margin-bottom: 16px;
}

.footer-note { color: #AEB5D2; font-size: .95rem; }

.footer-title {
  margin-bottom: 14px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white);
}

.footer-address { font-style: normal; display: grid; gap: 8px; }
.footer-address span { color: #D3D8EC; }
.footer-address a,
.footer-links a {
  color: #D3D8EC;
  font-weight: 600;
  text-decoration: none;
  transition: color .18s var(--ease);
}
.footer-address a:hover,
.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--orange);
}

.footer-links { display: grid; gap: 8px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: clamp(30px, 5vw, 48px);
  padding-top: 20px;
  border-top: 1px solid rgba(254, 254, 254, .14);
  color: #AEB5D2;
  font-size: .88rem;
}

/* --- Анимации ------------------------------------------------------------ */

/* Появление блоков hero при загрузке страницы */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
.reveal { animation: reveal-up .7s var(--ease) both; }
.reveal-1 { animation-delay: .05s; }
.reveal-2 { animation-delay: .12s; }
.reveal-3 { animation-delay: .19s; }
.reveal-4 { animation-delay: .26s; }
.reveal-5 { animation-delay: .33s; }
.reveal-6 { animation-delay: .4s; }

/* Мягкое появление секций при скролле — только там, где браузер это умеет.
   Без поддержки анимация не применяется, контент виден сразу. */
@keyframes scene-in {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@supports (animation-timeline: view()) {
  .card, .stat, .cta {
    animation: scene-in linear both;
    animation-timeline: view();
    /* Конец диапазона — раньше полного входа элемента: если элемент уже в кадре,
       прогресс = 100%, поэтому контент не может остаться невидимым. */
    animation-range: entry 0% entry 85%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:hover, .card:hover, .stat:hover { transform: none; }
}

/* --- Адаптив ------------------------------------------------------------- */
@media (max-width: 1000px) {
  .about { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  /* На узких экранах навигацию скрываем — остаётся логотип и кнопка */
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .brand { margin-right: auto; }
}

@media (max-width: 620px) {
  :root { --header-h: 64px; }
  .container { padding-inline: 16px; }

  .hero { padding-top: 40px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  .card { padding: 22px 20px 24px; }

  .cta { flex-direction: column; align-items: stretch; text-align: left; }
  .cta .btn { width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 360px) {
  .btn-lg { padding: 14px 20px; font-size: 1.0625rem; }
  .hero h1 { font-size: 1.95rem; }
  .card-icon { width: 48px; height: 48px; font-size: 23px; }
}
