/* SOVTECH — PCB / field-service landing */

:root {
  --bg: #0c1017;
  --bg-elevated: #121821;
  --surface: #171e2a;
  --surface-2: #1c2533;
  --line: rgba(61, 224, 197, 0.14);
  --line-strong: rgba(61, 224, 197, 0.28);
  --text: #eef3fa;
  --muted: #9eabbf;
  --accent: #f5a524;
  --accent-hover: #ffb84a;
  --accent-ink: #1a1205;
  --tech: #3de0c5;
  --tech-dim: rgba(61, 224, 197, 0.55);
  --vk: #4a76a8;
  --vk-hover: #5b8fc4;
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Space Grotesk", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --container: 1120px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --page-pad: max(1rem, env(safe-area-inset-left), env(safe-area-inset-right));
  --bottom-bar-h: 0px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.1rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  padding-bottom: calc(var(--bottom-bar-h) + env(safe-area-inset-bottom));
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: var(--tech);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent);
}

button,
input {
  font: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  font-weight: 600;
}

h1 {
  font-size: clamp(1.45rem, 1.1rem + 2.2vw, 2.75rem);
  max-width: min(22ch, 100%);
}

h2 {
  font-size: clamp(1.35rem, 1.1rem + 1.5vw, 2.25rem);
  max-width: 100%;
}

h3 {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.15rem);
}

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(100% - (var(--page-pad) * 2), var(--container));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - (var(--page-pad) * 2), 720px);
}

.mono {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

.icon {
  width: 28px;
  height: 28px;
  color: var(--tech);
  flex-shrink: 0;
}

/* Ambient PCB background */
.pcb-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(61, 224, 197, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(245, 165, 36, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(61, 224, 197, 0.06), transparent 60%),
    linear-gradient(180deg, #0c1017 0%, #0a0e14 100%);
}

.pcb-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(61, 224, 197, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 224, 197, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
  padding-top: env(safe-area-inset-top);
  backdrop-filter: blur(14px);
  background: rgba(12, 16, 23, 0.55);
  border-bottom: 1px solid transparent;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}

.site-header.is-solid,
.site-header.is-scrolled {
  background: rgba(12, 16, 23, 0.92);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: var(--header-h);
}

.logo {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--text);
  flex-shrink: 0;
}

.logo span {
  color: var(--tech);
}

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

.logo:hover span {
  color: var(--accent);
}

.header-nav {
  display: none;
  gap: 1.25rem;
  margin-left: 0.5rem;
}

.header-nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.header-nav a:hover {
  color: var(--text);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.header-actions .btn-sm {
  white-space: nowrap;
}

.header-phone {
  display: none;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--text);
}

.header-phone:hover {
  color: var(--accent);
}

.header-social {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 36px;
  padding: 0 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text);
  background: rgba(61, 224, 197, 0.06);
}

.header-social:hover {
  color: var(--tech);
  border-color: var(--tech);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-left: 0.15rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  transition: transform 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.35rem var(--page-pad) calc(1rem + env(safe-area-inset-bottom));
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--line);
}

.mobile-nav[hidden] {
  display: none;
}

.mobile-nav a,
.mobile-nav .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.mobile-nav a {
  color: var(--text);
  padding: 0.55rem 0;
}

.mobile-nav .btn {
  margin-top: 0.35rem;
  width: 100%;
}

@media (min-width: 900px) {
  :root {
    --header-h: 72px;
  }

  .header-inner {
    gap: 1.25rem;
  }

  .header-actions {
    gap: 0.85rem;
  }

  .header-nav,
  .header-phone,
  .header-social {
    display: flex;
  }

  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }

  .header-actions {
    margin-left: auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  min-height: 44px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.2s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgba(245, 165, 36, 0.35);
}

.btn-accent:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
  box-shadow: 0 0 28px rgba(245, 165, 36, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-ghost:hover {
  border-color: var(--tech);
  color: var(--tech);
}

.btn-vk {
  background: rgba(74, 118, 168, 0.18);
  color: #c9dbf0;
  border-color: rgba(74, 118, 168, 0.55);
}

.btn-vk:hover {
  background: rgba(74, 118, 168, 0.32);
  color: #fff;
  border-color: var(--vk-hover);
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tech);
  margin-bottom: 0.65rem;
}

.section-lead {
  max-width: 42ch;
  margin-bottom: 2rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h) - env(safe-area-inset-top));
  display: grid;
  align-items: end;
  padding: clamp(1.5rem, 5vw, 4rem) 0 clamp(2.5rem, 6vw, 5rem);
  overflow: hidden;
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.04);
  filter: saturate(0.85) contrast(1.05);
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(12, 16, 23, 0.92) 0%, rgba(12, 16, 23, 0.72) 42%, rgba(12, 16, 23, 0.45) 100%),
    linear-gradient(to top, rgba(12, 16, 23, 0.85), transparent 45%);
}

