/* ==================================================
   Codexal Modern Homepage Stylesheet (home.css)
   - Zero-bloat, 60fps GPU-accelerated animations
   - Custom High-Tech Bento Grid & Split Console Hero
   - Infinite Smooth Logo Marquee Ribbon
   - Roadmap Timeline & Interactive FAQ Accordion
   - Fully Responsive, RTL & LTR Native, Zero Layout Shifts
   All comments in English only.
================================================== */

/* ===== Scope & Tokens ===== */
:root {
  --home-glow-blue: rgba(66, 133, 244, 0.12);
  --home-glow-green: rgba(52, 168, 83, 0.10);
  --home-surface: #ffffff;
  --home-surface-subtle: #f8fafc;
  --home-border: rgba(15, 23, 42, 0.08);
  --home-border-hover: rgba(66, 133, 244, 0.35);
  --home-text-main: #090d16;
  --home-text-muted: #536479;
  --home-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --home-shadow-md: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
  --home-shadow-glow: 0 20px 48px -8px rgba(66, 133, 244, 0.16);
}

html.theme-dark {
  --home-glow-blue: rgba(66, 133, 244, 0.18);
  --home-glow-green: rgba(52, 168, 83, 0.15);
  --home-surface: #0e1626;
  --home-surface-subtle: #121c2f;
  --home-border: rgba(255, 255, 255, 0.09);
  --home-border-hover: rgba(66, 133, 244, 0.5);
  --home-text-main: #f1f5f9;
  --home-text-muted: #94a3b8;
  --home-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --home-shadow-md: 0 12px 32px -4px rgba(0, 0, 0, 0.5);
  --home-shadow-glow: 0 20px 48px -8px rgba(66, 133, 244, 0.3);
}

/* ===== Ambient Background Glows ===== */
.home-page {
  position: relative;
  overflow-x: clip;
  background-color: var(--bg);
}

.home-ambient-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 850px;
  max-width: 1400px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 650px 380px at 15% 15%, var(--home-glow-blue), transparent 70%),
    radial-gradient(ellipse 550px 320px at 85% 20%, var(--home-glow-green), transparent 70%),
    radial-gradient(ellipse 400px 250px at 50% 5%, rgba(251, 188, 5, 0.06), transparent 70%);
}

/* ===== Section Header Common ===== */
.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 44px;
}

.section-head--start {
  text-align: start;
  margin-inline: 0;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(66, 133, 244, 0.08);
  border: 1px solid rgba(66, 133, 244, 0.2);
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

html.theme-dark .section-tag {
  color: #93c5fd;
  background: rgba(66, 133, 244, 0.15);
}

.section-tag .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(66, 133, 244, 0.6);
  animation: pulse-ring 2s infinite cubic-bezier(0.45, 0, 0.2, 1);
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.22;
  margin: 0 0 14px;
  color: var(--home-text-main);
  letter-spacing: -0.01em;
}

.section-head p {
  font-size: clamp(1rem, 1.3vw, 1.14rem);
  color: var(--home-text-muted);
  line-height: 1.7;
  margin: 0;
}

/* ===== 1. High-Tech Split Hero ===== */
.home-hero {
  position: relative;
  z-index: 1;
  padding: clamp(48px, 9vw, 96px) 0 clamp(40px, 7vw, 72px);
}

.home-hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.home-hero__content {
  display: flex;
  flex-direction: column;
}

.home-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow-sm);
  width: fit-content;
  margin-bottom: 20px;
}

html.theme-dark .home-hero__status {
  background: var(--home-surface);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 2s infinite;
}

.status-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--home-text-main);
}

.home-hero__title {
  /* "Hero Arabic Fallback" keeps the Arabic heading on the same number of
     lines before Readex Pro arrives, so the swap shifts nothing (CLS). */
  font-family: "Readex Pro", "Hero Arabic Fallback", "Readex Pro Fallback", Inter, "Inter Fallback", system-ui;
  font-size: clamp(2.3rem, 4.4vw, 3.8rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--home-text-main);
}

