/* RapidValue marketing — shared styles
   Used by marketing.html and product-*.html pages.
   Variables, layout primitives, hero, sections, nav, cards, lightbox. */

:root {
  --brand:        #0d9488;
  --brand-dark:   #0f766e;
  --brand-light:  #14b8a6;
  --brand-pale:   #f0fdfa;
  --brand-accent: #ccfbf1;
  --ink:          #0f172a;
  --ink-soft:     #475569;
  --muted:        #94a3b8;
  --line:         #e2e8f0;
  --bg:           #fafbfc;
  --card:         #ffffff;
  --accent-amber: #f59e0b;
  --accent-rose:  #f43f5e;
  --accent-sky:   #0ea5e9;
  --accent-violet:#8b5cf6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Nav ─────────────────────────────────────────────────── */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav .container {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1rem; padding-bottom: 1rem;
}
.logo {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.15rem;
  text-decoration: none; color: inherit;
}
.logo img { height: 38px; width: auto; display: block; }
.logo .logo-text {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 1.75rem; align-items: center; font-size: 0.92rem; }
.nav-links > a { color: var(--ink-soft); }
.nav-links a.cta {
  background: var(--brand); color: white; padding: 0.55rem 1rem; border-radius: 6px;
  font-weight: 500;
}
.nav-links a.cta:hover { background: var(--brand-dark); text-decoration: none; }

/* Products dropdown */
.nav-products { position: relative; }
.nav-products > .trigger {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--ink-soft); cursor: pointer; background: none; border: none;
  font: inherit; padding: 0;
}
.nav-products > .trigger::after {
  content: "▾"; font-size: 0.7rem; opacity: 0.6;
}
.nav-products .dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: white; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.12);
  padding: 0.6rem;
  min-width: 340px;
  margin-top: 8px;
  display: none; flex-direction: column; gap: 0.15rem;
  z-index: 100;
}
/* Transparent bridge so moving the cursor from the trigger to the dropdown
   doesn't break the :hover state. */
.nav-products .dropdown::before {
  content: ""; position: absolute;
  top: -10px; left: 0; right: 0; height: 12px;
  background: transparent;
}
.nav-products:hover .dropdown,
.nav-products:focus-within .dropdown,
.nav-products.open .dropdown { display: flex; }
.nav-products .dropdown a {
  display: grid; grid-template-columns: 28px 1fr;
  gap: 0.65rem; align-items: start;
  padding: 0.6rem 0.7rem; border-radius: 8px;
  color: var(--ink); text-decoration: none;
}
.nav-products .dropdown a:hover { background: var(--brand-pale); }
.nav-products .dropdown a .dp-icon {
  font-size: 1.2rem; line-height: 1; padding-top: 0.1rem;
}
.nav-products .dropdown a .dp-body { display: flex; flex-direction: column; }
.nav-products .dropdown a .dp-title { font-size: 0.92rem; font-weight: 600; }
.nav-products .dropdown a .dp-desc  { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.1rem; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  width: 38px; height: 38px; cursor: pointer; font-size: 1.1rem;
  color: var(--ink); padding: 0;
}
.nav-toggle:hover { background: var(--brand-pale); border-color: var(--brand-light); }

/* Product-page sub-nav (small back-arrow + tagline above hero) */
.subnav { background: white; border-bottom: 1px solid var(--line); }
.subnav .container { padding: 0.7rem 1.5rem; display: flex; align-items: center; gap: 1rem; }
.subnav a.back { font-size: 0.85rem; color: var(--ink-soft); display: inline-flex; align-items: center; gap: 0.3rem; }
.subnav a.back:hover { color: var(--brand-dark); text-decoration: none; }
.subnav .crumb { font-size: 0.85rem; color: var(--muted); }
.subnav .crumb .sep { margin: 0 0.5rem; }
.subnav .crumb .now { color: var(--ink); font-weight: 500; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, var(--brand-pale) 0%, var(--bg) 100%);
  padding: 5rem 0 6rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.1; margin: 0 0 1.25rem;
  font-weight: 800; letter-spacing: -0.02em;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-dark) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .sub {
  font-size: 1.2rem; color: var(--ink-soft); max-width: 700px;
  margin: 0 0 2rem;
}
.hero .product-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-dark);
  background: var(--brand-accent); padding: 0.3rem 0.8rem; border-radius: 4px;
  margin-bottom: 1rem;
}
.ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.4rem; border-radius: 8px;
  font-weight: 500; font-size: 1rem; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: all 0.15s;
}
.btn-primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: white; border-color: var(--ink-soft); text-decoration: none; }
.hero-meta { margin-top: 2.5rem; color: var(--muted); font-size: 0.9rem; display: flex; gap: 1.5rem; flex-wrap: wrap; }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.4rem; }
.hero-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); display: inline-block; }

/* ── Section base ────────────────────────────────────────── */
section { padding: 5rem 0; }
section.alt { background: white; }
.eyebrow {
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-dark);
  margin: 0 0 1rem;
}
h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  line-height: 1.15; margin: 0 0 1rem;
  font-weight: 700; letter-spacing: -0.02em;
}
.lead {
  font-size: 1.1rem; color: var(--ink-soft); max-width: 700px;
  margin: 0 0 3rem;
}

