/* CodeThere landing */
:root,
[data-theme="dark"] {
  --bg-deep: #070a12;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-elevated: rgba(30, 41, 59, 0.55);
  --border: rgba(148, 163, 184, 0.14);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --glow: rgba(56, 189, 248, 0.35);
  --success: #34d399;
  --error: #f87171;
  --header-bg: rgba(7, 10, 18, 0.78);
  --mesh-1: rgba(56, 189, 248, 0.18);
  --mesh-2: rgba(99, 102, 241, 0.12);
  --mesh-3: rgba(14, 165, 233, 0.1);
  --grid-line: rgba(148, 163, 184, 0.05);
  --input-bg: rgba(15, 23, 42, 0.85);
  --shadow-card: rgba(0, 0, 0, 0.35);
  --logo-mark-fg: #070a12;
}

[data-theme="light"] {
  --bg-deep: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-elevated: rgba(241, 245, 249, 0.95);
  --border: rgba(15, 23, 42, 0.1);
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #0284c7;
  --accent-dim: #0369a1;
  --accent-soft: rgba(2, 132, 199, 0.1);
  --glow: rgba(2, 132, 199, 0.22);
  --success: #059669;
  --error: #dc2626;
  --header-bg: rgba(255, 255, 255, 0.86);
  --mesh-1: rgba(2, 132, 199, 0.12);
  --mesh-2: rgba(99, 102, 241, 0.08);
  --mesh-3: rgba(14, 165, 233, 0.06);
  --grid-line: rgba(15, 23, 42, 0.06);
  --input-bg: #ffffff;
  --shadow-card: rgba(15, 23, 42, 0.08);
  --logo-mark-fg: #ffffff;
}

:root {
  --radius: 14px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --space: clamp(1rem, 4vw, 2rem);
  --max: 1120px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.95rem + 0.4vw, 1.05rem);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-deep);
  overflow-x: clip;
  transition: background-color 0.25s ease, color 0.2s ease;
}

/* Background mesh */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--mesh-1), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, var(--mesh-2), transparent),
    radial-gradient(ellipse 50% 30% at 0% 80%, var(--mesh-3), transparent),
    var(--bg-deep);
  transition: background 0.3s ease;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black, transparent);
  transition: opacity 0.3s ease;
}

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

a:hover {
  color: #7dd3fc;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space);
  background: var(--accent);
  color: var(--logo-mark-fg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  z-index: 100;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space);
}

.container {
  width: min(var(--max), 100%);
  max-width: 100%;
  margin-inline: auto;
  padding-left: max(var(--space), env(safe-area-inset-left, 0px));
  padding-right: max(var(--space), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.2s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  padding: 0.85rem 0;
  gap: 0.75rem 1.25rem;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: clamp(1rem, 0.92rem + 0.5vw, 1.15rem);
  color: var(--text);
  letter-spacing: -0.02em;
  min-width: 0;
  max-width: min(280px, 58vw);
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.logo-img {
  display: block;
  width: auto;
  height: 56px;
  max-width: 100%;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
}

/* Theme + CTA: one horizontal cluster (no stacked “box” above the button) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  font-size: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Larger tap target on touch devices (WCAG / mobile HIG) */
@media (pointer: coarse) {
  .theme-toggle {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
  }
}

.theme-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: block;
}

[data-theme="dark"] .theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: block;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem 1.15rem;
  justify-content: center;
}

