/* ==========================================================================
   Kontur Think Tank — site styles
   Every colour lives in the token block below; nothing else in this file
   hard-codes one. Base type weight is 300 (Geologica Light).
   ========================================================================== */

:root {
  --bg: #F9F8F8;
  --ink: #0A0903;
  --accent: #A72A47;

  --rule: rgba(10, 9, 3, 0.22);
  --rule-strong: rgba(10, 9, 3, 0.28);
  --field-border: rgba(10, 9, 3, 0.35);
  --muted: rgba(10, 9, 3, 0.5);
  --muted-strong: rgba(10, 9, 3, 0.62);
}

/* --- Reset / base ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); }

body {
  font-family: 'Geologica', Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Headings carry no intrinsic look; every size comes from a utility class,
   so heading level can be chosen purely for document structure. */
h1, h2, h3, h4, h5, h6 { margin: 0; font-size: inherit; font-weight: inherit; }

p { margin: 0; }

img, picture { max-width: 100%; }
picture { display: block; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--ink); text-decoration-thickness: 2px; }

::selection { background: var(--accent); color: var(--bg); }

input, select, textarea, button { font-family: inherit; }

/* No default focus rings — an explicit visible outline instead. */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.k-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

@keyframes k-fade { from { opacity: 0; } to { opacity: 1; } }

/* --- Page shell --------------------------------------------------------- */

.k-page { background: var(--bg); color: var(--ink); min-height: 100vh; }

.k-shell {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 96px);
}

/* --- Header ------------------------------------------------------------- */

.k-header-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--ink);
  transition: transform 200ms ease;
}

.k-header-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 96px);
}

.k-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 27px;
}

.k-header-spacer { height: 90px; }

.k-logo-link {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  text-decoration: none;
}

.k-logo { display: block; width: 132px; height: auto; }

.k-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 24px; height: 24px;
  padding: 0; border: 0; background: none;
  cursor: pointer;
}
.k-burger span { display: block; width: 24px; height: 1.5px; background: var(--ink); }

.k-header-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
}

.k-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 300;
}

/* Nav links bold on hover, and the current page sits at 500. A hidden bold
   copy of the label is stacked in the same grid cell so the link always
   reserves its heaviest width and nothing shifts. */
.k-nav a,
.k-lang a {
  display: inline-grid;
  font-weight: 300;
  text-decoration: none;
}
.k-nav a[aria-current="page"] { font-weight: 500; }
.k-nav a::before,
.k-lang a::before {
  content: attr(data-label);
  grid-area: 1/1;
  font-weight: 700;
  visibility: hidden;
}
.k-nav a > span,
.k-lang a > span { grid-area: 1/1; }
.k-nav a:hover { font-weight: 700; }

.k-lang {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-left: 28px;
  border-left: 1px solid var(--rule-strong);
}
.k-lang-current { font-weight: 500; }
.k-lang-sep { opacity: 0.35; font-weight: 300; }
.k-lang a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* --- Mobile menu overlay ------------------------------------------------ */

.k-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  animation: k-fade 120ms ease-out;
}
.k-menu[hidden] { display: none; }

.k-menu-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 96px);
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.k-menu-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.k-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  padding: 0; border: 0; background: none;
  cursor: pointer;
}
.k-close span {
  display: block;
  position: relative;
  width: 24px; height: 1.5px;
  background: var(--ink);
  transform: rotate(45deg);
}
.k-close span span {
  display: block;
  position: absolute;
  inset: 0;
  width: auto;
  background: var(--ink);
  transform: rotate(-90deg);
}

.k-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 48px 0 0;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 300;
}
.k-menu-nav a { text-decoration: none; font-weight: 300; }
.k-menu-nav a[aria-current="page"] { font-weight: 500; }

.k-menu-lang {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--rule);
}
.k-menu-lang a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  font-weight: 300;
}

/* --- Section pattern: sticky label + content column --------------------- */

.k-sec {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(48px, 7vw, 88px) 0;
}
.k-sec--rule    { border-top: 1px solid var(--ink); }
.k-sec--hero    { padding-top: clamp(64px, 10vw, 132px); }
.k-sec--block   { display: block; }
.k-sec--anchor  { scroll-margin-top: 96px; }
.k-sec--pb-about { padding-bottom: clamp(56px, 8vw, 104px); }
.k-sec--pb-last  { padding-bottom: clamp(64px, 8vw, 104px); }
.k-sec--pb-team  { padding-bottom: clamp(48px, 7vw, 80px); }
.k-sec--pb-mid   { padding-bottom: clamp(48px, 7vw, 88px); }

