/* ==========================================================================
   CODE11 — inner pages
   Loaded on top of style.css: reuses its tokens, header, footer and buttons.
   ========================================================================== */

/* -------------------------------------------------------- page heading --- */

.page-hero {
  position: relative;
  padding: 190px 0 64px;
  overflow: hidden;
  background: var(--bg-light);
}

.page-hero--tight { padding-bottom: 48px; }

.page-hero__glow {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}

.page-hero__glow--lavender {
  top: -300px;
  left: calc(50% - 720px + 880px);
  width: 640px;
  height: 560px;
  background: var(--accent-lavender);
  opacity: .5;
}

.page-hero__glow--blue {
  top: 40px;
  left: calc(50% - 720px + 1120px);
  width: 460px;
  height: 400px;
  background: var(--blue-glass);
  opacity: .5;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero__inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 900px;
}

.page-title {
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.02;
}

.page-lead {
  max-width: 620px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted-light);
}

/* --------------------------------------------------------- breadcrumbs --- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.crumbs a { transition: color .2s ease; }
.crumbs a:hover { color: var(--signal-blue); }
.crumbs__sep { color: var(--border-light); }
.crumbs__current { color: var(--text-on-light); }

/* --------------------------------------------------------------- facts --- */
/* the mono stat row used under page headings */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 48px;
  padding-top: 8px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.fact__label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.fact__value {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
}

.fact__value--blue { color: var(--signal-blue); }

/* ------------------------------------------------------------- section --- */

.block {
  padding: 90px 0;
  background: var(--bg-light);
}

.block--dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.block--tight { padding: 56px 0; }

.block .container {
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.block__head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 780px;
}

/* ============================================================== SERVICES === */
/* A list of full-width rows rather than another card grid — it keeps the
   services scannable and stops the page turning into boxes inside boxes. */

.service-list {
  display: flex;
  flex-direction: column;
}

.service-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 360px) minmax(0, 1fr) 44px;
  align-items: start;
  gap: 32px;
  padding: 32px 20px;
  border-top: 1px solid var(--border-light);
  margin-inline: -20px;
  border-radius: 16px;
  transition: background-color .3s ease;
}

.service-list .service-row:last-child { border-bottom: 1px solid var(--border-light); }

.service-row:hover { background: var(--surface-light); }

.service-row__index {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--signal-blue);
}

.service-row__title {
  font-size: 26px;
  line-height: 1.15;
}

.service-row__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-row__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted-light);
}

.service-row__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-row__go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}

.service-row:hover .service-row__go {
  border-color: var(--bg-dark);
  background: var(--bg-dark);
  color: var(--accent-lime);
  transform: translate(2px, -2px);
}

/* included-in list on the dark band */

.checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 32px;
}

.checklist li {
  display: flex;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-dark);
  font-size: 15px;
  line-height: 1.55;
}

/* одноколоночный вариант списка — используется на странице услуги */
.checklist--single { grid-template-columns: minmax(0, 1fr); }

.checklist__mark {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  color: var(--accent-lime);
}

/* engagement formats */

.formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.format {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--surface-light);
}

.format--accent {
  background: var(--accent-lime);
}

.format__tag {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.format--accent .format__tag { color: var(--blue-deep); }

.format__title {
  font-size: 22px;
  line-height: 1.15;
}

.format__text {
  flex: 1;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted-light);
}

.format--accent .format__text { color: #3B4A12; }

.format__price {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1;
  color: var(--text-on-light);
}

/* ========================================================= SERVICE DETAIL === */

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 64px;
}

.detail__aside {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-card);
  background: var(--surface-light);
}

.detail__aside-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bg-light);
  font-size: 14px;
}

.detail__aside-row:last-of-type { border-bottom: 0; padding-bottom: 0; }

.detail__aside-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.detail__aside-value { font-weight: 600; text-align: right; }

.detail__body {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.detail__section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail__section h2 {
  font-size: 30px;
  line-height: 1.16;
}

.detail__section p {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted-light);
}

/* numbered steps inside a detail page */

.stages {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stage {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid var(--border-light);
}

.stage__num {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--signal-blue);
}

.stage__title {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.3;
}

.stage__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted-light);
}

/* ============================================================== FILTERS === */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 11px 18px;
  border: 1px solid var(--border-light);
  border-radius: 1000px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text-muted-light);
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

.filter:hover { border-color: var(--text-muted-light); }

.filter.is-active {
  border-color: var(--bg-dark);
  background: var(--bg-dark);
  color: var(--accent-lime);
}

.filter-empty {
  padding: 40px 0;
  font-size: 15px;
  color: var(--text-muted-light);
}

/* ========================================================== CASE DETAIL === */

.case-cover {
  border: 3px solid var(--bg-dark);
  border-radius: 24px;
  overflow: hidden;
}

.case-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.case-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 64px;
}

.case-split h2 {
  margin-bottom: 16px;
  font-size: 30px;
  line-height: 1.16;
}

.case-split p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted-light);
}

.case-split p + p { margin-top: 14px; }

.results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.result {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--border-dark);
}

.result__value {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-lime);
}

.result__label {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted-dark);
}

.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.shot {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  object-fit: cover;
}

.shot figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

/* next / previous case */

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.pager__side {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pager__side--next { text-align: right; align-items: flex-end; }

.pager__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.pager__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.15;
  transition: color .2s ease;
}

