/* ==========================================================================
   Баялиг — design tokens
   Source: брендбук «Буряад Абяан» (2026). Brand colours are used as fills;
   for text on white the darker tones of the same hue are used (WCAG AA).
   All theming goes through these custom properties, so a dark theme, a
   large-type mode (ГОСТ 52872) or a /bu/ locale can be added without
   touching markup.
   ========================================================================== */

:root {
  /* brand */
  --brand-blue: #0037a0;
  --brand-green: #2fc12f;
  --brand-yellow: #daad00;
  --brand-ink: #181818;
  --brand-white: #ffffff;

  /* derived UI colours */
  --accent: var(--brand-blue);
  --accent-hover: #002c80;
  --accent-press: #00245f;
  --accent-soft: #eef2fb;
  --accent-soft-2: #dde5f7;
  --accent-line: #c3d0ee;

  --ink: #181818;
  --ink-2: #3c424d;
  --ink-70: #4f5765;
  --ink-50: #616b79;

  --green-ink: #14701b;      /* text on white: 5.4:1 */
  --green-soft: #e6f7e6;
  --yellow-ink: #6f5600;     /* text on white: 5.9:1 */
  --yellow-soft: #fdf5dc;
  --red-ink: #a41c1c;        /* text on white: 6.8:1 */
  --red-soft: #fdecec;

  --surface: #ffffff;
  --surface-2: #f5f7fc;
  --surface-3: #eef1f8;
  --line: #e3e7f0;
  --line-strong: #cdd4e3;

  /* chart series */
  --series-1: var(--brand-blue);
  --series-2: var(--brand-yellow);
  --series-3: var(--brand-green);
  --series-grid: #e8ecf5;

  /* typography */
  --font-ui: "Geologica", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Tovar Kolobov", "Geologica", system-ui, sans-serif;

  --fs-100: 0.75rem;    /* 12 */
  --fs-200: 0.8125rem;  /* 13 */
  --fs-300: 0.875rem;   /* 14 */
  --fs-400: 1rem;       /* 16 */
  --fs-500: 1.125rem;   /* 18 */
  --fs-600: 1.375rem;   /* 22 */
  --fs-700: 1.75rem;    /* 28 */
  --fs-800: clamp(2rem, 1.55rem + 2.1vw, 2.75rem);
  --fs-900: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);
  --fs-1000: clamp(2.6rem, 1.4rem + 5vw, 4.5rem);

  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-body: 1.55;

  /* spacing (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;
  --sp-24: 96px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgb(24 24 24 / 6%), 0 1px 3px rgb(24 24 24 / 4%);
  --shadow-md: 0 6px 24px -8px rgb(0 55 160 / 16%), 0 2px 6px rgb(24 24 24 / 5%);
  --shadow-lg: 0 24px 60px -24px rgb(0 55 160 / 28%);

  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 64px;
  --focus-ring: 0 0 0 3px #ffffff, 0 0 0 6px var(--brand-blue);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Large type mode — the hook for the ГОСТ accessibility mode (phase 2). */
:root[data-a11y="large"] {
  --fs-100: 0.9rem;
  --fs-200: 1rem;
  --fs-300: 1.05rem;
  --fs-400: 1.2rem;
  --fs-500: 1.35rem;
  --fs-600: 1.6rem;
  --fs-700: 2rem;
  --lh-body: 1.7;
}

/* Dark theme — tokens only, not shipped as a switch in this phase. */
:root[data-theme="dark"] {
  --ink: #f2f4f8;
  --ink-2: #d7dce6;
  --ink-70: #aab3c2;
  --ink-50: #8b95a5;
  --surface: #0d1526;
  --surface-2: #111a2e;
  --surface-3: #16203a;
  --line: #24304a;
  --line-strong: #33405c;
  --accent: #7fa4ff;
  --accent-hover: #9bb8ff;
  --accent-soft: #14203a;
  --accent-soft-2: #1a2848;
  --accent-line: #2a3c63;
  --green-ink: #7ee787;
  --yellow-ink: #f2d46b;
  --series-grid: #24304a;
  --focus-ring: 0 0 0 3px #0d1526, 0 0 0 6px #7fa4ff;
}


/* ==========================================================================
   Баялиг — site styles (mobile-first)
   ========================================================================== */