.k-sec-label { flex: 0 0 200px; }
.k-sec-label-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 120px;
}

/* The standalone (non-sticky) label used at the top of the Programs page. */
.k-label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(32px, 4vw, 56px);
}

.k-dot { width: 7px; height: 7px; background: var(--accent); flex: none; }

.k-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

/* min-width:0 lets these shrink below their flex-basis / intrinsic content
   width; without it a narrow viewport overflows horizontally. */
.k-col        { flex: 1 1 520px; max-width: 840px; min-width: 0; }
.k-col--wide  { max-width: 1000px; }
.k-col--legal { max-width: 720px; }
.k-col--stack { display: flex; flex-direction: column; }
.k-col--gap28 { gap: 28px; }

/* --- Typography utilities ---------------------------------------------- */

.k-lead {
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.28;
  letter-spacing: -0.025em;
  font-weight: 500;
  text-wrap: pretty;
}

.k-lead-xl {
  max-width: 1100px;
  font-size: clamp(26px, 3.6vw, 48px);
  line-height: 1.22;
  letter-spacing: -0.03em;
  font-weight: 500;
  text-wrap: pretty;
}

.k-lead-sm {
  margin-bottom: clamp(32px, 4vw, 48px);
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 720px;
  text-wrap: pretty;
}

.k-body { font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.k-body--680 { max-width: 680px; }

.k-title {
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 620px;
  text-wrap: pretty;
  margin-bottom: clamp(32px, 4vw, 44px);
}
.k-title--form { margin-bottom: clamp(36px, 4vw, 52px); }

.k-h-md {
  margin-bottom: 14px;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.k-h-sm {
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.k-num {
  flex: 0 0 auto;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

/* Mission strip under the About lead */
.k-mission {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  margin-top: 12px;
}
.k-mission-key {
  flex: 0 0 120px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding-top: 4px;
}
.k-mission-val { flex: 1 1 420px; max-width: 640px; min-width: 0; }

/* --- Buttons ------------------------------------------------------------ */

.k-btn {
  display: inline-block;
  padding: 14px 30px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--ink);
  border-radius: 0;
  text-decoration: none;
  cursor: pointer;
}
.k-btn--solid {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.k-btn--solid:hover { background: var(--bg); color: var(--accent); }

.k-btn--ghost { color: var(--ink); background: var(--bg); }
.k-btn--ghost:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.k-btn--mt   { margin-top: 32px; }
.k-btn--mt-l { margin-top: clamp(28px, 3vw, 40px); }

/* --- Numbered rows (Workflow, Programs) --------------------------------- */

.k-rows { --k-row-pad: 36px; display: flex; flex-direction: column; }
.k-rows--lg { --k-row-pad: 44px; }

.k-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
  padding: var(--k-row-pad) 0;
  border-top: 1px solid var(--rule);
}
.k-row:first-child { padding-top: 0; border-top: 0; }
.k-row:last-child { padding-bottom: 0; }

.k-row-body { flex: 1 1 380px; max-width: 640px; min-width: 0; }

/* --- Values: 4 featured + 8 supporting ---------------------------------- */

.k-values-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(40px, 5vw, 72px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.k-value { max-width: 520px; min-width: 0; }
.k-value-num {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 14px;
}

/* The eight supporting values collapse behind a toggle. Built on
   <details>/<summary> so it works with JavaScript disabled and is
   keyboard-operable for free; the summary is styled as the ghost button. */
.k-values-more { display: block; }

.k-values-toggle {
  display: inline-block;
  margin-bottom: clamp(32px, 4vw, 48px);
  list-style: none;
  cursor: pointer;
}
.k-values-toggle::-webkit-details-marker { display: none; }
.k-values-more[open] .k-values-toggle-more { display: none; }
.k-values-more:not([open]) .k-values-toggle-less { display: none; }

.k-values-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--rule);
  padding-top: clamp(32px, 4vw, 48px);
}
.k-value-item { display: flex; gap: 16px; }
.k-value-item-num {
  flex: 0 0 24px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding-top: 3px;
}
.k-value-name { font-weight: 500; }
.k-value-desc { display: block; font-size: 15px; line-height: 1.55; margin-top: 4px; }

/* --- Programs teaser list (homepage) ------------------------------------ */

.k-prog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--rule);
}
.k-prog-list > * {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

/* --- Team --------------------------------------------------------------- */

.k-team-grid {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  grid-template-columns: repeat(3, 1fr);
}
.k-team-grid > * { min-width: 0; }
@media (max-width: 640px) {
  .k-team-grid { grid-template-columns: 1fr; }
}

/* height:auto is load-bearing. The width/height attributes on the <img> are
   presentational hints that set a CSS height; without this the photo renders
   500px tall instead of taking its height from aspect-ratio (a 4:5 crop). */
.k-team-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.k-team-name    { margin: 20px 0 4px; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.k-team-name--bio { margin: 20px 0 14px; }
.k-team-bio     { font-size: 15px; line-height: 1.6; text-wrap: pretty; }

/* --- Contact details ---------------------------------------------------- */

.k-info { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.k-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}
.k-info-key {
  flex: 0 0 140px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted-strong);
}
.k-info-val { flex: 1 1 320px; font-size: 17px; line-height: 1.5; min-width: 0; overflow-wrap: break-word; }

/* --- Contact form ------------------------------------------------------- */

.k-form-banner {
  margin: 0 0 28px;
  padding: 14px 16px;
  border: 1px solid var(--ink);
  font-size: 15px;
  line-height: 1.5;
  max-width: 620px;
}
.k-form-banner[hidden] { display: none; }

.k-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px 32px;
}

