/* Skillful Energy Ltd: page styles. All values come from tokens.css. */

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--nav-height) + var(--space-4));
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: var(--font-weight-regular);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
  color: inherit;
}

h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0; padding: 0; }
[role="list"] { list-style: none; }

a { color: var(--c-maroon-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }

::selection { background: var(--selection-bg); color: var(--selection-text); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

.section--navy :focus-visible,
.section--maroon :focus-visible,
.hero :focus-visible,
.footer :focus-visible { outline-color: var(--focus-on-dark); }

button, a, [role="button"] { touch-action: manipulation; }
button { font: inherit; color: inherit; }
button, .btn { user-select: none; -webkit-user-select: none; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 40ch;
}

/* Placeholders that the owners must fill: obvious on purpose */
.ph {
  display: inline-block;
  padding: 0 0.4em;
  border: 1px dashed var(--c-maroon-ink);
  border-radius: var(--radius-xs);
  background: rgba(211, 197, 133, 0.28);
  color: var(--c-graphite);
  font-size: 0.82em;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: nowrap;
}

.ph--on-dark,
.section--maroon .ph,
.footer .ph {
  background: transparent;
  border-color: var(--c-gold);
  color: var(--c-gold);
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  background: var(--c-maroon);
  color: var(--c-warm-white);
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus-visible { transform: none; outline-color: var(--c-gold); }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-6);
  border: 0;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-fast) var(--ease-standard),
    color var(--dur-fast) var(--ease-standard);
}
.btn:active { transform: scale(0.97); }

.btn--sm { min-height: 44px; padding: 0 var(--space-5); font-size: 0.9375rem; }

.btn--primary { background: var(--c-maroon); color: var(--c-warm-white); }
.btn--light { background: var(--c-warm-white); color: var(--c-maroon); }

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--c-maroon-deep); }
  .btn--light:hover { background: var(--c-white); }
}

.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  color: var(--c-maroon-ink);
}
.link-arrow::after {
  content: "";
  width: 0.55em;
  height: 0.55em;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.link-arrow::before {
  content: "";
  position: absolute;
  left: 0;
  right: 1.1em;
  bottom: 0.55em;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.link-arrow--light { color: var(--c-warm-white); }

@media (hover: hover) and (pointer: fine) {
  .link-arrow:hover::before { transform: scaleX(1); }
  .link-arrow:hover::after { transform: translateX(3px) rotate(45deg); }
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-white);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.nav.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-1); }

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--nav-height);
}

.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 44px;
  color: var(--c-graphite);
  text-decoration: none;
}
.brand__logo { width: auto; height: 2.75rem; }

.nav__links ul {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}
.nav__links a { white-space: nowrap; }
.nav__links a:not(.btn) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.7rem;
  color: var(--c-graphite);
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius-xs);
  background-image: linear-gradient(var(--c-maroon), var(--c-maroon));
  background-repeat: no-repeat;
  background-position: 0.7rem calc(100% - 9px);
  background-size: 0 2px;
  transition: background-size var(--dur-base) var(--ease-out), color var(--dur-fast) var(--ease-standard);
}
.nav__links a[aria-current="true"]:not(.btn) {
  color: var(--c-maroon);
  background-size: calc(100% - 1.4rem) 2px;
}
@media (hover: hover) and (pointer: fine) {
  .nav__links a:not(.btn):hover { color: var(--c-maroon); background-size: calc(100% - 1.4rem) 2px; }
}
.nav__lang-item { margin-left: var(--space-3); }
.lang { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius-pill); }
.lang__btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.55rem;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--c-graphite-soft);
  font-size: 0.8125rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.lang__btn[aria-pressed="true"] { background: var(--c-maroon); color: var(--c-warm-white); }
@media (hover: hover) and (pointer: fine) {
  .lang__btn[aria-pressed="false"]:hover { color: var(--c-maroon); background: rgba(79, 12, 14, 0.07); }
}