@font-face {
  font-family: "Geologica";
  src: url("fonts/geologica-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geologica";
  src: url("fonts/geologica-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geologica";
  src: url("fonts/geologica-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tovar Kolobov";
  src: url("fonts/tovar.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: var(--fs-400);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.on-dark :focus-visible {
  outline-color: #fff;
}

::selection {
  background: var(--accent-soft-2);
  color: var(--ink);
}

/* ----------------------------------------------------------- utilities --- */
.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  padding-block: clamp(40px, 7vw, 88px);
}

.section--tight {
  padding-block: clamp(28px, 4vw, 48px);
}

.section--tint {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: clamp(20px, 3vw, 32px);
}

.section__title {
  font-size: var(--fs-800);
}

.section__lead {
  color: var(--ink-70);
  font-size: var(--fs-500);
  max-width: 56ch;
  margin-top: var(--sp-3);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-70);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-yellow);
}

.visually-hidden {
  position: absolute !important;
  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;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -120px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  transition: top 0.18s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ------------------------------------------------------------- buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-400);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn svg {
  flex: none;
  width: 20px;
  height: 20px;
}

.btn--primary {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgb(0 55 160 / 60%);
}
.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--light {
  background: #fff;
  color: var(--brand-blue);
}
.btn--light:hover {
  background: #eef2fb;
}

.btn--outline-light {
  border-color: rgb(255 255 255 / 55%);
  color: #fff;
  background: rgb(255 255 255 / 6%);
}
.btn--outline-light:hover {
  background: rgb(255 255 255 / 16%);
  border-color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--accent-line);
  color: var(--accent);
}
.btn--ghost:hover {
  background: var(--accent-soft);
}

.btn--small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: var(--fs-300);
}

/* -------------------------------------------------------------- header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 88%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
  padding-block: 6px;
}

.logo__mark {
  width: clamp(40px, 9vw, 54px);
  height: auto;
  flex: none;
}

.logo__word {
  font-family: var(--font-display);
  font-size: clamp(22px, 5vw, 30px);
  line-height: 1;
  letter-spacing: 0.005em;
  padding-top: 2px;
}

.nav {
  display: none;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: var(--fs-300);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.16s var(--ease), color 0.16s var(--ease);
}

.nav__link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav__link[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
}

.lang__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--ink-70);
  text-decoration: none;
  white-space: nowrap;
}

.lang__link:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.lang__link[aria-current="true"] {
  background: var(--accent-soft);
  color: var(--accent);
}

.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}

.burger__bar {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.burger[aria-expanded="true"] .burger__bar:nth-child(1) {
  transform: translateY(3.5px) rotate(45deg);
}
.burger[aria-expanded="true"] .burger__bar:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] .burger__bar:nth-child(3) {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Below 640px only the other language stays visible: the switch keeps a
   compact footprint and the target language is still labelled in itself. */
@media (max-width: 639px) {
  .lang__link[aria-current="true"] {
    display: none;
  }
  .lang {
    padding: 3px;
    border-color: var(--line);
  }
  .lang__link {
    padding: 6px 10px;
    min-height: 44px;
  }
}

.mobile-nav {
  display: none;
  padding: 8px 0 20px;
  border-top: 1px solid var(--line);
}

.mobile-nav[data-open="true"] {
  display: block;
}

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

.mobile-nav__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 4px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.mobile-nav__link[aria-current="page"] {
  color: var(--accent);
}

/* ---------------------------------------------------------------- hero --- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--brand-blue);
  color: #fff;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 170%;
  background-image: url("brand/pattern.svg");
  background-size: 208px 128px;
  background-repeat: repeat;
  opacity: 0.16;
  z-index: -2;
  transform: rotate(-5deg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 88% 6%, rgb(218 173 0 / 18%), transparent 46%),
    linear-gradient(100deg, rgb(0 22 74 / 72%) 0%, rgb(0 30 92 / 34%) 42%, rgb(0 20 70 / 6%) 72%),
    radial-gradient(90% 80% at 0% 100%, rgb(0 18 62 / 45%), transparent 62%);
  z-index: -1;
}

.hero__inner {
  display: grid;
  gap: clamp(28px, 5vw, 56px);
  padding-block: clamp(32px, 6vw, 84px);
}

.hero__eyebrow {
  color: rgb(255 255 255 / 78%);
}

.hero__eyebrow::before {
  background: var(--brand-yellow);
}

.hero__title {
  font-size: var(--fs-1000);
  margin-top: var(--sp-4);
  letter-spacing: -0.03em;
}

.hero__lead {
  margin-top: var(--sp-4);
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.25rem);
  color: rgb(255 255 255 / 88%);
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(20px, 3vw, 32px);
}

.hero__actions .btn {
  min-width: 172px;
  flex: 1 1 160px;
}

.hero__note {
  margin-top: 14px;
  font-size: var(--fs-300);
  color: rgb(255 255 255 / 70%);
}

/* --------------------------------------------------------------- tiles --- */
.tiles {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: clamp(14px, 2.4vw, 20px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tile__label {
  font-size: var(--fs-300);
  color: var(--ink-70);
  font-weight: 500;
}

.tile__value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.35rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.tile__value small {
  font-size: 0.44em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-70);
}

.tile__delta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--green-ink);
  background: var(--green-soft);
  white-space: nowrap;
}

