/* ============================================================
   Capitalxen — styles
   Palette derived from the original site's tokens:
   navy #1d2538 / #2b3a5c / #252b3a, blue #3b79f8 / #548af9,
   orange #ff9900, grays #575d6c / #f5f5f6 / #dfe1e6
   ============================================================ */

:root {
  --navy-900: #1d2538;
  --navy-800: #252b3a;
  --navy-700: #2b3a5c;
  --blue: #3b79f8;
  --blue-light: #548af9;
  --orange: #ff9900;
  --ink: #252b3a;
  --muted: #575d6c;
  --line: #dfe1e6;
  --bg-soft: #f5f5f6;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --shadow-sm: 0 2px 10px rgba(29, 37, 56, .06);
  --shadow-md: 0 18px 40px rgba(29, 37, 56, .10);
  --shadow-blue: 0 18px 44px rgba(59, 121, 248, .28);
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "DIN Alternate", "Oswald", var(--font);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; padding: 15px 26px; }
.btn-primary {
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-light) 100%);
  color: #fff;
  box-shadow: var(--shadow-blue);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(59, 121, 248, .38); }
.btn-ghost {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  border-color: rgba(255, 255, 255, .35);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 18px 0;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line);
  padding: 12px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { display: inline-flex; }
.brand-name {
  font-size: 21px;
  letter-spacing: -.02em;
  color: #fff;
  transition: color .3s ease;
}
.scrolled .brand-name { color: var(--ink); }

.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links > a {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, .82);
  transition: color .2s ease;
  position: relative;
}
.nav-links > a:not(.nav-cta):hover { color: #fff; }
.scrolled .nav-links > a { color: var(--muted); }
.scrolled .nav-links > a:not(.nav-cta):hover { color: var(--blue); }
.nav-cta { color: #fff !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease, background .3s ease;
}
.scrolled .nav-toggle span { background: var(--ink); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 190px 0 130px;
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(59, 121, 248, .25) 0%, transparent 30%),
    radial-gradient(circle at 85% 30%, rgba(255, 153, 0, .12) 0%, transparent 28%),
    radial-gradient(circle at 70% 90%, rgba(59, 121, 248, .18) 0%, transparent 35%);
  pointer-events: none;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
}
.hero-inner { position: relative; text-align: center; max-width: 860px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  margin: 0 0 22px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #cfe0ff;
  background: rgba(59, 121, 248, .16);
  border: 1px solid rgba(59, 121, 248, .35);
  border-radius: 999px;
}
.hero-title {
  margin: 0 0 22px;
  font-size: clamp(34px, 5.6vw, 60px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
  background: linear-gradient(90deg, #fff 0%, #e0e6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 0 auto 38px;
  max-width: 680px;
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(255, 255, 255, .78);
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Section scaffolding ---------- */
.section { padding: 100px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
}
.section-title.light, .section-sub.light { color: #fff; }
.section-sub { margin: 0; font-size: 17px; color: var(--muted); }
.section-sub.light { color: rgba(255, 255, 255, .72); }

/* ---------- Products ---------- */
.products { background: var(--bg-soft); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(59, 121, 248, .4);
}
.card-icon {
  width: 54px; height: 54px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px;
  color: var(--blue);
  background: rgba(59, 121, 248, .1);
  margin-bottom: 20px;
}
.card:hover .card-icon { background: var(--blue); color: #fff; }
.card h3 { margin: 0 0 10px; font-size: 20px; font-weight: 650; color: var(--ink); }
.card p { margin: 0; font-size: 15px; color: var(--muted); }

/* ---------- Use cases (tabs) ---------- */
.use-cases {
  background: linear-gradient(120deg, var(--navy-900) 0%, var(--navy-700) 100%);
  position: relative;
  overflow: hidden;
}
.use-cases::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(59, 121, 248, .2) 0%, transparent 40%);
  pointer-events: none;
}
.tabs { position: relative; }
.tab-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.tab-btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, .7);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 13px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s ease;
}
.tab-btn:hover { color: #fff; border-color: rgba(255, 255, 255, .4); }
.tab-btn.is-active {
  color: #fff;
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-light) 100%);
  border-color: transparent;
  box-shadow: var(--shadow-blue);
}
.tab-panels { max-width: 860px; margin: 0 auto; }
.tab-panel {
  position: relative;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 44px 48px;
  text-align: center;
  animation: fade-in .4s ease;
}
.tab-panel[hidden] { display: none; }
.tab-index {
  font-family: var(--font-num);
  font-size: 56px;
  font-weight: 700;
  color: rgba(59, 121, 248, .35);
  line-height: 1;
}
.tab-panel h3 { margin: 12px 0 16px; font-size: 26px; font-weight: 650; color: #fff; }
.tab-panel p { margin: 0; font-size: 17px; color: rgba(255, 255, 255, .78); }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Capabilities ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}
.cap-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cap-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cap-icon {
  width: 50px; height: 50px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(120deg, var(--blue) 0%, var(--blue-light) 100%);
  margin-bottom: 18px;
}
.cap-card h3 { margin: 0 0 18px; font-size: 20px; font-weight: 650; color: var(--ink); }
.cap-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--muted);
}
.cap-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 16px; height: 16px;
  background: rgba(59, 121, 248, .12);
  border-radius: 50%;
}
.cap-list li::after {
  content: "";
  position: absolute;
  left: 5px; top: 9px;
  width: 5px; height: 8px;
  border: solid var(--blue);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 44px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
  text-align: center;
}
.stat-num {
  display: block;
  font-family: var(--font-num);
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #fff 0%, #cfe0ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { font-size: 15px; color: rgba(255, 255, 255, .72); }

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(59, 121, 248, .18) 0%, transparent 40%);
  pointer-events: none;
}
.contact-grid {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.contact-form {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-md);
}
.contact-form h3 { margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--ink); }
.form-note { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 500; color: var(--ink); }
.field > span i { color: var(--blue); font-style: normal; }
.field input,
.field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fafbfc;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(59, 121, 248, .15);
}
.field input.invalid,
.field textarea.invalid { border-color: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }
.form-status { margin: 14px 0 0; font-size: 14px; min-height: 20px; }
.form-status.ok { color: #1a7f5a; }
.form-status.err { color: #e5484d; }

/* Honeypot: visually hidden, kept in the DOM for bots */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .7); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px 80px;
  padding: 66px 24px 48px;
}
.footer-brand .brand { margin-bottom: 18px; }
.footer-brand .brand-name { color: #fff; }
.footer-desc { margin: 0; font-size: 15px; max-width: 380px; line-height: 1.7; }
.footer-col h4 { margin: 0 0 18px; font-size: 16px; color: #fff; font-weight: 600; }
.footer-col ul li { margin-bottom: 12px; font-size: 15px; }
.footer-col ul li a:hover { color: var(--blue-light); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom .container { padding-top: 22px; padding-bottom: 22px; }
.footer-bottom p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .55); text-align: center; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    padding: 16px 24px 24px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid var(--line);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links > a { color: var(--ink); padding: 12px 6px; border-radius: 8px; }
  .nav-links > a:not(.nav-cta):hover { background: var(--bg-soft); color: var(--blue); }
  .nav-cta { margin-top: 8px; text-align: center; }
  .hero { padding: 150px 0 96px; }
  .section { padding: 72px 0; }
  .stats { grid-template-columns: 1fr; }
  .tab-panel { padding: 32px 24px; }
}

@media (max-width: 520px) {
  .card-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tab-panel { animation: none; }
}