.nav__toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  margin-right: calc(var(--space-3) * -1);
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--c-graphite);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
}
.nav__toggle-bars,
.nav__toggle-bars::before,
.nav__toggle-bars::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-fast) var(--ease-standard);
}
.nav__toggle-bars { position: relative; }
.nav__toggle-bars::before,
.nav__toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav__toggle-bars::before { top: -6px; }
.nav__toggle-bars::after { top: 6px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1099px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    z-index: 49;
    padding: var(--space-6) var(--gutter) calc(var(--space-6) + env(safe-area-inset-bottom, 0px));
    background: var(--c-white);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s linear var(--dur-base);
  }
  .nav.is-open .nav__links {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity var(--dur-base) var(--ease-out),
      transform var(--dur-base) var(--ease-out),
      visibility 0s;
  }
  .nav__links ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__links li { border-bottom: 1px solid var(--line); }
  .nav__links a:not(.btn) {
    min-height: 56px;
    padding: 0;
    font-size: 1.25rem;
    background-position: 0 calc(100% - 12px);
  }
  .nav__links a[aria-current="true"]:not(.btn) { background-size: 2.5rem 2px; }
  .nav__lang-item { margin: var(--space-5) 0 0; border-bottom: 0 !important; }
  .lang__btn { min-height: 44px; min-width: 56px; font-size: 0.9375rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--nav-height));
  background: var(--c-maroon);
  color: var(--text-on-dark);
  overflow: hidden;
}

.hero__art { position: absolute; inset: 0; z-index: -1; }
.hero__art svg { width: 100%; height: 100%; }

.hero__inner { padding-top: clamp(3rem, 2rem + 5vw, 6.5rem); }
.hero__copy { max-width: 38rem; }

html:is([lang="ru"], [lang="kk"]) .hero__title { --h1-scale: 0.8; max-width: 19ch; }
html:is([lang="ru"], [lang="kk"]) .hero__copy { max-width: 42rem; }
html:is([lang="ru"], [lang="kk"]) .hero__lead { max-width: 38rem; }
.hero__title {
  font-size: calc(var(--fs-h1) * var(--h1-scale, 1));
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-display);
  max-width: 14ch;
}

.hero__lead {
  margin-top: var(--space-5);
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--text-on-dark-muted);
  max-width: 34rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin-top: var(--space-6);
}

.fx-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-pill);
  background: rgba(58, 8, 9, 0.72);
  color: var(--c-warm-white);
  font-size: var(--fs-sm);
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-standard), transform var(--dur-press) var(--ease-out);
}
.fx-toggle:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .fx-toggle:hover { background: var(--c-maroon-deep); }
}
.fx-toggle__icon { position: relative; width: 10px; height: 12px; }
.fx-toggle__icon::before,
.fx-toggle__icon::after { content: ""; position: absolute; top: 0; width: 3px; height: 12px; background: currentColor; border-radius: 1px; }
.fx-toggle__icon::before { left: 0; }
.fx-toggle__icon::after { right: 0; }
.fx-toggle[aria-pressed="true"] .fx-toggle__icon::before {
  width: 0;
  height: 0;
  background: none;
  border-style: solid;
  border-width: 6px 0 6px 10px;
  border-color: transparent transparent transparent currentColor;
  border-radius: 0;
}
.fx-toggle[aria-pressed="true"] .fx-toggle__icon::after { display: none; }

