:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-alt: #eef3f8;
  --text: #172033;
  --muted: #5d687c;
  --primary: #2058d8;
  --primary-dark: #163f9d;
  --accent: #18a999;
  --border: #dbe2ef;
  --shadow: 0 18px 45px rgba(24, 32, 51, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 252, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(219, 226, 239, 0.7);
}

.nav {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 14px;
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-tagline {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.brand-text {
  font-size: 1.15rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 650;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-cta {
  color: white !important;
  background: var(--primary);
  padding: 10px 16px;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--primary-dark);
}

.lang-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--muted);
}

.lang-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
}

.section {
  padding: 92px 0;
}

.section-alt {
  background: var(--surface-alt);
}

.hero {
  min-height: calc(100vh - 78px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at top left, rgba(32, 88, 216, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(24, 169, 153, 0.18), transparent 35%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin: 0 0 14px;
}

h1, h2, h3 {
  line-height: 1.1;
  margin-top: 0;
  letter-spacing: -0.045em;
}

h1 {
  font-size: clamp(2.7rem, 7vw, 5.45rem);
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  margin-bottom: 18px;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

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

.hero-subtitle {
  font-size: 1.2rem;
  max-width: 680px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 14px 28px rgba(32, 88, 216, 0.24);
}

.button-primary:hover {
  background: var(--primary-dark);
}

.button-secondary {
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
}

.full-width {
  width: 100%;
}

.hero-card {
  display: grid;
  gap: 18px;
}

.signal-card, .card, .about-box, .contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.signal-card {
  padding: 26px;
}

.signal-card:nth-child(2) {
  transform: translateX(36px);
}

.signal-card:nth-child(3) {
  transform: translateX(72px);
}

.signal-icon, .card-icon {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(32, 88, 216, 0.1);
  color: var(--primary);
  font-weight: 900;
  margin-bottom: 18px;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 38px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.card {
  padding: 28px;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-action {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 850;
  font-size: 0.92rem;
}

.card-action:hover {
  color: var(--primary-dark);
}

.card-action::after {
  content: "→";
  margin-left: 8px;
}

.approach-grid, .contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}

.steps {
  display: grid;
  gap: 16px;
}

.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
}

.step span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.step p {
  margin-bottom: 0;
}

.about-box {
  padding: 44px;
  box-shadow: none;
  background:
    linear-gradient(135deg, rgba(32, 88, 216, 0.09), rgba(24, 169, 153, 0.08)),
    white;
}

.contact-section {
  background: linear-gradient(180deg, var(--bg), white);
}

.contact-note {
  background: rgba(24, 169, 153, 0.1);
  color: #146e65;
  border: 1px solid rgba(24, 169, 153, 0.22);
  padding: 16px 18px;
  border-radius: 18px;
  font-weight: 700;
}

.contact-form {
  padding: 28px;
  display: grid;
  gap: 18px;
  box-shadow: none;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 750;
  color: var(--text);
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  background: #fbfcff;
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  font: inherit;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(32, 88, 216, 0.12);
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 650;
  color: var(--muted);
}

.checkbox-label input {
  width: auto;
  margin-top: 5px;
}

.form-message {
  display: none;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 750;
}

.form-message.success {
  display: block;
  color: #146e65;
  background: rgba(24, 169, 153, 0.12);
  border: 1px solid rgba(24, 169, 153, 0.25);
}

.form-message.error {
  display: block;
  color: #9d1c1c;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.hidden {
  display: none;
}

.footer {
  padding: 28px 0;
  background: #101828;
  color: white;
}

.footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

@media (max-width: 920px) {
  .hero-grid, .approach-grid, .contact-grid {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .signal-card:nth-child(2),
  .signal-card:nth-child(3) {
    transform: none;
  }

  .hero {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 28px, 1120px);
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 78px;
    left: 14px;
    right: 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-cta {
    text-align: center;
  }

  .section {
    padding: 68px 0;
  }

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

  .footer-grid {
    flex-direction: column;
  }

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

  h1 {
    font-size: 2.7rem;
  }
}

.diagnostic-intro {
  display: grid;
  gap: 4px;
  background: rgba(32, 88, 216, 0.07);
  border: 1px solid rgba(32, 88, 216, 0.14);
  border-radius: 18px;
  padding: 16px 18px;
}

.diagnostic-intro strong {
  color: var(--text);
  letter-spacing: -0.02em;
}

.diagnostic-intro span {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.diagnostic-dynamic-title {
  background: rgba(24, 169, 153, 0.09);
  border-color: rgba(24, 169, 153, 0.2);
}

.diagnostic-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fbfcff;
}

.diagnostic-panel[hidden] {
  display: none !important;
}

.diagnostic-panel.active {
  animation: panelIn 0.18s ease-out;
}

.diagnostic-empty {
  background: rgba(93, 104, 124, 0.06);
  box-shadow: none;
}

.diagnostic-empty p {
  margin: 0;
  font-weight: 700;
}

.panel-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 2px;
}

.panel-heading h3 {
  margin-bottom: 0;
}

.panel-heading p {
  margin-bottom: 0;
}

.panel-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  background: rgba(32, 88, 216, 0.1);
  color: var(--primary);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Spatial Intelligence Lab */
.lab-hero .hero-subtitle { max-width: 760px; }
.lab-card { gap: 18px; }
.article-grid .article-card h3 a { color: var(--text); text-decoration: none; }
.article-grid .article-card h3 a:hover { color: var(--primary); }
.narrow { max-width: 860px; }
.article-layout h1 { font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.02; margin-bottom: 16px; }
.article-layout h2 { margin-top: 42px; margin-bottom: 14px; }
.article-layout p, .article-layout li { font-size: 1.05rem; line-height: 1.75; }
.article-meta { color: var(--muted); margin-bottom: 28px; }
.article-layout ul, .article-layout ol, .feature-list { color: var(--muted); padding-left: 22px; }
.article-layout li, .feature-list li { margin-bottom: 12px; }
.article-cta, .cta-panel { margin-top: 48px; padding: 34px; border: 1px solid var(--border); border-radius: 28px; background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(14,165,233,0.08)); box-shadow: var(--shadow-soft); }
.cta-panel { text-align: left; }
.field-hint {
  display: block;
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
  color: var(--muted, #64748b);
  font-size: 0.85rem;
  font-weight: 500;
}