.pager a:hover .pager__title { color: var(--signal-blue); }

/* ============================================================ MATERIALS === */

.feature-post {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius-card);
  background: var(--surface-light);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}

.feature-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(18, 59, 138, .12);
}

.feature-post__media { overflow: hidden; }

.feature-post__media img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.feature-post:hover .feature-post__media img { transform: scale(1.04); }

.feature-post__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 40px;
}

.feature-post__title {
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.14;
}

.feature-post__text {
  flex: 1;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted-light);
}

.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 12px 26px;
  border-radius: var(--radius-card);
  background: var(--surface-light);
  transition: transform .35s ease, box-shadow .35s ease;
}

.post:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(18, 59, 138, .12);
}

.post__media {
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
}

.post__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.post:hover .post__media img { transform: scale(1.04); }

.post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding-inline: 10px;
}

.post__title {
  font-size: 20px;
  line-height: 1.22;
}

.post__text {
  flex: 1;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-muted-light);
}

/* shared post meta line */

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.post-meta__topic { color: var(--signal-blue); }
.post-meta__dot { color: var(--border-light); }

/* ============================================================== ARTICLE === */

.read-progress {
  position: fixed;
  z-index: 70;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--signal-blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 64px;
}

.toc {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toc__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border-light);
}

.toc__list a {
  display: block;
  padding: 8px 0 8px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-muted-light);
  transition: color .2s ease, border-color .2s ease;
}

.toc__list a:hover { color: var(--text-on-light); }

.toc__list a.is-current {
  border-left-color: var(--signal-blue);
  color: var(--text-on-light);
  font-weight: 600;
}

/* prose */

.prose {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.72;
}

.prose > * + * { margin-top: 26px; }

.prose h2 {
  margin-top: 52px;
  font-size: 30px;
  line-height: 1.18;
  scroll-margin-top: 110px;
}

.prose h3 {
  margin-top: 36px;
  font-size: 21px;
  line-height: 1.25;
}

.prose p { color: #2A2A2A; }

.prose a {
  color: var(--signal-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose ul,
.prose ol {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 4px;
}

.prose li {
  display: flex;
  gap: 14px;
  color: #2A2A2A;
}

.prose li::before {
  content: "—";
  flex-shrink: 0;
  color: var(--signal-blue);
}

.prose ol { counter-reset: step; }

.prose ol li { counter-increment: step; }

.prose ol li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.9;
}

.prose blockquote {
  padding: 4px 0 4px 26px;
  border-left: 3px solid var(--accent-lime);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}

.prose pre {
  padding: 24px;
  border-radius: 16px;
  background: var(--bg-dark);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #D7DEE8;
}

.prose pre .tok-tag  { color: #7FB0FF; }
.prose pre .tok-attr { color: var(--accent-lime); }
.prose pre .tok-val  { color: #B7BFCC; }

.prose code {
  padding: 2px 6px;
  border-radius: 6px;
  background: #E4E8F8;
  font-family: var(--font-mono);
  font-size: .88em;
}

.prose pre code { padding: 0; background: none; font-size: inherit; }

.prose figure { margin: 0; }

.prose figure img {
  width: 100%;
  border-radius: 16px;
}

.prose figcaption {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-muted-light);
}

.prose hr {
  height: 1px;
  border: 0;
  margin: 44px 0;
  background: var(--border-light);
}

/* author sign-off */

.author {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 720px;
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--border-light);
}

.author__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--bg-dark);
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-lime);
}

.author__name { font-family: var(--font-heading); font-size: 17px; font-weight: 600; }

.author__role {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-muted-light);
}

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 1280px) {
  .detail { grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
  .article-layout { grid-template-columns: 200px minmax(0, 1fr); gap: 40px; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .page-hero { padding-top: 150px; }

  .service-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 16px 20px;
  }

  .service-row__body { grid-column: 2 / 4; }

  .checklist,
  .formats,
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }

  .toc {
    position: static;
    padding: 20px;
    border-radius: 16px;
    background: var(--surface-light);
  }

  .detail { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .detail__aside { position: static; order: -1; }
}

@media (max-width: 760px) {
  .page-hero { padding: 130px 0 40px; }
  .block { padding: 56px 0; }
  .block .container { gap: 32px; }

  .facts { gap: 20px 32px; }

  /* stack everything on one left edge — a title indented past the index while
     the description below it is not reads like a mistake */
  .service-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 16px;
    margin-inline: -16px;
  }

  .service-row__go { display: none; }
  .service-row__title { font-size: 22px; }

  .checklist,
  .formats,
  .posts,
  .case-split,
  .results,
  .shots { grid-template-columns: minmax(0, 1fr); }

  .feature-post { grid-template-columns: minmax(0, 1fr); }
  .feature-post__media img { min-height: 220px; }
  .feature-post__body { padding: 26px; }

  .detail__section h2,
  .case-split h2 { font-size: 24px; }

  .prose { font-size: 16px; }
  .prose h2 { margin-top: 38px; font-size: 24px; }
  .prose blockquote { font-size: 19px; padding-left: 18px; }
  .prose pre { padding: 18px; font-size: 12px; }

  .pager { flex-direction: column; align-items: flex-start; gap: 24px; }
  .pager__side--next { text-align: left; align-items: flex-start; }
}