.home-hero__title .text-gradient {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 40%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.home-hero__lead {
  font-size: clamp(1.05rem, 1.4vw, 1.24rem);
  color: var(--home-text-muted);
  line-height: 1.72;
  margin: 0 0 28px;
  max-width: 620px;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.btn-primary-glow {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 13px 26px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 24px -6px rgba(37, 99, 235, 0.45);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -6px rgba(37, 99, 235, 0.55);
}

.btn-ghost-glow {
  background: #ffffff;
  color: var(--home-text-main) !important;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 13px 24px;
  border-radius: 12px;
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

html.theme-dark .btn-ghost-glow {
  background: var(--home-surface);
}

.btn-ghost-glow:hover {
  transform: translateY(-2px);
  border-color: rgba(66, 133, 244, 0.4);
}

.home-hero__proof {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--home-border);
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--home-text-muted);
}

.proof-icon {
  width: 18px;
  height: 18px;
  color: #10b981;
  flex-shrink: 0;
}

/* Hero Tech Console Preview (100% Lightweight CSS & SVG) */
.home-hero__console {
  position: relative;
}

.tech-console {
  background: #0b1320;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  color: #e2e8f0;
  position: relative;
}

.tech-console__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-dots {
  display: flex;
  gap: 7px;
}

.console-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.console-dot--red { background: #ef4444; }
.console-dot--yellow { background: #f59e0b; }
.console-dot--green { background: #10b981; }

.console-title {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  direction: ltr;
}

.console-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.tech-console__body {
  padding: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.65;
}

.code-stream {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  /* Source code always reads left-to-right, including on RTL pages */
  direction: ltr;
  text-align: left;
}

.code-line {
  display: flex;
  gap: 12px;
}

.line-no {
  color: #475569;
  user-select: none;
  width: 20px;
  text-align: end;
}

.token-keyword { color: #f472b6; }
.token-fn { color: #60a5fa; }
.token-str { color: #34d399; }
.token-var { color: #facc15; }
.token-comment { color: #64748b; font-style: italic; }

/* Interactive AI Model Card inside Console */
.console-ai-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.console-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-engine-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ai-metric-item {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.ai-metric-label {
  font-size: 0.68rem;
  color: #64748b;
  text-transform: uppercase;
}

.ai-metric-val {
  font-size: 0.92rem;
  font-weight: 700;
  color: #e2e8f0;
}

.ai-metric-val--green { color: #34d399; }

/* Subtle floating card behind/near console */
.console-floating-tag {
  position: absolute;
  bottom: -14px;
  inset-inline-start: 18px;
  background: #ffffff;
  color: #090d16;
  border-radius: 12px;
  padding: 10px 16px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  animation: float-soft 4s ease-in-out infinite;
}

html.theme-dark .console-floating-tag {
  background: #1e293b;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.1);
}

/* ===== 2. Infinite Fluid Marquee Ticker ===== */
.home-ticker-section {
  padding: 30px 0 38px;
  border-block: 1px solid var(--home-border);
  background: var(--home-surface-subtle);
  position: relative;
  overflow: hidden;
}

.ticker-label {
  text-align: center;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--home-text-muted);
  margin-bottom: 20px;
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 48px;
  flex-shrink: 0;
  will-change: transform;
}

/* LTR Marquee */
html:not([dir="rtl"]) .marquee-track {
  animation: marquee-scroll-ltr 30s linear infinite;
}

/* RTL Marquee */
html[dir="rtl"] .marquee-track {
  animation: marquee-scroll-rtl 30s linear infinite;
}

.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-logo-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  border-radius: 12px;
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  box-shadow: var(--home-shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.marquee-logo-card:hover {
  transform: translateY(-2px);
  border-color: var(--home-border-hover);
}

.marquee-logo-card img {
  height: 28px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: grayscale(100%) opacity(0.8);
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.marquee-logo-card:hover img {
  filter: grayscale(0%) opacity(1);
}

.marquee-logo-card .client-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--home-text-main);
}

/* ===== 3. Asymmetric Bento Grid (Capabilities) ===== */
.home-bento-section {
  padding: clamp(64px, 8vw, 100px) 0;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 20px;
  padding: clamp(24px, 3.5vw, 36px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--home-shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--home-shadow-md);
  border-color: var(--home-border-hover);
}

/* Bento Sizing Hierarchy */
.bento-card--featured-ai {
  grid-column: span 8;
  background: linear-gradient(135deg, rgba(66, 133, 244, 0.03) 0%, rgba(52, 168, 83, 0.03) 100%), var(--home-surface);
}

.bento-card--cloud {
  grid-column: span 4;
}

.bento-card--apps {
  grid-column: span 4;
}

.bento-card--devops {
  grid-column: span 4;
}

.bento-card--seo {
  grid-column: span 4;
}

.bento-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.bento-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(66, 133, 244, 0.08);
  color: var(--blue);
  border: 1px solid rgba(66, 133, 244, 0.16);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.bento-card:hover .bento-icon-wrap {
  transform: scale(1.08);
}

.bento-icon-wrap--green {
  background: rgba(52, 168, 83, 0.08);
  color: var(--green);
  border-color: rgba(52, 168, 83, 0.16);
}

.bento-icon-wrap--yellow {
  background: rgba(251, 188, 5, 0.12);
  color: #b45309;
  border-color: rgba(251, 188, 5, 0.25);
}

.bento-icon-wrap--red {
  background: rgba(234, 67, 53, 0.08);
  color: var(--red);
  border-color: rgba(234, 67, 53, 0.16);
}

.bento-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--home-surface-subtle);
  border: 1px solid var(--home-border);
  color: var(--home-text-muted);
}

.bento-body h3 {
  font-size: clamp(1.22rem, 1.8vw, 1.55rem);
  margin: 0 0 10px;
  color: var(--home-text-main);
  line-height: 1.3;
}

.bento-body p {
  color: var(--home-text-muted);
  font-size: 0.96rem;
  line-height: 1.68;
  margin: 0 0 18px;
}

/* Feature tags inside bento */
.bento-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.bento-pills li {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--home-text-muted);
  background: var(--home-surface-subtle);
  border: 1px solid var(--home-border);
  padding: 4px 10px;
  border-radius: 8px;
}

.bento-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--blue);
  margin-top: auto;
}

.bento-action svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

html[dir="rtl"] .bento-card:hover .bento-action svg {
  transform: translateX(-4px);
}

html:not([dir="rtl"]) .bento-card:hover .bento-action svg {
  transform: translateX(4px);
}

/* Interactive preview box inside Featured AI card */
.bento-ai-visual {
  background: #0b1320;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  margin-top: 14px;
  margin-bottom: 20px;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.78rem;
}

.bento-ai-pipeline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pipeline-node {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.pipeline-node--active {
  background: rgba(66, 133, 244, 0.2);
  border-color: rgba(66, 133, 244, 0.5);
  color: #93c5fd;
}

.pipeline-arrow {
  color: #64748b;
  font-weight: bold;
}

/* ===== 4. Flagship Deep-Tech Research Showcase ===== */
.home-research-section {
  padding: clamp(48px, 7vw, 80px) 0;
  background: linear-gradient(180deg, var(--home-surface-subtle) 0%, var(--bg) 100%);
}

.research-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, #091a2e 0%, #0d2847 45%, #13426e 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 64px -16px rgba(9, 26, 46, 0.5);
  color: #f1f5f9;
}

.research-media {
  position: relative;
  min-height: 320px;
}

.research-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.research-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 26, 46, 0.7) 0%, transparent 60%);
}

html[dir="rtl"] .research-media::after {
  background: linear-gradient(270deg, rgba(9, 26, 46, 0.7) 0%, transparent 60%);
}

.research-chip {
  position: absolute;
  inset-block-start: 20px;
  inset-inline-start: 20px;
  z-index: 2;
  background: #ffffff;
  color: #0b2740;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.research-body {
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.research-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #93c5fd;
  font-weight: 700;
  font-size: 0.76rem;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.research-body h3 {
  color: #ffffff;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  line-height: 1.25;
  margin: 0 0 12px;
}

.research-body p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.72;
  margin: 0 0 20px;
}

.research-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
}

.research-tags li {
  font-size: 0.78rem;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 5px 12px;
  border-radius: 8px;
}

.research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.research-btn-primary {
  background: #ffffff;
  color: #0d2847 !important;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.research-btn-primary:hover {
  transform: translateY(-2px);
}

.research-btn-secondary {
  background: transparent;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.research-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== 5. Institutional Work & Case Studies ===== */
.home-cases-section {
  padding: clamp(64px, 8vw, 100px) 0;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-card {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--home-shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--home-shadow-md);
  border-color: var(--home-border-hover);
}

.case-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #f1f5f9;
  overflow: hidden;
}

.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.case-card:hover .case-media img {
  transform: scale(1.05);
}

.case-badge {
  position: absolute;
  inset-block-start: 14px;
  inset-inline-start: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
}

.case-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.case-body h3 {
  font-size: 1.28rem;
  margin: 0 0 10px;
  line-height: 1.32;
}

.case-body h3 a {
  color: var(--home-text-main);
  text-decoration: none;
}

.case-body h3 a:hover {
  color: var(--blue);
}

.case-desc {
  font-size: 0.94rem;
  color: var(--home-text-muted);
  line-height: 1.68;
  margin: 0 0 18px;
}

.case-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  background: var(--home-surface-subtle);
  border-radius: 12px;
  border: 1px solid var(--home-border);
}

