/* ============================================================
   TRIM SERVICE — tsdev.kz
   Light, clean design in the spirit of typescriptlang.org
   ============================================================ */

:root {
  --blue: #075d9b;        /* brand color from the logo */
  --blue-dark: #05497a;
  --blue-tint: #e9f2f9;
  --text: #1f2733;
  --text-muted: #5b6673;
  --border: #e3e7eb;
  --bg-soft: #f7f9fb;
  --radius: 10px;
  --container: 1100px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[x-cloak] { display: none !important; }

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.015em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--blue);
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  z-index: 100;
}
.skip-link:focus { left: 8px; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease,
              border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }

.btn-outline {
  background: #fff;
  color: var(--blue);
  border-color: #b9cfdf;
}
.btn-outline:hover { border-color: var(--blue); background: var(--blue-tint); }

.btn-invert { background: #fff; color: var(--blue); }
.btn-invert:hover { background: #e9f2f9; }

.btn-lg { padding: 13px 26px; font-size: 16px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--blue); }
.brand img { width: 34px; height: 34px; }
.brand .brand-name small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
  letter-spacing: .02em;
}

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.main-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
}
.main-nav a:hover { color: var(--blue); text-decoration: none; background: var(--bg-soft); }
.main-nav a.active { color: var(--blue); font-weight: 600; }

.header-spacer { flex: 1; }

/* Language switcher */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: #fff;
}
.lang-switch button {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.lang-switch button:hover { color: var(--blue); }
.lang-switch button.active { background: var(--blue); color: #fff; }

.header-cta { white-space: nowrap; }

/* Burger */
.burger {
  display: none;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}
.burger svg { display: block; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background: #fff;
  padding: 12px 24px 20px;
}
.mobile-nav a:not(.btn) {
  display: block;
  padding: 12px 4px;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--bg-soft);
}
.mobile-nav a:not(.btn).active { color: var(--blue); }
.mobile-nav .mobile-nav-extra {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

@media (max-width: 920px) {
  .main-nav, .header-cta, .lang-switch.desktop-only { display: none; }
  .burger { display: inline-flex; }
  .mobile-nav.open { display: block; }
  .mobile-nav .lang-switch { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 84px 0 72px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(1000px 420px at 85% -10%, var(--blue-tint) 0%, transparent 60%);
}
.hero-grid { position: relative; }

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 54%;
}

.hero-art {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -56px;
  transform: translateY(-50%);
  width: 64%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 42%);
  mask-image: linear-gradient(to right, transparent 0, #000 42%);
}
.hero-art img {
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  opacity: .92;
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 800;
}
.hero h1 .accent { color: var(--blue); }
.hero .lead {
  margin: 20px 0 0;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 28rem;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 36px;
  padding: 0;
  list-style: none;
}
.hero-stats li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}
.hero-stats svg { color: var(--blue); flex: none; }

@media (max-width: 860px) {
  .hero { padding: 56px 0 56px; }
  .hero-copy { max-width: 100%; }
  .hero-art {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 36px;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .hero-art img { opacity: 1; }
}

/* ---------- Sections ---------- */

.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 46rem; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.25rem); font-weight: 800; }
.section-head p { margin: 14px 0 0; color: var(--text-muted); font-size: 1.05rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

/* ---------- Cards ---------- */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover {
  box-shadow: 0 10px 30px rgba(9, 30, 66, .08);
  transform: translateY(-2px);
}

.icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-tint);
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: none;
}

.card h3 { font-size: 17px; font-weight: 700; margin-top: 16px; }
.card p { margin: 10px 0 0; color: var(--text-muted); font-size: 15px; }
.card.soft-bg { background: var(--bg-soft); }

/* Steps */
.step-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
}

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

.member-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 14px;
}
.member-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.member-links a svg { color: var(--text-muted); }
.member-links a:hover svg { color: var(--blue); }

.member-top { display: flex; align-items: center; gap: 14px; }
.member-role {
  margin: 0;
  color: var(--blue);
  font-size: 13.5px;
  font-weight: 600;
}
.member-top h3 { margin: 2px 0 0; font-size: 18px; }
.card .member-bio { margin-top: 14px; }

/* ---------- Story / prose ---------- */

.prose { max-width: 46rem; }
.prose p { margin: 0 0 18px; font-size: 1.06rem; color: var(--text); }
.prose p:last-child { margin-bottom: 0; }

.cert-panel {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  background: var(--blue-tint);
  border: 1px solid #cfe2f0;
  border-radius: 12px;
  padding: 28px;
}
.cert-panel h3 { font-size: 18px; }
.cert-panel p { margin: 10px 0 0; color: var(--text-muted); font-size: 15px; }
.cert-panel .icon-wrap { background: #fff; }

/* ---------- CTA band ---------- */

.cta-band { background: var(--blue); color: #fff; padding: 72px 0; }
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-inner h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.cta-inner p { margin: 10px 0 0; color: #d9e8f4; max-width: 34rem; font-size: 1.05rem; }

/* ---------- Contacts page ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.contact-card + .contact-card { margin-top: 20px; }
.contact-card h3 { font-size: 17px; }
.contact-card p { margin: 8px 0 0; color: var(--text-muted); font-size: 15px; }
.contact-card .mail-line { font-size: 17px; font-weight: 600; margin-top: 8px; }

.req-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}
.req-row {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--bg-soft);
}
.req-row:last-child { border-bottom: 0; }
.req-row dt { color: var(--text-muted); font-size: 14px; margin: 0; }
.req-row dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.req-row dd.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 500;
  font-size: 14.5px;
}
@media (max-width: 480px) {
  .req-row { grid-template-columns: 1fr; gap: 2px; }
}

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

.site-footer {
  border-top: 1px solid var(--border);
  padding: 52px 0 36px;
  background: #fff;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.footer-brand img { width: 30px; height: 30px; }
.footer-tagline { margin: 14px 0 0; color: var(--text-muted); font-size: 14px; max-width: 22rem; }

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin: 0 0 10px; font-size: 14.5px; }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--blue); }
.footer-col .footer-static { color: var(--text-muted); }

.footer-bottom {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ---------- Page hero (inner pages) ---------- */

.page-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; }
.page-hero p { margin: 16px 0 0; color: var(--text-muted); font-size: 1.125rem; max-width: 40rem; }

/* ---------- Utility ---------- */

.mt-20 { margin-top: 20px; }
.mt-32 { margin-top: 32px; }
.muted { color: var(--text-muted); }
.small { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
