@import url('./tokens.css');

/* =========================================================================
   CEGA I.T. — AI-first site
   Extends design-system tokens with page-level structure.
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-1);
  color: var(--fg-2);
  overflow-x: hidden;
}

::selection { background: var(--cegait-blue-700); color: white; }

a { color: inherit; }

/* ---------- Layout primitives ---------- */
.container-xl {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.section {
  padding: clamp(72px, 11vh, 140px) 0;
}

.section-tight { padding: clamp(48px, 7vh, 96px) 0; }

/* ---------- Typography helpers ---------- */
.display-xxl {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 8.5vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--cegait-blue-700);
  margin: 0;
}
.display-xxl em {
  font-style: normal;
  color: var(--cegait-blue-500);
  position: relative;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--cegait-blue-700);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px; height: 1px;
  background: currentColor;
  display: inline-block;
}
.eyebrow.on-dark { color: rgba(255,255,255,0.7); }

.lead {
  font-size: clamp(18px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--cegait-gray-700);
  max-width: 60ch;
  text-wrap: pretty;
}

h2.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--cegait-blue-700);
  margin: 0 0 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: all 200ms var(--ease-out);
  border-radius: 2px;
  white-space: nowrap;
}
.btn-primary {
  background: var(--cegait-blue-700);
  color: white;
}
.btn-primary:hover {
  background: white;
  color: var(--cegait-blue-700);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(10,60,100,0.25);
}
.btn-primary:hover svg { color: var(--cegait-blue-700); }

/* Primary button on dark backgrounds (e.g. CTA band on blue-700) */
.btn-primary.on-dark {
  background: white;
  color: var(--cegait-blue-700);
}
.btn-primary.on-dark:hover {
  background: var(--cegait-blue-50);
  color: var(--cegait-blue-800);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.btn-primary.on-dark:hover svg { color: var(--cegait-blue-800); }
.btn-ghost {
  background: transparent;
  color: var(--cegait-blue-700);
  border: 1.5px solid var(--cegait-blue-700);
}
.btn-ghost:hover {
  background: var(--cegait-blue-700);
  color: white;
}
.btn-ghost.on-dark {
  color: white;
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost.on-dark:hover {
  background: white;
  color: var(--cegait-blue-800);
}
.btn-wa {
  background: #25D366;
  color: white;
}
.btn-wa:hover {
  background: #20BA5A;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37,211,102,0.35);
}
.btn .arrow {
  display: inline-block;
  transition: transform 200ms var(--ease-out);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: all 240ms var(--ease-out);
  backdrop-filter: blur(0px);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 1px 0 rgba(10,60,100,0.08);
}
.navbar .nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.navbar .brand img { height: 52px; display: block; }
.navbar .nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navbar .nav-links a {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cegait-blue-700);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  cursor: pointer;
}
.navbar .nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--cegait-blue-700);
  transition: width 200ms var(--ease-out);
}
.navbar .nav-links a:hover::after,
.navbar .nav-links a.active::after { width: 100%; }
.navbar .nav-links a.active { color: var(--cegait-blue-800); }

.navbar-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.navbar-mobile-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--cegait-blue-700);
  margin: 4px 0;
  transition: all 200ms;
}

@media (max-width: 860px) {
  .navbar .nav-links { display: none; }
  .navbar .btn-wa { display: none; }
  .navbar-mobile-toggle { display: block; }
  .navbar.mobile-open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    background: white;
    padding: 24px;
    gap: 20px;
    box-shadow: var(--cegait-shadow-md);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px 0 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFD 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 2;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}
.hero-copy .eyebrow { margin-bottom: 28px; }
.hero-copy h1 { margin: 0 0 28px; }
.hero-copy .lead { margin-bottom: 40px; }
.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-canvas-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 560px;
  justify-self: end;
}
@media (max-width: 960px) {
  .hero-canvas-wrap { justify-self: center; max-width: 420px; }
}

