/* Scoped refinements to the approved V6 homepage. */
#hero .audience-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 420px);
  min-width: 0;
  margin: 24px 0 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--ground-2);
}
#hero .audience-switch[hidden] {
  display: none;
}
.audience-switch label {
  position: relative;
  min-width: 0;
  cursor: pointer;
}
.audience-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.audience-switch span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 7px 9px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  transition:
    background-color 0.15s,
    color 0.15s;
}
.audience-switch input:checked + span {
  background: var(--surface);
  color: var(--brand-ink);
  box-shadow: 0 1px 3px rgba(15, 28, 42, 0.12);
}
.audience-switch input:focus-visible + span {
  outline: 2px solid var(--brand-strong);
  outline-offset: -2px;
}
/* Booking actions retain the primary style; the portal still opens /login. */
.nav .nav-right {
  gap: 12px;
}
.nav .header-call,
.nav .portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
}
.nav .nav-right > .btn {
  min-height: 44px;
}
.nav .header-call {
  gap: 8px;
  white-space: nowrap;
}
.nav .header-call svg,
.nav .portal-link svg {
  width: 20px;
  height: 20px;
}
.nav .portal-link:hover {
  background: var(--ground-2);
}
#cta .call-note {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 28px auto 0;
}
#cta .call-note p {
  margin: 0;
  font-size: 14px;
}
#cta .call-note .btn {
  min-width: 184px;
  min-height: 48px;
  gap: 10px;
}
#cta .call-note > span {
  font-size: 12px;
  color: var(--ink-2);
}
@media (max-width: 1100px) {
  .nav .nav-links {
    display: none;
  }
}
@media (max-width: 600px) {
  .nav .wrap {
    gap: 8px;
  }
  .nav .nav-right {
    gap: 4px;
  }
  .nav .header-call span {
    display: none;
  }
  .nav .nav-right > .header-call {
    width: 44px;
    padding-inline: 0;
  }
  .nav .nv-brand {
    gap: 7px;
    font-size: 17px;
  }
  .nav .nv-brand .rk-logo {
    width: 24px;
    height: 24px;
  }
  .nav .nav-right > .btn {
    padding-inline: 10px;
    font-size: 12px;
    min-height: 44px;
    white-space: nowrap;
  }
}
@media (max-width: 359px) {
  .nav .brand-name {
    display: none;
  }
}
/* Six tracks place the final two engines symmetrically under the first three. */
@media (max-width: 460px) {
  #why .engine-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  #why .eg {
    grid-column: span 2;
    min-width: 0;
  }
  #why .eg:nth-child(4) {
    grid-column: 2 / span 2;
  }
  #why .eg:nth-child(5) {
    grid-column: 4 / span 2;
  }
}
@media (max-width: 380px) {
  .audience-switch span {
    padding-inline: 5px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .audience-switch span {
    transition: none;
  }
}

/* Give the first mobile screen more room without changing desktop spacing. */
@media (max-width: 640px) {
  #hero .wrap {
    padding-top: 20px;
  }
  #product .pt-seg {
    scroll-snap-type: none;
  }
}
/* Native modal keeps keyboard focus inside the booking flow. */
#booking-dialog {
  width: min(960px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 24px;
  border: 1px solid #216a70;
  border-radius: 16px;
  background: #0f1c2a;
  color: #f9fbfd;
  overscroll-behavior: contain;
}
#booking-dialog::backdrop { background: rgba(15, 28, 42, 0.65); }
body:has(#booking-dialog[open]) { overflow: hidden; }
.booking-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
#booking-title { margin: 0; font-size: clamp(21px, 3vw, 28px); line-height: 1.25; }
.booking-close { flex-shrink: 0; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #1b3342; color: #fff; font: inherit; font-size: 28px; cursor: pointer; }
.booking-close:focus-visible, .booking-fallback a:focus-visible { outline: 2px solid #00beac; outline-offset: 2px; }
#booking-status, .booking-fallback { margin: 12px 0; font-size: 13px; color: #c3d9df; }
.booking-brand { margin: 0 0 8px; color: #78e4d7; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
#booking-description { max-width: 70ch; margin: 14px 0; color: #d1e2e8; font-size: 14px; line-height: 1.65; }
#booking-calendar { height: min(700px, calc(100dvh - 280px)); min-height: 240px; background: #fff; border-radius: 12px; overflow: hidden; }
#booking-calendar iframe { display: block; width: 100%; height: 100%; border: 0; }
.booking-fallback a { color: #78e4d7; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
  #booking-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 12px 4px; }
  .booking-header, #booking-description, #booking-status, .booking-fallback { margin-inline: 10px; }
}

.floating-call { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); left: 20px; z-index: 40; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #00beac; color: #0f1c2a; border: 2px solid #007f78; box-shadow: 0 4px 18px #0f1c2a33; }
.floating-call .i { width: 23px; height: 23px; }
.floating-call:hover { background: #78e4d7; }
.floating-call:focus-visible { outline: 3px solid #0f1c2a; outline-offset: 4px; }
@media(max-width:600px) { .floating-call { left: 14px; bottom: max(14px, env(safe-area-inset-bottom)); width: 48px; height: 48px; } }

/* SEO and GEO explanations for services and products. */
:root { --font-body: "Geist", ui-sans-serif, system-ui, sans-serif; --font-display: var(--font-body); }
#hero h1 { font-size: clamp(36px,5.6vw,72px); }
#hero .lede { max-width: 710px; }
#hero .hero-ctas { margin: 28px auto 0; width: min(100%, 320px); justify-content: center; }
#hero .hero-ctas .btn { width: 100%; min-height: 60px; padding: 16px 32px; font-size: 20px; font-weight: 600; }
#hero .hb-shot { margin-top: 48px; }
#why { scroll-margin-top: 80px; }
#why .sec-head p { max-width: 760px; }
.discovery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.discovery-card { padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); display: flex; flex-direction: column; min-width: 0; }
.discovery-ai { background: linear-gradient(160deg,#f3fcfa 0%,#ffffff 70%); }
.discovery-label { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; font-size: 18px; font-weight: 600; }
.discovery-label small { display: block; color: var(--ink-2); font-weight: 400; font-size: 12px; }
.discovery-icon { width: 42px; height: 42px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.discovery-icon svg { width: 23px; height: 23px; }
.discovery-card h3 { font-size: 27px; font-weight: 500; line-height: 1.2; min-height: 65px; margin-bottom: 14px; text-wrap: pretty; }
.discovery-card > p { color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.discovery-example { background: var(--ground); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin: 24px 0; min-height: 220px; }
.example-caption { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.search-query { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 24px; margin-top: 13px; font-size: 14px; }
.search-result { margin: 18px 4px 0; }
.search-result > span { display: block; color: var(--ink-2); font-size: 11px; overflow-wrap: anywhere; }
.search-result strong { display: block; font-size: 16px; font-weight: 500; color: var(--blue-ink); margin: 6px 0; }
.search-result p { font-size: 12px; color: var(--ink-2); }
.discovery-example blockquote { margin: 13px 0 18px; font-size: 19px; line-height: 1.45; letter-spacing: -.02em; }
.answer-source { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.answer-source > svg { margin-top: 3px; color: var(--brand-ink); }
.answer-source span { display: block; font-size: 11px; color: var(--ink-2); }
.answer-source strong { display: block; font-size: 13px; font-weight: 500; margin-top: 4px; }
.discovery-card h4 { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.discovery-list { list-style: none; padding: 0; margin: 13px 0 22px; display: grid; gap: 12px; }
.discovery-list li { display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--ink-2); }
.discovery-list li::before { content: "✓"; color: var(--brand-ink); font-size: 13px; }
.discovery-card .discovery-foundation { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }
.discovery-outcome { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; background: var(--brand-tint); border-radius: 12px; margin-top: 24px; }
.discovery-outcome span { color: var(--brand-ink); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.discovery-outcome strong { font-size: 19px; font-weight: 500; }
.discovery-role { max-width: 800px; text-align: center; margin: 22px auto 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
#who .who { grid-template-columns: repeat(2,minmax(0,1fr)); }
.who-experts { max-width: 710px; margin: 28px auto 0; text-align: center; color: var(--ink-2); font-size: 14px; line-height: 1.7; }
@media (max-width:720px) {
 .discovery-grid, #who .who { grid-template-columns: 1fr; }
 .discovery-card { padding: 23px; }
 .discovery-card h3 { min-height: 0; font-size: 25px; }
 .discovery-example { min-height: 0; }
 .discovery-outcome { align-items: flex-start; flex-direction: column; gap: 8px; padding: 20px; }
 .discovery-outcome strong { font-size: 18px; }
 #hero h1 { font-size: 39px; }
}
