/* Page-local styles: the «Главное» block, 4:3 demo video (pattern of /projects/mgu-deeptalk/#video),
   captioned gallery and a wide layout without empty side margins. */

/* Main point of the project: free AI conversation with the avatar. */
.key-feature { padding: 3.5rem 0 0; scroll-margin-top: 130px; }
.key-feature-box {
  position: relative; overflow: hidden;
  padding: clamp(22px, 3vw, 40px);
  border: 1px solid var(--lime); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--lime-soft) 0%, rgba(255,255,255,0.02) 60%), var(--surface);
  display: grid; gap: 24px;
}
.key-feature .key-eyebrow { color: var(--lime); font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 12px; }
.key-feature h2 { font-size: clamp(26px, 3.2vw, 42px); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 16px; color: var(--text); }
.key-feature .key-lead { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: var(--text); margin: 0; max-width: 70ch; }
.key-feature .key-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.key-feature .key-points li {
  background: rgba(11,15,12,0.55); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 18px 20px; color: var(--text-muted); font-size: 15px; line-height: 1.55;
}
.key-feature .key-points b { display: block; color: var(--text); font-size: 17px; line-height: 1.3; margin: 0 0 6px; }
.key-feature .key-points b::before { content: ""; display: inline-block; width: 9px; height: 9px; margin: 0 10px 2px 0; border-radius: 50%; background: var(--lime); }
.key-feature .key-note { margin: 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; max-width: 80ch; }
.key-feature a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 860px) { .key-feature { padding-top: 2.5rem; } .key-feature .key-points { grid-template-columns: 1fr; } }

.video-demo { padding: 3.5rem 0 4rem; scroll-margin-top: 130px; }
.video-demo .video-heading { max-width: 860px; margin: 0 auto 2rem; }
.video-demo .video-eyebrow { color: var(--lime); font-size: 14px; font-weight: 700; margin: 0 0 12px; }
.video-demo h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.2; margin: 0 0 18px; }
.video-demo .video-summary { color: var(--text-muted); font-size: 16px; line-height: 1.7; margin: 0; }
.video-demo a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.video-demo .video-frame {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: #000;
  aspect-ratio: 4 / 3;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.video-demo .video-frame:focus-within { border-color: var(--lime); }
.video-demo .video-player { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; border: 0; }
.video-demo .video-overlay-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  width: 100%; height: 100%; padding: 16px;
  border: 0; cursor: pointer; font-family: inherit; color: var(--lime);
  background: radial-gradient(ellipse at center, rgba(11,15,12,0.35) 0%, rgba(11,15,12,0.75) 100%);
  transition: opacity .25s ease, visibility .25s ease;
}
.video-demo .video-overlay-play[hidden] { display: none; }
.video-demo .vop-circle { width: clamp(64px, 12vw, 104px); height: clamp(64px, 12vw, 104px); display: block; filter: drop-shadow(0 10px 30px rgba(0,0,0,0.55)); transition: transform .2s ease; }
.video-demo .vop-circle svg { width: 100%; height: 100%; display: block; }
.video-demo .vop-label {
  font-size: clamp(14px, 1.4vw, 17px); font-weight: 600; color: #fff;
  padding: 8px 18px; border-radius: var(--radius-pill);
  background: rgba(11,15,12,0.75); border: 1px solid rgba(255,255,255,0.14);
}
.video-demo .video-overlay-play:hover .vop-circle,
.video-demo .video-overlay-play:focus-visible .vop-circle { transform: scale(1.08); }
.video-demo .video-overlay-play:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; }
.video-demo .video-frame.is-playing .video-overlay-play { opacity: 0; visibility: hidden; pointer-events: none; }
.video-demo .video-steps {
  list-style: none; max-width: 860px; margin: 12px auto 0; padding: 0;
  display: grid; gap: 14px; grid-template-columns: repeat(3, 1fr);
}
.video-demo .video-steps li {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; font-size: 14.5px; color: var(--text-muted); line-height: 1.5;
}
.video-demo .video-steps b { display: block; color: var(--text); font-size: 16px; margin: 10px 0 6px; }
.video-demo .vs-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--lime-soft); border: 1px solid var(--lime); color: var(--lime);
  font-weight: 700; font-size: 13px;
}
.video-demo .video-steps-title { max-width: 860px; margin: 28px auto 0; color: var(--text); font-size: 16px; font-weight: 700; }
.video-demo .video-caption,
.video-demo .video-error { max-width: 860px; margin: 22px auto 0; text-align: center; color: var(--text-muted); font-size: 14.5px; line-height: 1.6; }
@media (max-width: 860px) { .video-demo .video-steps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .video-demo .video-overlay-play, .video-demo .vop-circle { transition: none; } }

