/* AgeReset Bio — styles-v6.css
   New components for the v6 content rebuild. Layers on top of styles.css.
   Reuses the existing design tokens (navy + medical teal, Cormorant + Inter).
   Adds a warm yellow accent for cross-page links and "Больше" toggles. */

:root {
  --gold: #FFCB45;
  --gold-soft: rgba(255,203,69,.12);
}

/* ---------- Yellow cross-links & "Больше" ---------- */
.more-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold);
  font-size: 14px; letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,203,69,.35);
  padding-bottom: 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.more-link:hover { color: #FFD972; border-color: var(--gold); }
.terms-trigger { margin: 40px 0 0; }

.bio-more { margin-top: 14px; }
.bio-more > summary {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; list-style: none;
  color: var(--gold);
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  padding: 6px 12px;
  border: 1px solid rgba(255,203,69,.30);
  border-radius: 100px;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  width: max-content;
}
.bio-more > summary::-webkit-details-marker { display: none; }
.bio-more > summary::after { content: "+"; font-size: 15px; line-height: 1; }
.bio-more[open] > summary::after { content: "–"; }
.bio-more > summary:hover { background: var(--gold-soft); border-color: var(--gold); }
.bio-more[open] > summary { margin-bottom: 14px; }
.bio-more p { color: var(--text-2); font-size: 14px; line-height: 1.62; margin: 0 0 12px; }
.bio-more p:last-child { margin-bottom: 0; }

/* ---------- Sub-headings inside sections ---------- */
.sub-h {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 34px);
  color: var(--text);
  margin: 64px 0 24px;
  letter-spacing: -.005em;
}

/* ---------- Problem: three barriers ---------- */
.barriers {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px;
}
.barriers li {
  padding: 32px 28px 34px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  position: relative;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.barriers li:hover { border-color: var(--line-3); transform: translateY(-3px); }
.barrier-n {
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: 48px; line-height: 1; color: var(--warn);
  display: block; margin-bottom: 16px;
}
.barriers h3 { font-family: var(--font-display); font-weight: 400; font-size: 23px; margin: 0 0 10px; color: var(--text); }
.barriers p { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0; }

/* ---------- Solution: 4-up properties (extends .layers) ---------- */
.layers.props-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.props-4 .layer-n { font-size: 52px; }
.props-4 h3 { font-size: 24px; }

/* ---------- What is DPC ---------- */
.dpc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dpc-block {
  padding: 36px 34px;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
}
.dpc-cap {
  font-size: 11px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 16px; font-weight: 500;
}
.dpc-block p:not(.dpc-cap) { color: var(--text-2); font-size: clamp(15px,1.3vw,17px); line-height: 1.65; margin: 0; }
.dpc-block strong { color: var(--text); font-weight: 500; }

/* ---------- Why now: bg image + inflection callout ---------- */
.s-now { position: relative; overflow: hidden; }
.now-bg { position: absolute; inset: 0; z-index: 0; }
.now-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .12; filter: brightness(.6) saturate(.8); }
.now-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,15,28,.82), rgba(10,15,28,.97));
}
.s-now .wrap { position: relative; z-index: 1; }
.inflection {
  margin-top: 40px; max-width: 820px;
  padding: 32px 34px;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
  background: rgba(0,212,168,.04);
}
.inflection-cap { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; font-weight: 600; }
.inflection-body { color: var(--text-2); font-size: clamp(15px,1.35vw,18px); line-height: 1.6; margin: 0; }
.inflection-body strong { color: var(--text); font-weight: 500; }

/* ---------- What's already done ---------- */
.done-list { list-style: none; padding: 0; margin: 0; position: relative; }
.done-list::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--line-2));
  opacity: .35;
}
.done-list li { position: relative; padding: 0 0 44px 44px; }
.done-list li:last-child { padding-bottom: 0; }
.done-list li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px rgba(0,212,168,.10);
}
.done-when { display: block; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; font-weight: 500; }
.done-list h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(22px,2.2vw,28px); margin: 0 0 12px; color: var(--text); }
.done-list p { color: var(--text-2); font-size: 16px; line-height: 1.62; margin: 0; max-width: 64ch; }
.done-list strong { color: var(--text); font-weight: 500; }