/* ---------- Ticker (agent log) ---------- */
.agent-ticker {
  margin-top: 40px;
  padding: 18px 20px;
  background: white;
  border: 1px solid var(--cegait-gray-200);
  border-left: 3px solid var(--cegait-blue-700);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--cegait-gray-700);
  max-width: 520px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 12px;
}
.agent-ticker .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cegait-success);
  box-shadow: 0 0 0 0 rgba(31,138,76,0.7);
  animation: pulse 1.6s infinite;
  flex-shrink: 0;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(31,138,76,0.6); }
  70% { box-shadow: 0 0 0 10px rgba(31,138,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,138,76,0); }
}

/* ---------- Metrics strip ---------- */
.metrics-strip {
  background: var(--cegait-blue-700);
  color: white;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}
.metrics-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 1px, transparent 1px),
    radial-gradient(circle at 70% 70%, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 80px 80px, 120px 120px;
  pointer-events: none;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 48px;
  position: relative;
  z-index: 2;
}
@media (max-width: 760px) { .metrics-grid { grid-template-columns: repeat(2,1fr); gap: 32px; } }
.metric .val {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 5.5vw, 80px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: white;
  margin-bottom: 12px;
}
.metric .val .unit {
  font-size: 0.5em;
  color: rgba(255,255,255,0.7);
  margin-left: 4px;
}
.metric .label {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
  max-width: 24ch;
}

/* ---------- Service cards (AI) ---------- */
.services-ai-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.service-tile {
  position: relative;
  padding: 32px;
  background: white;
  border: 1px solid var(--cegait-gray-200);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 340px;
  overflow: hidden;
  cursor: default;
  transition: all 300ms var(--ease-out);
}
.service-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cegait-blue-700);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}
.service-tile:hover {
  border-color: var(--cegait-blue-700);
  transform: translateY(-4px);
  box-shadow: var(--cegait-shadow-lg);
  background: var(--cegait-blue-700);
  color: white;
  z-index: 2;
}
.service-tile:not(.feature):hover { min-height: 420px; }
.service-tile:hover h3 { color: white; }
.service-tile:hover p { color: rgba(255,255,255,0.85); }
.service-tile:hover .tile-num { color: rgba(255,255,255,0.6); }
.service-tile:hover .tile-icon { color: white; }
.service-tile:hover .tile-foot { color: white; }
.service-tile:hover::before { background: white; }
.service-tile:hover::before { transform: scaleX(1); }
.service-tile .tile-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cegait-gray-500);
  letter-spacing: 0.1em;
}
.service-tile h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.05;
  color: var(--cegait-blue-700);
  margin: 0;
}
.service-tile p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--cegait-gray-700);
  margin: 0;
  flex-grow: 1;
}
.service-tile .tile-icon {
  height: 56px;
  width: 56px;
  color: var(--cegait-blue-700);
}
.service-tile .tile-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--cegait-blue-700);
  margin-top: auto;
}

/* Grid layouts for service tiles */
.service-tile.span-6 { grid-column: span 6; }
.service-tile.span-4 { grid-column: span 4; }
.service-tile.span-3 { grid-column: span 3; }
.service-tile.span-8 { grid-column: span 8; }
.service-tile.span-12 { grid-column: span 12; }
@media (max-width: 900px) {
  .service-tile.span-6, .service-tile.span-4,
  .service-tile.span-3, .service-tile.span-8,
  .service-tile.span-12 { grid-column: span 12; }
}

.service-tile.feature {
  background: var(--cegait-blue-700);
  color: white;
  border: none;
  min-height: 420px;
}
.service-tile.feature::before { background: white; }
.service-tile.feature h3 { color: white; }
.service-tile.feature p { color: rgba(255,255,255,0.85); }
.service-tile.feature .tile-num { color: rgba(255,255,255,0.6); }
.service-tile.feature .tile-icon { color: white; }
.service-tile.feature .tile-foot { color: white; }