/* Desktop: art fills the hero behind the copy (its top-left stays calm). */
@media (min-width: 900px) {
  .hero { display: flex; flex-direction: column; }
  /* a soft panel bound to the copy keeps text legible wherever the scene reaches */
  .hero__copy { position: relative; }
  .hero__copy::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -4rem;
    bottom: -3.5rem;
    left: -50vw;
    right: -7rem;
    background: linear-gradient(90deg, rgba(79, 12, 14, 0.94) 0, rgba(79, 12, 14, 0.9) calc(100% - 13rem), rgba(79, 12, 14, 0) 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 4rem, #000 calc(100% - 3.5rem), transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 4rem, #000 calc(100% - 3.5rem), transparent 100%);
    pointer-events: none;
  }
}
@media (min-width: 900px) and (max-height: 820px) {
  .hero__inner { padding-top: clamp(2rem, 6vh, 4rem); }
  .hero__title { font-size: min(calc(var(--fs-h1) * var(--h1-scale, 1)), 8.6vh); }
  .hero__lead { margin-top: var(--space-4); max-width: 31rem; }
  .hero__actions { margin-top: var(--space-5); }
}

/* Phones and small tablets: copy first, art below as its own band. */
@media (max-width: 899px) {
  .hero { min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; }
  .hero__inner { padding-top: var(--space-7); }
  .hero__inner { padding-bottom: var(--space-7); }
  .hero__art { position: relative; inset: auto; z-index: 0; order: 3; aspect-ratio: 16 / 9; }
  /* icon-only, in the sky corner of the art band (art is 16:9 at full width) */
  .fx-toggle {
    top: calc(100% - 56.25vw + var(--space-2));
    bottom: auto;
    right: var(--space-2);
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .fx-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 479px) {
  .hero__actions .btn,
  .cform__foot .btn { flex: 1 1 100%; width: 100%; }
}

.art-pending { width: 100%; height: 100%; min-height: 12rem; background: var(--c-tint-stone); }
.hero .art-pending { background: transparent; }

/* ---------- Sections ---------- */
.section { position: relative; padding-block: var(--section-pad); background: var(--bg); }
.section--white { background: var(--c-white); }
.section--navy { background: var(--c-navy); color: var(--text-on-dark); }
.section--navy .lead { color: var(--text-on-dark-muted); }
.section--maroon { background: var(--c-maroon); color: var(--text-on-dark); }
.section--maroon .lead { color: var(--text-on-dark-muted); }

.section-head {
  display: grid;
  gap: var(--space-4) var(--space-8);
  margin-bottom: clamp(1.75rem, 1.3rem + 1.8vw, 3rem);
}
.section-head h2 { max-width: 20ch; }
@media (min-width: 960px) {
  .section-head { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: end; }
  .section-head .lead { justify-self: start; }
}

/* ---------- 2. About ---------- */
#about { overflow: hidden; }
.about { position: relative; display: grid; gap: var(--space-5) var(--space-9); }
.about h2 { max-width: 16ch; position: relative; z-index: 1; }
.about__text { position: relative; z-index: 1; }
.about__text .lead { max-width: 48ch; color: var(--text); margin-bottom: var(--space-4); }
.about__text p:not(.lead) { max-width: 60ch; color: var(--text-muted); }
.about__watermark {
  position: absolute;
  right: -1%;
  bottom: -2.5rem;
  width: clamp(9rem, 18vw, 16rem);
  color: var(--c-maroon);
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
}
@media (min-width: 960px) {
  .about { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
}
@media (max-width: 599px) {
  .about__watermark { display: none; }
}

/* ---------- 3. What we do ---------- */
.pillars {
  position: relative;
  display: grid;
  gap: var(--space-7) var(--space-6);
  list-style: none;
}
.pillar { position: relative; padding-top: var(--space-6); }
.pillar__node {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--c-maroon);
  box-shadow: 0 0 0 6px var(--bg);
}
.pillar h3 { margin-bottom: var(--space-3); max-width: 16ch; }
.pillar p { color: var(--text-muted); max-width: 34ch; }

@media (min-width: 640px) {
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .pillars { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* the lifecycle line linking the four */
  .pillars::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--c-maroon) 0 2px, transparent 2px) 0 0 / 10px 2px repeat-x;
    opacity: 0.35;
  }
}