.case-kpi-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--home-text-main);
}

.case-kpi-label {
  font-size: 0.76rem;
  color: var(--home-text-muted);
}

/* ===== 6. Engineering Execution Roadmap ===== */
.home-roadmap-section {
  padding: clamp(64px, 8vw, 100px) 0;
  background: var(--home-surface-subtle);
  border-block: 1px solid var(--home-border);
}

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

.roadmap-card {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: var(--home-shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.roadmap-card:hover {
  transform: translateY(-3px);
  border-color: var(--home-border-hover);
}

.roadmap-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.roadmap-num {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--blue);
}

.roadmap-icon {
  width: 22px;
  height: 22px;
  color: var(--home-text-muted);
}

.roadmap-card h3 {
  font-size: 1.2rem;
  margin: 0 0 10px;
  color: var(--home-text-main);
}

.roadmap-card p {
  color: var(--home-text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin: 0 0 16px;
}

.roadmap-pill {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(66, 133, 244, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
  margin-top: auto;
}

html.theme-dark .roadmap-pill {
  color: #93c5fd;
}

/* ===== 7. Impact & Institutional Trust ===== */
.home-impact-section {
  padding: clamp(64px, 8vw, 100px) 0;
}

.impact-dashboard {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 24px;
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--home-shadow-sm);
}

.impact-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 36px;
}

.impact-title-wrap h2 {
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  margin: 0 0 6px;
}

.impact-title-wrap p {
  color: var(--home-text-muted);
  margin: 0;
}

.impact-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--home-surface-subtle);
  border: 1px solid var(--home-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--home-text-main);
}