.service-tile.expanded {
  border-color: var(--cegait-blue-700);
  box-shadow: var(--cegait-shadow-lg);
  transform: translateY(-4px);
}
.service-tile.is-hidden {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
  max-height: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  overflow: hidden;
  visibility: hidden;
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out), max-height 320ms var(--ease-out), padding 280ms var(--ease-out), visibility 0s linear 320ms;
}
.svc-row.svc-highlight, .svc-highlight {
  background: var(--cegait-blue-50);
  animation: svcPulse 2s var(--ease-out);
}
@keyframes svcPulse {
  0%, 100% { background: transparent; }
  15%, 70% { background: var(--cegait-blue-50); }
}
.service-tile.expanded::before { transform: scaleX(1); }
.tile-chev { display: inline-flex; transition: transform 200ms var(--ease-out); }
.tile-chev.open { transform: rotate(90deg); }
.tile-detail {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--cegait-gray-200);
  animation: tileExpand 280ms var(--ease-out);
  font-size: 14px;
  line-height: 1.55;
  color: var(--cegait-gray-700);
}
.service-tile.feature .tile-detail { border-top-color: rgba(255,255,255,0.2); color: rgba(255,255,255,0.9); }
.tile-detail-cap {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cegait-gray-500);
  margin-bottom: 8px;
}
.service-tile.feature .tile-detail-cap { color: rgba(255,255,255,0.6); }
.tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cegait-blue-700);
  cursor: pointer;
  border-bottom: 1.5px solid var(--cegait-blue-700);
  padding-bottom: 3px;
}
.service-tile.feature .tile-cta { color: white; border-bottom-color: white; }
@keyframes tileExpand {
  from { opacity: 0; transform: translateY(-4px); max-height: 0; }
  to { opacity: 1; transform: none; max-height: 300px; }
}

/* ---------- Floating Chat Widget ---------- */
.chat-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--cegait-blue-700);
  color: white;
  border: none;
  cursor: pointer;
  z-index: 150;
  box-shadow: 0 8px 24px rgba(10,60,100,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms var(--ease-out);
}
.chat-fab:hover { transform: scale(1.08); }
.chat-fab svg { width: 26px; height: 26px; }
.chat-fab .notify-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 10px; height: 10px;
  background: #25D366;
  border-radius: 50%;
  border: 2px solid var(--cegait-blue-700);
  animation: pulse 1.6s infinite;
}
.chat-widget {
  position: fixed;
  bottom: 24px; right: 24px;
  width: min(380px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 48px));
  background: white;
  border: 1px solid var(--cegait-gray-200);
  box-shadow: 0 20px 60px rgba(10,60,100,0.25);
  z-index: 150;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: chatOpen 240ms var(--ease-out);
}
@keyframes chatOpen {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.chat-widget-head {
  background: var(--cegait-blue-700);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-widget-head .avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-widget-head .avatar svg { width: 20px; height: 20px; }
.chat-widget-head .name { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.1; }
.chat-widget-head .status { font-size: 11px; color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 6px; }
.chat-widget-head .status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #25D366; display: inline-block;
}
.chat-widget-head .close {
  margin-left: auto;
  background: none; border: none; color: white;
  cursor: pointer; font-size: 22px; line-height: 1;
  padding: 4px 8px;
}
.chat-widget-msgs {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--cegait-off-white);
}
.chat-widget-msgs .m {
  max-width: 85%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 4px;
}
.chat-widget-msgs .m.bot {
  align-self: flex-start;
  background: white;
  color: var(--cegait-gray-700);
  border-left: 2px solid var(--cegait-blue-700);
  white-space: pre-wrap;
}
.chat-widget-msgs .m.user {
  align-self: flex-end;
  background: var(--cegait-blue-700);
  color: white;
}
.chat-widget-msgs .m.bot .cursor {
  display: inline-block;
  width: 6px; height: 14px;
  background: var(--cegait-blue-700);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 0.8s infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.chat-widget-quick {
  padding: 0 14px 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--cegait-off-white);
}
.chat-widget-quick button {
  font-size: 11px;
  padding: 6px 10px;
  background: white;
  border: 1px solid var(--cegait-gray-200);
  color: var(--cegait-blue-700);
  cursor: pointer;
  font-family: var(--font-body);
  border-radius: 2px;
  transition: all 150ms;
}
.chat-widget-quick button:hover {
  background: var(--cegait-blue-700);
  color: white;
  border-color: var(--cegait-blue-700);
}
.chat-widget-form {
  display: flex;
  border-top: 1px solid var(--cegait-gray-200);
  background: white;
}
.chat-widget-form input {
  flex: 1;
  border: none;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--cegait-blue-700);
  outline: none;
  background: transparent;
}
.chat-widget-form button {
  border: none;
  background: var(--cegait-blue-700);
  color: white;
  padding: 0 18px;
  cursor: pointer;
  font-size: 16px;
}
.chat-widget-form button:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-widget-progress {
  height: 3px;
  background: var(--cegait-gray-200);
  position: relative;
  overflow: hidden;
}
.chat-widget-progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, var(--cegait-blue-700), #4A90E2);
  transition: width 420ms var(--ease-out);
}
.chat-widget-msgs .m.summary {
  background: var(--cegait-blue-700);
  color: white;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  align-self: stretch;
  max-width: 100%;
  padding: 14px 16px;
  white-space: pre-wrap;
}
.chat-widget-done-actions {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
}
.chat-widget-done-actions button,
.chat-widget-done-actions a {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border: 1px solid var(--cegait-gray-200);
  background: white;
  color: var(--cegait-blue-700);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--font-body);
  transition: border-color 180ms, background 180ms;
}
.chat-widget-done-actions button:hover,
.chat-widget-done-actions a:hover {
  border-color: var(--cegait-blue-700);
  background: var(--cegait-blue-50);
}