.pcb-art {
  position: absolute;
  right: -4%;
  top: 8%;
  width: min(70vw, 560px);
  opacity: 0.35;
  mix-blend-mode: screen;
}

.pcb-board {
  fill: rgba(23, 30, 42, 0.65);
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.pcb-traces .trace {
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: draw-trace 2.8s var(--ease) forwards;
}

.pcb-traces .trace:nth-child(2) { animation-delay: 0.15s; }
.pcb-traces .trace:nth-child(3) { animation-delay: 0.3s; }
.pcb-traces .trace:nth-child(4) { animation-delay: 0.45s; }
.pcb-traces .trace:nth-child(5) { animation-delay: 0.55s; }
.pcb-traces .trace:nth-child(6) { animation-delay: 0.65s; }

.pcb-chip {
  animation: chip-glow 3.5s ease-in-out infinite;
}

@keyframes draw-trace {
  to { stroke-dashoffset: 0; }
}

@keyframes chip-glow {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 12px rgba(61, 224, 197, 0.35)); }
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 16, 23, 0.55);
  font-family: var(--mono);
  font-size: clamp(0.62rem, 0.55rem + 0.4vw, 0.72rem);
  letter-spacing: 0.08em;
  color: var(--tech);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--tech);
  box-shadow: 0 0 0 0 rgba(61, 224, 197, 0.55);
  animation: pulse-dot 2.2s ease-out infinite;
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(61, 224, 197, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(61, 224, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 224, 197, 0); }
}

.brand-mark {
  font-family: var(--mono);
  font-size: clamp(2.1rem, 12vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: var(--text);
  margin: 0 0 1.1rem;
  text-shadow: 0 0 60px rgba(12, 16, 23, 0.9);
  word-break: break-word;
}

.hero-sub {
  max-width: 36ch;
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.1rem);
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-cta .btn {
  flex: 1 1 12rem;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.hero-chips a {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(12, 16, 23, 0.55);
  color: var(--text);
  font-size: 0.85rem;
}

.hero-chips a:hover {
  border-color: var(--tech);
  color: var(--tech);
}

@media (min-width: 900px) {
  .hero {
    align-items: center;
  }

  .pcb-art {
    opacity: 0.45;
    right: 2%;
    top: 12%;
    width: min(48vw, 620px);
  }

  .hero-content {
    max-width: 54%;
  }

  .hero-cta .btn {
    flex: 0 1 auto;
  }
}

/* Trust */
.trust {
  border-block: 1px solid var(--line);
  background: rgba(18, 24, 33, 0.7);
  padding: 1.1rem 0;
}

.trust-row {
  display: grid;
  gap: 0.85rem 1.5rem;
}

.trust-row p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.trust-row strong {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 700px) {
  .trust-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

/* Pains */
.pain-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.pain-item {
  padding: 1.35rem 0;
  border-top: 1px solid var(--line);
}

.pain-item h3 {
  margin-top: 0.85rem;
}

.pain-item p {
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .pain-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0 2.5rem;
  }
}

@media (min-width: 1100px) {
  .pain-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Services — interactive price blocks */
.service-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
}

.service-jump a {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  background: rgba(61, 224, 197, 0.06);
}

.service-jump a:hover {
  border-color: var(--tech);
  color: var(--tech);
}

.service-group {
  margin-bottom: 2.5rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.service-group-title {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tech);
  font-weight: 500;
  margin: 0 0 1rem;
}

.service-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0;
}

.service-grid-narrow {
  max-width: 420px;
}

.service-card {
  background: linear-gradient(160deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.4rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.service-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.service-card .price {
  font-family: var(--mono);
  color: var(--accent);
  font-size: 1.05rem;
  margin: 0.35rem 0 0.85rem;
}

.service-card ul {
  display: grid;
  gap: 0.35rem;
}

.service-card li {
  position: relative;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--tech);
}

@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1000px) {
  .service-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Upgrade panel */
.upgrade-panel {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line-strong);
  background:
    linear-gradient(135deg, rgba(245, 165, 36, 0.12), transparent 45%),
    linear-gradient(225deg, rgba(61, 224, 197, 0.1), transparent 40%),
    var(--surface);
}

.upgrade-panel h2 {
  max-width: 18ch;
}

.upgrade-panel p {
  max-width: 42ch;
  margin-bottom: 0;
  color: var(--text);
  opacity: 0.85;
}

@media (min-width: 800px) {
  .upgrade-panel {
    grid-template-columns: 1fr auto;
  }
}

/* About */
.about-grid {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.about-grid-text {
  gap: 1.75rem;
}

.about-badges {
  display: grid;
  gap: 0.75rem;
  margin-top: 0;
}

.about-badges-row {
  grid-template-columns: 1fr;
}

.about-badges li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

@media (min-width: 700px) {
  .about-badges-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 800px) {
  .about-grid:not(.about-grid-text) {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 3rem;
  }
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Steps */
.steps {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
  counter-reset: none;
}

.steps li {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.step-num {
  display: block;
  font-family: var(--mono);
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.steps p {
  margin-bottom: 0;
}

@media (min-width: 800px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Coverage */
.coverage-panel {
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}

.coverage-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 1rem;
}

.coverage-panel h2 {
  max-width: 22ch;
  margin-inline: auto;
}

.coverage-panel p {
  max-width: 48ch;
  margin-inline: auto;
}

.coverage-pay {
  color: var(--text) !important;
  font-weight: 500;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 1rem;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 0;
  font-weight: 600;
  color: var(--text);
}

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

.faq-item summary::after {
  content: "+";
  float: right;
  font-family: var(--mono);
  color: var(--tech);
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0 0 1rem;
  padding-bottom: 0.25rem;
}

/* Contacts */
.contacts-grid {
  display: grid;
  gap: 1.75rem;
}

.contact-list {
  display: grid;
  gap: 1.1rem;
  margin: 1.5rem 0 1.75rem;
}

.contact-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.contact-list .muted {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.contact-list a,
.contact-list span:last-child {
  color: var(--text);
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 320px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border: 0;
  filter: grayscale(0.2) contrast(1.05);
}

@media (min-width: 900px) {
  .contacts-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: stretch;
  }

  .map-wrap,
  .map-wrap iframe {
    min-height: 100%;
    height: 100%;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--tech);
}

@media (min-width: 700px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Legal page */
.legal-page {
  padding: 3rem 0 4rem;
}

.legal-page h1 {
  max-width: none;
  margin-bottom: 1rem;
}

.legal-page h2 {
  font-size: 1.2rem;
  margin-top: 1.75rem;
}

.legal-lead {
  color: var(--text);
}

.legal-back {
  margin-top: 2.5rem;
}

/* Modal */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  width: min(100%, 420px);
  background: var(--bg-elevated);
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
  animation: modal-in 0.3s var(--ease);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-lead {
  margin-bottom: 1.25rem;
}

#lead-form {
  display: grid;
  gap: 0.9rem;
}

#lead-form label {
  display: grid;
  gap: 0.35rem;
}

#lead-form label span {
  font-size: 0.85rem;
  color: var(--muted);
}

#lead-form input {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-size: 16px;
  transition: border-color 0.2s var(--ease);
}

#lead-form input:focus {
  border-color: var(--tech);
}

.form-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0;
}