.trust-badge svg {
  width: 16px;
  height: 16px;
  color: #10b981;
}

.impact-numbers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.impact-num-card {
  background: var(--home-surface-subtle);
  border: 1px solid var(--home-border);
  border-radius: 16px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.impact-num-card:hover {
  transform: translateY(-2px);
}

.impact-val {
  font-size: clamp(2rem, 3.2vw, 2.7rem);
  font-weight: 800;
  color: var(--home-text-main);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}

.impact-val span {
  color: var(--blue);
}

.impact-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--home-text-muted);
}

/* ===== 8. Enterprise FAQ Accordion (SEO & Trust Booster) ===== */
.home-faq-section {
  padding: clamp(64px, 8vw, 100px) 0;
  background: var(--home-surface-subtle);
  border-top: 1px solid var(--home-border);
}

.faq-container {
  max-width: 860px;
  margin: 0 auto;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.faq-item {
  background: var(--home-surface);
  border: 1px solid var(--home-border);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(66, 133, 244, 0.3);
}

.faq-item.is-open {
  border-color: rgba(66, 133, 244, 0.4);
  box-shadow: var(--home-shadow-sm);
}

.faq-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: start;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--home-text-main);
  gap: 16px;
}

.faq-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--home-text-muted);
  transition: transform 0.25s ease;
}

.faq-item.is-open .faq-chevron {
  transform: rotate(180deg);
  color: var(--blue);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 24px;
}

.faq-item.is-open .faq-answer {
  max-height: 350px;
  padding: 0 24px 22px;
}

.faq-answer p {
  margin: 0;
  color: var(--home-text-muted);
  font-size: 0.98rem;
  line-height: 1.75;
}

