/* ─────────────────────────────────────────────────────────────────────────
   SRA Group of Texas — site framework
   Shared across every page (index.html, about.html, etc). Design tokens are
   deliberately identical to the Aperion/Smartflow docs system
   (docs.aperion.ai) since SRA Group is the engineering team behind it —
   same palette, same type scale, same component language, so the two
   properties read as one family rather than two unrelated brands.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #162032;
  --border: #334155;
  --border2: #1e293b;
  --ink: #f1f5f9;
  --ink2: #cbd5e1;
  --ink3: #94a3b8;
  --muted: #64748b;
  --violet: #8b5cf6;
  --violet-dark: #7c3aed;
  --blue: #3b82f6;
  --teal: #14b8a6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --code-bg: #0a1322;

  --max: 1240px;
  --radius: 12px;
  --radius-sm: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
section { padding: 88px 24px; position: relative; }
.container { max-width: var(--max); margin: 0 auto; }

/* ── Gradient text (matches the Aperion docs "paper" title treatment) ── */
.grad-text {
  background: linear-gradient(90deg, var(--violet), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── Reusable subtle circuit-pattern backdrop (brand asset motif) ── */
.circuit-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.circuit-bg svg { position: absolute; opacity: .35; }

/* ── Scroll reveal (IntersectionObserver toggles .in-view) ──
   Gated behind a `.js` class added by an inline script in <head>, so content
   is only ever hidden once we've confirmed JS can un-hide it again. Without
   JS (or if it errors), everything just renders normally, visible by default. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1); }
.js .reveal.in-view { opacity: 1; transform: translateY(0); }
.js .reveal.d1 { transition-delay: .08s; }
.js .reveal.d2 { transition-delay: .16s; }
.js .reveal.d3 { transition-delay: .24s; }
.js .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ── Hero entrance animation (plays on load, hero is already in view) ── */
@keyframes heroIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero .kicker, .hero h1, .hero p.lead, .hero .hero-ctas, .hero .trust-bar { animation: heroIn .7s cubic-bezier(.16,1,.3,1) both; }
.hero h1 { animation-delay: .08s; }
.hero p.lead { animation-delay: .16s; }
.hero .hero-ctas { animation-delay: .24s; }
.hero .trust-bar { animation-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .hero .kicker, .hero h1, .hero p.lead, .hero .hero-ctas, .hero .trust-bar { animation: none; }
}

/* ── Kicker color variants (rotates section-to-section instead of all-violet) ── */
.kicker.kicker-teal  { color: var(--teal);  background: rgba(20,184,166,.1); border-color: rgba(20,184,166,.3); }
.kicker.kicker-blue  { color: var(--blue);  background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); }
.kicker.kicker-amber { color: var(--amber); background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.3); }

/* ── Card accent bar (small color tell above the icon) ── */
.card .accent-bar { display: block; height: 3px; width: 32px; border-radius: 2px; background: var(--violet); margin-bottom: 16px; }
.card.icon-teal .accent-bar { background: var(--teal); }
.card.icon-blue .accent-bar { background: var(--blue); }
.card.icon-amber .accent-bar { background: var(--amber); }

/* ── Bento grids: breaks the "four identical boxes" rhythm by giving one
   card real visual weight instead of uniform tiles everywhere. ── */
.bento-4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bento-4 .card.feature {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 26px;
  background: linear-gradient(120deg, rgba(139,92,246,.14), var(--surface) 65%);
}
.bento-4 .card.feature .icon-wrap { flex-shrink: 0; width: 64px; height: 64px; margin-bottom: 0; }
.bento-4 .card.feature .icon-wrap svg { width: 30px; height: 30px; }
.bento-4 .card.feature .feature-copy { flex: 1; }
.bento-4 .card.feature .feature-copy .accent-bar { margin-bottom: 12px; }
.bento-4 .card.feature h3 { font-size: 1.25rem; margin-bottom: 8px; }
@media (max-width: 720px) { .bento-4 .card.feature { flex-direction: column; align-items: flex-start; text-align: left; } }
@media (max-width: 640px) { .bento-4 { grid-template-columns: 1fr; } }

.bento-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.bento-3 .card.feature { grid-column: span 2; background: linear-gradient(160deg, rgba(139,92,246,.12), var(--surface) 55%); }
@media (max-width: 920px) { .bento-3 { grid-template-columns: 1fr; } .bento-3 .card.feature { grid-column: span 1; } }