.tile__delta--flat {
  color: var(--ink-70);
  background: var(--surface-3);
}

.tile__delta svg {
  width: 12px;
  height: 12px;
}

.tile__hint {
  font-size: var(--fs-200);
  color: var(--ink-50);
  margin-top: auto;
}

.updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-200);
  color: var(--ink-70);
}

.updated::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-green);
  box-shadow: 0 0 0 3px rgb(47 193 47 / 18%);
}

/* ---------------------------------------------------------------- goal --- */
.goal {
  margin-top: 16px;
  padding: clamp(20px, 4vw, 32px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.goal__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.goal__title {
  font-size: var(--fs-600);
  letter-spacing: -0.01em;
}

.goal__pct {
  font-size: var(--fs-300);
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.goal__track {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.goal__fill {
  position: relative;
  height: 100%;
  min-width: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-blue) 0%, #2f5fd0 100%);
}

.goal__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0%) 40%, rgb(255 255 255 / 26%));
}

.goal__marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgb(24 24 24 / 12%);
}

.goal__numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: var(--fs-300);
  color: var(--ink-70);
}

.goal__numbers strong {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.goal__note {
  margin-top: 10px;
  font-size: var(--fs-200);
  color: var(--ink-50);
  max-width: 70ch;
}

/* --------------------------------------------------------------- steps --- */
.steps {
  display: grid;
  gap: 12px;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(18px, 3vw, 26px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--line);
}

.step__top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}

.step__icon svg {
  width: 30px;
  height: auto;
}

.step__num {
  font-size: var(--fs-200);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.step__title {
  font-size: var(--fs-600);
  letter-spacing: -0.01em;
}

.step__text {
  color: var(--ink-70);
  font-size: var(--fs-300);
}

/* ------------------------------------------------------------- partners --- */
.partners {
  display: grid;
  gap: clamp(20px, 4vw, 40px);
  align-items: center;
}

.partners__media {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--surface-3);
}

.partners__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.partners__media::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgb(24 24 24 / 6%);
  border-radius: inherit;
}

.partners__text {
  display: grid;
  gap: 12px;
}

.partners__text p {
  color: var(--ink-70);
}

.partners__text .btn {
  justify-self: start;
  margin-top: 8px;
}

/* -------------------------------------------------------------- charts --- */
.charts {
  display: grid;
  gap: 12px;
}

.chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(16px, 2.6vw, 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.chart__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chart__kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.chart__num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0;
}

.chart__title {
  margin-top: 6px;
  font-size: var(--fs-500);
  font-weight: 600;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
}

.chart__desc {
  margin-top: 4px;
  font-size: var(--fs-200);
  color: var(--ink-50);
}

.chart__body {
  position: relative;
  min-height: 160px;
}

.chart__body svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart svg text {
  font-family: var(--font-ui);
  font-size: 11px;
  fill: var(--ink-70);
}

.chart svg .axis-label {
  font-size: 11px;
  fill: var(--ink-50);
}

.chart svg .value-label {
  font-size: 11px;
  font-weight: 600;
  fill: var(--ink);
}

.chart svg .grid-line {
  stroke: var(--series-grid);
  stroke-width: 1;
}

.chart svg .series-line {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart svg .marker {
  stroke: var(--surface);
  stroke-width: 2;
}

.chart__tooltip {
  position: absolute;
  z-index: 6;
  top: 0;
  left: 0;
  max-width: 240px;
  padding: 8px 11px;
  border-radius: 12px;
  background: #181818;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 0.12s var(--ease);
}

.chart__tooltip[data-visible="true"] {
  opacity: 1;
}

.chart__tooltip b {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--surface-3);
}

.segmented button {
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-70);
  font-size: var(--fs-200);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.segmented button[aria-pressed="true"] {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

/* 320–419px: the three-period switch has to fit one card without overflow */
@media (max-width: 419px) {
  .segmented {
    padding: 2px;
    gap: 1px;
  }
  .segmented button {
    min-height: 44px;
    padding: 4px 8px;
    font-size: 11px;
  }
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: var(--fs-200);
  color: var(--ink-70);
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  flex: none;
}

.legend__swatch--line {
  height: 3px;
  border-radius: 2px;
}

.legend__swatch--icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
}

.legend__swatch--icon svg {
  width: 12px;
  height: 12px;
}

.chart__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  justify-content: space-between;
  font-size: var(--fs-200);
  color: var(--ink-50);
}

/* fallback / empty state of a single chart */
.chart__fallback {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border: 1px dashed var(--line-strong);
}

