/* Cloud Academy — стиль по брендбуку Yandex Cloud («детали с отверстиями») */

/* Шрифты: YS Display для заголовков, YS Text для текста */
@font-face { font-family: "YS Display"; src: url("fonts/ys-display-heavy.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "YS Display"; src: url("fonts/ys-display-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "YS Display"; src: url("fonts/ys-display-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "YS Text"; src: url("fonts/ys-text-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "YS Text"; src: url("fonts/ys-text-medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "YS Text"; src: url("fonts/ys-text-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --art-h: clamp(150px, 14vw, 200px);   /* высота иллюстраций в карточках аудитории и результатов */
  --blue: #2A9FFF;
  --ink: #18181A;
  --white: #FFFFFF;
  --gray-bg: #EFF2F8;
  --gray-line: #E4E7EE;
  --gray-blue: #B0BDD9;
  --text-muted: #808080;
  --peach: #FCC67F;
  --orange: #FE8242;
  --lime: #BFFF00;
  --yellow: #FFDA0C;
  --hero-bg: #E7EBF4;
  --radius-tile: 20px;
  --font-display: "YS Display", "YS Text", Arial, Helvetica, sans-serif;
  --font-text: "YS Text", Arial, Helvetica, sans-serif;
  --content: 1280px;
  --side-pad: max(clamp(20px, 4vw, 32px), calc((100% - var(--content)) / 2));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--white);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 900; }
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); line-height: 1.0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); line-height: 1.04; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; line-height: 1.2; }

.accent-blue { color: var(--blue); }
.nowrap { white-space: nowrap; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 999px; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 12px; }

/* Пометки «уточняется» — временные, до ответа заказчика */
.todo {
  display: inline-block; vertical-align: middle;
  background: var(--yellow); color: var(--ink);
  font-family: var(--font-text); font-size: 0.72rem; font-weight: 500;
  line-height: 1.2; padding: 3px 10px; border-radius: 12px;
}

