:root {
  --bg: #ffffff;
  --surface: #f4f5f6;
  --ink: #111820;
  --muted: #4e5660;
  --line: #d8dde1;
  --dark: #111820;
  --accent: #ff4b18;
  --container: 1296px;
  --shadow: 0 14px 38px rgba(17, 24, 32, 0.08);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.container {
  width: min(calc(100% - 44px), var(--container));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  background: linear-gradient(to bottom, rgba(7, 12, 17, 0.82), rgba(7, 12, 17, 0.42), transparent);
}
.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  text-decoration: none;
}
.brand img {
  width: clamp(290px, 27vw, 540px);
  height: auto;
}

/* Hero */
.hero {
  position: relative;
  min-height: 680px;
  background: #0b1117;
  overflow: hidden;
}
.hero-media,
.hero-media img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-media img {
  object-fit: cover;
  object-position: center center;
}
.hero-overlay {
  background:
    linear-gradient(90deg, rgba(5, 9, 13, 0.98) 0%, rgba(5, 9, 13, 0.94) 26%, rgba(5, 9, 13, 0.55) 48%, rgba(5, 9, 13, 0.12) 72%),
    linear-gradient(0deg, rgba(5, 9, 13, 0.32), rgba(5, 9, 13, 0.08));
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 126px;
  padding-bottom: 48px;
}
.hero-copy {
  display: flex;
  align-items: stretch;
  gap: 26px;
  max-width: 780px;
  margin-top: 38px;
}
.hero-accent {
  flex: 0 0 7px;
  width: 7px;
  border-radius: 2px;
  background: var(--accent);
}
.hero-copy-inner {
  padding-top: 2px;
}
.hero h1 {
  margin: 0;
  color: #fff;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.92;
  font-size: clamp(56px, 5.45vw, 92px);
}
.hero h1 span {
  font-weight: 350;
  letter-spacing: -0.03em;
}
.hero-subtitle {
  width: fit-content;
  margin: 14px 0 0;
  padding-top: 8px;
  border-top: 3px solid var(--accent);
  color: rgba(255,255,255,0.96);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: clamp(16px, 1.15vw, 25px);
}