.chart__fallback-value {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.chart__fallback-text {
  flex: 1 1 220px;
  font-size: var(--fs-300);
  color: var(--ink-70);
}

/* loading / error */
.chart__skeleton {
  display: grid;
  gap: 10px;
  padding: 8px 0;
}

.skeleton {
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface-3) 0%, #f7f9fd 50%, var(--surface-3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s var(--ease) infinite;
}

.skeleton--lg {
  height: 120px;
  border-radius: 14px;
}

.chart__error {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--red-soft);
  border: 1px solid rgb(164 28 28 / 18%);
}

.chart__error-title {
  font-weight: 700;
  color: var(--red-ink);
}

.chart__error-text {
  font-size: var(--fs-300);
  color: var(--ink-2);
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -60% 0;
  }
}

/* ------------------------------------------------------------- contacts --- */
.page-head {
  position: relative;
  overflow: hidden;
  padding-block: clamp(28px, 5vw, 64px);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.page-head__title {
  font-size: var(--fs-900);
  margin-top: var(--sp-3);
}

.page-head__lead {
  margin-top: var(--sp-3);
  max-width: 62ch;
  font-size: var(--fs-500);
  color: var(--ink-70);
}

.team {
  display: grid;
  gap: 12px;
}

.person {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(16px, 2.6vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.person__avatar {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
  border: 1px solid var(--accent-line);
}

.person__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person__name {
  font-size: var(--fs-600);
  letter-spacing: -0.01em;
}

.person__role {
  font-size: var(--fs-300);
  color: var(--ink-70);
}

.person__links {
  display: grid;
  gap: 4px;
  margin-top: 4px;
  font-size: var(--fs-300);
}

.person__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--accent);
  text-decoration: none;
  word-break: break-word;
}

.person__link:hover {
  text-decoration: underline;
}

.person__link svg {
  width: 16px;
  height: 16px;
  flex: none;
  opacity: 0.85;
}

.contact-panel {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 36px);
  border-radius: var(--radius-xl);
  background: var(--brand-blue);
  color: #fff;
}

.contact-panel__title {
  font-size: var(--fs-600);
  color: #fff;
}

.contact-panel__mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.25rem, 1rem + 1.4vw, 1.75rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  word-break: break-word;
  min-height: 44px;
}

.contact-panel__mail:hover {
  text-decoration: underline;
}

.contact-panel__note {
  font-size: var(--fs-300);
  color: rgb(255 255 255 / 76%);
  max-width: 52ch;
}

.contact-panel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgb(255 255 255 / 40%);
  color: #fff;
  text-decoration: none;
  font-size: var(--fs-300);
  font-weight: 600;
}

.social-link:hover {
  background: rgb(255 255 255 / 14%);
  border-color: #fff;
}

.notice {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-70);
  font-size: var(--fs-300);
}

/* -------------------------------------------------------------- footer --- */
.footer {
  position: relative;
  overflow: hidden;
  margin-top: clamp(40px, 7vw, 96px);
  background: var(--brand-blue);
  color: #fff;
  isolation: isolate;
}

.footer::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 150%;
  background-image: url("brand/pattern-white.svg");
  background-size: 158px 96px;
  opacity: 0.12;
  z-index: -1;
}

.footer__inner {
  display: grid;
  gap: 32px;
  padding-block: clamp(32px, 5vw, 56px);
}

.footer .logo {
  color: #fff;
}

.footer__tagline {
  margin-top: 14px;
  max-width: 34ch;
  color: rgb(255 255 255 / 76%);
  font-size: var(--fs-300);
}

.footer__title {
  font-size: var(--fs-200);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 62%);
  margin-bottom: 12px;
}

.footer__list {
  display: grid;
  gap: 2px;
}

.footer__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgb(255 255 255 / 86%);
  text-decoration: none;
  font-size: var(--fs-300);
}

.footer__link:hover {
  color: #fff;
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-block: 18px 28px;
  border-top: 1px solid rgb(255 255 255 / 18%);
  font-size: var(--fs-200);
  color: rgb(255 255 255 / 62%);
}

/* --------------------------------------------------------- breakpoints --- */
@media (min-width: 640px) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero__actions .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 900px) {
  :root {
    --header-h: 76px;
  }
  .nav {
    display: block;
  }
  .burger {
    display: none;
  }
  .mobile-nav {
    display: none !important;
  }
  .hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: center;
  }
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .charts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .chart--wide {
    grid-column: span 2;
  }
  .partners {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }
  .team {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .footer__inner {
    grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  }
  .contact-panel {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
  }
}

@media (min-width: 1200px) {
  .hero__inner {
    padding-block: clamp(48px, 6vw, 96px);
  }
}

/* --------------------------------------------------------------- misc --- */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-70: #3c424d;
    --ink-50: #4b5462;
    --line: #b9c1d2;
  }
}