@media (max-width: 900px) {
  nav ul {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

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

.nav-cta-mobile {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  background: linear-gradient(135deg, var(--accent-dim), #6366f1);
  color: white !important;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  box-shadow: 0 0 24px var(--glow);
  -webkit-tap-highlight-color: transparent;
}

.header-cta:hover {
  filter: brightness(1.08);
  color: white !important;
}

/* Hero */
.hero {
  padding: clamp(3rem, 12vw, 7rem) 0 clamp(4rem, 10vw, 6rem);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

h1 {
  font-size: clamp(1.75rem, 6vw + 0.5rem, 3.35rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  max-width: 20ch;
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero-title {
  max-width: min(14ch, 100%);
  background: linear-gradient(135deg, var(--text) 0%, var(--text) 40%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero-title {
  background: linear-gradient(135deg, #0f172a 35%, #0284c7 95%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  font-size: clamp(1rem, 0.96rem + 0.35vw, 1.12rem);
  color: var(--text-muted);
  max-width: min(42ch, 100%);
  margin: 0 0 1.75rem;
  overflow-wrap: break-word;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

@media (max-width: 380px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-dim), #6366f1);
  color: white;
  box-shadow: 0 4px 28px var(--glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

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

.btn-ghost:hover {
  background: var(--bg-elevated);
  border-color: rgba(148, 163, 184, 0.25);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  color: var(--accent);
}

.stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}

.hero-panel .hero-panel-heading {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero-panel-intro {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.35rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
}

/* Section anchor offset (sticky header) */
main section[id] {
  scroll-margin-top: clamp(4.5rem, 12vw, 5.5rem);
}

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

.section-head {
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.section-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 0.94rem + 0.25vw, 1.05rem);
  overflow-wrap: break-word;
}

/* Service cards */
.services-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.35rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.service-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 12px 40px var(--shadow-card);
}

[data-theme="light"] .service-card:hover {
  border-color: rgba(2, 132, 199, 0.35);
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(99, 102, 241, 0.15));
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.service-card > p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.service-card details {
  border-top: 1px solid var(--border);
  padding-top: 0.85rem;
}

.service-card summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.service-card summary::-webkit-details-marker {
  display: none;
}

.service-card summary::after {
  content: "▸";
  transition: transform 0.2s;
}

.service-card details[open] summary::after {
  transform: rotate(90deg);
}

.service-detail {
  margin: 0.85rem 0 0;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.service-detail li {
  margin-bottom: 0.45rem;
  margin-left: 1.1rem;
}

.service-detail strong {
  color: var(--text);
}

/* Process */
.process-steps {
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

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

.process-step {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.process-step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.65rem;
}

.process-step h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.process-step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Global team */
.global-team-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  position: relative;
}

.global-team-section::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: min(900px, 90%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.global-team-inner {
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: clamp(1.5rem, 4vw, 2.25rem) clamp(1.5rem, 4vw, 2.5rem);
  backdrop-filter: blur(10px);
  box-shadow: 0 24px 48px var(--shadow-card);
}

@media (min-width: 880px) {
  .global-team-inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.global-team-copy h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.global-team-copy > p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.global-team-copy strong {
  color: var(--text);
  font-weight: 600;
}

.global-team-note {
  margin: 0 !important;
  font-size: 0.95rem !important;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  color: var(--text) !important;
}

.global-team-map {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.region-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .region-list {
    grid-template-columns: 1fr 1fr;
  }
}

.region-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.45rem 0.65rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.region-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  flex-shrink: 0;
  box-shadow: 0 0 10px var(--glow);
}

.global-team-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border: 1px solid var(--border);
}

.global-team-badge-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.global-team-badge-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 12rem;
}

/* Contact */
.contact-section {
  padding-bottom: clamp(4rem, 10vw, 6rem);
}

.contact-layout {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr 1.05fr;
    align-items: start;
  }
}

.contact-aside h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.contact-aside > p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-list strong {
  color: var(--text);
  min-width: 5.5rem;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .contact-list li {
    flex-direction: column;
    gap: 0.2rem;
  }

  .contact-list strong {
    min-width: 0;
  }
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.1rem, 4vw, 1.75rem);
  min-width: 0;
}

.form-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 560px) {
  .form-row.two {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

input,
textarea,
select {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

@media (min-width: 768px) {
  input,
  textarea,
  select {
    font-size: 1rem;
  }
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.honeypot {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.turnstile-wrap {
  margin: 1rem 0;
  min-height: 65px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.turnstile-wrap iframe {
  max-width: 100%;
}

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  display: none;
}

.form-status.visible {
  display: block;
}

.form-status.success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--success);
}

.form-status.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--error);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 max(2rem, env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  overflow-wrap: break-word;
}

.site-footer p {
  margin: 0;
}

/* Mobile nav (hamburger) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 2px 8px var(--shadow-card);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nav-toggle:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

[data-theme="light"] .nav-toggle:hover {
  border-color: rgba(2, 132, 199, 0.35);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle-box {
  position: relative;
  width: 22px;
  height: 16px;
  display: block;
}

.nav-toggle-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s ease, opacity 0.2s ease, top 0.28s ease;
}

.nav-toggle-bar:nth-child(1) {
  top: 1px;
}

.nav-toggle-bar:nth-child(2) {
  top: 7px;
}

.nav-toggle-bar:nth-child(3) {
  top: 13px;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.45rem 0.5rem;
  }

  .header-inner > .logo {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-width: 0;
  }

  .header-inner > .nav-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .header-inner > .header-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .header-inner > nav {
    grid-column: 1 / -1;
    grid-row: 2;
    position: relative;
    margin: 0.4rem 0 0;
    width: 100%;
    max-width: 100%;
    display: none;
    padding: 0.65rem 0.65rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 50px var(--shadow-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    max-height: min(65vh, 420px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-inner > nav::before {
    content: "";
    display: block;
    height: 3px;
    margin: -0.65rem -0.65rem 0.6rem;
    border-radius: 15px 15px 0 0;
    background: linear-gradient(90deg, var(--accent-dim), #6366f1, var(--accent));
    opacity: 0.95;
  }

  .header-inner nav.open {
    display: block;
    animation: nav-drawer-in 0.32s ease both;
  }

  @keyframes nav-drawer-in {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .header-inner nav ul {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: flex-start;
  }

  .header-inner > nav > ul > li:not(.nav-cta-mobile) > a {
    display: flex;
    align-items: center;
    padding: 0.72rem 1rem;
    min-height: 48px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
  }

  .header-inner > nav > ul > li:not(.nav-cta-mobile) > a:hover {
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.35);
    background: var(--accent-soft);
  }

  [data-theme="light"] .header-inner > nav > ul > li:not(.nav-cta-mobile) > a:hover {
    border-color: rgba(2, 132, 199, 0.35);
  }

  .header-inner > nav > ul > li:not(.nav-cta-mobile) > a:active {
    transform: scale(0.99);
  }

  .nav-cta-mobile {
    display: list-item;
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  .nav-cta-mobile .header-cta--full {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 1.15rem;
    min-height: 48px;
    font-size: 0.9rem;
    box-shadow: 0 6px 24px var(--glow);
  }

  /* Mobile: CTA in menu drawer; keep header row compact */
  .header-actions .header-cta {
    display: none;
  }

  .header-actions {
    gap: 0;
  }
}

@media (min-width: 769px) {
  .header-inner nav {
    flex: 1;
    display: flex !important;
    justify-content: center;
    min-width: 0;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  nav ul {
    gap: 0.35rem 0.65rem;
  }

  nav a {
    font-size: 0.86rem;
  }

  .header-cta {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
}

/* Small screens, touch */
@media (max-width: 768px) {
  .hero {
    padding-top: clamp(2rem, 8vw, 3rem);
    padding-bottom: clamp(2.5rem, 10vw, 4rem);
  }

  .hero-panel {
    padding: 1.15rem;
    min-width: 0;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.15rem;
  }

  .stat strong {
    font-size: 1.15rem;
  }

  .eyebrow {
    flex-wrap: wrap;
    line-height: 1.4;
    font-size: 0.72rem;
  }

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

  .section-head {
    margin-bottom: 1.75rem;
  }

  .global-team-inner {
    padding: 1.15rem 1.1rem;
  }

  .global-team-copy > p {
    font-size: 0.98rem;
  }

  .region-list li {
    font-size: 0.78rem;
    padding: 0.5rem 0.6rem;
    min-height: 44px;
    align-items: center;
  }

  .service-card summary {
    min-height: 44px;
    align-items: center;
  }

  #quote-form .btn-primary {
    min-height: 48px;
  }

  .contact-layout {
    gap: 1.75rem;
    min-width: 0;
  }

  .contact-aside {
    min-width: 0;
  }
}

@media (max-width: 380px) {
  h1,
  .hero-title {
    max-width: 100%;
  }
}

.site-header .container {
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .header-inner nav.open {
    animation: none;
  }

  .nav-toggle-bar {
    transition: none;
  }

  .header-inner > nav > ul > li:not(.nav-cta-mobile) > a:active {
    transform: none;
  }
}

/* Lock background scroll while mobile drawer is open */
@media (max-width: 768px) {
  body.nav-open {
    overflow: hidden;
    overscroll-behavior: contain;
  }
}

/* Form: busy state (screen readers + subtle cue) */
form[aria-busy="true"] .btn-primary {
  opacity: 0.85;
  cursor: wait;
}

.form-field-gap {
  margin-top: 1rem;
}

.btn-submit-full {
  width: 100%;
}
