/* Shared site-wide styles extracted from the page templates. */

:root {
  --bg: #0c0e14;
  --bg-elevated: #12141c;
  --bg-deeper: #08090e;
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.14);
  --text: #f0f2f5;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.42);
  --text-faint: rgba(255,255,255,0.28);
  --accent: #4e8ff7;
  --accent-light: #6da3fa;
  --accent-glow: rgba(78,143,247,0.25);
  --accent-soft: rgba(78,143,247,0.08);
  --teal: #14b8a6;
  --green: #10b981;
  --purple: #8b5cf6;
  --sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --w: 1200px;
  --gut: clamp(24px, 4vw, 64px);
  --pad-y: clamp(64px, 8vw, 110px);
  --ribbon-h: 38px;
}

/* Keep animated ribbons and decorative overflow from widening mobile pages. */
html, body { overflow-x: clip; }

/* Shared block 1 */
/* ── Footer (Harvey-style columns) ──────────────────────────────── */
  .site-footer {
    background: #0a0c11;
    color: #e5e9f0;
    padding: clamp(56px, 8vw, 96px) 0 40px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
  }
  .footer-inner {
    max-width: var(--w);
    margin: 0 auto;
    padding: 0 clamp(24px, 4vw, 64px);
    display: grid;
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
  }
  .footer-brand .footer-logo { display: inline-block; text-decoration: none; }
  .footer-brand .logo-word {
    font-family: var(--sans);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.36em;
    color: #fff;
    padding-left: 0.36em;
  }
  .footer-brand .logo-dot { color: var(--accent); }
  .footer-cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(24px, 3vw, 56px);
  }
  .footer-col .footer-h {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fff;
    margin: 0 0 18px;
  }
  .footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
  .footer-col a {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    color: rgba(229,233,240,0.66);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
  }
  .footer-col a span { opacity: 0; transition: opacity 0.2s, transform 0.2s; transform: translateX(-2px); font-size: 11px; }
  .footer-col a:hover { color: #fff; }
  .footer-col a:hover span { opacity: 1; transform: translateX(0); }
  .footer-col li.footer-external { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(78,143,247,0.3); }
  .footer-col li.footer-external a { color: var(--accent-light); }
  .footer-col li.footer-external a:hover { color: #fff; }
  .footer-bottom {
    max-width: var(--w);
    margin: 56px auto 0;
    padding: 24px clamp(24px, 4vw, 64px) 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }
  .footer-copy, .footer-site {
    margin: 0;
    font-family: var(--sans);
    font-size: 12px;
    color: rgba(229,233,240,0.42);
    letter-spacing: 0.02em;
  }
  .footer-site a { color: inherit; text-decoration: none; transition: color 0.2s; }
  .footer-site a:hover { color: rgba(229,233,240,0.75); }
  @media (max-width: 780px) {
    .footer-inner { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
  }

/* Shared block 2 */
/* ── Mega-menu overrides (v29) ──────────────────────────────────── */
  .nav-panel-inner.has-feature {
    grid-template-columns: 1.7fr 1fr;
    align-items: stretch;
    column-gap: clamp(48px, 5vw, 80px);
  }
  .nav-panel-inner.has-feature .np-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 40px;
  }
  /* When there are only 2 links (See It Work), keep them tight side-by-side */
  .nav-panel-inner.has-feature.two-links .np-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .np-item .np-title {
    font-size: 13.5px;
    line-height: 1.3;
    margin-bottom: 4px;
  }
  .np-item .np-desc {
    font-size: 12.5px;
    line-height: 1.5;
  }
  /* Feature card: smaller, right-anchored */
  .nav-feature {
    max-width: 340px;
    margin-left: auto;
    align-self: start;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
  }
  .nav-feature:hover { border-color: rgba(42,212,229,0.35); }
  .nav-feature .nf-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #0b0d13;
  }
  .nav-feature .nf-media > *:not(.nf-cycler) { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .nav-feature video.nf-media-el { object-fit: cover; }
  .nav-feature .nf-body { padding: 14px 16px 16px; }
  .nav-feature .nf-kicker { display: none !important; }  /* no kicker labels */
  .nav-feature .nf-title {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.005em;
    line-height: 1.4;
    margin: 0 0 5px;
  }
  .nav-feature .nf-sub {
    font-family: var(--sans);
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
  }
  .nf-cycler::before { top: 0; background: linear-gradient(to bottom, #0b0d13, rgba(11,13,19,0)); }
  .nf-cycler::after  { bottom: 0; background: linear-gradient(to top, #0b0d13, rgba(11,13,19,0)); }

  /* Mobile: stack feature under links */
  @media (max-width: 900px) {
    .nav-panel-inner.has-feature { grid-template-columns: 1fr; }
    .nav-feature { max-width: none; }
    .nav-panel-inner.has-feature .np-links { grid-template-columns: 1fr; }
  }

/* Shared block 3 */
/* Deployment mega-menu: two links side-by-side + wordmark feature card */
  .nav-panel-inner.deploy-panel .np-links {
    gap: 22px 64px;
  }
  .nav-panel-inner.deploy-panel .nav-feature {
    margin-left: auto;
  }
  .nav-feature .nf-media > .nf-wordmark-box {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0d13;
    background-image: radial-gradient(ellipse 70% 70% at 50% 40%, rgba(78,143,247,.18), transparent 65%);
  }
  .nf-wordmark {
    font-family: var(--sans);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--text);
    padding-left: 0.32em;
  }
  .nf-wordmark .logo-dot { color: var(--accent); }

  /* Push feature card further right in its column */
  .nav-panel-inner.has-feature .nav-feature {
    max-width: 320px;
    margin-left: auto;
    margin-right: 0;
  }

  /* Remove static AMS list styles (safety) */
  .nf-static, .nf-ams { display: none !important; }

  /* Horizontal marquee: dark box with a white band across the middle */
  .nf-marquee {
    position: absolute; inset: 0;
    background: #0b0d13;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
  }
  .nf-marquee-band {
    background: #ffffff;
    width: 100%;
    height: 42px;
    overflow: hidden;
    position: relative;
    display: flex; align-items: center;
  }
  .nf-marquee-band::before,
  .nf-marquee-band::after {
    content: '';
    position: absolute; top: 0; bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 2;
  }
  .nf-marquee-band::before { left: 0; background: linear-gradient(to right, #ffffff, rgba(255,255,255,0)); }
  .nf-marquee-band::after  { right: 0; background: linear-gradient(to left,  #ffffff, rgba(255,255,255,0)); }

  .nf-marquee-inner {
    display: flex; align-items: center;
    gap: 40px;
    animation: nfMarqueeH 22s linear infinite;
    will-change: transform;
    padding: 0 20px;
    flex-shrink: 0;
  }
  .nf-ams-item {
    display: inline-flex; align-items: center;
    flex-shrink: 0;
    line-height: 1;
    opacity: 0.85;
  }
  .nf-ams-item svg {
    height: 18px;
    width: auto;
    display: block;
  }
  @keyframes nfMarqueeH {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

/* Global typography policy */
html, body, button, input, textarea, select, h1, h2, h3, h4, h5, h6 { font-family: var(--sans); }

/* Shared keyboard and motion preferences. */
:where(a, button, input, textarea, select, [role="button"]):focus-visible {
  outline: 2px solid var(--accent, #4e8ff7);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  video[autoplay] { display: none; }
}
img, video, iframe { max-width: 100%; }
.b-link-disabled { color: var(--text-secondary); cursor: default; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--text, #f4f7f8);
  color: var(--bg, #0c0e14);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* Keep thread focus visible within the clipped demo rail. */
.thread[role="button"]:focus-visible { outline-offset: -3px; }
