/* ESGWorks — presentation page. Builds on styles.css (the ESGWorks site); same tokens, same face. */
:root { --hatch: repeating-linear-gradient(135deg, rgba(8, 49, 108, 0.22) 0 6px, transparent 6px 12px); }
body { background: var(--paper); }

/* hero: proposal line under the logo */
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--step-small); color: var(--soft); font-weight: 500; }
.hero-meta span + span::before { content: "·"; margin-right: 18px; color: var(--soft); }
.hero-name .display { max-width: 12ch; }

/* ---------- facts: why now ---------- */
.fact { background: var(--surface); padding: clamp(20px, 2.4vw, 32px); display: grid; align-content: space-between; gap: 40px; min-height: 260px; min-width: 0; }
.fact:first-child { background: var(--ink); color: var(--on-ink); }
.fact:first-child .fact-src { color: #a9bddb; }
.fact-num { font-size: clamp(2rem, 1.1rem + 2.2vw, 3.25rem); overflow-wrap: anywhere; font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.fact-unit { display: block; font-size: var(--step-body); font-weight: 500; letter-spacing: 0; margin-top: 10px; }
.fact-text { font-size: var(--step-body); line-height: 1.35; }
.fact-src { font-size: var(--step-small); color: var(--soft); margin-top: 10px; }

/* ---------- sources ---------- */
.src { margin-top: var(--section); padding-bottom: 32px; }
.src h2 { font-size: var(--step-body); margin-bottom: 16px; }
.src ol { list-style: decimal; padding-left: 1.4em; display: grid; gap: 6px; font-size: var(--step-small); color: var(--soft); max-width: 90ch; }
.src a { color: var(--ink); overflow-wrap: anywhere; }
sup a { text-decoration: none; font-weight: 500; color: inherit; opacity: 0.7; }

/* =====================================================================
   Stage 2: languages, team, blog, contact form (same tokens as above)
   ===================================================================== */
:root { --error: #b42318; --field: #ffffff; }
:root[lang="ru"] { --font: "Onest", "General Sans", "Helvetica Neue", Arial, sans-serif; }

/* ---------- top bar: nav, language switch, CTA ---------- */
.bar { grid-template-columns: 60px 1fr auto auto; }
.bar-nav { padding-left: 24px; gap: clamp(1rem, 1.8vw, 2rem); }
.bar-nav a[aria-current="page"] { text-decoration-color: currentColor; }
.bar-lang { display: flex; align-items: stretch; padding: 0 6px; font-weight: 500; font-size: var(--step-small); }
.bar-lang a, .menu-lang a { display: inline-flex; align-items: center; padding: 0 10px; text-decoration: none; color: var(--soft); letter-spacing: 0.04em; }
.bar-lang a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--green); }
@media (hover: hover) and (pointer: fine) { .bar-lang a:hover { color: var(--ink); } }
.menu-lang { display: flex; gap: 4px; padding: 8px 10px 4px; margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.menu-lang a { min-height: 44px; color: #c6d3e8; }
.menu-lang a[aria-current="true"] { color: #fff; box-shadow: inset 0 -3px 0 var(--green); }

/* the links and the CTA no longer fit side by side below ~1024px: switch to the menu */
@media (max-width: 64em) {
  .bar { grid-template-columns: 60px 1fr auto; }
  .bar-nav, .bar-action { display: none; }
  .bar-menu { display: block; overflow: visible; z-index: 5; }
  .bar-menu > button { width: 100%; height: 60px; display: flex; align-items: center; justify-content: flex-end; padding: 0 20px; font-weight: 500; cursor: pointer; background: none; border: 0; }
  .menu-panel[hidden] { display: none; }
  .menu-panel { position: absolute; right: 0; top: calc(100% + 6px); width: 100%; min-width: 240px; background: var(--ink); color: var(--on-ink); display: grid; padding: 8px 0; }
  .menu-panel > a { padding: 12px 20px; text-decoration: none; font-weight: 500; }
  .menu-panel > a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--green); }
}
@media (max-width: 47.99em) {
  .bar { grid-template-columns: 56px 1fr; }
  .bar-lang { display: none; }
  .bar-menu > button { height: 56px; }
}

/* blog pages: the bar alone, without the hero board */
.topbar { padding: var(--gap); }
.topbar .bar { height: 60px; }
@media (max-width: 47.99em) { .topbar .bar { height: 56px; } }

/* ---------- shared section head ---------- */
.sec-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; margin-bottom: 48px; }
.sec-top .head { grid-column: 1 / 7; }
.sec-top .lead { grid-column: 8 / 13; align-self: end; color: var(--soft); max-width: 44ch; }

/* ---------- team ---------- */
.team { margin-top: var(--section); }
.member { display: grid; align-content: start; gap: 6px; min-width: 0; }
.member-pic { position: relative; aspect-ratio: 4 / 5; max-width: 100%; background: var(--ink); overflow: hidden; margin-bottom: 14px; }
.member-pic img { position: absolute; inset: 0; }
.member-initials { position: absolute; inset: 0; display: grid; place-items: end start; padding: 20px; color: var(--on-ink); font-size: clamp(3rem, 2rem + 4vw, 6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 0.85; }
.member-initials::after { content: ""; position: absolute; right: 20px; top: 20px; width: 28px; height: 28px; background: var(--green); }
.member-name { font-size: var(--step-lead); line-height: 1.1; }
.member-role { font-weight: 500; color: var(--soft); }
.member-bio { max-width: 40ch; }

/* ---------- blog cards (home "News", list, related) ---------- */
.news { margin-top: var(--section); }
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px var(--gap); }
.post { position: relative; display: grid; align-content: start; gap: 10px; min-width: 0; }
.post-pic { aspect-ratio: 3 / 2; max-width: 100%; overflow: hidden; background: var(--surface); margin-bottom: 8px; }
.post-pic img { transition: transform 900ms var(--ease-out); }
.post-meta { font-size: var(--step-small); color: var(--soft); font-variant-numeric: tabular-nums; }
.post-title { font-size: var(--step-lead); line-height: 1.12; letter-spacing: -0.015em; }
.post-title a { text-decoration: none; }
.post-title a::after { content: ""; position: absolute; inset: 0; }
.post-excerpt { color: var(--soft); max-width: 48ch; }
@media (hover: hover) and (pointer: fine) {
  .post:hover .post-pic img { transform: scale(1.04); }
  .post:hover .post-title a { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
}
.post-title a:focus-visible { outline: none; }
.post:has(.post-title a:focus-visible) { outline: 3px solid var(--green); outline-offset: 6px; }

/* blog list header */
.page-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 24px; margin-top: calc(var(--section) * 0.35); }
.page-title { grid-column: 1 / 8; min-height: 32svh; display: flex; align-items: flex-end; padding: 24px; }
.page-lead { grid-column: 9 / 13; align-self: end; color: var(--soft); }
.page-head + .news { margin-top: calc(var(--section) * 0.6); }

/* ---------- article ---------- */
.article { margin-top: calc(var(--section) * 0.35); }
.art-head { max-width: calc(68ch + 2 * var(--margin)); margin-inline: auto; display: grid; gap: 16px; }
.art-back { margin-bottom: 24px; font-weight: 500; }
.art-title { font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; }
.art-lead { font-size: var(--step-lead); line-height: 1.3; color: var(--soft); }
.art-pic { margin: 48px var(--gap) 0; height: clamp(260px, 52svh, 620px); }
.art-pic img { position: absolute; inset: 0; }
.prose { max-width: calc(68ch + 2 * var(--margin)); margin: 56px auto 0; font-size: var(--step-body); line-height: 1.6; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--step-lead); line-height: 1.15; letter-spacing: -0.015em; margin-top: 2em; }
.prose ul { display: grid; gap: 0.6em; }
.prose li { padding-left: 22px; position: relative; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 10px; height: 2px; background: var(--green); }
.prose strong { font-weight: 500; }
.related .head { margin-bottom: 48px; }