/* ---------- Model Engineering differentiator ---------- */
.model-eng-section {
  background: var(--cegait-blue-700);
  color: white;
  position: relative;
  overflow: hidden;
}
.model-eng-section::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 60%; height: 140%;
  background: radial-gradient(ellipse at center, rgba(93, 184, 184, 0.18) 0%, transparent 55%);
  pointer-events: none;
}
.model-eng-section::after {
  content: "";
  position: absolute;
  bottom: -40%; left: -15%;
  width: 60%; height: 120%;
  background: radial-gradient(ellipse at center, rgba(74, 144, 226, 0.14) 0%, transparent 55%);
  pointer-events: none;
}
.model-eng {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}
.model-eng-head .model-eng-lead {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  margin: 0 0 16px;
  max-width: 55ch;
}
.model-eng-head .model-eng-lead strong {
  color: white;
  font-weight: 600;
}
.model-eng-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.model-pill {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 24px;
  transition: background 280ms var(--ease-out), border-color 280ms var(--ease-out), transform 280ms var(--ease-out);
  cursor: default;
}
.model-pill:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}
.model-pill-cap {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.model-pill-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 8px;
  color: white;
  letter-spacing: -0.01em;
}
.model-pill-desc {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
}
.model-eng-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.model-eng-stats .v {
  font-family: var(--font-display);
  font-size: clamp(44px, 5vw, 72px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: white;
  margin-bottom: 10px;
}
.model-eng-stats .l {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,0.7);
  max-width: 26ch;
}
@media (max-width: 900px) {
  .model-eng { grid-template-columns: 1fr; gap: 40px; }
  .model-eng-pills { grid-template-columns: 1fr; }
  .model-eng-stats { grid-template-columns: 1fr; gap: 28px; }
}

/* Legacy services — muted style */
.legacy-section {
  background: var(--cegait-off-white);
  border-top: 1px solid var(--cegait-gray-200);
  border-bottom: 1px solid var(--cegait-gray-200);
}
.legacy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--cegait-gray-200);
}
.legacy-item {
  padding: 32px 24px;
  border-right: 1px solid var(--cegait-gray-200);
  border-bottom: 1px solid var(--cegait-gray-200);
}
.legacy-item:last-child { border-right: none; }
.legacy-item h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--cegait-blue-700);
  margin: 0 0 8px;
}
.legacy-item p {
  font-size: 13px;
  color: var(--cegait-gray-500);
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 900px) { .legacy-grid { grid-template-columns: repeat(2,1fr); } .legacy-item:nth-child(2) { border-right: none; } }
@media (max-width: 560px) { .legacy-grid { grid-template-columns: 1fr; } .legacy-item { border-right: none; } }

