/* ============================================================
   Jerry Labs — Marketing site shared styles
   Builds on colors_and_type.css with site-wide chrome:
   reset, navigation, footer, buttons, scroll reveal.
   ============================================================ */

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--jl-sans);
  font-size: var(--jl-fs-base);
  line-height: var(--jl-lh-body);
  background: var(--jl-bg);
  color: var(--jl-fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }

/* ---- Container ---- */
.container {
  max-width: var(--jl-container);
  margin: 0 auto;
  padding: 0 32px;
}
.container-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container, .container-narrow { padding: 0 20px; }
}

/* ---- Section rhythm ---- */
section {
  padding: var(--jl-s-10) 0;
  position: relative;
}
@media (max-width: 720px) {
  section { padding: var(--jl-s-8) 0; }
}

/* ============================================================
   Top navigation
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--jl-z-nav);
  background: var(--jl-bg);
  border-bottom: 1px solid var(--jl-hairline);
}
.nav-inner {
  max-width: var(--jl-container);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--jl-fg);
}
.nav-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.nav-brand-name {
  font-family: var(--jl-mono);
  font-size: 16px;
  letter-spacing: -0.01em;
  font-weight: 500;
}
.nav-brand-name .dot { display:inline-block; width:7px; height:8px; margin-left:3px; vertical-align:2px; font-size:0; background: var(--jl-green); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); filter: drop-shadow(0 0 5px rgba(0,255,65,.6)); animation: brand-dot-pulse 2.6s ease-in-out infinite; }

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 32px;
}
.nav-links a {
  font-family: var(--jl-mono);
  font-size: 13px;
  color: var(--jl-fg-muted);
  text-decoration: none;
  transition: color var(--jl-t-base) var(--jl-ease);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--jl-mint); }
.nav-links a[aria-current="page"] { color: var(--jl-fg); }

.nav-cta {
  font-family: var(--jl-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--jl-fg);
  background: var(--jl-green-dim);
  border: 1px solid var(--jl-green-dim);
  border-radius: 4px;
  padding: 11px 20px;
  text-decoration: none;
  transition: background var(--jl-t-base) var(--jl-ease), border-color var(--jl-t-base), box-shadow var(--jl-t-base);
}
.nav-cta:hover {
  background: var(--jl-green);
  border-color: var(--jl-green);
  box-shadow: 0 0 18px rgba(0, 255, 65, 0.28);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--jl-hairline);
  border-radius: 4px;
  width: 40px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 1px;
  background: var(--jl-fg);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 1px;
  background: var(--jl-fg);
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after  { top:  5px; }

/* ---- Mobile nav (unified 2026-06-14): flex-wrap dropdown, no absolute hacks ---- */
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after { transition: transform .25s var(--jl-ease), top .25s var(--jl-ease), background .2s; }
@media (max-width: 820px) {
  .nav-inner { flex-wrap: wrap; row-gap: 0; }
  .nav-brand { order: 1; }
  .nav-toggle { display: inline-flex; order: 2; }
  .nav-links { order: 3; }
  .nav-actions { order: 4; }
  .nav-brand img { width: 40px; height: 40px; }   /* shrink home logo on mobile so it doesn't crowd the toggle */
  /* header.nav prefix = specificity 0,2,1 so these beat the home page's inline
     `.nav .nav-links{display:flex}` (0,2,0), which otherwise keeps the mobile
     menu permanently expanded (the "jumbled buttons" bug). */
  header.nav .nav-links, header.nav .nav-actions { display: none; flex-basis: 100%; width: 100%; }
  header.nav.is-open .nav-links {
    display: flex; flex-direction: column; align-items: center; gap: 10px; list-style: none;
    margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--jl-rule);
  }
  /* roomy full-width buttons so the outline has breathing room around the label */
  header.nav.is-open .nav-links a {
    display: block; width: 170px; max-width: 100%; box-sizing: border-box; text-align: center;
    padding: 16px 20px; font-size: 14px; letter-spacing: .12em;
    border: 1px solid rgba(104,210,186,.28); border-radius: 12px;
  }
  header.nav.is-open .nav-actions {
    display: flex; flex-direction: column; gap: 10px; align-items: center;
    margin-top: 10px; padding: 0;
  }
  /* Contact matches the service buttons: full-width outlined, no green fill/dot */
  header.nav.is-open .nav-cta {
    order: 1; display: block; width: 170px; max-width: 100%; box-sizing: border-box; text-align: center;
    padding: 16px 20px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
    background: transparent; color: var(--jl-fg-muted);
    border: 1px solid rgba(104,210,186,.28); border-radius: 12px; box-shadow: none;
  }
  header.nav.is-open .nav-cta::before { display: none; }
  header.nav.is-open .nav-x { order: 2; align-self: center; }
  /* hamburger -> X */
  .nav.is-open .nav-toggle span { background: transparent; }
  .nav.is-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
  .nav.is-open .nav-toggle span::after  { top: 0; transform: rotate(-45deg); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--jl-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 4px;
  padding: 14px 22px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--jl-t-base) var(--jl-ease),
              color var(--jl-t-base) var(--jl-ease),
              box-shadow var(--jl-t-base) var(--jl-ease),
              border-color var(--jl-t-base) var(--jl-ease),
              transform var(--jl-t-fast);
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--jl-green-dim);
  color: var(--jl-bg);
  border-color: var(--jl-green-dim);
}
.btn-primary:hover {
  background: var(--jl-green);
  border-color: var(--jl-green);
  box-shadow: 0 0 22px rgba(0, 255, 65, 0.28);
}
.btn-primary:active { background: var(--jl-green); border-color: var(--jl-green); }