/* ---------- CTA band on blog pages ---------- */
.cta-band { margin-top: var(--section); background: var(--green); color: var(--green-ink); padding-block: clamp(3.5rem, 7vw, 6rem); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.cta-inner .head { max-width: 18ch; }
.cta-btn { background: var(--ink); color: var(--on-ink); }
@media (hover: hover) and (pointer: fine) { .cta-btn:hover { background: var(--deep); } }

/* ---------- contact: text beside the form ---------- */
.contact { grid-template-columns: repeat(12, 1fr); align-items: start; row-gap: 48px; }
.ct-side { grid-column: 1 / 6; display: grid; gap: 48px; min-width: 0; }
.contact .ct-say { grid-column: auto; font-weight: 500; line-height: 1.12; letter-spacing: -0.015em; }
.ct-card { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: start; }
.contact .ct-pic, .contact .ct-links { grid-column: auto; margin-top: 0; }
.contact .ct-pic { width: 120px; height: 120px; }
.cform { grid-column: 7 / 13; display: grid; gap: 22px; background: var(--surface); padding: clamp(20px, 3vw, 40px); min-width: 0; }
.f-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.field { display: grid; gap: 8px; align-content: start; min-width: 0; }
.field > label { font-weight: 500; }
.f-opt { font-weight: 400; color: var(--soft); }
.cform input[type="text"], .cform input[type="email"], .cform input[type="tel"], .cform select, .cform textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0;
  background: var(--field); color: var(--ink); font-size: var(--step-body); transition: border-color 180ms ease, box-shadow 180ms ease;
}
.cform textarea { resize: vertical; min-height: 140px; line-height: 1.45; }
.cform select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
.cform input:focus-visible, .cform select:focus-visible, .cform textarea:focus-visible { outline: none; border-bottom-color: var(--green); box-shadow: 0 0 0 3px var(--green); }
.cform [aria-invalid="true"] { border-bottom-color: var(--error); }
.f-err { color: var(--error); font-size: var(--step-small); font-weight: 500; }
.f-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.f-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.f-actions .button { border: 0; font-size: var(--step-body); }
.f-actions .button[disabled] { opacity: 0.6; cursor: progress; }
.f-status { font-weight: 500; max-width: 44ch; }
.f-status.is-ok { color: #136c34; }
.f-status.is-bad { color: var(--error); }
.f-status a { overflow-wrap: anywhere; }

/* ---------- sources, folded ---------- */
details.src { padding: 0 var(--margin) 96px; }
details.src summary { cursor: pointer; font-weight: 700; display: inline-flex; gap: 10px; align-items: center; min-height: 44px; list-style: none; }
details.src summary::-webkit-details-marker { display: none; }
details.src summary::before { content: "+"; display: inline-grid; place-items: center; width: 24px; height: 24px; background: var(--surface); font-weight: 500; }
details.src[open] summary::before { content: "−"; }
details.src ol { margin-top: 12px; }

/* ---------- tablet ---------- */
@media (max-width: 64em) {
  .sec-top .head, .sec-top .lead { grid-column: 1 / -1; }
  .sec-top .lead { margin-top: 16px; }
  .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-title, .page-lead { grid-column: 1 / -1; }
  .ct-side, .cform { grid-column: 1 / -1; }
}

/* ---------- phone ---------- */
@media (max-width: 47.99em) {
  .sec-top { display: block; margin-bottom: 32px; }
  .post-grid { grid-template-columns: 1fr; }
  .member-pic { aspect-ratio: 4 / 3; }
  .page-head { display: block; }
  .page-title { min-height: 24svh; padding: 16px; }
  .page-lead { margin-top: 20px; }
  .art-pic { height: 40svh; }
  .prose { margin-top: 40px; }
  .contact { display: block; }
  .ct-side { gap: 32px; margin-bottom: 40px; }
  .ct-card { grid-template-columns: 88px 1fr; }
  .contact .ct-pic { width: 88px; height: 88px; }
  .f-row { grid-template-columns: 1fr; }
  .cform { margin-inline: calc(var(--margin) * -1); }
}

/* =====================================================================
   Stage 3: short home (goals, why now, services), services and team pages
   ===================================================================== */

/* hero: free first call */
.hero-say-cta { display: flex; flex-direction: column; justify-content: space-between; gap: 20px; }
.hero-cta { align-self: flex-start; max-width: 100%; white-space: normal; text-align: left; font-size: var(--step-body); }

/* ---------- home: what do you want to achieve ---------- */
.goals { margin-top: var(--section); }
.goal-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--gap); }
.goal { grid-column: span 2; position: relative; background: var(--surface); padding: clamp(20px, 2.4vw, 32px); display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-width: 0; }
.goal:nth-child(n+4) { grid-column: span 3; }
.goal:first-child { background: var(--ink); color: var(--on-ink); }
.goal-h { font-size: var(--step-lead); line-height: 1.12; letter-spacing: -0.015em; }
.goal-h a { text-decoration: none; }
.goal-h a::after { content: ""; position: absolute; inset: 0; }
.goal sup { position: relative; z-index: 1; }
.goal-to { font-weight: 500; padding-top: 14px; border-top: 1px solid rgba(8, 49, 108, 0.2); }
.goal:first-child .goal-to { border-top-color: rgba(255, 255, 255, 0.25); }
.goal-h a:focus-visible { outline: none; }
.goal:has(.goal-h a:focus-visible) { outline: 3px solid var(--green); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .goal:hover .goal-h a { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
}

/* ---------- home: why now ---------- */
.now { margin-top: var(--section); }
.now .head { margin-bottom: 48px; }
.now-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }

