:root {
  color-scheme: dark;
  --bg: #06131f;
  --bg-soft: #0b1d2d;
  --panel: rgba(11, 27, 41, 0.68);
  --panel-strong: rgba(10, 23, 35, 0.88);
  --border: rgba(120, 181, 255, 0.18);
  --text: #edf6ff;
  --muted: #95aec6;
  --cyan: #65e5ff;
  --blue: #4f7cff;
  --teal: #0dc9aa;
  --shadow: 0 24px 80px rgba(2, 12, 22, 0.45);
  --radius: 24px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Manrope, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(79, 124, 255, 0.24), transparent 32%),
    radial-gradient(circle at top right, rgba(13, 201, 170, 0.16), transparent 24%),
    linear-gradient(180deg, #041018 0%, #071625 42%, #050d15 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

body::before {
  top: 6rem;
  right: -8rem;
  background: rgba(79, 124, 255, 0.12);
}

body::after {
  bottom: 6rem;
  left: -8rem;
  background: rgba(13, 201, 170, 0.12);
}

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

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), calc(var(--max-width) + 6rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
}

.glass-panel {
  background: var(--panel);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.topbar,
.footer,
.signal-card,
.cta-panel,
.hero-visual,
.problem-card,
.solution-card,
.pillars-grid article,
.capabilities-grid article,
.feature-columns article,
.agent-grid article,
.metrics-grid article,
.process-steps article,
.faq-list details,
.trust-strip {
  border-radius: var(--radius);
}

.topbar {
  position: sticky;
  top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  z-index: 10;
}

.brand img {
  display: block;
  width: auto;
  height: 3.4rem; /* larger hero brand on desktop */
  transition: transform 220ms ease, filter 220ms ease;
  filter: drop-shadow(0 6px 18px rgba(79,124,255,0.25));
}

.brand:hover img,
.brand:focus-visible img {
  transform: scale(1.04);
  filter: drop-shadow(0 10px 28px rgba(101,229,255,0.45));
}

.footer img {
  display: block;
  width: auto;
  height: 2.4rem;
}

.main-nav {
  display: flex;
  gap: 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-switch {
  display: inline-flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button.is-active {
  background: linear-gradient(135deg, rgba(101, 229, 255, 0.18), rgba(79, 124, 255, 0.18));
  color: var(--text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: #041018;
  background: linear-gradient(135deg, var(--cyan), #a6efff 56%, #d1f5ff);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.section {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 5rem 0 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  min-height: calc(100vh - 8rem);
  align-items: center;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--cyan);
  font-family: "Space Grotesk", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}

h1,
h2,
h3,
strong {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 7vw, 6.1rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero-lead {
  margin-top: 1.5rem;
  max-width: 40rem;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  margin: 2rem 0 0;
  list-style: none;
}

.hero-highlights li {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.95rem;
}

.hero-visual {
  position: relative;
}

.signal-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(101, 229, 255, 0.18), transparent 40%),
    linear-gradient(180deg, rgba(9, 24, 37, 0.92), rgba(9, 24, 37, 0.82));
}

.signal-card::after {
  content: "";
  position: absolute;
  inset: 1rem;
  border-radius: calc(var(--radius) - 8px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.signal-head span {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--cyan);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.signal-head strong {
  display: block;
  font-size: 1.6rem;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.signal-grid article {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
}

.signal-grid span,
.price-card span,
.process-steps span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.signal-grid strong,
.metrics-grid strong {
  display: block;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.trust-strip {
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.trust-strip p {
  margin-bottom: 0.85rem;
  color: var(--text);
  font-weight: 600;
}

.trust-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.trust-items span {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.section-heading {
  max-width: 44rem;
  margin-bottom: 1.5rem;
}

.compact-heading {
  margin-top: 2.25rem;
}

.split-grid,
.card-grid,
.feature-columns,
.agent-grid,
.process-steps {
  display: grid;
  gap: 1.1rem;
}

.split-grid,
.feature-columns,
.metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pillars-grid,
.capabilities-grid,
.agent-grid,
.process-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pillars-grid article,
.capabilities-grid article,
.feature-columns article,
.agent-grid article,
.metrics-grid article,
.process-steps article,
.problem-card,
.solution-card {
  padding: 1.4rem;
}

.final-cta {
  position: relative;
}

/* Calendly popup customization */
.calendly-popup-overlay {
  animation: fadeIn 300ms ease;
  backdrop-filter: blur(6px) !important;
}

.calendly-popup-content {
  border-radius: 24px !important;
  box-shadow: 0 32px 120px rgba(2, 12, 22, 0.65), 
              0 0 1px rgba(101, 229, 255, 0.25) !important;
  animation: slideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  border: 1px solid rgba(120, 181, 255, 0.24) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.calendly-popup-content iframe {
  border-radius: 24px !important;
  box-shadow: none !important;
}

/* Fallback for dynamically loaded iframe */
.calendly-popup-content > * {
  border-radius: 24px !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(6px);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(32px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

/* Architecture diagram */
.architecture .section-heading {
  max-width: 60rem;
}

.arch-figure {
  padding: 0.75rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(120,181,255,0.06);
  background: linear-gradient(180deg, rgba(6,19,31,0.6), rgba(9,24,37,0.55));
  box-shadow: 0 20px 60px rgba(2,12,22,0.5);
  margin-top: 1rem;
}

.arch-figure img {
  display:block;
  width:100%;
  height:auto;
  border-radius: 12px;
  transition: transform 260ms ease, filter 260ms ease;
}

.arch-figure img:hover {
  transform: translateY(-6px) scale(1.01);
  filter: drop-shadow(0 12px 32px rgba(101,229,255,0.08));
}

.arch-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.faq-list details {
  padding: 1.1rem 1.2rem;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}

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

.faq-list p {
  margin-top: 0.85rem;
}

.cta-panel {
  padding: 2rem;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(101, 229, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(10, 23, 35, 0.96), rgba(6, 17, 27, 0.92));
}

.cta-panel .hero-actions {
  justify-content: center;
}

.footer {
  width: min(100%, var(--max-width));
  margin: 4rem auto 0;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.side-anchors {
  position: fixed;
  left: max(1rem, calc((100vw - var(--max-width)) / 2 - 2rem));
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 8;
}

.side-anchors a {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.side-anchors a.is-active {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  transform: scale(1.15);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .side-anchors {
    display: none;
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 900px) {
  .hero,
  .split-grid,
  .feature-columns,
  .metrics-grid,
  .pillars-grid,
  .capabilities-grid,
  .agent-grid,
  .process-steps {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
  }

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

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions {
    margin-left: auto;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  /* compact logo on mobile */
  .brand img {
    height: 3.1rem; /* slightly larger mobile logo for stronger brand */
  }
  
  .page-shell {
    width: min(calc(100% - 1rem), calc(var(--max-width) + 2rem));
    padding-top: 0.5rem;
  }

  .section {
    padding-top: 4rem;
  }

  .topbar {
    top: 0.5rem;
    padding: 0.85rem 1rem;
  }

  .topbar-actions {
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
  }

  .topbar-book {
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: linear-gradient(135deg, #7be8ff, #8fb3ff 55%, #c9f4ff);
    box-shadow: 0 6px 18px rgba(101,229,255,0.35);
  }

  .topbar-book:hover,
  .topbar-book:focus-visible {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 26px rgba(101,229,255,0.45);
  }

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

  .button {
    width: 100%;
  }

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