/* ---------- 4. Energy ---------- */
.tech-grid { display: grid; gap: var(--space-6); }
@media (min-width: 760px) {
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tech {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--c-warm-white);
  overflow: hidden;
}
.tech__art { aspect-ratio: 4 / 3; background: var(--c-tint-stone); }
.tech__art svg { width: 100%; height: 100%; }
.tech__body { padding: var(--space-5) var(--space-6) var(--space-6); }
.tech__body h3 { margin-bottom: var(--space-2); }
.tech__body p { color: var(--text-muted); max-width: 46ch; }

/* ---------- 5. Edge (navy band) ---------- */
.edge { --edge-gap: var(--space-5); }
.edge__label {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 var(--space-4);
  border: 1.5px solid var(--c-gold);
  border-radius: var(--radius-pill);
  background: var(--c-navy);
  color: var(--c-gold);
  font-size: var(--fs-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  white-space: nowrap;
}
.edge__cards { list-style: none; display: grid; gap: var(--edge-gap); }
.edge__card {
  position: relative;
  padding: var(--space-6);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius-lg);
  background: rgba(243, 239, 238, 0.04);
}
.edge__card h3 { color: var(--c-warm-white); margin-bottom: var(--space-2); }
.edge__card > p { color: var(--text-on-dark-muted); margin-bottom: var(--space-5); }
.edge__list {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-on-dark);
}
.edge__list li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--c-warm-white);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.edge__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--c-gold);
}

/* phones: the label heads a gold rail that ties the stacked cards together */
@media (max-width: 899px) {
  .edge__rail { margin-bottom: var(--space-4); }
  .edge__cards { position: relative; padding-left: var(--space-6); }
  /* tick into each card */
  .edge__card::before {
    content: "";
    position: absolute;
    left: calc(var(--space-6) * -1 + 0.6rem);
    top: 2.35rem;
    width: calc(var(--space-6) - 0.6rem);
    height: 2px;
    background: var(--c-gold);
  }
  /* label down to the first tick */
  .edge__cards::before {
    content: "";
    position: absolute;
    left: 0.6rem;
    top: calc(var(--space-4) * -1);
    height: calc(var(--space-4) + 2.35rem + 2px);
    width: 2px;
    background: var(--c-gold);
  }
  /* each tick down to the next card's tick */
  .edge__card:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(var(--space-6) * -1 + 0.6rem);
    top: 2.35rem;
    height: calc(100% + var(--edge-gap));
    width: 2px;
    background: var(--c-gold);
  }
}

/* desktop: one bracket over all three cards, label centred, ends landing on the outer card centres */
@media (min-width: 900px) {
  .edge__cards { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto 1fr; }
  .edge__card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
  .edge__rail {
    position: relative;
    height: 4.25rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  /* bracket between the outer card centres: (100% - 2 gaps) / 6 in from each side */
  .edge__rail::before {
    content: "";
    position: absolute;
    left: calc((100% - 2 * var(--edge-gap)) / 6);
    right: calc((100% - 2 * var(--edge-gap)) / 6);
    top: 2.75rem;
    height: 1.5rem;
    border: 2px solid var(--c-gold);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
  }
  /* centre tick from the label down to the middle card */
  .edge__rail::after {
    content: "";
    position: absolute;
    left: calc(50% - 1px);
    top: 2rem;
    width: 2px;
    height: 2.25rem;
    background: var(--c-gold);
  }
  .edge__label { position: relative; z-index: 1; }
}

/* ---------- 6. Partners ---------- */
.partners { display: grid; gap: var(--space-7); }
.partners__art {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-tint-stone);
  aspect-ratio: 4 / 3;
  align-self: start;
}
.partners__art svg { width: 100%; height: 100%; }
.partners__track h3 { margin-bottom: var(--space-5); max-width: 22ch; }

