:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --bg-soft: #101722;
  --surface: #111827;
  --surface-2: #162133;
  --text: #e5e7eb;
  --text-soft: #9aa8bf;
  --line: #25354a;
  --line-strong: #38577a;
  --brand: #1d4ed8;
  --brand-2: #2563eb;
  --brand-ink: #cad8ff;
  --accent: #22c55e;
  --accent-2: #34d399;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.24);
  --max: 1200px;
  --header-h: 78px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;
  --focus: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

body.light {
  color-scheme: light;
  --bg: #f4f8fb;
  --bg-soft: #eaf0f7;
  --surface: #ffffff;
  --surface-2: #eef4fb;
  --text: #0f172a;
  --text-soft: #4b5b73;
  --line: #bfd0e4;
  --line-strong: #9eb5d2;
  --brand: #1d4ed8;
  --brand-2: #1e40af;
  --brand-ink: #143780;
  --accent: #16a34a;
  --accent-2: #22c55e;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 28%),
    radial-gradient(circle at 90% 8%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--brand-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(calc(100% - 2rem), var(--max));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 0.65rem 0.9rem;
  background: var(--brand);
  color: #fff;
  border-radius: 10px;
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
  background-image:
    linear-gradient(color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 30%, transparent) 1px, transparent 1px);
  background-size: 36px 36px;
}

body.light .ambient-bg {
  opacity: 0.95;
  background-image:
    linear-gradient(rgba(72, 102, 138, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(72, 102, 138, 0.22) 1px, transparent 1px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  min-height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--space-4);
}

.header-inner > * {
  min-width: 0;
}

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

.brand-mark,
.brand-mark img {
  width: 46px;
  height: 46px;
}

.brand-copy strong {
  display: block;
  color: var(--brand-ink);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.brand-copy span {
  display: block;
  color: var(--text-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.desktop-nav {
  display: none;
  justify-self: stretch;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-left: auto;
}

.desktop-nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-soft);
  padding: 0.58rem 0.78rem;
  border-radius: 999px;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: var(--text);
  background: var(--surface-2);
}

.header-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  justify-self: end;
}

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

.lang-btn {
  border: 0;
  min-width: 42px;
  height: 36px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
  padding: 0 10px;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  background: var(--brand);
  color: #f8fbff;
}

.theme-toggle,
.menu-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.theme-icon {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
}

.theme-icon svg {
  width: 20px;
  height: 20px;
}

.icon-moon {
  display: none;
}

body.light .icon-sun {
  display: none;
}

body.light .icon-moon {
  display: grid;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
}

.menu-toggle span {
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  display: block;
}

.menu-toggle span + span {
  margin-top: 0;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 0 0 var(--space-5);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 0.5rem;
  padding-top: var(--space-4);
}

.mobile-panel a {
  font-weight: 600;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  text-align: right;
}

.section {
  padding: var(--space-10) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.section-alt {
  background: color-mix(in srgb, var(--surface) 56%, transparent);
}

.section-head {
  max-width: 920px;
  margin-bottom: var(--space-8);
}

.section-head a,
.seo-block a {
  text-decoration: none;
  font-weight: 700;
  color: var(--brand-ink);
}

.section-head a:hover,
.seo-block a:hover,
.section-head a:focus-visible,
.seo-block a:focus-visible {
  color: var(--text);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.8rem;
  line-height: 1.2;
}

h1,
h2 {
  font-family: Sora, Inter, sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
}

h3 {
  font-size: clamp(1.2rem, 2.8vw, 1.4rem);
}

p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

.lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 68ch;
}

.hero {
  padding-top: calc(var(--space-9) + 10px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-6);
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.service-card,
.process-step,
.about-points,
.cta-shell,
.faq-list details,
.contact-form,
.project-card {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.hero-copy {
  padding: clamp(2rem, 4vw, 3.1rem);
  min-width: 0;
  height: 100%;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.72rem;
}

.hero-tech-line {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
}

.hero-metrics {
  margin-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.72rem 0.85rem;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
}

.metric strong {
  display: block;
  font-size: 1.25rem;
  color: var(--text);
  font-family: "JetBrains Mono", Consolas, monospace;
  line-height: 1.1;
}

.metric span {
  font-size: 0.84rem;
  color: var(--text-soft);
  line-height: 1.25;
}

.hero-panel {
  padding: 1.3rem;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 1rem;
  min-width: 0;
  height: 100%;
}

.hero-media {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 280px;
}

.hero-media::before {
  content: "REC - MONITORING 24/7";
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 700;
  font-size: 0.7rem;
  color: #fff;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.55);
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(6, 10, 18, 0.45));
}

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

.panel-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: clamp(0.55rem, 1.2vw, 0.85rem);
  align-self: start;
}

.panel-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
}

