/* V3 «Эволюция»: стиль и структура текущего сайта SkillEx + аккуратный моушн.
   Базовые правила перенесены с действующего сайта и собраны без слоёв переопределений. */

:root {
  --bg: #000;
  --surface: #151515;
  --surface-2: #1b1b1b;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f6f5f2;
  --muted: #969696;
  --accent: #fff;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
a:focus-visible, button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.skip { position: fixed; top: -80px; left: 12px; z-index: 1000; padding: 12px 16px; border-radius: 10px; background: #fff; color: #000; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.ln-mask { margin-block: -0.14em -0.08em; padding-block: 0.14em 0.08em; }

/* ── Каркас: сайдбар и страница-карточка ─────────────── */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; max-width: 1780px; margin: 0 auto; }
.side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 38px 26px 28px; }
.brand { padding: 0 12px; color: white; font-size: 1.55rem; font-weight: 830; letter-spacing: -0.025em; text-decoration: none; }
.brand i { color: var(--accent); font-style: normal; }
.nav { position: relative; display: grid; gap: 8px; margin-top: 58px; }
.nav a {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  color: #777;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.25s;
}
.nav a:hover, .nav a.active { color: white; }
.nav svg { width: 22px; height: 22px; stroke-width: 2; }
.nav__pill { position: absolute; top: 0; left: 0; right: 0; height: 46px; border-radius: 16px; background: #1b1b1b; box-shadow: inset 0 0 0 1px #ffffff14; opacity: 0; }
.telegram { display: grid; gap: 14px; margin-top: auto; padding: 12px; }
.telegram a { display: inline-flex; align-items: center; gap: 11px; width: max-content; color: #fff; font-size: 0.88rem; font-weight: 700; text-decoration: none; transition: transform 0.2s; }
.telegram a:hover { transform: translateX(2px); }
.telegram svg { width: 21px; height: 21px; }
.telegram a:first-child svg { color: #2aabee; }
.telegram a:last-child svg { color: #e1306c; }

main { padding: 14px; overflow: hidden; }
.page { min-height: calc(100vh - 28px); padding: 0 16px 16px; overflow: hidden; border-radius: 20px; background: var(--surface); }

/* ── Герой ───────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 500px;
  margin: 0 -16px;
  padding: 48px;
  overflow: hidden;
  border-radius: 20px 20px 18px 18px;
  background: linear-gradient(111deg, #17252a 0%, #0d1118 34%, #421c2d 66%, #15100e 100%);
}
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-video { position: absolute; inset: -6% 0; width: 100%; height: 112%; max-width: none; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 58%); pointer-events: none; }
.hero-content { position: relative; z-index: 3; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: #ddd; font-size: 0.82rem; font-weight: 700; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px #ffffff22; }
h1 { max-width: 900px; margin: 14px 0 0; font-size: clamp(3.15rem, 5.9vw, 6.65rem); font-weight: 700; line-height: 0.92; letter-spacing: -0.055em; }
.hero-info { max-width: 600px; margin: 22px 0 0; color: #e2e2e2; font-size: 1.05rem; line-height: 1.45; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s;
}
.button.primary { background: #fff; color: #111; }
.button.secondary { border: 1px solid #ffffff4d; background: #12121288; color: #fff; backdrop-filter: blur(8px); }
.button svg { width: 17px; height: 17px; }

/* ── О курсе ─────────────────────────────────────────── */
h2 { margin: 0; font-size: 1.85rem; letter-spacing: -0.045em; }
.course-info { display: grid; grid-template-columns: minmax(220px, 0.95fr) 1.55fr; gap: 36px; padding: 42px 0; border-bottom: 1px solid var(--line); }
.course-info h2 { max-width: 15ch; font-size: clamp(1.75rem, 2.5vw, 2.65rem); line-height: 1; }
.course-info > div:last-child { padding-left: 14px; }
.course-info p { max-width: 540px; margin: 0; color: #b5b5b5; font-size: 1rem; line-height: 1.55; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.fact { padding-left: 14px; border-left: 1px solid #3a3a3a; }
.fact strong { display: block; font-size: 1.05rem; letter-spacing: -0.03em; }
.fact span { display: block; margin-top: 5px; color: var(--muted); font-size: 0.8rem; }

@media (min-width: 761px) {
  .course-info, .program, .gallery, .signup, .works { margin-right: 32px; margin-left: 32px; }
}

/* ── Программа: табы дней ────────────────────────────── */
.program { padding-top: 46px; }
.program-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.days { display: flex; gap: 8px; padding-bottom: 8px; overflow: auto; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  --day-gradient: linear-gradient(115deg, #1c1c1c, #303030);
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 8px;
  border: 1px solid transparent;
  border-radius: 100px;
  background: transparent;
  color: #a3a3a3;
  font-size: 0.92rem;
  font-weight: 750;
  cursor: pointer;
  transition: color 0.3s;
}
.day:nth-child(1) { --day-gradient: linear-gradient(115deg, #226bb1, #08a0b8, #15518f); }
.day:nth-child(2) { --day-gradient: linear-gradient(115deg, #b35b2c, #e39a27, #a63d35); }
.day:nth-child(3) { --day-gradient: linear-gradient(115deg, #16776e, #4eaa7b, #1e5f92); }
.day:nth-child(4) { --day-gradient: linear-gradient(115deg, #8b3d63, #c76756, #6b4aa1); }
.day[aria-selected="true"] { color: white; }
/* Плашка активного дня одна: при переключении она переезжает Flip-ом. */
.day-pill {
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background-image: var(--day-gradient);
  background-size: 230% 230%;
  box-shadow: inset 0 0 0 1px #ffffff30, 0 7px 18px #0004;
  animation: day-gradient 7s ease-in-out infinite alternate;
}
@keyframes day-gradient { 0% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }
.number { display: grid; place-items: center; width: 28px; height: 28px; color: #a7a7a7; transition: transform 0.3s, color 0.3s; }
.number svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.day[aria-selected="true"] .number { color: #fff; transform: scale(1.08); }

.cards {
  display: grid;
  grid-auto-columns: clamp(160px, 17vw, 310px);
  grid-auto-flow: column;
  gap: 22px;
  margin-top: 18px;
  padding: 0 0 8px;
  overflow-x: auto;
  scrollbar-color: #353535 transparent;
  scrollbar-width: thin;
}
.cards[hidden] { display: none; }
.lesson { min-width: 0; color: #f6f5f2; }
.poster { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; background: #101010; transition: transform 0.25s; }
.poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.lesson:hover .poster { transform: translateY(-4px); }
.lesson:hover .poster img { transform: scale(1.04); }
.poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.22)); }
.lesson-copy { padding-top: 13px; }
.lesson h3 { margin: 0; font-size: clamp(0.9rem, 1.05vw, 1.18rem); line-height: 1.22; letter-spacing: -0.035em; }
.lesson p { margin: 5px 0 0; color: #939393; font-size: clamp(0.75rem, 0.88vw, 0.96rem); line-height: 1.38; }

/* ── Галерея ─────────────────────────────────────────── */
.gallery { padding: 64px 0 8px; }
.gallery-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.gallery-head p { max-width: 360px; margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.gallery-mosaic {
  display: grid;
  grid-template-columns: 1.35fr 1.35fr 1.1fr 1.25fr;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 14px;
  height: clamp(560px, 49vw, 790px);
}
.tile { position: relative; display: block; min-width: 0; margin: 0; padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: #202020; cursor: pointer; }
.tile video, .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile video { filter: brightness(1.04) contrast(1.14) saturate(1.19); }
.tile img { filter: brightness(1.05) contrast(1.13) saturate(1.16); transition: transform 0.35s ease; }
.tile:hover img { transform: scale(1.03); }
.tile-atmosphere { grid-area: 1 / 1 / 2 / 3; }
.tile-workshop { grid-area: 2 / 1 / 4 / 3; }
.tile-process { grid-area: 1 / 3 / 2 / 4; }
.tile-group { grid-area: 2 / 3 / 3 / 4; }
.tile-frames { grid-area: 3 / 3 / 4 / 5; }
.tile-light { grid-area: 1 / 4 / 2 / 5; }
.tile-outdoor { grid-area: 2 / 4 / 3 / 5; }
.tile .play {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #ffffff42;
  border-radius: 50%;
  background: #111b;
  color: #fff;
  backdrop-filter: blur(8px);
}
.tile .play svg { width: 15px; margin-left: 2px; }

/* ── Секции-карточки ─────────────────────────────────── */
.learning-flow, .mentor, .offer-details, .faq { margin: 0 32px; padding: 54px 0; border-top: 1px solid var(--line); }
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.flow-card { min-height: 170px; padding: 20px; border-radius: 20px; background: #202020; }
.flow-card b { display: block; margin-bottom: 10px; font-size: 1.04rem; }
.flow-card span { color: var(--muted); font-size: 0.88rem; line-height: 1.48; }

.mentor { display: grid; grid-template-columns: minmax(210px, 0.55fr) 1.45fr; gap: 30px; align-items: center; }
.mentor-photo { max-width: 260px; aspect-ratio: 1; overflow: hidden; border-radius: 22px; background: #262626; }
.mentor-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.mentor p { max-width: 520px; margin: 0; color: #b5b5b5; font-size: 1rem; line-height: 1.55; }
.mentor-kicker { margin-bottom: 8px !important; color: #a7a7a7 !important; font-size: 0.78rem !important; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.mentor h2 { margin-bottom: 13px; }
.mentor .button { margin-top: 20px; }

.works { padding: 54px 0 8px; border-top: 1px solid var(--line); }
.works-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.work { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; padding: 0; border: 0; border-radius: 20px; background: #202020; text-align: left; cursor: pointer; }
.work video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.work:hover video { transform: scale(1.03); }
.work::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent 52%); pointer-events: none; }
.work-meta { position: absolute; right: 18px; bottom: 16px; left: 18px; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.work-meta b { color: #fff; font-size: 1.12rem; }
.work-meta span { color: #e0e0e0; font-size: 0.75rem; }

.offer-details { display: grid; grid-template-columns: 0.86fr 1.14fr; gap: 40px; align-items: end; }
.price { margin: 13px 0 0; color: #fff; font-size: clamp(2rem, 4vw, 4.1rem); font-weight: 800; line-height: 0.95; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.offer-details p { max-width: 480px; margin: 0; color: #b5b5b5; font-size: 1rem; line-height: 1.5; }
.offer-details .button { margin-top: 20px; }
.offer-perks { display: grid; gap: 10px; margin-top: 18px; }
.gift, .telegram-benefit { display: flex; align-items: center; gap: 10px; margin: 0; padding: 13px 14px; border: 1px solid #ffffff20; border-radius: 16px; font-size: 0.82rem; font-weight: 650; line-height: 1.35; }
.gift { background: linear-gradient(105deg, #2b232c, #211f22); color: #f5f5f5; }
.telegram-benefit { background: linear-gradient(105deg, #132830, #1d2426); color: #e3f4ff; }
.gift svg, .telegram-benefit svg { flex: 0 0 auto; width: 19px; height: 19px; }
.gift svg { color: #ec8fe9; }
.telegram-benefit svg { color: #2aabee; }

.signup { display: grid; grid-template-columns: minmax(280px, 0.55fr) minmax(440px, 1.45fr); gap: 12px; margin: 44px 32px 20px; }
.signup-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
  border-radius: 26px;
  background: #202020;
}
.signup-copy::before {
  content: "";
  position: absolute;
  top: -34px;
  left: -29px;
  width: 272px;
  height: 106px;
  border: 4px solid #ec8fe9;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-radius: 54% 46% 0 0;
  opacity: 0.95;
  transform: rotate(-8deg);
}
.signup h2 { position: relative; z-index: 1; max-width: 270px; color: white; font-size: clamp(1.45rem, 1.9vw, 2.08rem); line-height: 1.02; letter-spacing: -0.055em; }
.signup p { position: relative; z-index: 1; max-width: 270px; margin: 13px 0 20px; color: #a8a8a8; font-size: 0.74rem; line-height: 1.43; }
.signup .button { position: relative; z-index: 1; min-height: 44px; padding: 0 15px; background: #2aabee; color: #fff; font-size: 0.75rem; }
.signup .button:hover { background: #249edc; }
.signup-visual { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 26px; background: #703a2c; }
.signup-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }

.faq-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-items: start; margin-top: 24px; }
.faq-item h3 { margin: 0; font: inherit; }
.faq-item { overflow: hidden; border: 1px solid #353535; border-radius: 16px; background: #1c1c1c; }
.faq-item button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; padding: 17px 18px; border: 0; background: none; color: #f3f3f3; font-size: 0.92rem; font-weight: 700; text-align: left; cursor: pointer; }
.faq-item .chev { flex: 0 0 auto; color: #b9b9b9; font-size: 1.45rem; font-weight: 400; line-height: 0.7; transition: transform 0.3s ease, color 0.2s ease; }
.faq-item [aria-expanded="true"] .chev { color: #fff; transform: rotate(180deg); }
.faq-answer { overflow: hidden; }
.faq-answer p { margin: 0; padding: 0 48px 17px 18px; color: #a4a4a4; font-size: 0.86rem; line-height: 1.48; }

/* ── Адаптив (как на текущем сайте) ──────────────────── */
@media (min-width: 761px) and (max-width: 1050px) {
  .shell { grid-template-columns: 78px minmax(0, 1fr); }
  .side { padding: 34px 12px; }
  .brand { padding: 0; font-size: 0; text-align: center; }
  .brand i { font-size: 1.7rem; }
  .nav a { justify-content: center; padding: 12px; }
  .nav span, .telegram { display: none; }
  .hero { padding: 36px; }
  .cards { grid-auto-columns: 190px; }
}

@media (max-width: 760px) {
  .shell { display: block; }
  .side { display: none; }
  main { padding: 0; }
  .page { min-height: 100vh; padding: 0 14px 28px; border-radius: 0; }
  .hero { align-items: flex-end; min-height: 62svh; margin: 0 -14px; padding: 22px 20px 58px; border-radius: 0 0 20px 20px; }
  .hero::after { background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 66%); }
  h1 { font-size: clamp(2.95rem, 12.6vw, 4.5rem); }
  .hero-info { max-width: 360px; font-size: 0.95rem; }
  .hero-actions { margin-top: 20px; }
  .button { min-height: 45px; padding: 0 17px; font-size: 0.8rem; }
  .course-info { grid-template-columns: 1fr; gap: 24px; padding: 38px 0; }
  .course-info > div:last-child { padding-left: 0; }
  .facts { gap: 12px; }
  .fact { padding-left: 10px; }
  .fact strong { font-size: 0.9rem; }
  .fact span { font-size: 0.72rem; }
  .program { padding-top: 38px; }
  h2, .course-info h2 { font-size: 1.65rem; }
  .days { margin: 0 -14px; padding: 0 14px 10px; }
  .day { font-size: 0.86rem; }
  .cards { grid-auto-columns: 47vw; gap: 14px; margin: 18px -14px 0; padding: 0 14px 16px; }
  .lesson h3 { font-size: 0.88rem; }
  .lesson p { margin-top: 4px; font-size: 0.72rem; }
  .poster { border-radius: 10px; }
  .gallery { padding: 48px 0 0; }
  .gallery-head { display: block; margin-bottom: 18px; }
  .gallery-head p { margin-top: 10px; }
  .gallery-mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; grid-auto-rows: calc((100vw - 38px) / 2); height: auto; gap: 10px; }
  .gallery-mosaic .tile { grid-area: auto; border-radius: 18px; }
  .tile-atmosphere, .tile-workshop, .tile-frames { grid-column: span 2; grid-row: span 2; }
  .tile-process, .tile-group, .tile-light, .tile-outdoor { grid-row: span 2; }
  .learning-flow, .mentor, .offer-details, .faq { margin: 0; padding: 42px 0; }
  .flow-grid, .faq-list, .mentor, .offer-details { grid-template-columns: 1fr; gap: 10px; }
  .flow-card { min-height: 0; padding: 18px; }
  .mentor { gap: 18px; }
  .offer-details { gap: 22px; }
  .price { font-size: 2.65rem; }
  .works { padding: 42px 0 0; }
  .works-grid { grid-template-columns: 1fr; }
  .signup { display: block; margin: 35px 0 0; }
  .signup-copy { min-height: 250px; padding: 24px; border-radius: 20px; }
  .signup-copy::before { top: -45px; left: -28px; width: 230px; }
  .signup h2 { font-size: 1.75rem; }
  .signup-visual { margin-top: 12px; border-radius: 20px; }
}

/* До старта GSAP заголовок героя скрыт; если скрипты не загрузились — проявится сам. */
.js:not(.is-ready) [data-hero-title], .js:not(.is-ready) [data-hero] { opacity: 0; animation: hero-fallback 0.6s 2.5s forwards; }
@keyframes hero-fallback { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .day-pill { animation: none; }
  .js:not(.is-ready) [data-hero-title], .js:not(.is-ready) [data-hero] { opacity: 1; animation: none; }
}