.k-field { display: flex; flex-direction: column; gap: 8px; }
.k-field--full { grid-column: 1 / -1; }

.k-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
}
.k-field-err {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--muted-strong);
  font-weight: 400;
}

.k-input {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  outline: none;
}
.k-input:focus,
.k-input:focus-visible {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
textarea.k-input { line-height: 1.5; resize: vertical; }
select.k-input { appearance: none; }

.k-form-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.k-sent { border-top: 1px solid var(--ink); padding-top: clamp(32px, 4vw, 44px); }
.k-sent[hidden] { display: none; }
.k-sent-title {
  margin-bottom: 12px;
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.k-sent-text { margin-bottom: 28px; font-size: 17px; line-height: 1.6; max-width: 560px; text-wrap: pretty; }

.k-form-wrap[hidden] { display: none; }

/* --- Legal (Privacy Policy) --------------------------------------------- */

.k-legal p  { margin: 0 0 16px; font-size: 16px; line-height: 1.65; text-wrap: pretty; }
.k-legal p:last-child { margin-bottom: 0; }
.k-legal-intro { font-size: 17px; margin-bottom: clamp(32px, 4vw, 44px); }

.k-legal h2 {
  margin: clamp(36px, 4vw, 48px) 0 20px;
  padding-top: clamp(28px, 3vw, 36px);
  border-top: 1px solid var(--rule);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.k-legal h2:first-of-type { margin-top: 0; }

.k-legal ul {
  margin: 0 0 20px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 16px;
  line-height: 1.65;
}
.k-legal ul ul { margin: 10px 0 0; }
.k-legal strong { font-weight: 500; }

/* --- Footer ------------------------------------------------------------- */

.k-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--ink);
  padding: 28px 0 40px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 300;
}
.k-footer-col { display: flex; flex-direction: column; gap: 8px; }
.k-footer-col--end { align-items: flex-end; text-align: right; }
.k-footer a {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}
.k-footer a:hover { text-decoration-thickness: 2px; }
.k-footer-address {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-style: normal;
  letter-spacing: 0.06em;
}

/* Below this width the two footer columns no longer fit side by side, so
   stack them and left-align the address rather than leaving it ragged-left
   against the right edge. 780px is where the longer (Ukrainian) footer stops
   fitting, so both languages switch at the same point. */
@media (max-width: 780px) {
  .k-footer { flex-direction: column; }
  .k-footer-col--end { align-items: flex-start; text-align: left; }
}

/* --- Breakpoint: nav collapses to the mobile menu ----------------------- */

@media (max-width: 767px) {
  .k-desktop-only { display: none !important; }
  .k-burger { display: flex; }
}

/* Keeps the second half of a CTA heading on one line, per the design. */
.k-nowrap { white-space: nowrap; }