/* ---------- home: what we do ---------- */
.offer { margin-top: var(--section); }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.svc { position: relative; background: var(--surface); padding: clamp(20px, 2.4vw, 32px); display: grid; align-content: start; gap: 14px; min-height: 240px; min-width: 0; }
.svc:last-child { background: var(--green); color: var(--green-ink); }
.svc-n { font-size: var(--step-small); font-weight: 500; color: var(--soft); font-variant-numeric: tabular-nums; }
.svc:last-child .svc-n { color: inherit; }
.svc-h { font-size: var(--step-lead); line-height: 1.1; }
.svc-h a { text-decoration: none; }
.svc-h a::after { content: ""; position: absolute; inset: 0; }
.svc-h a:focus-visible { outline: none; }
.svc:has(.svc-h a:focus-visible) { outline: 3px solid var(--green); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .svc:hover .svc-h a { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
}
.pillars { margin-top: 24px; font-weight: 500; }
.offer-diff { margin-top: 12px; max-width: 64ch; font-size: var(--step-lead); line-height: 1.3; }

/* ---------- home: one team card ---------- */
.team .head { margin-bottom: 48px; }
.member-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px 48px; align-items: end; }
.member-row .member-pic { margin-bottom: 0; }
.member-text { display: grid; gap: 8px; justify-items: start; padding-bottom: 8px; }
.member-text .member-bio { max-width: 48ch; font-size: var(--step-lead); line-height: 1.3; }