/* ---------- Cases ---------- */
.case-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border: 1px solid var(--cegait-gray-200);
  overflow: hidden;
  transition: all 300ms var(--ease-out);
}
.case-card:hover {
  border-color: var(--cegait-blue-300);
  box-shadow: var(--cegait-shadow-lg);
  transform: translateY(-2px);
}
.case-card .case-visual {
  background: var(--cegait-blue-700);
  color: white;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}
.case-card .case-visual::after {
  content: "";
  position: absolute;
  top: -50%; right: -30%;
  width: 120%; height: 180%;
  background: radial-gradient(ellipse at center, rgba(74, 144, 226, 0.22) 0%, transparent 55%);
  pointer-events: none;
}
.case-headline {
  position: relative;
  z-index: 1;
}
.case-headline-v {
  font-family: var(--font-display);
  font-size: clamp(72px, 10vw, 128px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: white;
  margin-bottom: 16px;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.case-headline-l {
  font-size: 15px;
  line-height: 1.35;
  color: rgba(255,255,255,0.78);
  max-width: 28ch;
  font-weight: 500;
}
.case-card .case-body { padding: 48px; }
.case-card .sector {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cegait-gray-500);
  margin-bottom: 12px;
}
.case-card h3 {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--cegait-blue-700);
  margin: 0 0 16px;
  line-height: 1.05;
}
.case-card .summary {
  font-size: 15px;
  line-height: 1.55;
  color: var(--cegait-gray-700);
  margin: 0 0 24px;
}
.case-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--cegait-gray-200);
}
.case-metric .v {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  color: var(--cegait-blue-700);
  line-height: 1;
  margin-bottom: 6px;
}
.case-metric .l {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cegait-gray-500);
}
@media (max-width: 800px) {
  .case-card { grid-template-columns: 1fr; }
  .case-card .case-visual, .case-card .case-body { padding: 32px; }
}

/* ---------- Footer ---------- */
footer.site {
  background: var(--cegait-blue-800);
  color: white;
  padding: 80px 0 24px;
  position: relative;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

footer.site h5 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  margin: 0 0 20px;
}
footer.site ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
footer.site a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.85;
  transition: opacity 150ms;
  cursor: pointer;
}
footer.site a:hover { opacity: 1; }
footer.site .brand-col img { height: 56px; margin-bottom: 20px; }
footer.site .brand-col p {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin: 0;
  max-width: 36ch;
  line-height: 1.55;
}
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 12px;
}

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

/* ---------- Page transitions ---------- */
.page-enter {
  animation: pageEnter 500ms var(--ease-out) both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- ROI calculator ---------- */
.roi-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  background: white;
  border: 1px solid var(--cegait-gray-200);
  padding: 48px;
}
@media (max-width: 900px) { .roi-wrap { grid-template-columns: 1fr; padding: 28px; gap: 28px; } }