.panel-badge {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  background: var(--brand);
  color: #f8fbff;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.panel-item h2 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  font-family: Inter, sans-serif;
  letter-spacing: 0;
}

.panel-item p {
  margin: 0;
  font-size: 0.92rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 1rem;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}

.btn-primary {
  color: #f8fbff;
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
}

.btn-secondary {
  color: var(--text);
  background: var(--surface);
  border-color: var(--line);
}

.btn-accent {
  color: #07210f;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}

.service-card {
  padding: 1.15rem;
}

.service-media {
  margin: 0 0 0.9rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}

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

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
  background: color-mix(in srgb, var(--brand) 20%, var(--surface-2));
  color: var(--brand-ink);
}

.service-icon svg {
  width: 22px;
  height: 22px;
}

.ai-note {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  font-size: 0.9rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-5);
}

.process-step {
  padding: 1.35rem;
}

.process-step span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-weight: 700;
  font-size: 0.84rem;
  color: #f8fbff;
  background: var(--brand);
  margin-bottom: 0.65rem;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-6);
  align-items: start;
}

.legal-head {
  max-width: 100%;
}

.legal-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-6);
  align-items: stretch;
}

.about-copy {
  display: flex;
  flex-direction: column;
}

.seo-block {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.3rem, 3vw, 2rem);
}

.seo-block h3 {
  margin-top: 1rem;
}

.seo-block h3:first-child {
  margin-top: 0;
}

.legal-microcopy {
  margin-top: auto;
  padding-top: 0.9rem;
}

.legal-sources {
  margin-top: 1rem;
  font-size: 0.92rem;
}

.about-points {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.about-points li {
  color: var(--text);
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.about-points li:last-child {
  border-bottom: 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.project-card h3 {
  padding: 1rem 1.1rem 0.25rem;
  margin: 0;
}

.project-card p {
  padding: 0 1.1rem 1.2rem;
  margin: 0;
}

.cta-shell {
  padding: clamp(1.45rem, 3vw, 2.25rem);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.1rem;
}

.cta-action {
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-list {
  display: grid;
  gap: 0.72rem;
}

.faq-list details {
  border-radius: var(--radius-md);
  padding: 1.05rem 1.2rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.contact-form {
  padding: 1.45rem;
  display: grid;
  gap: 0.85rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

label {
  font-weight: 700;
  color: var(--text);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 0.72rem 0.8rem;
  resize: none;
}

.social-links {
  display: inline-flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.social-links a {
  font-weight: 700;
}

.site-footer {
  padding-top: var(--space-8);
  padding-bottom: 1.2rem;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(14px);
}

.footer-simple {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

.footer-brand-block {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.footer-brand-block img {
  width: 44px;
  height: 44px;
}

.footer-brand {
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 800;
}

.footer-contact p {
  margin: 0;
}

.footer-title {
  margin: 0 0 0.4rem;
  color: var(--text);
  font-weight: 800;
}

.footer-contact {
  justify-self: end;
}

.footer-contact p + p {
  margin-top: 0.35rem;
}

.footer-legal-links {
  margin-top: 0.65rem !important;
  font-size: 0.9rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  display: grid;
  gap: 0.2rem;
}

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto auto;
  }
}

@media (max-width: 1023px) {
  .section {
    padding: var(--space-9) 0;
  }

  .hero-grid,
  .service-grid,
  .process-grid,
  .project-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-grid,
  .contact-grid,
  .legal-grid,
  .footer-simple {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 0.6rem;
  }

  .header-tools {
    order: 2;
  }

  .menu-toggle {
    order: 3;
  }

  .hero-grid,
  .service-grid,
  .process-grid,
  .project-grid,
  .cta-shell {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(calc(100% - 1.25rem), var(--max));
  }

  .brand-copy span {
    display: none;
  }

  .brand-copy strong {
    font-size: 0.82rem;
  }

  .lang-btn {
    min-width: 36px;
    height: 34px;
    padding: 0 8px;
  }

  .theme-toggle,
  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .hero-copy,
  .hero-panel,
  .service-card,
  .process-step,
  .project-card,
  .contact-form,
  .faq-list details,
  .seo-block,
  .cta-shell {
    border-radius: var(--radius-md);
  }
}

@media (max-width: 420px) {
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand menu"
      "tools tools";
    row-gap: 0.45rem;
  }

  .brand {
    grid-area: brand;
  }

  .header-tools {
    grid-area: tools;
    justify-self: start;
  }

  .menu-toggle {
    grid-area: menu;
  }

  .btn {
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    padding: 0.5rem 0.95rem;
  }

  .footer-legal-links {
    overflow-wrap: anywhere;
  }
}

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