/* ===== 9. Magnetic High-Conversion CTA ===== */
.home-cta-section {
  padding: clamp(64px, 8vw, 100px) 0;
}

.magnetic-cta-card {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #091a2e 0%, #0d2847 50%, #173860 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: clamp(36px, 6vw, 68px) clamp(24px, 5vw, 60px);
  text-align: center;
  color: #ffffff;
  box-shadow: 0 28px 64px -16px rgba(11, 39, 64, 0.6);
}

.magnetic-cta-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle 350px at 20% 30%, rgba(66, 133, 244, 0.25), transparent 70%),
    radial-gradient(circle 350px at 80% 70%, rgba(52, 168, 83, 0.2), transparent 70%);
}

.magnetic-cta-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.magnetic-cta-card h2 {
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.2;
  margin: 0 0 16px;
  color: #ffffff;
}

.magnetic-cta-card p {
  color: #cbd5e1;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.7;
  margin: 0 0 32px;
}

.magnetic-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.cta-btn-glow {
  background: #ffffff;
  color: #0d2847 !important;
  font-size: 1.05rem;
  font-weight: 800;
  padding: 14px 30px;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.35);
}

.cta-btn-whatsapp {
  background: #25d366;
  color: #ffffff !important;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.3);
  transition: transform 0.2s ease;
}

.cta-btn-whatsapp:hover {
  transform: translateY(-2px);
}

