/* ==========================================================================
   PIVOX AI — Design System (Light)
   Overhaul: white canvas, system font stack, category dropdown navigation,
   grayscale customer-logo strip. Tokens still trace back to the brand mark:
   the blue of the logo remains the single accent thread through the site.
   ========================================================================== */

:root {
  /* Color */
  --bg: #FFFFFF;
  --bg-soft: #F7F9FC;
  --surface: #FFFFFF;
  --line: rgba(18, 26, 51, 0.09);
  --line-strong: rgba(18, 26, 51, 0.16);

  --blue-deep: #0B3FA0;
  --blue: #1C6FEE;
  --blue-bright: #1259D1;
  --cyan: #0EA5C9;
  --blue-tint: #EEF4FF;

  --text-hi: #0B0F19;
  --text: #33394A;
  --text-mute: #656D80;
  --text-faint: #9399AA;

  --success: #16814F;
  --success-tint: #E8F7EF;
  --warn: #A3590B;
  --warn-tint: #FDF1E3;

  /* legacy aliases (kept so existing per-page styles resolve correctly) */
  --ink-2: var(--bg-soft);
  --ink-3: var(--surface);

  --focus: #1C6FEE;

  --font-display: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-body: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.35rem + 0.75vw, 1.9rem);
  --step-3: clamp(2rem, 1.7rem + 1.5vw, 2.75rem);
  --step-4: clamp(2.6rem, 2.1rem + 2.4vw, 3.9rem);
  --step-5: clamp(3.4rem, 2.5rem + 4.2vw, 5.6rem);

  --container: 1200px;
  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 26px;

  --shadow-sm: 0 1px 2px rgba(18, 26, 51, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(18, 26, 51, 0.14);
  --shadow-lg: 0 24px 60px -20px rgba(18, 26, 51, 0.18);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(50vw 40vw at 85% -8%, rgba(28, 111, 238, 0.06), transparent 60%),
    radial-gradient(40vw 34vw at -8% 22%, rgba(11, 63, 160, 0.05), transparent 60%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-hi);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.mono { font-family: var(--font-mono); letter-spacing: 0.03em; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 28px;
  position: relative;
  z-index: 1;
}

section { position: relative; z-index: 1; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------- Eyebrow / labels ---------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-bright);
  font-weight: 600;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--blue);
  border-radius: 50%;
}

/* ---------------- Buttons ---------------- */
.btn {
  --pad-y: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: var(--pad-y) 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #FFFFFF;
  box-shadow: 0 10px 24px -8px rgba(28, 111, 238, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(28, 111, 238, 0.55); }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-hi);
}
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--blue-bright); }
.btn-arrow { transition: transform 0.3s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { height: 28px; width: auto; }
.brand-word { font-family: var(--font-display); font-size: 1.15rem; color: var(--text-hi); letter-spacing: -0.01em; font-weight: 600; }
.brand-word b { font-weight: 700; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links > a {
  padding: 9px 15px;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-mute);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  position: relative;
}
.nav-links > a:hover { color: var(--text-hi); background: var(--bg-soft); }
.nav-links > a.active { color: var(--text-hi); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* ---- Products dropdown / mega menu ---- */
.nav-dropdown { position: relative; }
.nav-drop-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 13px 9px 15px;
  border-radius: 999px;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-mute);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.nav-drop-trigger:hover, .nav-dropdown.open .nav-drop-trigger, .nav-drop-trigger.active { color: var(--text-hi); background: var(--bg-soft); }
.nav-drop-trigger svg { transition: transform 0.25s var(--ease); flex-shrink: 0; }
.nav-dropdown.open .nav-drop-trigger svg, .nav-dropdown:hover .nav-drop-trigger svg { transform: rotate(180deg); }

.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 620px;
  max-width: 88vw;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
  z-index: 60;
}
.nav-dropdown:hover .mega-menu,
.nav-dropdown.open .mega-menu,
.nav-dropdown:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mega-item {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 13px 14px;
  border-radius: 12px;
  transition: background 0.2s var(--ease);
}
.mega-item:hover { background: var(--bg-soft); }
.mega-item .ic {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--blue-tint);
  display: flex; align-items: center; justify-content: center;
}
.mega-item h5 { font-size: 0.92rem; font-weight: 600; color: var(--text-hi); }
.mega-item p { margin-top: 4px; font-size: 0.79rem; color: var(--text-mute); line-height: 1.45; }
.mega-item.featured { grid-column: 1 / -1; background: var(--bg-soft); border: 1px solid var(--line); }