/* Кнопки — пилюли */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-text); font-weight: 500; font-size: 1rem;
  padding: 15px 30px; border-radius: 999px; border: 0; cursor: pointer;
  text-decoration: none; transition: transform 0.15s ease, background 0.15s ease;
}
.button:active { transform: scale(0.97); }
.button-black { background: var(--ink); color: var(--white); }
.button-black:hover { background: #2E2E33; }
.button-blue { background: var(--blue); color: var(--white); }
.button-blue:hover { background: #1590F5; }
.button-outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.button-outline:hover { background: rgba(24, 24, 26, 0.08); }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--gray-line); }
.header-inner {
  padding: 14px var(--side-pad);
  display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.brand-mark { width: 30px; height: 26px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.site-nav > a { text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav > a:not(.nav-cta):hover { color: var(--blue); }
.nav-cta { padding: 10px 22px; font-size: 0.95rem; }
.menu-toggle { display: none; }

/* Секции — как на yandex.cloud: hero и белые полосы во всю ширину,
   цветные подложки — скруглённые карточки с отступом 8px от краёв */
.card { padding: clamp(48px, 6vw, 88px) var(--side-pad); }
.card-hero { background: var(--hero-bg); }
.card-blue { background: var(--blue); color: var(--ink); }
.card-gray { background: var(--gray-bg); }
.card-white { background: var(--white); }
.card-black { background: var(--ink); color: var(--white); }
.card-blue, .card-gray, .card-black { border-radius: 40px; }

/* Надзаголовок секции — как на yandex.cloud: YS Display Medium 17px/20px, чёрный */
.section-label {
  font-family: var(--font-display); font-weight: 500;
  font-size: 17px; line-height: 20px; letter-spacing: 0; color: #000000;
  margin-bottom: clamp(14px, 2vw, 20px);
}
.section-label-invert { color: var(--white); }

.section-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: start; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { max-width: 20ch; }
.section-intro { display: grid; gap: 14px; font-size: 1.05rem; }
.card-black .section-intro { color: #C9CDD6; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.hero-eyebrow { font-family: var(--font-display); font-weight: 500; font-size: 17px; line-height: 20px; color: #000000; }
.hero-lead { font-size: 1.15rem; max-width: 55ch; color: #444A59; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { justify-self: center; width: min(100%, 470px); }

/* Анимация иллюстрации: лёгкое парение, вращение диска, живой процесс */
.ha-scene { animation: ha-bob 7s ease-in-out infinite; }
.hi-spin { animation: ha-spin 60s linear infinite; transform-origin: 98px 74px; }
.hi-wiggle { animation: ha-wiggle 5s ease-in-out infinite; transform-origin: 238px 272px; }
.hi-flow { stroke-dasharray: 2 8; stroke-width: 1.6; animation: hi-flow 1.8s linear infinite; }
@keyframes ha-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ha-spin { to { transform: rotate(360deg); } }
@keyframes ha-wiggle { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes hi-flow { to { stroke-dashoffset: -20; } }
.hero-facts {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-top: clamp(8px, 2vw, 24px);
}
.hero-facts > div { background: var(--white); border-radius: var(--radius-tile); padding: 16px 20px; }
.hero-facts dt { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-bottom: 4px; }
.hero-facts dd { font-weight: 700; font-family: var(--font-display); }
.card-blue.application, .application .hero-eyebrow { color: var(--white); }

/* Плитки */
.tile { background: var(--white); border-radius: var(--radius-tile); padding: 24px; }
.card-white .tile { background: var(--gray-bg); }
.tile h3 { margin-bottom: 8px; }
.tile p { color: #444A59; font-size: 0.98rem; }
.tile-dark { background: #232327; }
.tile-dark p { color: #C9CDD6; }
.tile-icon { width: 60px; height: 60px; margin-bottom: 18px; }
.tile-index { display: block; font-family: var(--font-display); font-weight: 900; font-size: 1.6rem; color: var(--blue); margin-bottom: 10px; }

.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* Для кого */
/* Аудитория — крупные карточки в духе блока «Мы всегда рядом» на yandex.cloud */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.audience-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-tile);
  padding: clamp(26px, 2.4vw, 36px);
  min-height: 380px;
  display: flex; flex-direction: column; gap: 14px;
}
.audience-card h3 { font-size: clamp(1.35rem, 2vw, 1.85rem); line-height: 1.1; }
.audience-card p { font-size: 1.02rem; max-width: 32ch; }
.audience-card > *:not(.audience-art) { position: relative; z-index: 1; }
.audience-light { background: var(--white); }
.audience-light p { color: #444A59; }
.audience-dark { background: var(--ink); color: var(--white); }
.audience-dark p { color: #C9CDD6; }
.audience-peach { background: var(--peach); }
.audience-peach p { color: rgba(24, 24, 26, 0.75); }
/* Все иллюстрации нарисованы в кадре высотой 400, поэтому единый масштаб задаётся одной высотой */
.audience-art { position: absolute; right: 0; bottom: 0; height: var(--art-h); width: auto; }
.role-chip {
  margin-top: auto; align-self: flex-start;
  background: var(--gray-bg); border-radius: 999px; padding: 8px 16px;
  font-weight: 500; font-size: 0.9rem;
}
.card-white .role-chip { background: var(--white); }
.checklist { list-style: none; display: grid; gap: 6px; font-size: 0.95rem; color: #444A59; }
.checklist li { padding-left: 22px; position: relative; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }

/* Результаты — мозаика: высокая «Инфраструктура», широкое «Масштабирование», остальные обычные */
.outcomes-mosaic {
  list-style: none;
  display: grid; grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(230px, auto)); gap: 10px;
}
.outcome-card {
  border-radius: var(--radius-tile); padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative; overflow: hidden;
}
.outcome-blue { background: var(--blue); color: var(--white); }
.outcome-black { background: var(--ink); color: var(--white); }
.outcome-first { grid-column: 1; grid-row: 1 / 3; }
.outcome-wide { grid-column: span 2; }
.outcome-num { font-size: 0.9rem; font-weight: 500; opacity: 0.75; }
.outcome-card p { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 1.6vw, 1.5rem); line-height: 1.15; color: var(--white); }
.outcome-art { margin-top: auto; align-self: flex-end; height: var(--art-h); width: auto; margin-bottom: -26px; margin-right: -26px; }   /* упирается в угол карточки */
/* Кадрирование: часть иллюстрации уходит за правый и нижний край карточки (доли от высоты кадра 400) */
.outcome-art[src$="infrastructure.svg"] { height: calc(var(--art-h) * 1.5); margin-right: calc(-26px - var(--art-h) * 0.17); margin-bottom: calc(-26px - var(--art-h) * 0.17); }
.outcome-art[src$="data.svg"]           { margin-right: calc(-26px - var(--art-h) * 0.205); margin-bottom: calc(-26px - var(--art-h) * 0.27); }
.outcome-art[src$="automation.svg"]     { margin-right: calc(-26px - var(--art-h) * 0.07);  margin-bottom: calc(-26px - var(--art-h) * 0.08); }
.outcome-art[src$="security.svg"]       { margin-right: calc(-26px - var(--art-h) * 0.14);  margin-bottom: calc(-26px - var(--art-h) * 0.22); }
.outcome-art[src$="solution.svg"]       { margin-right: calc(-26px - var(--art-h) * 0.135); margin-bottom: calc(-26px - var(--art-h) * 0.35); }

/* Программа */
.program-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.meta-chip { background: var(--gray-bg); border-radius: 999px; padding: 10px 18px; font-weight: 500; font-size: 0.95rem; display: inline-flex; align-items: center; gap: 8px; }
.program-list { display: grid; gap: 10px; }
.module { background: var(--gray-bg); border-radius: var(--radius-tile); overflow: hidden; }
.module summary {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px;
  padding: 20px 24px; cursor: pointer; list-style: none;
}
.module summary::-webkit-details-marker { display: none; }
.module-index { font-family: var(--font-display); font-weight: 900; color: var(--blue); font-size: 1.1rem; }
.module-hours { background: var(--white); border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; font-weight: 500; }
.module summary i { width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform 0.2s; margin-top: -4px; }
.module[open] summary i { transform: rotate(-135deg); margin-top: 4px; }
.module[open] .module-body, .faq-list details[open] p { animation: acc-fade 0.4s ease; }
@keyframes acc-fade { from { opacity: 0; } to { opacity: 1; } }
.module-body { padding: 0 24px 22px 24px; display: grid; gap: 10px; }
.module-body p { color: #444A59; }
.module-practice { font-weight: 500; font-size: 0.92rem; color: var(--blue); }

/* Преподавателям */
.teacher-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.teacher-callout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  background: #232327; border-radius: var(--radius-tile); padding: 24px 28px;
}
.teacher-callout p { color: #C9CDD6; max-width: 52ch; }
.teacher-callout b { color: var(--white); }
.callout-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button-outline-light { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px var(--white); }
.button-outline-light:hover { background: rgba(255, 255, 255, 0.12); }

/* Экспертиза и цифры */
.experts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.expert-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 24px; align-items: start; padding: 28px;
}
.expert-info .expert-links { margin-top: 10px; font-size: 0.95rem; }
.expert-photo { width: 112px; height: 112px; border-radius: 24px; object-fit: cover; background: var(--gray-bg); }
.expert-info { display: grid; gap: 4px; justify-items: start; }
.expert-info .role-chip { margin-bottom: 14px; }
.expert-info h3 { font-size: 1.5rem; margin-bottom: 0; }
.expert-links { list-style: none; display: grid; gap: 10px; }
.expert-links a { color: var(--blue); font-weight: 500; text-decoration: none; }
.expert-links a:hover { text-decoration: underline; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat strong { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(2.4rem, 4vw, 3.4rem); line-height: 1; color: var(--blue); margin-bottom: 8px; }
.stat span { color: #444A59; font-size: 0.95rem; }
.stat-todo strong { color: var(--gray-blue); }

/* Заявка */
.application { position: relative; overflow: hidden; }
.application-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 660px);
  gap: clamp(24px, 3vw, 56px); align-items: center;
}
.application-copy { display: grid; gap: 20px; justify-items: start; }
.application-art {
  width: 100%; height: auto; pointer-events: none;
  margin: -120px -14px -170px 0;   /* выходит за края блока — обрезается сверху и снизу */
}
.application-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0; }
.application-actions .button { padding: 17px 36px; font-size: 1.05rem; }
.application-lead { font-size: 1.1rem; max-width: 40ch; }
.application-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.application-meta span { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); border-radius: 999px; padding: 8px 16px; font-size: 0.9rem; font-weight: 500; }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.faq-layout h2 { max-width: 14ch; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { background: var(--gray-bg); border-radius: var(--radius-tile); }
.faq-list summary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 20px 24px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary i { flex: none; width: 12px; height: 12px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform 0.2s; }
.faq-list details[open] summary i { transform: rotate(-135deg); }
.faq-list details p { padding: 0 24px 22px; color: #444A59; max-width: 70ch; }

/* Футер */
.site-footer { padding: 40px var(--side-pad) 44px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--gray-line); }
.footer-brand { display: grid; gap: 14px; justify-items: start; align-content: start; }
.footer-brand p { color: var(--text-muted); font-size: 0.95rem; max-width: 34ch; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h3 { font-size: 0.95rem; font-family: var(--font-text); font-weight: 700; margin-bottom: 4px; }
.footer-col a { text-decoration: none; font-size: 0.95rem; color: #444A59; }
.footer-col a:hover { color: var(--blue); }
.footer-muted { color: var(--text-muted); font-size: 0.95rem; }
.footer-bottom { padding-top: 20px; color: var(--text-muted); font-size: 0.9rem; }

/* Тост */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px);
  display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: var(--white);
  padding: 14px 20px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s;
  z-index: 60; max-width: min(92vw, 560px);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { background: none; border: 0; color: var(--white); font-size: 1.2rem; cursor: pointer; line-height: 1; }

/* Адаптив */
@media (max-width: 1080px) {
  .principles, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .teacher-grid { grid-template-columns: repeat(2, 1fr); }
  .outcomes-mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .outcome-first { grid-column: auto; grid-row: auto; }
  .outcome-wide { grid-column: auto; }
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .section-head, .faq-layout, .experts-grid, .application-layout { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .hero-art, .application-art { display: none; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .card-blue, .card-gray, .card-black { border-radius: 24px; }
  .expert-card { grid-template-columns: 1fr; }
  .principles, .audience-grid, .outcomes-mosaic, .teacher-grid, .stats-grid, .hero-facts { grid-template-columns: 1fr; }
  /* иллюстрация аудитории уходит в поток под текст, но остаётся вплотную к углу */
  .audience-card { min-height: 0; }
  .audience-art { position: static; align-self: flex-end; margin-top: 8px; margin-right: -26px; margin-bottom: -26px; }
  .footer-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 24px; }
  .module summary { grid-template-columns: auto 1fr auto; }
  .module summary i { display: none; }

  .menu-toggle {
    display: grid; gap: 4px; margin-left: auto;
    background: none; border: 0; padding: 10px; cursor: pointer;
  }
  .menu-toggle span:not(.sr-only) { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; left: 16px; right: 16px; top: calc(100% + 8px);
    background: var(--white); border-radius: var(--radius-tile);
    box-shadow: 0 12px 40px rgba(24, 24, 26, 0.16);
    flex-direction: column; align-items: stretch; padding: 16px; gap: 4px;
  }
  .site-nav.open { display: flex; }
  .site-nav > a { padding: 12px 16px; border-radius: 12px; }
  .site-nav > a:not(.nav-cta):hover { background: var(--gray-bg); }
  .nav-cta { margin-top: 8px; text-align: center; justify-content: center; }
}

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