.steps { list-style: none; display: grid; gap: var(--space-4); counter-reset: none; }
.steps li { display: grid; grid-template-columns: 2.25rem 1fr; gap: var(--space-4); align-items: start; }
.steps__n {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1.5px solid var(--c-maroon);
  border-radius: 7px;
  color: var(--c-maroon);
  font-weight: var(--font-weight-semibold);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.steps p { margin: 0.35rem 0 0; color: var(--text); }

@media (min-width: 760px) {
  .partners { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partners__art { grid-column: 1 / -1; aspect-ratio: 16 / 7; }
}
@media (min-width: 1100px) {
  .partners { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); }
  .partners__art { grid-column: auto; aspect-ratio: 4 / 3; }
}

/* ---------- 7. Contact ---------- */
.contact__inner { display: grid; gap: var(--space-7); align-items: start; }
.contact__text h2 { max-width: 18ch; margin-bottom: var(--space-4); }
.contact__direct {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-on-dark);
}
.contact__or { margin-bottom: var(--space-1); color: var(--text-on-dark-muted); font-size: var(--fs-sm); }
.contact__mail {
  display: inline-block;
  padding: 0.45rem 0;
  color: var(--c-gold);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  overflow-wrap: anywhere;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 0.2rem);
  background-size: 100% 1px;
  transition: background-size var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .contact__mail:hover { background-size: 100% 2px; }
}
.contact__addr { margin: var(--space-2) 0 0; color: var(--text-on-dark-muted); }

/* form card */
.cform {
  display: grid;
  gap: var(--space-5);
  padding: clamp(1.25rem, 0.9rem + 1.6vw, 2.25rem);
  border-radius: var(--radius-lg);
  background: var(--c-white);
  color: var(--text);
  box-shadow: 0 2px 6px rgba(20, 4, 5, 0.18), 0 18px 40px rgba(20, 4, 5, 0.22);
}
.cform__row { display: grid; gap: var(--space-5); }
@media (min-width: 600px) { .cform__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.field { display: grid; gap: var(--space-2); min-width: 0; margin: 0; padding: 0; border: 0; }
.field label,
.field legend {
  padding: 0;
  font-size: var(--fs-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--text);
}
.field legend { margin-bottom: var(--space-2); }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--c-white);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* no zoom on iOS */
  line-height: 1.45;
  transition: border-color var(--dur-fast) var(--ease-standard), box-shadow var(--dur-fast) var(--ease-standard);
}
.field textarea { min-height: 8.5rem; resize: vertical; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--c-maroon);
  box-shadow: 0 0 0 3px rgba(79, 12, 14, 0.18);
}
.field [aria-invalid="true"] { border-color: #A3262B; }
.field__err { margin: 0; color: #A3262B; font-size: var(--fs-sm); font-weight: var(--font-weight-semibold); }

.choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice { position: relative; display: inline-flex; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  color: var(--text);
  transition: background-color var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.choice input:checked + span { background: var(--c-maroon); border-color: var(--c-maroon); color: var(--c-warm-white); }
.choice input:focus-visible + span { outline: 2px solid var(--c-maroon); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .choice:hover input:not(:checked) + span { border-color: var(--c-maroon); }
}

.cform__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); }
.cform__note { margin: 0; flex: 1 1 16rem; color: var(--text-muted); font-size: var(--fs-sm); }
.cform__status:empty { display: none; }
.cform__status {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: rgba(211, 197, 133, 0.28);
  color: var(--text);
  font-size: var(--fs-sm);
}
.contact .cform :focus-visible { outline-color: var(--c-maroon); }

@media (min-width: 960px) {
  .contact__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-9); }
}

/* ---------- 8. Footer ---------- */
.footer {
  padding: var(--space-8) 0 calc(var(--space-7) + env(safe-area-inset-bottom, 0px));
  background: var(--c-maroon-deep);
  color: var(--text-on-dark-muted);
  font-size: var(--fs-sm);
}
.footer__inner {
  display: grid;
  gap: var(--space-5) var(--space-8);
  border-top: 1px solid var(--line-on-dark);
  padding-top: var(--space-6);
}
.footer p { margin: 0; }
.footer__id { display: grid; gap: var(--space-1); }
.footer__name { color: var(--c-warm-white); font-weight: var(--font-weight-semibold); }
.footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-gold); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .footer a:hover { text-decoration: underline; } }
.footer__legal { max-width: 62ch; }
@media (min-width: 900px) {
  .footer__inner { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto; align-items: start; }
}

