/*
 * Theme additions on top of /assets/css/main.css.
 *
 * main.css lives in the web-root /assets folder shared with the static-site
 * history and is left untouched; fixes and new section styles go here and load
 * right after it (inc/assets.php).
 */

/* ---------- Timeline (/istoriya/) ----------
   The line and dots sat 6px above the scroll strip's top edge, and a scrolling
   box clips vertically, so the dots were cut off. Moved 8px down, same spacing. */
.htl-item::before { top: -32px; }
.htl-item::after { top: -38px; }

/* ---------- Gallery (/za-nas/) ----------
   The light placeholder behind each photo showed through the rounded,
   fractionally sized clip as a 1px light rim on the dark section. */
.gallery-item { background: transparent; }

/* ---------- Steps carousel: light background + phone links ---------- */
.hsteps--light { background: transparent; color: var(--onyx); }
.hsteps--light .hstep::before { background: var(--line-2); }
.hsteps--light .hstep__node { background: var(--paper); border-color: var(--line-2); color: var(--faded); }
.hsteps--light .hstep.lit .hstep__node { background: var(--onyx); color: #fff; border-color: var(--onyx); box-shadow: 0 0 0 6px rgba(11, 11, 12, 0.05), 0 10px 24px rgba(11, 11, 12, 0.16); }
.hsteps--light .hstep__title { color: var(--ink-3); }
.hsteps--light .hstep.lit .hstep__title { color: var(--onyx); }
.hsteps--light .hstep__text { color: var(--ink-3); }
.hsteps--light .carousel-btn { border-color: var(--line-2); color: var(--onyx); }
.hsteps--light .carousel-btn:hover { background: var(--onyx); color: #fff; border-color: var(--onyx); }
.hstep__text a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hstep__text a:hover { text-decoration-thickness: 2px; }

/* ---------- Project cards: available units + stage (replaced the countdown) ---------- */
.project__facts { margin: auto 0 0; padding-top: 22px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project__fact { min-width: 0; }
.project__fact-label { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faded); margin-bottom: 10px; }
.project__fact-value { margin: 0; font-size: clamp(1.1rem, 1.4vw, 1.35rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--onyx); }

/* ---------- Two paths (homepage) ---------- */
.paths__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 26px); }
.path { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.path__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--mist); }
.path__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.path:hover .path__media img { transform: scale(1.04); }
.path__body { padding: clamp(28px, 2.8vw, 46px); display: flex; flex-direction: column; flex: 1; }
.path__tag { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faded); margin-bottom: 10px; }
.path__title { font-size: clamp(1.4rem, 2vw, 1.95rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 14px; color: var(--onyx); }
.path__text { font-size: 1rem; line-height: 1.6; color: var(--ink-3); margin-bottom: 26px; }
.path__list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 34px; }
.path__item { display: flex; gap: 14px; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.path__ic { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; margin-top: 1px; background: var(--onyx); color: #fff; }
.path__btn { margin-top: auto; align-self: flex-start; }
.paths--dark .path { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.paths--dark .path__title { color: #fff; }
.paths--dark .path__text, .paths--dark .path__item { color: rgba(255, 255, 255, 0.7); }
.paths--dark .path__ic { background: #fff; color: var(--onyx); }
.paths--dark .path__btn { --btn-bg: #fff; --btn-fg: var(--onyx); }
@media (max-width: 960px) { .paths__grid { grid-template-columns: 1fr; } }
.path__btn { white-space: nowrap; }
@media (max-width: 520px) { .path__btn { align-self: stretch; padding-inline: 1.1em; } }

/* ---------- Blog post page (single.php) ---------- */
.post-hero { min-height: 0; background: var(--onyx); padding-bottom: 0; }
.post-hero .page-hero__inner { padding-top: clamp(56px, 9vh, 120px); padding-bottom: clamp(48px, 7vh, 88px); }
.post-hero__title { font-size: clamp(2rem, 4.4vw, 3.7rem); line-height: 1.04; max-width: 24ch; }
.post-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; letter-spacing: .14em; }
.post-hero__meta a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.35); transition: border-color .32s var(--ease-hover); }
.post-hero__meta a:hover { border-color: #fff; }
.post-hero__tags { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.post-hero__tags li { font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,0.78); border: 1px solid var(--line-dark-2); border-radius: var(--r-pill); padding: .5em .95em; }

.article-section { padding-top: clamp(40px, 6vw, 96px); }
.article-layout { max-width: 780px; margin-inline: auto; }
.article { min-width: 0; }
.article-toc { display: none; }
@media (min-width: 1180px) {
  .article-layout.has-toc { max-width: 1180px; display: grid; grid-template-columns: 270px minmax(0, 780px); gap: clamp(56px, 6vw, 110px); justify-content: center; }
  .article-toc { display: block; position: sticky; top: calc(var(--header-h) + 28px); align-self: start; max-height: calc(100vh - var(--header-h) - 56px); overflow-y: auto; padding-right: 6px; }
}
.article-toc__title { font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--faded); margin-bottom: 16px; }
.article-toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line-2); }
.article-toc a { display: block; margin-left: -1px; padding: .5em 0 .5em 18px; border-left: 1px solid transparent; font-size: .9rem; line-height: 1.38; color: var(--ink-3); transition: color .32s var(--ease-hover), border-color .32s var(--ease-hover); }
.article-toc a:hover, .article-toc a.is-active { color: var(--onyx); border-left-color: var(--onyx); }

.article__cover { margin: 0 0 clamp(32px, 4vw, 52px); }
.article__cover img { width: 100%; height: auto; border-radius: var(--r-lg); }
.article__back { margin-top: clamp(40px, 5vw, 64px); padding-top: 28px; border-top: 1px solid var(--line); }

.prose { font-size: clamp(1.03rem, 1.1vw, 1.13rem); line-height: 1.75; color: var(--ink-2); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 2.1em; font-size: clamp(1.5rem, 2.3vw, 2.05rem); font-weight: 700; line-height: 1.14; letter-spacing: -0.022em; color: var(--onyx); scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { margin-top: 1.8em; font-size: clamp(1.2rem, 1.6vw, 1.42rem); font-weight: 700; line-height: 1.22; letter-spacing: -0.015em; color: var(--onyx); }
.prose h4 { margin-top: 1.6em; font-size: 1.06rem; font-weight: 700; line-height: 1.3; color: var(--onyx); }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .7em; }
.prose > :first-child { margin-top: 0; }
.prose strong { font-weight: 500; color: var(--onyx); }
.prose h2 strong, .prose h3 strong, .prose h4 strong { font-weight: inherit; }
.prose a { color: var(--onyx); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--line-2); transition: text-decoration-color .32s var(--ease-hover); }
.prose a:hover { text-decoration-color: var(--onyx); }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--faded); }
.prose .post-figure { margin-block: 2em; }
.prose .post-figure img { width: 100%; height: auto; border-radius: var(--r-md); background: var(--mist); }
.prose figcaption { margin-top: .75em; font-size: .86rem; line-height: 1.5; color: var(--ink-3); }
.prose figcaption em { font-style: normal; }