.roi-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.roi-control label {
  font-size: 13px;
  font-weight: 700;
  color: var(--cegait-blue-700);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.roi-control label .v {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cegait-blue-700);
}
.roi-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--cegait-gray-200);
  outline: none;
  border-radius: 2px;
}
.roi-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cegait-blue-700);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--cegait-blue-700);
  transition: transform 150ms;
}
.roi-control input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.15); }
.roi-control input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cegait-blue-700);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 0 0 1px var(--cegait-blue-700);
}
.roi-result {
  background: var(--cegait-blue-700);
  color: white;
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.roi-result .big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: white;
  margin: 8px 0 4px;
}
.roi-result .big .currency { font-size: 0.45em; color: rgba(255,255,255,0.7); margin-right: 6px; vertical-align: top; }
.roi-result .cap { font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.65); }
.roi-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.roi-secondary .val {
  font-family: var(--font-display);
  font-size: 32px;
  color: white;
  line-height: 1;
  margin-bottom: 6px;
}
.roi-secondary .lbl {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- Process / Methodology steps ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 900px) { .process-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .process-grid { grid-template-columns: 1fr; } }
.process-step {
  padding: 36px 28px;
  border-right: 1px solid var(--cegait-gray-200);
  position: relative;
  transition: background 320ms var(--ease-out), transform 320ms var(--ease-out);
  cursor: default;
  overflow: hidden;
}
.process-step::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--step-accent, var(--cegait-blue-700)) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 320ms var(--ease-out);
  pointer-events: none;
}
.process-step:hover::before { opacity: 0.08; }
.process-step:hover {
  transform: translateY(-4px);
  background: var(--cegait-off-white);
}
.process-step > * { position: relative; z-index: 1; }
.process-step:nth-child(1) { --step-accent: #0A3C64; }
.process-step:nth-child(2) { --step-accent: #1D6AAE; }
.process-step:nth-child(3) { --step-accent: #3A8DD8; }
.process-step:nth-child(4) { --step-accent: #5DB8B8; }
.process-step .num {
  transition: color 320ms var(--ease-out), transform 320ms var(--ease-out), letter-spacing 320ms var(--ease-out);
}
.process-step:hover .num {
  color: var(--step-accent);
  transform: scale(1.15);
  transform-origin: left center;
}
.process-step:hover h4 { color: var(--step-accent); }
.process-step:last-child { border-right: none; }
.process-step .num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  color: var(--cegait-blue-100);
  line-height: 1;
  margin-bottom: 12px;
}
.process-step h4 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cegait-blue-700);
  margin: 0 0 12px;
  transition: color 320ms var(--ease-out);
}
.process-step p {
  font-size: 14px;
  color: var(--cegait-gray-700);
  line-height: 1.55;
  margin: 0;
}

/* ---------- Visão / Missão / Valores cards ---------- */
.vmv-card {
  --vmv-accent: var(--cegait-blue-700);
  --vmv-bg: white;
  --vmv-fg: var(--cegait-gray-700);
  --vmv-eyebrow: var(--cegait-gray-500);
  background: var(--vmv-bg);
  color: var(--vmv-fg);
  padding: 32px;
  border: 1px solid var(--cegait-gray-200);
  position: relative;
  overflow: hidden;
  transition: transform 360ms var(--ease-out), border-color 360ms var(--ease-out), box-shadow 360ms var(--ease-out), background 360ms var(--ease-out), color 360ms var(--ease-out);
  cursor: default;
}
.vmv-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--vmv-accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 420ms var(--ease-out);
}
.vmv-card:hover::before { transform: scaleY(1); }
.vmv-card:hover {
  transform: translateY(-4px);
  border-color: var(--vmv-accent);
  box-shadow: 0 16px 40px -20px color-mix(in oklab, var(--vmv-accent) 60%, transparent);
  background: var(--vmv-accent);
  color: white;
  --vmv-eyebrow: rgba(255,255,255,0.75);
}
.vmv-card .vmv-eyebrow {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--vmv-eyebrow);
  margin-bottom: 12px;
  font-family: var(--font-mono);
  transition: color 360ms var(--ease-out);
}
.vmv-card p {
  font-size: 18px;
  line-height: 1.5;
  margin: 0;
  color: inherit;
}
.vmv-visao  { --vmv-accent: #0A3C64; }
.vmv-missao { --vmv-accent: #1D6AAE; }
.vmv-valores{ --vmv-accent: #3A8DD8; }

/* ---------- Bento / Feature highlight ---------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: 280px 280px;
  gap: 16px;
}
.bento-cell {
  background: white;
  border: 1px solid var(--cegait-gray-200);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bento-cell.dark {
  background: var(--cegait-blue-700);
  color: white;
  border: none;
}
.bento-cell h4 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--cegait-blue-700);
}
.bento-cell.dark h4 { color: white; }
.bento-cell p { font-size: 14px; margin: 0; }
.bento-cell .cap {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cegait-gray-500);
  margin-bottom: 12px;
}
.bento-cell.dark .cap { color: rgba(255,255,255,0.55); }
@media (max-width: 900px) { .bento-grid { grid-template-columns: repeat(2,1fr); grid-template-rows: auto; } }

/* ---------- Chat demo ---------- */
.chat-demo {
  background: white;
  border: 1px solid var(--cegait-gray-200);
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 420px;
  overflow: hidden;
}
.chat-demo .head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--cegait-gray-200);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cegait-gray-500);
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-demo .head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cegait-success); }
.chat-demo .msgs {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.msg {
  max-width: 78%;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 4px;
}
.msg.user {
  align-self: flex-end;
  background: var(--cegait-blue-700);
  color: white;
}
.msg.bot {
  align-self: flex-start;
  background: var(--cegait-gray-100);
  color: var(--cegait-gray-700);
  border-left: 2px solid var(--cegait-blue-700);
}
.msg.source {
  font-size: 11px;
  color: var(--cegait-gray-500);
  align-self: flex-start;
  font-family: var(--font-mono);
  padding-left: 14px;
}
.chat-typing {
  display: inline-flex; gap: 3px;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cegait-gray-500);
  animation: typing 1.3s infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- Integrations marquee ---------- */
.integrations {
  background: var(--cegait-off-white);
  padding: 48px 0;
  overflow: hidden;
  border-top: 1px solid var(--cegait-gray-200);
  border-bottom: 1px solid var(--cegait-gray-200);
}
.integration-track {
  display: flex;
  gap: 64px;
  animation: scroll-left 30s linear infinite;
  white-space: nowrap;
}
@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.integration-item {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  color: var(--cegait-blue-500);
  letter-spacing: -0.01em;
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity 200ms;
}
.integration-item:hover { opacity: 1; }

/* ---------- Contact cards ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  background: white;
  border: 1px solid var(--cegait-gray-200);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 240ms var(--ease-out);
}
.contact-card:hover {
  border-color: var(--cegait-blue-700);
  transform: translateY(-2px);
  box-shadow: var(--cegait-shadow-md);
}
.contact-card .ic {
  width: 40px; height: 40px;
  color: var(--cegait-blue-700);
}
.contact-card .cap { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--cegait-gray-500); }
.contact-card .v { font-family: var(--font-display); font-size: 22px; color: var(--cegait-blue-700); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 160px 0 80px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFD 100%);
  border-bottom: 1px solid var(--cegait-gray-200);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--cegait-blue-700);
  margin: 0 0 20px;
}
.page-hero .lead { max-width: 640px; font-size: clamp(17px, 1.3vw, 20px); }

/* ---------- Tweaks panel ---------- */
.tweaks-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 300px;
  background: white;
  border: 1px solid var(--cegait-gray-200);
  padding: 20px;
  z-index: 200;
  box-shadow: var(--cegait-shadow-lg);
  font-family: var(--font-body);
  display: none;
}
.tweaks-panel.open { display: block; }
.tweaks-panel h5 {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cegait-gray-500);
  margin: 0 0 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tweaks-panel .tweak-row { margin-bottom: 14px; }
.tweaks-panel .tweak-row label {
  display: flex; justify-content: space-between;
  font-size: 12px; color: var(--cegait-blue-700);
  font-weight: 700;
  margin-bottom: 6px;
}
.tweaks-panel select, .tweaks-panel input[type=color] {
  width: 100%; padding: 6px 8px;
  border: 1px solid var(--cegait-gray-200);
  background: white;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--cegait-blue-700);
}
.tweaks-panel .swatch-row {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.tweaks-panel .swatch {
  width: 28px; height: 28px; cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 150ms;
}
.tweaks-panel .swatch.active { border-color: var(--cegait-blue-700); }