.btn-secondary-dark {
  background: transparent;
  color: var(--jl-fg);
  border-color: var(--jl-hairline);
}
.btn-secondary-dark:hover {
  border-color: var(--jl-mint);
  color: var(--jl-mint);
}

.btn-secondary-light {
  background: transparent;
  color: var(--jl-graphite);
  border-color: rgba(42,42,42,0.24);
}
.btn-secondary-light:hover {
  border-color: var(--jl-accent-light);
  color: var(--jl-accent-light);
}

.btn-primary-light {
  background: var(--jl-graphite);
  color: var(--jl-paper);
  border-color: var(--jl-graphite);
}
.btn-primary-light:hover { background: #1a1a1a; border-color: #1a1a1a; }

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--jl-bg);
  color: var(--jl-fg);
  padding: 64px 0 32px;
  border-top: 1px solid var(--jl-hairline);
}
.footer-console {
  font-family: var(--jl-mono);
  font-size: 12px;
  color: var(--jl-fg-muted);
  margin-bottom: 40px;
}
.footer-console .prompt { color: var(--jl-fg-muted); margin-right: 8px; }
.footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--jl-rule);
}
.footer-group { display: flex; flex-direction: column; gap: 10px; }
.footer-group .head {
  font-family: var(--jl-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jl-fg-faint);
  margin-bottom: 2px;
}
.footer-group .line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--jl-mono);
  font-size: 14px;
  color: var(--jl-fg);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--jl-t-base);
}
.footer-group .line:hover { color: var(--jl-mint); }
.footer-group .line .kind {
  width: 48px;
  color: var(--jl-fg-faint);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.footer-group .line .icon { width: 14px; height: 14px; flex-shrink: 0; display: inline-flex; }
.footer-group .line .icon svg { width: 100%; height: 100%; display: block; }
.footer-group .line .agent-icon {
  width: 16px; height: 16px;
  object-fit: contain;
  flex-shrink: 0;
}
.footer-group .line .dim { color: var(--jl-fg-faint); margin-left: 2px; }
.footer-disclose {
  font-family: var(--jl-sans);
  font-size: 13px;
  color: var(--jl-fg-muted);
  line-height: 1.6;
}
.footer-meta {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-family: var(--jl-mono);
  font-size: 12px;
  color: var(--jl-fg-faint);
}
@media (max-width: 720px) {
  .footer-row { grid-template-columns: 1fr; }
  .footer-meta { flex-direction: column; gap: 8px; }
}

/* ----- Site footer (solid base) ----- */
.site-footer {
  background: #0F100F;
  border-top: 1px solid var(--jl-hairline);
  padding: 64px 0 28px;
}
.site-footer-inner {
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.sf-top {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.sf-brand {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 460px;
}
.sf-mark { width: 72px; height: 72px; object-fit: contain; flex-shrink: 0; }
.sf-brand-txt { display: flex; flex-direction: column; gap: 9px; }
.sf-wordmark {
  font-family: var(--jl-mono);
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 19px;
  color: var(--jl-fg);
}
.sf-tag {
  font-family: var(--jl-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--jl-fg-muted);
  margin: 0;
}
.sf-nav { display: flex; gap: 56px; }
.sf-col { display: flex; flex-direction: column; gap: 12px; }
.sf-head {
  font-family: var(--jl-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jl-fg-faint);
  margin-bottom: 4px;
}
.sf-col a {
  font-family: var(--jl-mono);
  font-size: 14px;
  color: var(--jl-fg-muted);
  text-decoration: none;
  transition: color var(--jl-t-base);
}
.sf-col a:hover { color: var(--jl-mint); }
.sf-ic { display:inline-flex; width:13px; height:13px; vertical-align:middle; margin-right:8px; }
.sf-ic svg { width:100%; height:100%; display:block; }
.sf-base {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--jl-rule);
}
.sf-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--jl-mono);
  font-size: 12px;
  color: var(--jl-fg-muted);
}
.sf-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #00FF41;
  box-shadow: 0 0 8px #00FF41;
  animation: sf-pulse 2.4s ease-in-out infinite;
}
.sf-legal {
  font-family: var(--jl-mono);
  font-size: 12px;
  color: var(--jl-fg-faint);
}
@keyframes sf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@media (max-width: 720px) {
  .sf-top { flex-direction: column; gap: 32px; }
  .sf-nav { gap: 44px; }
  .sf-base { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-dot { animation: none; }
}

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 480ms var(--jl-ease-out), transform 480ms var(--jl-ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Safety: anything still hidden after 1s reveals itself, so a missed IO
   callback never leaves the page blank. */
.reveal { animation: jl-reveal-fallback 0s 1.2s forwards; }
@keyframes jl-reveal-fallback {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; animation: none; }
}

/* ============================================================
   Variant switcher (UI-kit only — top-right floating pill)
   ============================================================ */
.kit-switcher {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(13, 13, 13, 0.92);
  border: 1px solid var(--jl-hairline);
  font-family: var(--jl-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.kit-switcher a {
  color: var(--jl-fg-muted);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  transition: color var(--jl-t-base), background var(--jl-t-base);
}
.kit-switcher a:hover { color: var(--jl-fg); }
.kit-switcher a[aria-current="page"] {
  background: var(--jl-green);
  color: var(--jl-bg);
  box-shadow: 0 0 12px rgba(0, 255, 65, 0.32);
}
@media (max-width: 820px) { .kit-switcher { display: none; } }

/* ============================================================
   Agent pill — the canonical inline reference
   ============================================================ */
.agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--jl-hairline);
  background: var(--jl-surface);
  font-family: var(--jl-mono);
  font-size: 13px;
  color: var(--jl-fg);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--jl-t-base), background var(--jl-t-base);
}
.agent-pill:hover { border-color: var(--jl-mint); }
.agent-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 999px;
}
.agent-pill .arrow { color: var(--jl-green); margin-left: 4px; }

/* ============================================================
   Eyebrow
   ============================================================ */
.eyebrow {
  display: inline-block;
  font-family: var(--jl-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jl-mint);
}
.jl-light .eyebrow { color: var(--jl-accent-light); }

/* ============================================================
   Scroll indicator
   ============================================================ */
.scroll-indicator {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--jl-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jl-fg-faint);
}
.scroll-indicator::after {
  content: '';
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--jl-green) 0%, transparent 100%);
  animation: scroll-pulse 2.4s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50%      { opacity: 1;   transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator::after { animation: none; opacity: 0.5; }
}

/* ============================================================
   Touch devices (no hover): hover affordances are invisible on mobile,
   so give links a visible resting (pre-highlighted) state + a press flash.
   Scoped to (hover:none) so desktop hover behavior is untouched.
   ============================================================ */
@media (hover: none) {
  .nav-links a,
  header.nav.is-open .nav-cta,
  .link-arrow { color: var(--jl-mint) !important; }
  .nav-links a:active,
  .link-arrow:active,
  .btn:active,
  .btn-primary:active,
  .btn-secondary-dark:active,
  .btn-secondary-light:active,
  .nav-cta:active { opacity: .55 !important; transition: opacity .06s ease; }
}