/* Services */
.services-section {
  background: linear-gradient(180deg, #0f161d 0%, #141f27 100%);
  padding: 18px 0 12px;
}
/* Wider service row: three equal cards spread evenly across the page. */
.services-section .container {
  width: min(calc(100% - 36px), 1540px);
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.service-card {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 8px;
  background: transparent;
}
.service-card picture {
  display: block;
  aspect-ratio: 16 / 8.7;
  overflow: hidden;
  background: #d9dde0;
}
.service-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.service-body {
  padding: 14px 20px 16px;
}
.service-body h2 {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: clamp(26px, 1.82vw, 37px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.service-body p {
  margin: 0;
  color: rgba(255,255,255,.92);
  font-size: clamp(14px, 1.02vw, 17px);
  line-height: 1.15;
}

/* Feature strip */
.feature-strip {
  background: linear-gradient(180deg, #141f27 0%, #182630 100%);
  color: #fff;
  padding: 12px 0 18px;
}
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: center;
  gap: 26px;
}
.feature-separator {
  width: 1px;
  height: 72px;
  background: rgba(255,255,255,.24);
  justify-self: center;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 82px;
}
.feature-item img {
  width: 88px;
  height: 88px;
  object-fit: contain;
}
.feature-item h3 {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: clamp(25px, 1.65vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.feature-item p {
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: clamp(14px, 1vw, 17px);
  line-height: 1.15;
}
.headset-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
}
.headset-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* About */
.about-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #182630 0%, #1d2d38 100%);
  min-height: 295px;
}
.blueprint {
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(58vw, 920px);
  height: 100%;
  background: url('assets/toolhead-lineart.png') left bottom / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.about-grid {
  position: relative;
  z-index: 1;
  min-height: 295px;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  align-items: center;
}
.about-visual { min-height: 250px; }
.about-copy {
  max-width: 720px;
  justify-self: start;
  padding: 28px 0 22px;
}
.about-label {
  margin: 0 0 6px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}
.about-copy h2 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(40px, 3.35vw, 66px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}
.about-copy p:last-child {
  margin: 16px 0 0;
  color: rgba(255,255,255,.86);
  font-size: clamp(16px, 1.22vw, 23px);
  line-height: 1.12;
}

/* Footer */
.site-footer {
  background: #1d2d38;
  color: #fff;
  padding: 14px 0 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 34px;
}
.footer-brand img {
  width: min(380px, 32vw);
  height: auto;
}
.footer-contacts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 22px;
  min-width: 0;
  font-size: 16px;
}
.footer-contacts strong {
  font-size: 20px;
}
.footer-contacts a {
  text-decoration: none;
  color: #fff;
}
.footer-contacts a:hover { color: #ff8d71; }

/* Contacts page */
.contact-page { background: #fff; }
.site-header.solid {
  position: relative;
  background: #111820;
}
.contact-main {
  min-height: 60vh;
}
.contact-hero {
  background: linear-gradient(135deg, #111820 0%, #25313c 100%);
  color: #fff;
  padding: clamp(72px, 9vw, 120px) 0;
}
.contact-intro { max-width: 900px; }
.contact-intro h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .98;
  letter-spacing: -.045em;
}
.contact-intro > p:last-child {
  max-width: 760px;
  margin: 24px 0 0;
  font-size: clamp(17px, 1.7vw, 21px);
  color: rgba(255,255,255,.78);
}
.eyebrow {
  margin: 0 0 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
}
.contact-section {
  background: #f6f7f8;
  padding: clamp(38px, 5vw, 66px) 0;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 22px;
}
.contact-card {
  min-height: 220px;
  padding: 28px;
  border: 1px solid #e0e4e7;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.contact-card small {
  color: #7a838b;
  margin: 12px 0 4px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .12em;
}
.contact-card strong {
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.1;
}
.contact-card > span:last-child {
  margin-top: 10px;
  color: var(--accent);
  font-weight: 800;
}
.contact-icon { font-size: 28px; color: var(--accent); }
.contact-note {
  margin-top: 34px;
  padding: clamp(28px, 5vw, 56px);
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e0e4e7;
}
.contact-note h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.03;
  letter-spacing: -.035em;
}
.contact-note p {
  max-width: 900px;
  font-size: 18px;
  color: #46505a;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 9px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--accent); border: 1px solid var(--accent); }
.button-primary:hover { background: #d63a0b; border-color: #d63a0b; }

/* Responsive */
@media (max-width: 1100px) {
  .brand img { width: 330px; }
  .hero { min-height: 610px; }
  .hero-content { padding-top: 110px; }
  .service-grid { gap: 16px; }
  .service-body { padding-inline: 16px; }
  .feature-grid { gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; }
  .footer-contacts { justify-content: flex-start; }
}

@media (max-width: 860px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .services-section .container { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { min-height: 72px; }
  .brand img { width: 245px; }

  .hero { min-height: 620px; }
  .hero-media img { object-position: 66% center; }
  .hero-overlay {
    background:
      linear-gradient(0deg, rgba(7,12,17,.96) 10%, rgba(7,12,17,.82) 52%, rgba(7,12,17,.36) 100%),
      linear-gradient(90deg, rgba(7,12,17,.9), rgba(7,12,17,.24));
  }
  .hero-content { padding-top: 130px; padding-bottom: 48px; }
  .hero-copy { gap: 16px; max-width: 620px; }
  .hero-accent { flex-basis: 6px; width: 6px; }
  .hero h1 { font-size: clamp(43px, 8.8vw, 65px); line-height: .96; }
  .hero-subtitle { font-size: 15px; letter-spacing: .12em; }

  .services-section { padding-top: 14px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card picture { aspect-ratio: 16 / 9; }
  .service-body h2 { font-size: 32px; }
  .service-body p { font-size: 16px; }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .feature-separator {
    width: 100%;
    height: 1px;
  }
  .feature-item { gap: 16px; min-height: unset; }

  .about-grid { grid-template-columns: 1fr; min-height: 340px; }
  .about-visual { display: none; }
  .blueprint { width: 100%; opacity: 0.28; }
  .about-copy { max-width: 760px; padding: 34px 0 44px; }
  .about-copy h2 { font-size: clamp(35px, 7vw, 52px); }
  .about-copy p:last-child { font-size: 18px; }

  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .container { width: min(calc(100% - 22px), var(--container)); }
  .brand img { width: 210px; }
  .header-inner { min-height: 66px; }
  .hero { min-height: 670px; }
  .hero-media img { object-position: 68% center; }
  .hero-content { padding-top: 126px; padding-bottom: 42px; }
  .hero-copy { margin-top: 16px; }
  .hero h1 { font-size: clamp(38px, 11.2vw, 52px); }
  .hero-subtitle { font-size: 13px; letter-spacing: .08em; line-height: 1.4; }
  .service-body { padding: 14px 14px 18px; }
  .service-body h2 { font-size: 25px; }
  .service-body p { font-size: 14px; }
  .feature-item img { width: 72px; height: 72px; }
  .headset-icon { width: 62px; height: 62px; }
  .feature-item h3 { font-size: 22px; }
  .feature-item p { font-size: 14px; }
  .about-label { font-size: 16px; }
  .about-copy p:last-child { font-size: 16px; }
  .footer-brand img { width: min(270px, 80vw); }
  .footer-contacts { display: grid; gap: 9px; font-size: 15px; }
  .footer-contacts strong { font-size: 18px; }
  .contact-card { min-height: 190px; padding: 22px; }
  .contact-note { padding: 24px; }
  .contact-note p { font-size: 16px; }
}

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


/* Верхний баннер: показываем исходное изображение целиком, без увеличения и обрезки. */
@media (min-width: 861px) {
  .hero {
    aspect-ratio: 1672 / 941;
    min-height: 0;
  }

  .hero-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }
}


/* ===== G3D: header simplification and left alignment ===== */
/* Убрано верхнее меню. Логотип и белый текст главного баннера сдвинуты влево. */
.site-header .header-inner {
  justify-content: flex-start;
}
.site-header > .container,
.hero > .container {
  width: calc(100% - 48px);
  max-width: none;
  margin-left: 24px;
  margin-right: 24px;
}

@media (max-width: 860px) {
  .site-header > .container,
  .hero > .container {
    width: calc(100% - 28px);
    margin-left: 14px;
    margin-right: 14px;
  }
}

@media (max-width: 520px) {
  .site-header > .container,
  .hero > .container {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
  }
}


/* Header: only icon. Footer: only wordmark. */
.brand-icon img {
  width: clamp(72px, 6.8vw, 110px);
  height: auto;
}
.footer-brand-wordmark img {
  width: min(380px, 32vw);
  height: auto;
}

@media (max-width: 1100px) {
  .brand-icon img { width: 96px; }
}

@media (max-width: 860px) {
  .brand-icon img { width: 82px; }
}

@media (max-width: 520px) {
  .brand-icon img { width: 70px; }
  .footer-brand-wordmark img { width: min(270px, 80vw); }
}


/* ===== Language switch ===== */
.language-switch{margin-left:auto;display:flex;align-items:center;gap:8px}.lang-link{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:5px 8px;border:1px solid rgba(255,255,255,.28);border-radius:7px;color:rgba(255,255,255,.88);background:rgba(8,13,18,.30);text-decoration:none;font-size:12px;font-weight:800;letter-spacing:.06em;backdrop-filter:blur(3px);transition:background .18s ease,border-color .18s ease,opacity .18s ease}.lang-link:hover,.lang-link.is-active{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.72);color:#fff}.flag-icon{width:27px;height:18px;display:block;border:1px solid rgba(255,255,255,.45);box-shadow:0 1px 3px rgba(0,0,0,.25)}@media (max-width:520px){.language-switch{gap:5px}.lang-link{min-height:30px;padding:4px 5px;gap:4px;font-size:10px}.flag-icon{width:23px;height:15px}}


/* ===== Footer localized wordmark for Latvian page ===== */
.footer-brand-lv {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.footer-brand-name {
  color: #fff;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.footer-brand-tagline {
  color: rgba(255,255,255,.92);
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: none;
}

/* ===== Cross-resolution refinements ===== */
body {
  overflow-x: hidden;
}
.service-card,
.feature-item,
.footer-grid > *,
.about-copy,
.hero-copy,
.contact-card,
.contact-note {
  min-width: 0;
}

@media (max-width: 1366px) {
  .hero-copy { max-width: 700px; }
  .hero h1 { font-size: clamp(52px, 5vw, 84px); }
  .service-body h2 { font-size: clamp(24px, 1.8vw, 34px); }
}

@media (max-width: 980px) {
  .header-inner {
    gap: 14px;
    flex-wrap: wrap;
  }
  .hero { min-height: 600px; }
  .hero-content { padding-top: 116px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-copy { max-width: 100%; }
  .blueprint {
    width: 100%;
    background-position: left bottom;
  }
}

@media (max-width: 760px) {
  .site-header {
    background: linear-gradient(to bottom, rgba(7, 12, 17, 0.9), rgba(7, 12, 17, 0.58), transparent);
  }
  .header-inner {
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .language-switch {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .feature-item {
    align-items: flex-start;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .footer-contacts {
    justify-content: flex-start;
  }
  .footer-brand-lv .footer-brand-name { font-size: clamp(38px, 10vw, 56px); }
  .footer-brand-lv .footer-brand-tagline { font-size: 15px; }
}

@media (max-width: 420px) {
  .hero { min-height: 700px; }
  .hero-content { padding-top: 132px; }
  .hero-copy { gap: 12px; }
  .footer-brand-lv .footer-brand-tagline { font-size: 14px; }
}


/* ===== Final responsive guards ===== */
/* 861–980 px: avoid aspect-ratio + min-height forcing the hero wider than the viewport. */
@media (min-width: 861px) and (max-width: 980px) {
  .hero {
    aspect-ratio: auto;
    width: 100%;
    min-height: 600px;
  }
  .hero-media img {
    object-fit: cover;
  }
}

/* Small phones: keep long RU/LV hero lines fully visible without changing desktop/tablet styling. */
@media (max-width: 520px) {
  .hero-copy-inner {
    min-width: 0;
    width: 100%;
  }
  .hero h1 {
    font-size: clamp(29px, 9.35vw, 46px);
    letter-spacing: -0.05em;
    overflow-wrap: normal;
    word-break: normal;
  }
}

@media (max-width: 360px) {
  .hero-subtitle {
    font-size: 12px;
    letter-spacing: .055em;
  }
}