/* ── How it works ─────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.step {
  background: var(--card); padding: 1.8rem;
  border: 1px solid var(--line); border-radius: 12px;
  position: relative; transition: transform 0.15s, box-shadow 0.15s;
}
.step:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(13,148,136,0.08); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--brand-pale); color: var(--brand-dark);
  border-radius: 50%; font-weight: 700; margin-bottom: 1rem;
}
.step h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.step .time {
  display: inline-block; margin-top: 1rem; font-size: 0.8rem;
  background: var(--brand-accent); color: var(--brand-dark);
  padding: 0.2rem 0.6rem; border-radius: 4px; font-weight: 500;
}

/* ── Differentiators ──────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.feature {
  background: var(--card); padding: 1.8rem;
  border-left: 3px solid var(--brand); border-radius: 8px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.feature h3 { margin: 0 0 0.5rem; font-size: 1.1rem; display: flex; align-items: center; gap: 0.5rem; }
.feature h3 .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--brand-pale); color: var(--brand-dark);
  font-size: 0.95rem;
}
.feature p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ── Comparison table ─────────────────────────────────────── */
.compare { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.compare table { width: 100%; border-collapse: collapse; }
.compare th, .compare td {
  padding: 1rem 1.2rem; text-align: left; border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}
.compare th { background: var(--brand-pale); color: var(--brand-dark); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.compare td:first-child { font-weight: 500; color: var(--ink); }
.compare tr:last-child td { border-bottom: none; }
.compare .us { background: rgba(13,148,136,0.04); font-weight: 500; }
.compare .check  { color: var(--brand); }
.compare .cross  { color: var(--muted); }

/* ── Deployment tiers ─────────────────────────────────────── */
.deploy-intro { max-width: 680px; margin-bottom: 3rem; }
.deploy-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 3rem; }
.deploy-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.deploy-card.highlight { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(13,148,136,0.12); }
.deploy-card .deploy-badge {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem; border-radius: 4px; align-self: flex-start;
  background: var(--brand-pale); color: var(--brand-dark);
}
.deploy-card .deploy-badge.soon { background: #fef3c7; color: #92400e; }
.deploy-card .deploy-icon { font-size: 1.75rem; }
.deploy-card h4 { margin: 0.25rem 0 0; font-size: 1rem; }
.deploy-card .deploy-sub { font-size: 0.82rem; color: var(--muted); margin: 0; }
.deploy-card .deploy-desc { font-size: 0.88rem; color: var(--ink-soft); margin: 0.5rem 0 0; flex: 1; }
.deploy-card .deploy-tag {
  font-size: 0.78rem; color: var(--brand-dark); font-weight: 500;
  border-top: 1px solid var(--line); margin-top: auto; padding-top: 0.75rem;
}
.agent-guarantee {
  background: var(--brand-pale); border-radius: 12px; padding: 1.5rem 2rem;
  display: flex; gap: 1.25rem; align-items: flex-start;
}
.agent-guarantee .ag-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }
.agent-guarantee h4 { margin: 0 0 0.35rem; font-size: 1rem; color: var(--brand-dark); }
.agent-guarantee p { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.arch-diagram {
  background: var(--card); padding: 2rem; border-radius: 12px;
  border: 1px solid var(--line);
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4;
  white-space: pre; overflow-x: auto;
}
.arch-label { font-weight: 600; color: var(--brand-dark); font-family: inherit; }
@media (max-width: 900px) { .deploy-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Sectors ──────────────────────────────────────────────── */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.sector {
  background: var(--card); padding: 1.5rem;
  border: 1px solid var(--line); border-radius: 10px;
  text-align: center;
}
.sector .ico { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.sector h4 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.sector .frameworks {
  font-size: 0.78rem; color: var(--muted); margin-top: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Team ─────────────────────────────────────────────────── */
.team-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; max-width: 800px; }
.team-card {
  background: var(--card); padding: 2rem;
  border: 1px solid var(--line); border-radius: 12px;
  display: flex; gap: 1.5rem; align-items: flex-start;
}
.team-avatar {
  flex-shrink: 0;
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700; color: white;
  letter-spacing: -0.02em;
}
.team-info h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.team-role {
  font-size: 0.82rem; font-weight: 600; color: var(--brand-dark);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.team-info p { margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }
.team-tag {
  display: inline-block; margin-top: 0.75rem; margin-right: 0.4rem;
  font-size: 0.75rem; background: var(--brand-pale);
  color: var(--brand-dark); padding: 0.15rem 0.5rem;
  border-radius: 4px; font-weight: 500;
}

/* ── Stat band ────────────────────────────────────────────── */
.stats {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white; padding: 4rem 0;
}
.stats h2 { color: white; text-align: center; margin-bottom: 3rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat-num { font-size: 2.8rem; font-weight: 800; line-height: 1; margin-bottom: 0.3rem; letter-spacing: -0.02em; }
.stat-label { font-size: 0.92rem; opacity: 0.9; }

/* ── Final CTA ────────────────────────────────────────────── */
.cta-final { background: var(--brand-pale); padding: 5rem 0; text-align: center; }
.cta-final h2 { margin-bottom: 1rem; }
.cta-final p { font-size: 1.1rem; color: var(--ink-soft); margin: 0 auto 2rem; max-width: 600px; }
.cta-note { margin-top: 1.5rem; font-size: 0.88rem; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────── */
footer { background: white; padding: 2.5rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
footer a { color: var(--ink-soft); }

/* ── Feature showcase — alternating blocks ─────────────── */
.sc-topic { margin-bottom: 3.5rem; }
.sc-topic-header {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-dark);
  border-top: 2px solid var(--brand-pale);
  padding-top: 2rem; margin-bottom: 2rem;
}
.sc-block { display:grid; grid-template-columns:1fr 1.6fr; gap:3rem; align-items:center; margin-bottom:3rem; }
.sc-block.flip { direction:rtl; }
.sc-block.flip > * { direction:ltr; }
.sc-eyebrow { font-size:.78rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--brand-dark); margin-bottom:.5rem; }
.sc-title { font-size:1.25rem; font-weight:700; margin:0 0 .75rem; letter-spacing:-.01em; line-height:1.25; }
.sc-desc { color:var(--ink-soft); font-size:.95rem; line-height:1.65; margin:0; }
.sc-img-wrap { border-radius:12px; overflow:hidden; border:1px solid var(--line); box-shadow:0 4px 24px rgba(0,0,0,.08); }
.sc-img-wrap img { width:100%; display:block; cursor:zoom-in; }

/* lightbox */
.sc-lightbox { display:none; position:fixed; inset:0; background:rgba(0,0,0,.92); z-index:200; align-items:center; justify-content:center; }
.sc-lightbox.open { display:flex; }
.sc-lightbox img { max-width:92vw; max-height:90vh; border-radius:8px; object-fit:contain; }
.sc-lightbox-close { position:absolute; top:1rem; right:1.5rem; color:white; font-size:1.75rem; cursor:pointer; background:none; border:none; }

/* ── Product cards (homepage 6-card grid) ─────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.product-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 2rem 1.8rem; display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-decoration: none; color: inherit;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(13,148,136,0.12);
  border-color: var(--brand-light);
  text-decoration: none;
}
.product-card .pc-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-pale); color: var(--brand-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 0.4rem;
}
.product-card h3 { margin: 0 0 0.25rem; font-size: 1.15rem; letter-spacing: -0.01em; }
.product-card p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.55; flex: 1; }
.product-card .pc-tags {
  margin-top: 0.85rem; display: flex; flex-wrap: wrap; gap: 0.35rem;
  font-size: 0.72rem; color: var(--muted);
}
.product-card .pc-tags span {
  background: var(--brand-pale); color: var(--brand-dark);
  padding: 0.15rem 0.5rem; border-radius: 4px; font-weight: 500;
}
.product-card .pc-arrow {
  margin-top: 1rem; font-size: 0.9rem; color: var(--brand-dark); font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.3rem;
}
@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; } }

/* ── Product page: related products at bottom ─────────────── */
.related { background: white; }
.related-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.75rem;
}
.related-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 1rem 1.1rem; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: border-color 0.15s, transform 0.15s;
}
.related-card:hover { border-color: var(--brand); transform: translateY(-1px); text-decoration: none; }
.related-card .rc-icon { font-size: 1.1rem; }
.related-card h4 { margin: 0; font-size: 0.92rem; }
.related-card p { margin: 0; font-size: 0.78rem; color: var(--ink-soft); }
@media (max-width: 900px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .steps, .grid-2, .sectors, .team-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .deploy-grid { grid-template-columns: 1fr; }
  section { padding: 3rem 0; }
  .hero { padding: 3rem 0 4rem; }
  .team-card { flex-direction: column; }
  .sc-block, .sc-block.flip { grid-template-columns:1fr; direction:ltr; }

  /* Mobile nav: hide regular links, show hamburger */
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: white; border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
    gap: 0.25rem;
    /* Cap the drawer height so the menu scrolls internally instead of
       running off-screen. Viewport minus the sticky nav (~72px). */
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  body.nav-open .nav-links { display: flex; }
  .nav-links > a, .nav-links .nav-products > .trigger {
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--line);
    width: 100%; text-align: left;
  }
  .nav-links a.cta {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem !important; text-align: center;
    border-bottom: none;
  }
  /* Products dropdown on mobile: render inline, no hover-only */
  .nav-products .dropdown {
    position: static; transform: none;
    box-shadow: none; border: none; padding: 0.25rem 0 0;
    margin: 0 0 0.5rem;
    display: flex; min-width: 0;
    background: var(--brand-pale); border-radius: 8px;
  }
  .nav-products > .trigger { pointer-events: none; opacity: 0.6; }
  .nav-products > .trigger::after { display: none; }
  /* Logo: hide text on small mobile, keep mark */
  .logo .logo-text { display: none; }
}
@media (max-width: 480px) {
  .logo img { height: 32px; }
}