@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    padding: 10px 20px 18px;
  }
  .nav-links.nav-links--open { display: flex; }
  .nav-links > a { padding: 12px 10px; }
  .nav-dropdown { width: 100%; }
  .nav-drop-trigger { width: 100%; justify-content: space-between; padding: 12px 10px; }
  .mega-menu {
    position: static; transform: none; width: 100%; max-width: none;
    display: none; grid-template-columns: 1fr;
    box-shadow: none; border: none; padding: 4px 0 4px 8px; opacity: 1; visibility: visible; pointer-events: auto;
  }
  .nav-dropdown.open .mega-menu { display: grid; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--line-strong); background: transparent; color: var(--text-hi);
  }
  .nav-cta .btn-ghost { display: none; }
}

/* ---------------- Footer ---------------- */
.footer {
  border-top: 1px solid var(--line);
  padding-block: 56px 34px;
  margin-top: 140px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer-brand p { color: var(--text-mute); max-width: 30ch; margin-top: 14px; font-size: var(--step--1); }
.footer h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--text-faint);
  margin-bottom: 16px;
  font-weight: 600;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer a { color: var(--text-mute); font-size: var(--step--1); transition: color 0.25s var(--ease); }
.footer a:hover { color: var(--blue-bright); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line);
  color: var(--text-faint); font-size: 0.82rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ---------------- Reveal on scroll ---------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------------- Page hero shell ---------------- */
.page-hero { padding-top: 76px; padding-bottom: 40px; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-faint); font-family: var(--font-mono); font-size: 0.78rem;
  margin-bottom: 26px; letter-spacing: 0.02em;
}
.breadcrumb a { color: var(--text-mute); }
.breadcrumb a:hover { color: var(--blue-bright); }

/* ---------------- Convergence mark (signature element) ---------------- */
.mark { --a: var(--blue-bright); --b: var(--blue); --c: var(--blue-deep); }
.mark-spin { animation: mark-rotate 34s linear infinite; transform-origin: 50% 50%; }
@keyframes mark-rotate { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mark-spin { animation: none; } }

/* ---------------- Utility ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.03em;
  color: var(--text-mute);
  background: var(--bg-soft);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.section { padding-block: 110px; }
.section-head { max-width: 640px; margin-bottom: 54px; }
.section-head h2 { margin-top: 16px; }
.section-head p.lead { margin-top: 18px; color: var(--text-mute); font-size: var(--step-1); line-height: 1.55; }

.divider { height: 1px; background: var(--line); border: none; }

@media (max-width: 700px) { .section { padding-block: 72px; } }

/* ---------------- CTA banner (shared across pages) ---------------- */
.cta-banner {
  border-radius: var(--radius-l);
  border: 1px solid var(--line-strong);
  padding: 70px 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  background: radial-gradient(120% 160% at 100% 0%, rgba(28,111,238,0.10), transparent 60%), var(--bg-soft);
  overflow: hidden;
}
.cta-banner h2 { max-width: 16ch; }
@media (max-width: 800px) { .cta-banner { flex-direction: column; align-items: flex-start; padding: 44px 28px; } }

/* ---------------- Customer logo strip ---------------- */
.logo-strip { padding-block: 56px; }
.logo-strip .strip-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 34px;
}
.logo-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 44px 56px; }
.logo-row img { height: 22px; width: auto; opacity: 0.72; filter: grayscale(100%); transition: opacity 0.3s var(--ease); }
.logo-row img:hover { opacity: 1; }
.text-logo { font-size: 1.15rem; color: var(--text-faint); transition: color 0.3s var(--ease); white-space: nowrap; }
.text-logo:hover { color: var(--text-hi); }
.text-logo.tl-celeris { font-weight: 300; letter-spacing: 0.16em; text-transform: uppercase; font-size: 1.02rem; }
.text-logo.tl-nexa { font-weight: 800; letter-spacing: -0.03em; font-style: italic; font-size: 1.28rem; }
.text-logo.tl-credi { font-weight: 700; letter-spacing: -0.01em; font-size: 1.18rem; }
.text-logo.tl-credi .dot { color: var(--blue); }