/* ==========================================================================
   Motion
   ========================================================================== */

/* Hero entrance. html.js-motion is set in <head> only when motion is allowed.
   Failsafe: if main.js never runs, everything shows after 3 s. */
html.js-motion [data-enter-item] {
  opacity: 0;
  transform: translateY(var(--enter-y, 16px));
  animation: sk-failsafe-show 0s linear 3s forwards;
}
html.js-motion .hero.is-entered [data-enter-item] {
  animation: none;
  opacity: 1;
  transform: none;
  transition:
    opacity 700ms var(--ease-out) var(--d, 0ms),
    transform 700ms var(--ease-out) var(--d, 0ms);
}
.hero__title { --enter-y: 22px; }
.hero__lead { --enter-y: 16px; }
.hero__actions { --enter-y: 12px; }

/* Scroll reveal: hidden state only once main.js has armed it. */
html.js-motion [data-reveal] { animation: sk-failsafe-show 0s linear 3s forwards; }
html.js-motion.reveal-armed [data-reveal] {
  animation: none;
  opacity: 0;
  transform: translateY(18px);
}
html.js-motion.reveal-armed [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-reveal) var(--ease-out) var(--d, 0ms),
    transform var(--dur-reveal) var(--ease-out) var(--d, 0ms);
}

@keyframes sk-failsafe-show { to { opacity: 1; transform: none; } }

/* Russian / Kazakh chosen: hide the copy until i18n.js swaps it in (failsafe 1.2 s). */
html.i18n-pending .nav,
html.i18n-pending #main,
html.i18n-pending .footer { visibility: hidden; animation: sk-i18n-failsafe 0s linear 1.2s forwards; }
@keyframes sk-i18n-failsafe { to { visibility: visible; } }

/* Illustration loops (class vocabulary in assets/illustrations/index.md).
   They run only while their figure is on screen (.is-live) and not paused. */
.fx-rotor {
  transform-box: view-box;
  animation: fx-spin var(--loop-blade) linear infinite;
}
.fx-pulse { animation: fx-pulse var(--loop-pulse) linear infinite; }
.fx-flow { animation: fx-flow var(--loop-flow) linear infinite; }
.fx-glow { animation: fx-glow var(--loop-glow) ease-in-out infinite alternate; }
.fx-blink { animation: fx-blink var(--loop-blink) steps(1, end) infinite; }

.fx-d1 { animation-delay: -0.6s; }
.fx-d2 { animation-delay: -1.3s; }
.fx-d3 { animation-delay: -2.1s; }

:is(.fx-rotor, .fx-pulse, .fx-flow, .fx-glow, .fx-blink) { animation-play-state: paused; }
[data-fx].is-live :is(.fx-rotor, .fx-pulse, .fx-flow, .fx-glow, .fx-blink) { animation-play-state: running; }
html.fx-paused :is(.fx-rotor, .fx-pulse, .fx-flow, .fx-glow, .fx-blink) { animation-play-state: paused !important; }

@keyframes fx-spin { to { transform: rotate(360deg); } }
@keyframes fx-pulse { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes fx-flow { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes fx-glow { from { opacity: 0.35; } to { opacity: 0.9; } }
@keyframes fx-blink { 0% { opacity: 1; } 62% { opacity: 0.25; } }

/* Reduced motion: everything rests, nothing stays hidden. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  :is(.fx-rotor, .fx-pulse, .fx-flow, .fx-glow, .fx-blink) { animation: none !important; }
  [data-enter-item], [data-reveal] { opacity: 1 !important; transform: none !important; }
  .fx-toggle { display: none; }
}