.magnetic-cta-guarantee {
  font-size: 0.86rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ===== GPU Keyframe Animations ===== */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes marquee-scroll-ltr {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marquee-scroll-rtl {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(50%, 0, 0); }
}

/* ===== Accessibility: Prefers Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none !important;
  }
  .console-floating-tag,
  .status-dot,
  .section-tag .pulse-dot {
    animation: none !important;
  }
  .bento-card,
  .case-card,
  .btn-primary-glow,
  .btn-ghost-glow,
  .cta-btn-glow {
    transition: none !important;
  }
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 1080px) {
  .home-hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .bento-card--featured-ai {
    grid-column: span 12;
  }
  .bento-card--cloud,
  .bento-card--apps,
  .bento-card--devops,
  .bento-card--seo {
    grid-column: span 6;
  }
  .case-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .roadmap-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .impact-numbers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .research-spotlight {
    grid-template-columns: 1fr;
  }
  .research-media {
    min-height: 240px;
  }
}

@media (max-width: 680px) {
  .bento-card--cloud,
  .bento-card--apps,
  .bento-card--devops,
  .bento-card--seo {
    grid-column: span 12;
  }
  .case-grid {
    grid-template-columns: 1fr;
  }
  .roadmap-grid {
    grid-template-columns: 1fr;
  }
  .impact-numbers-grid {
    grid-template-columns: 1fr;
  }
  .home-hero__proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .home-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary-glow,
  .btn-ghost-glow {
    justify-content: center;
  }
}

/* ==================================================
   Scroll Choreography Layer
   - Activated only when JS adds .js-reveal to <html>
     (no-JS and reduced-motion users get static content)
   - Elements drop their data-reveal attribute once the
     entrance finishes, so hover transforms stay intact
================================================== */
html.js-reveal [data-reveal] {
  opacity: 0;
}

html.js-reveal [data-reveal].is-revealed {
  animation: reveal-rise 0.78s cubic-bezier(0.22, 0.61, 0.36, 1) var(--reveal-delay, 0ms) both;
}

/* Variant: soft fade with no vertical travel (headlines, labels) */
html.js-reveal [data-reveal="fade"].is-revealed {
  animation-name: reveal-fade;
}

/* Variant: depth pop for framed media and the closing CTA */
html.js-reveal [data-reveal="zoom"].is-revealed {
  animation-name: reveal-zoom;
}

/* Variant: slides in from the reading-start edge (LTR left / RTL right) */
html.js-reveal [data-reveal="inline"].is-revealed {
  animation-name: reveal-inline-ltr;
}

html[dir="rtl"].js-reveal [data-reveal="inline"].is-revealed {
  animation-name: reveal-inline-rtl;
}

/* Cascade: direct children of a group enter one after another */
html.js-reveal [data-reveal-group] > [data-reveal]:nth-child(2) { --reveal-delay: 90ms; }
html.js-reveal [data-reveal-group] > [data-reveal]:nth-child(3) { --reveal-delay: 180ms; }
html.js-reveal [data-reveal-group] > [data-reveal]:nth-child(4) { --reveal-delay: 270ms; }
html.js-reveal [data-reveal-group] > [data-reveal]:nth-child(5) { --reveal-delay: 360ms; }
html.js-reveal [data-reveal-group] > [data-reveal]:nth-child(n + 6) { --reveal-delay: 450ms; }

@keyframes reveal-rise {
  from { opacity: 0; transform: translate3d(0, 28px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes reveal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes reveal-zoom {
  from { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.965); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes reveal-inline-ltr {
  from { opacity: 0; transform: translate3d(-34px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes reveal-inline-rtl {
  from { opacity: 0; transform: translate3d(34px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ===== Hero Entrance (LCP-safe) =====
   Runs straight from CSS at parse time - never waits for JS or an
   observer, so the hero is paintable on the very first frame.
   The LCP text (title + lead) animates transform only and keeps
   opacity 1, so Chrome records it as painted immediately. */
html.js-reveal .home-hero__title,
html.js-reveal .home-hero__lead {
  animation: hero-slide 0.62s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

html.js-reveal .home-hero__lead { animation-delay: 70ms; }

html.js-reveal .home-hero__status  { animation: hero-enter 0.6s cubic-bezier(0.22,0.61,0.36,1) 40ms both; }
html.js-reveal .home-hero__actions { animation: hero-enter 0.6s cubic-bezier(0.22,0.61,0.36,1) 150ms both; }
html.js-reveal .home-hero__proof   { animation: hero-enter 0.6s cubic-bezier(0.22,0.61,0.36,1) 220ms both; }
html.js-reveal .home-hero__console { animation: hero-enter 0.7s cubic-bezier(0.22,0.61,0.36,1) 120ms both; }

@keyframes hero-slide {
  from { transform: translate3d(0, 16px, 0); }
  to   { transform: translate3d(0, 0, 0); }
}

@keyframes hero-enter {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ===== Live Console: blinking caret on the last code line ===== */
.code-stream .code-line:last-child code::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 1em;
  margin-inline-start: 4px;
  vertical-align: -2px;
  background: #34d399;
  animation: caret-blink 1.1s steps(1, end) infinite;
}

@keyframes caret-blink {
  0%, 49%   { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ===== Live Console: slow light sweep across the terminal body ===== */
.tech-console__body {
  position: relative;
  overflow: hidden;
}

.tech-console__body::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(125, 211, 252, 0.09) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: console-sweep 7s ease-in-out 2s infinite;
}

@keyframes console-sweep {
  0%        { transform: translateX(-100%); }
  45%, 100% { transform: translateX(100%); }
}

/* ===== Bento cards: cursor-tracked spotlight (set by JS) ===== */
@media (hover: hover) and (pointer: fine) {
  .bento-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    background: radial-gradient(
      320px circle at var(--pointer-x, 50%) var(--pointer-y, 0%),
      rgba(66, 133, 244, 0.1),
      transparent 62%
    );
  }

  .bento-card:hover::after {
    opacity: 1;
  }

  html.theme-dark .bento-card::after {
    background: radial-gradient(
      320px circle at var(--pointer-x, 50%) var(--pointer-y, 0%),
      rgba(66, 133, 244, 0.2),
      transparent 62%
    );
  }
}

/* ===== Accessibility: every added motion folds away on request ===== */
@media (prefers-reduced-motion: reduce) {
  html.js-reveal [data-reveal],
  html.js-reveal [data-reveal].is-revealed {
    opacity: 1;
    animation: none !important;
  }

  html.js-reveal .home-hero__title,
  html.js-reveal .home-hero__lead,
  html.js-reveal .home-hero__status,
  html.js-reveal .home-hero__actions,
  html.js-reveal .home-hero__proof,
  html.js-reveal .home-hero__console {
    opacity: 1;
    animation: none !important;
  }

  .code-stream .code-line:last-child code::after,
  .tech-console__body::after {
    animation: none !important;
  }

  .tech-console__body::after {
    opacity: 0;
  }

  .bento-card::after {
    transition: none !important;
  }
}