/* The first solution card carries the main point of the project. */
#solution .solution-components > :first-child { border-color: var(--lime); }

/* Gallery: 4:3 frames with captions (shared styles assume uncaptioned 180px crops). */
#gallery .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
#gallery .gallery-item { margin: 0; display: flex; flex-direction: column; }
#gallery .gallery-item img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
#gallery .gallery-item figcaption { padding: 10px 12px 12px; color: var(--text-muted); font-size: 13.5px; line-height: 1.45; }
/* 4:3 frames fill the viewport height: keep the viewer and its close button above the fixed site header. */
#lightbox { z-index: 1001; }

/* Wide screens: the page uses the same 1560px frame as the project catalog instead of 1200px,
   and the video stands next to its description. */
@media (min-width: 1200px) {
  .video-demo .video-layout {
    display: grid; column-gap: clamp(32px, 3.2vw, 56px); align-items: start;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    grid-template-areas: "heading heading" "main notes";
  }
  .video-demo .video-heading { grid-area: heading; max-width: 980px; margin: 0 0 28px; }
  .video-demo .video-main { grid-area: main; }
  .video-demo .video-notes { grid-area: notes; }
  .video-demo h2 { font-size: clamp(24px, 2.1vw, 32px); }
  .video-demo .video-frame { max-width: min(100%, calc((100vh - 150px) * 4 / 3)); margin: 0; }
  .video-demo .video-steps-title { max-width: none; margin: 0; }
  .video-demo .video-steps { max-width: none; margin: 12px 0 0; grid-template-columns: 1fr; gap: 10px; }
  .video-demo .video-steps li { padding: 12px 16px 12px 58px; }
  .video-demo .video-steps b { margin: 0 0 4px; }
  .video-demo .vs-num { position: absolute; left: 16px; top: 14px; }
  .video-demo .video-caption, .video-demo .video-error { max-width: none; margin: 16px 0 0; text-align: left; }

  .key-feature-box { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "head points" "note points"; column-gap: clamp(32px, 3.2vw, 56px); align-items: start; }
  .key-feature-head { grid-area: head; }
  .key-feature .key-points { grid-area: points; grid-template-columns: 1fr; }
  .key-feature .key-note { grid-area: note; align-self: end; }
}
@media (min-width: 1400px) {
  body.project-page .container { max-width: 1560px; padding: 0 40px; }
  body.project-page .anchor-nav .container { padding: 0; }
  body.project-page .anchor-nav ul { padding: 0 40px; }
  body.project-page .cdo-site-header__inner { max-width: 1560px; }
  body.project-page .cdo-cta-block { max-width: min(1480px, calc(100% - 80px)); }
  body.project-page .project-hero-grid { grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; }
  body.project-page .answer-first { max-width: 1040px; }
  .video-demo .video-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-areas: "main heading" "main notes"; grid-template-rows: auto 1fr; }
  .video-demo .video-heading { max-width: none; margin: 0 0 8px; }
  .video-demo .video-steps-title { margin: 20px 0 0; }

  /* Body sections: short text blocks stand in pairs, long lines stay readable. */
  #body-root { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 64px; align-items: start; grid-auto-flow: row dense; }
  #body-root > * { grid-column: 1 / -1; }
  #body-root > #context, #body-root > #results, #body-root > #specs, #body-root > #paa { grid-column: 1 / span 7; }
  #body-root > #tasks, #body-root > #fit-for, #body-root > #products, #body-root > #integrations, #body-root > #glossary { grid-column: 8 / -1; }
  #body-root > #specs { grid-row: span 2; }
  #body-root p.lead { max-width: 110ch; }
  #body-root .solution-components { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #gallery .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