/* ---------- contact: free first call ---------- */
.ct-free { font-weight: 500; padding-left: 14px; border-left: 3px solid var(--green); }

/* ---------- services page ---------- */
.svc-jump { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 48px; font-weight: 500; }
.svc-jump span { color: var(--soft); font-variant-numeric: tabular-nums; }
.svc-sec { margin-top: var(--section); scroll-margin-top: 24px; }
.svc-sec-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding-bottom: 32px; border-bottom: 3px solid var(--ink); margin-bottom: 40px; }
.svc-sec-top .svc-n { grid-column: 1 / -1; margin-bottom: 8px; }
.svc-sec-top .head { grid-column: 1 / 8; }
.svc-sec-top .lead { grid-column: 8 / 13; align-self: end; color: var(--soft); }
.svc-body { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; }
.svc-facts { grid-column: 1 / 5; display: grid; gap: var(--gap); align-content: start; }
.svc-facts div { background: var(--surface); padding: 18px 20px; }
.svc-facts dt { font-size: var(--step-small); color: var(--soft); font-weight: 500; }
.svc-facts dd { font-weight: 700; font-size: var(--step-lead); line-height: 1.2; margin-top: 4px; }
.svc-text { grid-column: 6 / 13; max-width: 68ch; }
.svc-text h3 { font-size: var(--step-body); font-weight: 700; margin-top: 28px; }
.svc-text h3:first-child { margin-top: 0; }
.svc-text p { margin-top: 8px; }
.ticks { display: grid; gap: 10px; margin-top: 12px; }
.ticks li { padding-left: 22px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 2px; background: var(--green); }
.ticks b { font-weight: 700; }
.svc-extra { margin-top: 24px !important; padding: 16px 20px; background: var(--surface); }
.svc-cta { margin-top: 40px; }
.svc-cta .button, .cta-btn { max-width: 100%; white-space: normal; text-align: left; }