/* ── Industries: a distinct hover personality (tilt) vs. the plain lift elsewhere ── */
#industries .card:hover { transform: translateY(-4px) rotate(-0.5deg); }

/* ── Cosmo card: a small wink of personality on hover ── */
.cosmo-card { transition: transform .25s ease; }
.cosmo-card:hover { transform: rotate(-2deg) scale(1.04); }

/* ── Icon wrap: used by both card icons and stat icons ── */
.icon-wrap {
  width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(139,92,246,.12); color: var(--violet); flex-shrink: 0;
}
.icon-wrap svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.icon-teal .icon-wrap, .icon-wrap.teal { background: rgba(20,184,166,.12); color: var(--teal); }
.icon-blue .icon-wrap, .icon-wrap.blue { background: rgba(59,130,246,.12); color: var(--blue); }
.icon-amber .icon-wrap, .icon-wrap.amber { background: rgba(245,158,11,.12); color: var(--amber); }
.icon-violet .icon-wrap, .icon-wrap.violet { background: rgba(139,92,246,.12); color: var(--violet); }

/* ── Announce bar ── */
.announce {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 9px 16px;
  font-size: .84rem;
  color: var(--ink3);
}
.announce strong { color: var(--ink); }
.announce a { color: var(--violet); text-decoration: none; margin-left: 6px; }
.announce a:hover { text-decoration: underline; }

/* ── Topnav ── */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  max-width: var(--max); margin: 0 auto;
}
.nav-brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.nav-brand .brand-main { font-weight: 800; font-size: 1.05rem; letter-spacing: .02em; }
.nav-brand .brand-sub { font-weight: 700; font-size: .78rem; color: var(--violet); letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 2px; margin-left: 28px; }
.nav-links a { color: var(--ink3); font-size: .88rem; padding: 8px 12px; border-radius: 6px; text-decoration: none; transition: background .15s, color .15s; }
.nav-links a:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.nav-links a.active { color: var(--violet); background: rgba(139,92,246,.1); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; font-weight: 600; padding: 11px 20px;
  border-radius: var(--radius-sm); text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: all .15s;
}
.btn-primary { background: var(--violet); color: #fff; }
.btn-primary:hover { background: var(--violet-dark); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink2); }
.btn-ghost:hover { border-color: var(--ink3); color: var(--ink); }
.btn-sm { padding: 7px 14px; font-size: .82rem; }

/* ── Hero ── */
.hero {
  padding: 108px 24px 76px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0c1a2e 0%, #140d2a 100%);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(600px 320px at 50% -10%, rgba(139,92,246,.20), transparent 60%),
    radial-gradient(500px 280px at 85% 10%, rgba(20,184,166,.12), transparent 60%);
}
.hero > * { position: relative; z-index: 1; }
.hero > .circuit-bg { position: absolute; z-index: 0; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--violet); background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.3);
  padding: 6px 14px; border-radius: 20px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; max-width: 880px; margin: 0 auto 20px; }
.hero h1 .accent { background: linear-gradient(90deg, var(--violet), var(--blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p.lead { font-size: 1.15rem; color: var(--ink2); max-width: 680px; margin: 0 auto 34px; }
.hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

/* ── Stats band (By The Numbers) ── */
.stats-band {
  background: var(--surface2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 72px 24px; position: relative; overflow: hidden;
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
@media (max-width: 920px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stats-grid { grid-template-columns: 1fr; } }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px; text-align: center; transition: border-color .15s, transform .2s;
}
.stat-card:hover { border-color: rgba(139,92,246,.4); transform: translateY(-2px); }
.stat-card .icon-wrap { margin: 0 auto 16px; }
.stat-card .stat-num { font-size: 2.1rem; font-weight: 800; letter-spacing: -.01em; margin-bottom: 6px; }
.stat-card .stat-label { font-size: .88rem; color: var(--ink3); line-height: 1.4; }

/* ── Trust bar ── */
.trust-bar { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--border); max-width: 920px; margin: 0 auto; }
.trust-item { text-align: center; padding-top: 22px; }
.trust-item .num { font-size: 1.5rem; font-weight: 800; color: var(--ink); }
.trust-item .label { font-size: .78rem; color: var(--ink3); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

/* ── Section headers ── */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section-head .kicker { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; margin-bottom: 14px; letter-spacing: -.01em; }
.section-head p { color: var(--ink3); font-size: 1.02rem; }
.section-alt { background: var(--surface2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ── Grids & cards ── */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .15s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.22); }
.card .icon-wrap { margin-bottom: 16px; }
.card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--ink3); font-size: .92rem; }

/* ── Process timeline ── */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 22px; left: 8%; right: 8%; height: 2px; background: var(--border); z-index: 0; }
.tl-step { position: relative; z-index: 1; text-align: center; padding: 0 14px; }
.tl-dot {
  width: 44px; height: 44px; border-radius: 50%; background: var(--surface); border: 2px solid var(--violet);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--violet);
  margin: 0 auto 18px;
}
.tl-step h4 { font-size: .98rem; font-weight: 700; margin-bottom: 6px; }
.tl-step p { font-size: .85rem; color: var(--ink3); }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; gap: 32px; }
  .timeline::before { display: none; }
}