/* Figure card (data images) */
.figure-card { margin: 22px 0 0; }
.figure-imgs { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: stretch; max-width: 760px; }
.figure-imgs a { display: block; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; background: #fff; transition: border-color var(--t-fast), transform var(--t-fast); }
.figure-imgs a:hover { border-color: var(--accent); transform: translateY(-2px); }
.figure-imgs img { width: 100%; height: 100%; object-fit: contain; display: block; background: #fff; }
.figure-card figcaption { margin-top: 12px; font-size: 12px; letter-spacing: .04em; color: var(--text-3); max-width: 760px; }

/* ---------- Success criteria ---------- */
.criteria-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.criteria-list li {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 26px 28px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
}
.cr-n { font-family: var(--font-display); font-style: italic; font-size: 30px; color: var(--accent); line-height: 1; flex-shrink: 0; }
.criteria-list h3 { font-family: var(--font-display); font-weight: 400; font-size: 22px; margin: 0 0 8px; color: var(--text); }
.criteria-list p { color: var(--text-2); font-size: 14.5px; line-height: 1.55; margin: 0; }

.platform-punch {
  margin: 56px auto 0; max-width: 880px; text-align: center;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(22px, 2.6vw, 34px); line-height: 1.3; color: var(--text);
  border-top: 1px solid var(--line); padding-top: 40px;
}
.platform-punch em { font-style: italic; color: var(--accent); }
.platform-punch strong { color: var(--text); font-weight: 500; }

/* ---------- Roadmap ---------- */
.roadmap { list-style: none; padding: 0; margin: 0; position: relative; }
.roadmap::before {
  content: ""; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 1px;
  background: linear-gradient(180deg, var(--accent), var(--line-2) 70%);
  opacity: .4;
}
.roadmap li { position: relative; padding: 0 0 36px 44px; }
.roadmap li:last-child { padding-bottom: 0; }
.roadmap li::before {
  content: ""; position: absolute; left: 1px; top: 6px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line-3);
}
.roadmap li.rm-current::before { border-color: var(--accent); box-shadow: 0 0 0 5px rgba(0,212,168,.14); }
.rm-tag {
  display: inline-block; font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 10px; font-weight: 500;
}
.rm-current .rm-tag {
  color: #02180F; background: var(--accent); padding: 4px 10px; border-radius: 100px; letter-spacing: .14em;
}
.roadmap h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(21px,2vw,26px); margin: 0 0 8px; color: var(--text); }
.roadmap li.rm-current h3 { color: var(--accent); }
.roadmap p { color: var(--text-2); font-size: 15px; line-height: 1.58; margin: 0; max-width: 70ch; }

/* ---------- Investors: value chain ---------- */
.value-chain {
  display: flex; flex-wrap: wrap; gap: 10px 8px; align-items: center;
  margin: 40px 0 8px; max-width: 920px;
}
.value-chain span {
  display: inline-flex; align-items: center;
  font-size: 12px; letter-spacing: .04em; color: var(--text-2);
  padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 100px;
  background: var(--bg-1);
}
.value-chain span:not(:last-child)::after {
  content: "→"; margin-left: 12px; margin-right: -4px; color: var(--accent); opacity: .6;
}

/* Monetization stages */
.money-stages { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.money-stages li {
  display: grid; grid-template-columns: 64px 1fr; gap: 24px; align-items: start;
  padding: 28px 30px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  transition: border-color var(--t-fast);
}
.money-stages li:hover { border-color: var(--line-3); }
.ms-n { grid-row: span 2; align-self: start; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: 44px; color: var(--accent); line-height: 1; }
.money-stages h3 { font-family: var(--font-display); font-weight: 400; font-size: 24px; margin: 4px 0 8px; color: var(--text); }
.money-stages p { color: var(--text-2); font-size: 15px; line-height: 1.6; margin: 0; }
.money-stages strong { color: var(--text); font-weight: 500; }

.invest-foot {
  margin: 56px auto 0; max-width: 820px; text-align: center;
  font-family: var(--font-display); font-style: italic; font-weight: 300;
  font-size: clamp(18px,1.8vw,26px); line-height: 1.4; color: var(--text-2);
  border-top: 1px solid var(--line); padding-top: 36px;
}
.invest-foot em { color: var(--accent); font-style: italic; }

/* ---------- Overflow safety ---------- */
/* .wrap is a flex child of .s; without min-width:0 it cannot shrink below the
   gallery's intrinsic width, which forces horizontal page scroll on mobile. */
.s .wrap { min-width: 0; }

/* ---------- Team gallery (horizontal scroll) ---------- */
.gallery {
  min-width: 0; max-width: 100%;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 34%);
  gap: 16px; margin: 40px 0 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-width: thin; scrollbar-color: var(--line-3) transparent;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { height: 6px; }
.gallery::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 3px; }
.gallery figure {
  margin: 0; scroll-snap-align: start;
  border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--bg-2);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(.94) saturate(1.02); transition: filter var(--t-med), transform var(--t-med); }
.gallery figure:hover img { filter: brightness(1) saturate(1.06); transform: scale(1.03); }

/* ---------- Team grid (5 members) ---------- */
.team-grid-v6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.person-mentor { border-color: var(--line-3); }
.person-mentor .person-photo { border-color: var(--warn); }
.person-mentor .role { color: var(--warn); }