.modal-success {
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

.success-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  color: var(--tech);
}

.modal-success h2 {
  margin-bottom: 0.5rem;
}

.modal-success p {
  margin-bottom: 1.25rem;
  color: var(--text);
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .mobile-bar {
  visibility: hidden;
  pointer-events: none;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sticky mobile action bar */
.mobile-bar {
  display: none;
}

/* ——— Responsive hardening ——— */
@media (max-width: 899px) {
  :root {
    --bottom-bar-h: 64px;
  }

  .header-actions .btn {
    display: none;
  }

  .mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 0.45rem;
    padding: 0.55rem var(--page-pad) calc(0.55rem + env(safe-area-inset-bottom));
    background: rgba(12, 16, 23, 0.94);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }

  .mobile-bar .btn,
  .mobile-bar a.btn {
    width: 100%;
    min-height: 44px;
    padding: 0.55rem 0.4rem;
    font-size: 0.85rem;
    border-radius: 12px;
  }

  .section {
    padding: clamp(2.5rem, 7vw, 4rem) 0;
  }

  .section-lead,
  .hero-sub,
  .upgrade-panel p,
  .coverage-panel p,
  .coverage-panel h2 {
    max-width: none;
  }

  .trust-row {
    grid-template-columns: 1fr 1fr;
  }

  .upgrade-panel .btn,
  .contact-actions .btn {
    width: 100%;
  }

  .contact-actions {
    flex-direction: column;
  }

  .map-wrap,
  .map-wrap iframe {
    min-height: 260px;
  }

  .about-frame {
    max-width: none;
  }

  .faq-item summary {
    padding-right: 1.5rem;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-dialog {
    width: 100%;
    max-width: none;
    border-radius: 18px 18px 0 0;
    padding: 1.5rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom));
    max-height: min(92svh, 100%);
    overflow: auto;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
  }

  .trust-row {
    grid-template-columns: 1fr;
  }

  .status-line {
    letter-spacing: 0.04em;
  }

  .mobile-bar {
    grid-template-columns: 1fr 1fr;
  }

  .mobile-bar .btn-accent {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .mobile-bar {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .pcb-traces .trace,
  .pcb-chip,
  .modal-dialog,
  .status-dot {
    animation: none !important;
  }
  .pcb-traces .trace {
    stroke-dashoffset: 0;
  }
}
