/* Keyweaver shared marketing chrome - tokens, nav, footer, product cards */

:root {
  --ink: #0a0a0f;
  --surface: #13131a;
  --lift: #1c1c28;
  --edge: #2a2a3d;
  --accent: #5b6bf8;
  --accent2: #7b8bff;
  --accent-rgb: 91, 107, 248;
  --text: #e8e8f0;
  --muted: #6b6b88;
  --subtle: #3a3a52;
  /* Nav always stays Keyweaver brand, even on themed product pages */
  --nav-accent: #5b6bf8;
  --nav-accent2: #7b8bff;
}

/* Per-plugin page highlights (content only - not the menu) */
body.theme-cuemark {
  --accent: #3d9cf0;
  --accent2: #5eb0f5;
  --accent-rgb: 61, 156, 240;
}

body.theme-superconductor {
  --accent: #5b6bf8;
  --accent2: #7b8bff;
  --accent-rgb: 91, 107, 248;
}

body.theme-trillian {
  --accent: #b56bff;
  --accent2: #c98fff;
  --accent-rgb: 181, 107, 255;
}

body.theme-tamborine {
  --accent: #e8952f;
  --accent2: #f0a84a;
  --accent-rgb: 232, 149, 47;
}

body.theme-ludo {
  --accent: #34d399;
  --accent2: #5ee0b0;
  --accent-rgb: 52, 211, 153;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Nav ── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 56px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge);
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img {
  height: 28px;
  width: auto;
  max-width: min(42vw, 168px);
  display: block;
  object-fit: contain;
  object-position: left center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 0.35rem;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: 10px;
  background: var(--lift);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent2);
}

.nav-toggle-bars {
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.site-nav.is-open .nav-toggle-bars {
  height: 0;
  box-shadow: none;
  background: transparent;
  position: relative;
}

.site-nav.is-open .nav-toggle-bars::before,
.site-nav.is-open .nav-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.site-nav.is-open .nav-toggle-bars::before {
  transform: rotate(45deg);
}

.site-nav.is-open .nav-toggle-bars::after {
  transform: rotate(-45deg);
}

.site-nav .btn-primary {
  background: var(--nav-accent);
  color: #fff;
}

.site-nav .btn-primary:hover {
  background: var(--nav-accent2);
}

.site-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: rgba(76, 175, 131, 0.12);
  border-bottom: 1px solid rgba(76, 175, 131, 0.35);
  color: #9fd9bc;
  font-size: 13px;
  text-align: center;
}

.site-banner.is-visible {
  display: flex;
}

.site-banner button {
  background: transparent;
  border: none;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.nav-products {
  position: relative;
}

.nav-products > summary {
  list-style: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  user-select: none;
}

.nav-products > summary::-webkit-details-marker {
  display: none;
}

.nav-products > summary:hover,
.nav-products[open] > summary {
  color: var(--text);
}

.nav-products-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 0.4rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  z-index: 120;
}

.nav-products-menu a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
}

.nav-products-menu a:hover {
  background: var(--lift);
}

.nav-products-menu span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 1rem;
  height: 34px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--edge);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--subtle);
  background: var(--lift);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent2);
}

.btn-lg {
  height: 44px;
  padding: 0 1.5rem;
  font-size: 14px;
  border-radius: 8px;
}

.btn-xl {
  height: 52px;
  padding: 0 2rem;
  font-size: 15px;
  border-radius: 10px;
}

/* ── Layout ── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5.5rem 0;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Cal Sans', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 560px;
  line-height: 1.7;
}

.divider {
  border: none;
  border-top: 1px solid var(--edge);
  margin: 0;
}

/* ── Product cards (hub) ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
  min-height: 220px;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--subtle);
  background: var(--lift);
  transform: translateY(-2px);
}

/* Icon marks are ~132×132 in a 166.8-tall wordmark SVG - scale so the
   mark fills a fixed square and clip the wordmark text away. */
.product-card-logo {
  display: block;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 9px;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
  position: relative;
}

.product-card-logo img {
  position: absolute;
  left: 0;
  top: 50%;
  height: calc(36px * 166.8 / 132);
  width: auto;
  max-width: none;
  transform: translateY(-50%);
  display: block;
}

.product-card-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 0.45rem;
}

.product-card h3 {
  font-family: 'Cal Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.product-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  flex: 1;
}

.product-card-cta {
  margin-top: 1.1rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent2);
}

/* ── Product page hero ── */
.product-hero {
  padding: 7.5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.product-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(var(--accent-rgb), 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.product-hero-logo {
  /* Same height for every product so the left icon square matches across pages. */
  height: 40px;
  width: auto;
  max-width: none;
  margin: 0 auto 1.5rem;
  display: block;
}

@media (max-width: 720px) {
  .product-hero-logo {
    height: 28px;
  }
}

.product-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: var(--lift);
  border: 1px solid var(--edge);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.product-hero h1 {
  font-family: 'Cal Sans', sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.05;
  max-width: 820px;
  margin: 0 auto 1.25rem;
}

.product-hero .lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.product-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 2rem;
}

.feature-cell {
  background: var(--surface);
  padding: 1.5rem;
}

.feature-cell .feature-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  margin-bottom: 1.1rem;
}

.feature-cell .feature-icon svg {
  width: 19px;
  height: 19px;
  stroke: var(--accent2);
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-cell h3 {
  font-family: 'Cal Sans', sans-serif;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.feature-cell p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.steps-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 1.35rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--accent2);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
}

.step-card .step-icon {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--lift);
  border: 1px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.1rem;
}

.step-card .step-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.step-card h3 {
  font-size: 15px;
  margin-bottom: 0.4rem;
}

.step-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.cta-band {
  text-align: center;
  padding: 4.5rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(var(--accent-rgb), 0.07));
}

.cta-band h2 {
  font-family: 'Cal Sans', sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.cta-band p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--edge);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer p {
  margin-bottom: 0.4rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem 1.25rem;
  list-style: none;
  margin-top: 1rem;
}

.footer-products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.1rem;
  list-style: none;
  margin: 1.25rem 0 0.5rem;
  font-size: 12px;
}

.suite-strip {
  padding: 2.75rem 2rem 3.25rem;
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.04), transparent);
}

.suite-strip .container {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.suite-strip-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.suite-strip-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.suite-strip-links a {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 9.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-family: 'Cal Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: border-color 0.15s, background 0.15s;
}

.suite-strip-links a span {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.suite-strip-links a:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  background: var(--lift);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: relative;
    flex-wrap: wrap;
    row-gap: 0;
  }

  .nav-links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin-top: 0.85rem;
    padding: 0.65rem;
    background: var(--surface);
    border: 1px solid var(--edge);
    border-radius: 14px;
  }

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

  .nav-links > li {
    width: 100%;
  }

  .nav-links a,
  .nav-products > summary {
    display: block;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
  }

  .nav-links a:hover,
  .nav-products > summary:hover {
    background: var(--lift);
  }

  .nav-products-menu {
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
    margin-top: 0.25rem;
    box-shadow: none;
  }

  .nav-cta .btn-ghost {
    display: none;
  }
}

@media (max-width: 500px) {
  .site-nav {
    padding: 0 1rem;
  }

  .nav-cta .btn {
    height: 32px;
    padding: 0 0.65rem;
    font-size: 12px;
  }

  .suite-strip-links a {
    min-width: calc(50% - 0.4rem);
  }
}