/* ---------- Glossary ---------- */
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; margin: 40px 0 0; }
.glossary > div {
  display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: baseline;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.glossary dt { font-family: var(--font-display); font-size: 22px; color: var(--accent); margin: 0; }
.glossary dd { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }

/* References */
.refs { list-style: none; counter-reset: ref; padding: 0; margin: 24px 0 0; max-width: 920px; }
.refs li { counter-increment: ref; border-bottom: 1px solid var(--line); }
.refs li a {
  display: block; position: relative;
  padding: 18px 0 18px 40px; color: var(--text); font-size: 15.5px; line-height: 1.5;
  transition: color var(--t-fast);
}
.refs li a::before { content: counter(ref); position: absolute; left: 0; top: 16px; font-family: var(--font-display); font-style: italic; font-size: 22px; color: var(--accent); }
.refs li a:hover { color: var(--accent); }
.ref-doi { display: block; margin-top: 4px; font-size: 12px; letter-spacing: .04em; color: var(--text-3); word-break: break-word; }

/* ---------- Contacts: action cards ---------- */
.actions-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0 0 56px; }
.action-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 26px 26px 28px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.action-card:hover { border-color: var(--accent); transform: translateY(-3px); background: rgba(0,212,168,.04); }
.action-h { font-family: var(--font-display); font-size: 22px; color: var(--text); }
.action-s { font-size: 13px; color: var(--text-3); letter-spacing: .02em; }

.form-intro { font-size: 14px; color: var(--text-3); line-height: 1.55; margin: 0 0 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .barriers, .layers.props-4, .dpc-grid, .criteria-list, .money-stages li,
  .glossary, .team-grid-v6, .actions-row { grid-template-columns: 1fr !important; }
  .layers.props-4 { grid-template-columns: 1fr 1fr !important; }
  .figure-imgs { grid-template-columns: 1fr; }
  .money-stages li { grid-template-columns: 1fr; gap: 8px; }
  .ms-n { font-size: 36px; }
  .gallery { grid-auto-columns: minmax(240px, 78%); }
}
@media (max-width: 600px) {
  .s-glossary .glossary > div, .glossary > div { grid-template-columns: 1fr; gap: 4px; }
  .layers.props-4 { grid-template-columns: 1fr !important; }
  .sub-h { margin-top: 48px; }
  .value-chain span:not(:last-child)::after { margin-left: 8px; }
  .done-list li, .roadmap li { padding-left: 34px; }
  .barriers li { padding: 24px 20px; }
  .refs li a { grid-template-columns: 26px 1fr; }
}

/* ============================================================
   v7 — nav menu, desktop scroll/heading polish, «Дополнительно»
   ============================================================ */

/* Anchored navigation: smooth in-page jumps; #hash deep-links work natively.
   Sections already carry scroll-margin-top so the fixed header never overlaps. */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:target { scroll-margin-top: 92px; }

/* ---------- Top menu ---------- */
.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a {
  position: relative;
  font-size: 13px; letter-spacing: .04em; color: var(--text-2);
  padding: 6px 1px; white-space: nowrap;
  transition: color var(--t-fast);
}
.nav-menu a:hover { color: var(--accent); }
.nav-menu a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-fast);
}
.nav-menu a:hover::after { transform: scaleX(1); }
@media (max-width: 1000px) { .nav-menu { display: none; } }

/* ---------- Desktop heading sizing (calmer than full-bleed v6) ---------- */
@media (min-width: 1001px) {
  .h2 { font-size: clamp(34px, 4.2vw, 52px); }
  .hero-title { font-size: clamp(52px, 7vw, 104px); }
  .mission-headline { font-size: clamp(34px, 4.4vw, 54px); }
  .insight-line { font-size: clamp(40px, 5vw, 64px); }
}

/* ---------- Photo framing: keep heads in frame ---------- */
.gallery img { object-position: center top; }
.person-photo img { object-position: center 20%; }

/* ---------- «Дополнительно» — hidden team-history overlay ---------- */
.extra-trigger { margin: 8px 0 44px; }
.more-btn {
  font-family: inherit; background: transparent; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--gold); font-size: 14px; letter-spacing: .02em;
  border-bottom: 1px solid rgba(255,203,69,.35); padding: 0 0 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.more-btn:hover { color: #FFD972; border-color: var(--gold); }

body.extra-open { overflow: hidden; }
.extra-overlay {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; justify-content: center; align-items: stretch;
}
.extra-overlay[hidden] { display: none; }
.extra-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,8,16,.82);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.extra-panel {
  position: relative; z-index: 1;
  width: min(920px, 100%); max-height: 100vh; overflow-y: auto;
  background: var(--bg-1);
  border-left: 1px solid var(--line-2); border-right: 1px solid var(--line-2);
  box-shadow: 0 0 80px rgba(0,0,0,.6);
  padding: clamp(24px, 4vw, 52px) clamp(20px, 5vw, 56px) 96px;
  -webkit-overflow-scrolling: touch;
}
.extra-panel .h2 { margin: 8px 0 24px; }
.extra-close {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 28px; padding: 9px 16px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 100px;
  color: var(--text-2); font: 500 13px/1 var(--font-body); letter-spacing: .04em;
  cursor: pointer; transition: border-color var(--t-fast), color var(--t-fast);
}
.extra-close:hover { border-color: var(--accent); color: var(--accent); }
.extra-photo {
  margin: 28px 0 0; max-width: 760px;
  border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden;
}
.extra-photo img { width: 100%; height: auto; display: block; filter: brightness(.9) saturate(.95); }
.extra-foot { margin: 40px 0 0; }