/* pillars × what we work on: a real table, rows become cards on phones */
.pillar-wrap { margin-top: 48px; }
.pillars-table { width: 100%; border-collapse: separate; border-spacing: var(--gap); margin-inline: calc(var(--gap) * -1); table-layout: fixed; }
.pillars-table caption { text-align: left; font-size: var(--step-small); color: var(--soft); padding: 0 var(--gap) 8px; caption-side: top; }
.pillars-table th, .pillars-table td { text-align: left; vertical-align: top; padding: 16px 18px; }
.pillars-table thead th { font-size: var(--step-small); font-weight: 500; color: var(--soft); padding-block: 4px; }
.pillars-table thead td { padding: 0; }
.pillars-table tbody th { background: var(--ink); color: var(--on-ink); font-size: var(--step-lead); width: 18%; }
.pillars-table tbody td { background: var(--surface); }

/* report: two ways */
.variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: 48px; }
.variant { background: var(--surface); padding: clamp(20px, 2.4vw, 32px); }
.variant:first-child { background: var(--green); color: var(--green-ink); }
.variant:first-child .ticks li::before { background: var(--ink); }
.variant h3 { font-size: var(--step-lead); line-height: 1.1; }

/* ---------- team page ---------- */
.person { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 32px; margin-top: calc(var(--section) * 0.6); align-items: end; }
.person-pic { grid-column: 1 / 6; margin-bottom: 0; }
.person-text { grid-column: 7 / 13; display: grid; gap: 12px; justify-items: start; }
.person-bio { font-size: var(--step-lead); line-height: 1.35; max-width: 44ch; }

/* ---------- tablet ---------- */
@media (max-width: 64em) {
  .goal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .goal, .goal:nth-child(n+4) { grid-column: auto; }
  .goal:last-child { grid-column: 1 / -1; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc { min-height: 0; }
  .svc-sec-top .head, .svc-sec-top .lead { grid-column: 1 / -1; }
  .svc-sec-top .lead { margin-top: 12px; }
  .svc-facts, .svc-text { grid-column: 1 / -1; }
  .svc-facts { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 47.99em) {
  .goal-grid, .now-grid { grid-template-columns: 1fr; }
  .goal:last-child { grid-column: auto; }
  .fact { min-height: 0; gap: 24px; }
  .member-row { grid-template-columns: 1fr; }
  .svc-sec-top { display: block; }
  .svc-body { display: block; }
  .svc-facts { margin-bottom: 32px; grid-template-columns: 1fr; }
  .variants { grid-template-columns: 1fr; }
  .pillars-table, .pillars-table tbody, .pillars-table tr, .pillars-table th, .pillars-table td { display: block; width: auto; }
  .pillars-table { margin-inline: 0; border-spacing: 0; }
  .pillars-table thead { display: none; }
  .pillars-table tbody tr { margin-bottom: 16px; }
  .pillars-table tbody th { width: auto; }
  .pillars-table tbody td { border-top: 1px solid var(--paper); }
  .pillars-table td::before { content: attr(data-label); display: block; font-size: var(--step-small); font-weight: 500; color: var(--soft); margin-bottom: 4px; }
  .person { display: block; }
  .person-pic { margin-bottom: 32px; }
}