/* ── Pricing / engagement cards ── */
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column;
}
.price-card.featured { border-color: var(--violet); background: linear-gradient(180deg, rgba(139,92,246,.08), var(--surface) 40%); position: relative; }
.price-card .badge-pop {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--violet); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 14px; border-radius: 20px;
}
.price-card .stage-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--violet); margin-bottom: 10px; }
.price-card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.price-card .price { font-size: 2rem; font-weight: 800; margin: 10px 0 4px; }
.price-card .price span { font-size: .95rem; font-weight: 500; color: var(--ink3); }
.price-card ul { list-style: none; margin: 20px 0 24px; flex-grow: 1; }
.price-card li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink2); margin-bottom: 12px; }
.price-card li::before { content: "✓"; color: var(--teal); font-weight: 800; flex-shrink: 0; }

/* ── Badges ── */
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; }
.badge { font-size: .76rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; }
.badge-green  { background: rgba(34,197,94,.15); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.badge-blue   { background: rgba(59,130,246,.15); color: var(--blue); border: 1px solid rgba(59,130,246,.3); }
.badge-purple { background: rgba(139,92,246,.15); color: var(--violet); border: 1px solid rgba(139,92,246,.3); }
.badge-amber  { background: rgba(245,158,11,.15); color: var(--amber); border: 1px solid rgba(245,158,11,.3); }
.badge-teal   { background: rgba(20,184,166,.15); color: var(--teal); border: 1px solid rgba(20,184,166,.3); }

/* ── Founder row ── */
.founder-row { display: grid; grid-template-columns: 2.6fr 1fr; gap: 32px; align-items: center; margin-bottom: 48px; }
@media (max-width: 760px) { .founder-row { grid-template-columns: 1fr; } }
.founder-bio h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 12px; }
.founder-bio p { color: var(--ink2); font-size: .98rem; margin-bottom: 12px; }
.cosmo-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px; text-align: center; max-width: 168px; margin: 0 auto;
}
.cosmo-card img { border-radius: 6px; margin-bottom: 8px; width: 100%; }
.cosmo-card p { font-size: .72rem; color: var(--ink3); margin: 0; line-height: 1.35; }

/* ── Callouts ── */
.callout { border-radius: var(--radius); padding: 18px 22px; border-left: 3px solid var(--teal); background: rgba(20,184,166,.08); display: flex; gap: 14px; align-items: flex-start; }
.callout p { color: var(--ink2); font-size: .95rem; margin: 0; }
.callout .callout-title { font-weight: 700; margin-bottom: 4px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--teal); }

/* ── Logo strip (portfolio) ── */
.logo-strip { display: flex; justify-content: center; align-items: center; gap: 48px; flex-wrap: wrap; opacity: .9; }
.logo-strip .item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo-strip .item .name { font-weight: 800; font-size: 1.1rem; }
.logo-strip .item .tag { font-size: .74rem; color: var(--ink3); }

/* ── CTA band ── */
.cta-band { text-align: center; padding: 90px 24px; background: linear-gradient(180deg, var(--surface2), var(--bg)); border-top: 1px solid var(--border); }
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 14px; }
.cta-band p { color: var(--ink3); margin-bottom: 30px; }

/* ── Footer ── */
.footer { background: var(--surface2); border-top: 1px solid var(--border); padding: 40px 24px 28px; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 28px; }
.footer-brand { max-width: 320px; }
.footer-brand .brand-main { font-weight: 800; font-size: 1rem; margin-bottom: 8px; display: block; }
.footer-brand p { color: var(--muted); font-size: .84rem; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink3); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--muted); font-size: .87rem; text-decoration: none; margin-bottom: 10px; }
.footer-col a:hover { color: var(--ink2); }
.footer-bottom { max-width: var(--max); margin: 32px auto 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
