:root {
  --bg: #0b0a09;
  --panel: #141210;
  --panel-2: #1b1815;
  --text: #f4efe6;
  --muted: #9b948a;
  --dim: #635d55;
  --line: #262320;
  --line-2: #36322d;
  --gold: #f5b43c;
  --gold-2: #ffcf73;
  --gold-ink: #1a1306;
  --ok: #7fc8a0;
  --max: 1240px;
  --gutter: 24px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

/* faint dot grid + slow glow behind everything */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.backdrop::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(244, 239, 230, .07) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.backdrop i {
  position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 180, 60, .08), transparent);
  left: 50%; top: 40%; transform: translate(-50%, -50%);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-30%, -20%); } }

/* ---------- nav ---------- */
.nav-bar {
  position: sticky; top: 14px; z-index: 30;
  margin: 14px auto 0; max-width: calc(var(--max) - 2 * var(--gutter));
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 10px 10px 10px 22px;
  background: rgba(20, 18, 16, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.logo { display: flex; align-items: baseline; gap: 2px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.logo span { color: var(--gold); }
.menu { display: flex; align-items: center; gap: 26px; font-size: 14.5px; font-weight: 500; }
.menu a { text-decoration: none; color: var(--muted); transition: color .15s; }
.menu a:hover { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; padding: 13px 22px;
  font-size: 15px; font-weight: 700; text-decoration: none; white-space: nowrap;
  border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn-gold { background: var(--gold); color: var(--gold-ink) !important; box-shadow: 0 0 0 0 rgba(245,180,60,0); }
.btn-gold:hover { background: var(--gold-2); box-shadow: 0 10px 40px -10px rgba(245,180,60,.6); }
.btn-ghost { border-color: var(--line-2); color: var(--text) !important; }
.btn-ghost:hover { border-color: var(--muted); }
.nav-bar .btn { padding: 9px 16px; font-size: 14px; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 120px 0 0; text-align: center; overflow: hidden; }
.hero canvas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero .wrap { z-index: 1; }
h1 {
  font-size: clamp(34px, 5.2vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
  margin: 0 auto 26px;
  max-width: 16ch;
}
h1 span { color: var(--gold); }
html:lang(kk) h1 { font-size: clamp(30px, 4.6vw, 62px); max-width: 18ch; }
.lead { color: var(--muted); font-size: 19px; max-width: 56ch; margin: 0 auto 38px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.hero-cards {
  display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 14px;
  margin-top: 120px; padding-bottom: 72px; text-align: left;
}
.hcard {
  background: rgba(20, 18, 16, .82);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line-2);
  border-radius: 20px;
  padding: 20px 22px 22px;
  min-height: 230px;
  display: flex; flex-direction: column;
}
.hcard-h { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.hcard-h small { font-family: var(--mono); font-size: 11.5px; font-weight: 400; color: var(--dim); }
.hcard-foot { margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--muted); line-height: 1.45; }

.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.docs li {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 10px 12px; border-radius: 10px; background: var(--panel-2);
  font-size: 13.5px;
  opacity: .25; transition: opacity .5s;
}
.docs li.on { opacity: 1; }
.docs b { font-family: var(--mono); font-weight: 400; font-size: 12px; color: var(--muted); display: block; }
.status { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(127, 200, 160, .12); color: var(--ok); white-space: nowrap; }

.confs { display: flex; flex-wrap: wrap; gap: 7px; }
.confs span { font-size: 13px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); }
.confs span:first-child { border-color: rgba(245,180,60,.5); color: var(--gold); }

.close-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.close-list li { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.close-list li i {
  width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-2);
  display: grid; place-items: center; transition: background .35s, border-color .35s;
}
.close-list li i::after { content: ""; width: 7px; height: 4px; border: solid var(--gold-ink); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.close-list li.done { color: var(--text); }
.close-list li.done i { background: var(--gold); border-color: var(--gold); }
.close-list li.done i::after { opacity: 1; }
.close-list li span:last-child { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.progress { height: 4px; border-radius: 4px; background: var(--line); margin-top: 16px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width .6s ease; }

/* ---------- statement ---------- */
.statement { padding: 140px 0 120px; text-align: center; }
.statement p {
  font-size: clamp(26px, 3.4vw, 46px);
  line-height: 1.2; letter-spacing: -0.025em; font-weight: 600;
  max-width: 28ch; margin: 0 auto;
}
html:lang(kk) .statement p { max-width: 32ch; }
.statement p span { color: var(--dim); }
.statement small { display: block; margin-top: 40px; color: var(--muted); font-size: 15px; }

/* ---------- section heads ---------- */
section.wrap { padding-bottom: 130px; }
.head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; margin-bottom: 44px; }
h2 { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700; margin: 0; }
.head p { margin: 0; color: var(--muted); max-width: 50ch; justify-self: start; }

/* ---------- services bento ---------- */
.bento { display: grid; grid-template-columns: 1.15fr 1fr 1fr; grid-auto-rows: minmax(250px, auto); gap: 14px; }
.svc {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  padding: 26px 26px 28px; display: flex; flex-direction: column;
  transition: border-color .2s, transform .25s;
}
.svc:hover { border-color: var(--line-2); transform: translateY(-3px); }
.svc .n { font-family: var(--mono); font-size: 12px; color: var(--dim); margin-bottom: 18px; }
.svc h3 { font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 12px; }
.svc p { margin: 0; color: var(--muted); font-size: 15.5px; }
.svc-main { grid-row: span 2; background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.svc-main .n, .svc-main p { color: rgba(26, 19, 6, .7); }
.svc-main h3 { font-size: 30px; }
.bars { margin-top: auto; padding-top: 30px; display: flex; align-items: flex-end; gap: 10px; height: 190px; }
.bars i {
  flex: 1; border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, rgba(26,19,6,.92), rgba(26,19,6,.55));
  height: 6%; transition: height 1.1s cubic-bezier(.2,.8,.2,1);
}
.bars i:nth-child(even) { background: linear-gradient(180deg, #fff6e3, rgba(255,246,227,.55)); }
.bars.grow i { height: var(--h); }
.svc-ico { margin-top: auto; padding-top: 22px; display: flex; gap: 8px; }
.svc-ico span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 10px; }

/* ---------- kazakhstan rules ---------- */
.rules { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; }
.chips-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.chips-card small { display: block; color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); transition: all .25s; cursor: default; }
.chips span:hover, .chips span.lit { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.rule-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rule { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.rule b { display: block; font-family: var(--mono); font-weight: 500; font-size: 15px; color: var(--gold); margin-bottom: 12px; }
.rule h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; }
.rule p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ---------- process rows ---------- */
.steps { border-top: 1px solid var(--line-2); }
.step {
  display: grid; grid-template-columns: 80px 1fr 1fr; gap: 24px; align-items: center;
  padding: 30px 20px; border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden; border-radius: 4px;
}
.step::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 140% at 30% 50%, rgba(245,180,60,.12), transparent 70%);
  opacity: 0; transition: opacity .35s;
}
.step:hover::before { opacity: 1; }
.step .n { font-family: var(--mono); font-size: 13px; color: var(--dim); }
.step h3 { font-size: clamp(24px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.02em; margin: 0; transition: color .25s, transform .3s; }
.step:hover h3 { color: var(--gold); transform: translateX(6px); }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; max-width: 46ch; justify-self: start; }
@media (min-width: 761px) {
  #process .head { grid-template-columns: 100px 1fr 1fr; column-gap: 24px; padding-right: 20px; }
  #process .head h2 { grid-column: 1 / 3; }
}

/* ---------- contact ---------- */
.cta {
  position: relative; overflow: hidden;
  border-radius: 30px; border: 1px solid var(--line-2);
  background: radial-gradient(80% 120% at 50% 120%, rgba(245,180,60,.32), transparent 60%), var(--panel);
  padding: 88px 32px; text-align: center;
}
.cta::after {
  content: ""; position: absolute; left: 50%; bottom: -260px; width: 900px; height: 360px; transform: translateX(-50%);
  border-radius: 50%; border-top: 2px solid rgba(255, 207, 115, .75);
  box-shadow: 0 -20px 80px rgba(245,180,60,.35);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 50% { box-shadow: 0 -30px 120px rgba(245,180,60,.55); } }
.cta > * { position: relative; z-index: 1; }
.cta h2 { max-width: 20ch; margin: 0 auto 16px; }
.cta p { color: var(--muted); max-width: 52ch; margin: 0 auto 30px; }
.cta .mail { display: inline-block; font-size: clamp(20px, 2.4vw, 28px); font-weight: 700; text-decoration: none; margin-bottom: 26px; }
.cta .mail:hover { color: var(--gold); }

/* ---------- footer ---------- */
.footer { padding: 70px 0 40px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.foot p { color: var(--muted); font-size: 14.5px; max-width: 36ch; margin: 12px 0 0; }
.foot small { display: block; font-size: 12.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
html:lang(kk) .foot small { text-transform: none; letter-spacing: 0; }
.foot nav a, .foot span, .foot > div > a { display: block; color: var(--muted); font-size: 14.5px; text-decoration: none; margin-bottom: 6px; }
.foot a:hover { color: var(--text); }
.foot .logo { display: flex; color: var(--text); font-size: 20px; margin: 0; }
.foot .logo span { display: inline; color: var(--gold); font-size: inherit; margin: 0; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; font-size: 13.5px; color: var(--dim); }
.foot-bottom a { text-decoration: none; }
.foot-bottom a:hover { color: var(--text); }

a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }

/* ---------- scroll reveal ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- mail dialog ---------- */
.mail-dlg { border: 1px solid var(--line-2); border-radius: 22px; padding: 30px 26px 26px; width: min(420px, calc(100% - 32px)); background: var(--panel-2); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); }
.mail-dlg::backdrop { background: rgba(5,5,4,.72); backdrop-filter: blur(4px); }
.mail-dlg-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--line); color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.mail-dlg-t { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.mail-dlg-a { color: var(--muted); margin: 0 0 22px; word-break: break-all; }
.mail-dlg-list { display: grid; gap: 8px; }
.mail-dlg-list a, .mail-dlg-list button { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.mail-dlg-list a:hover, .mail-dlg-list button:hover { border-color: var(--muted); }
.mail-dlg-list svg { width: 16px; height: 16px; color: var(--muted); }
.mail-dlg-copy { justify-content: center !important; background: var(--gold) !important; color: var(--gold-ink) !important; border-color: var(--gold) !important; }
.mail-dlg-copy.ok { background: var(--ok) !important; border-color: var(--ok) !important; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-cards { grid-template-columns: 1fr 1fr; }
  .hero-cards .hcard:last-child { grid-column: span 2; }
  .bento { grid-template-columns: 1fr 1fr; }
  .svc-main { grid-row: auto; grid-column: span 2; }
  .rules { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > div:first-child { grid-column: span 2; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .menu a:not(.btn) { display: none; }
  .nav-bar { margin: 10px 10px 0; padding-left: 18px; }
  .hero { padding-top: 72px; }
  .lead { font-size: 17px; }
  .hero-cards { grid-template-columns: 1fr; margin-top: 64px; }
  .hero-cards .hcard:last-child { grid-column: auto; }
  .hcard { min-height: 0; }
  .statement { padding: 90px 0 80px; }
  section.wrap { padding-bottom: 90px; }
  .head { grid-template-columns: 1fr; gap: 14px; margin-bottom: 30px; }
  .head p { justify-self: start; }
  .bento { grid-template-columns: 1fr; }
  .svc-main { grid-column: auto; }
  .bars { height: 140px; }
  .rule-list { grid-template-columns: 1fr; }
  .step { grid-template-columns: 44px 1fr; padding: 22px 0; }
  .step p { grid-column: 2; justify-self: start; }
  .cta { padding: 60px 20px; }
  .foot { grid-template-columns: 1fr; }
  .foot > div:first-child { grid-column: auto; }
  .foot-bottom { flex-direction: column; }
}
@media (max-width: 480px) {
  .actions .btn, .cta .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* ---------- typical projects ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.case {
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  padding: 26px; display: flex; flex-direction: column;
  transition: border-color .2s, transform .25s;
}
.case:hover { border-color: var(--line-2); transform: translateY(-3px); }
.case-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.case-tag { font-size: 13px; font-weight: 700; color: var(--gold); padding: 6px 13px; border: 1px solid rgba(245,180,60,.45); border-radius: 999px; }
.case-top .n { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.case h3 { font-size: 21px; line-height: 1.18; letter-spacing: -0.02em; font-weight: 700; margin: 0 0 22px; }
.case dl { margin: 0; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.case dt { font-family: var(--mono); font-size: 11.5px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 5px; }
html:lang(kk) .case dt { text-transform: none; letter-spacing: 0; }
.case dd { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.case .res { margin-top: auto; padding: 16px 18px; border-radius: 14px; background: rgba(245,180,60,.07); border: 1px solid rgba(245,180,60,.25); }
.case .res dt { color: var(--gold); }
.case .res dd { color: var(--text); }
.case h3 em { font-style: normal; color: var(--gold); }
.case .res .num { display: block; font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: var(--gold); margin: 4px 0 10px; }
@supports (grid-template-rows: subgrid) {
  .case { display: grid; grid-template-rows: subgrid; grid-row: span 5; row-gap: 0; }
  .case dl { display: contents; }
  .case dl > div { margin-bottom: 18px; }
  .case dl > .res { margin: 0; }
}
@media (max-width: 1000px) { .cases { grid-template-columns: 1fr; } }
