/* =========================================================================
   TechX Pakistan — Design System
   Palette derived from the logo: violet -> magenta gradient on deep ink.
   ========================================================================= */

:root {
  /* Core palette */
  --ink:        #0a0a12;   /* deepest background */
  --ink-2:      #12121f;   /* raised surface */
  --ink-3:      #1a1a2e;   /* card surface */
  --line:       #2a2a3d;   /* hairline borders */

  --violet:     #6d47c9;   /* brand primary (from logo) */
  --violet-lt:  #8b5cf6;
  --magenta:    #b14bd8;   /* brand secondary (logo X) */
  --plum:       #7c4bd0;

  --amber:      #f5793b;   /* accent from company profile */

  --white:      #f4f2fb;
  --grey:       #a5a3b8;
  --grey-dim:   #6f6d82;

  --grad: linear-gradient(120deg, var(--violet) 0%, var(--magenta) 100%);
  --grad-soft: linear-gradient(120deg, rgba(109,71,201,0.15), rgba(177,75,216,0.10));

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --maxw: 1200px;
  --radius: 16px;
  --radius-lg: 24px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

section { position: relative; }

/* ---- Typography scale ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { color: var(--grey); }

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--magenta);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before { content: ''; width: 28px; height: 2px; background: var(--grad); }

.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head p { margin-top: 16px; font-size: 1.05rem; }
.section-pad { padding: 110px 0; }

/* =========================================================================
   NAVBAR
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 250;
  transition: all 0.4s var(--ease);
  padding: 18px 0;
}
.nav.scrolled {
  background: rgba(10,10,18,0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--grey);
  transition: color 0.25s var(--ease); position: relative;
}
.nav-links a:hover { color: var(--white); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
  background: var(--grad); transition: width 0.3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  padding: 12px 24px; border-radius: 100px; border: none; cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 30px rgba(124,75,208,0.35); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(124,75,208,0.5); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--violet-lt); transform: translateY(-3px); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--white); transition: 0.3s var(--ease); transform-origin: center; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   HERO — the thesis. 3D canvas behind, headline in front.
   ========================================================================= */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; z-index: 0; }
.hero-glow {
  position: absolute; z-index: 1; pointer-events: none;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,75,208,0.28), transparent 65%);
  top: -10%; right: -8%;
  transform: translateZ(0);
}
.hero-glow.two {
  background: radial-gradient(circle, rgba(177,75,216,0.20), transparent 65%);
  top: 40%; left: -12%; width: 560px; height: 560px;
}
.hero .wrap { position: relative; z-index: 2; padding-top: 80px; }
.hero-inner { max-width: 860px; }
.hero h1 { margin: 24px 0; }
.hero h1 .line { display: block; overflow: hidden; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--grey); max-width: 560px; margin-bottom: 40px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  z-index: 2; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--grey-dim); display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll .mouse {
  width: 22px; height: 36px; border: 2px solid var(--grey-dim); border-radius: 12px; position: relative;
}
.hero-scroll .mouse::after {
  content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 7px; background: var(--magenta); border-radius: 2px;
  animation: scrollDot 1.6s var(--ease) infinite;
}
@keyframes scrollDot { 0% { opacity: 1; top: 7px; } 70% { opacity: 0; top: 18px; } 100% { opacity: 0; } }

/* Hero slider */
.hero-slider { position: relative; min-height: 380px; }
.hero-slide {
  position: absolute; top: 0; left: 0; width: 100%;
  opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0.7s;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; visibility: visible; transform: none; pointer-events: auto; position: relative; }
.hero-slide .eyebrow { animation: slideUp 0.6s var(--ease) 0.1s both; }
.hero-slide.active h1 { animation: slideUp 0.6s var(--ease) 0.18s both; }
.hero-slide.active .hero-sub { animation: slideUp 0.6s var(--ease) 0.26s both; }
.hero-slide.active .hero-cta { animation: slideUp 0.6s var(--ease) 0.34s both; }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.hero-controls {
  display: flex; align-items: center; gap: 20px; margin-top: 48px;
}
.hero-arrow {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--ink-2); color: var(--white); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s var(--ease); flex-shrink: 0;
}
.hero-arrow:hover { border-color: var(--violet-lt); background: var(--grad-soft); transform: scale(1.08); }
.hero-arrow svg { width: 22px; height: 22px; }
.hero-dots { display: flex; gap: 10px; }
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--line); transition: all 0.3s var(--ease); padding: 0;
}
.hero-dot.active { background: var(--grad); width: 30px; border-radius: 6px; }

/* =========================================================================
   STATS STRIP
   ========================================================================= */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--ink-2); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 44px 24px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 700; }
.stat .lbl { font-size: 0.85rem; color: var(--grey); margin-top: 6px; letter-spacing: 0.03em; }

/* =========================================================================
   ABOUT
   ========================================================================= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-copy p { margin-bottom: 20px; font-size: 1.05rem; }
.about-founder {
  margin-top: 28px; padding: 22px 26px; border-radius: var(--radius);
  background: var(--grad-soft); border: 1px solid var(--line);
}
.about-founder .name { font-family: var(--font-display); font-weight: 600; color: var(--white); font-size: 1.1rem; }
.about-founder .role { font-size: 0.9rem; color: var(--magenta); }
.about-visual {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/5; background: var(--ink-3); border: 1px solid var(--line);
}
.about-visual .badge {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 20px; padding: 40px;
  background: var(--grad-soft);
}
.about-visual .badge img { width: 60%; opacity: 0.95; filter: drop-shadow(0 10px 30px rgba(124,75,208,0.4)); }
.about-visual .badge .est { font-family: var(--font-display); letter-spacing: 0.2em; color: var(--grey); font-size: 0.8rem; }

/* =========================================================================
   SERVICES
   ========================================================================= */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 34px 30px; transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  position: relative; overflow: hidden;
}
.svc-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease);
}
.svc-card:hover { transform: translateY(-8px); border-color: rgba(139,92,246,0.4); box-shadow: 0 24px 50px rgba(0,0,0,0.4); }
.svc-card:hover::before { transform: scaleX(1); }
.svc-icon {
  width: 54px; height: 54px; border-radius: 14px; background: var(--grad-soft);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--violet-lt); margin-bottom: 22px;
}
.svc-icon svg { width: 26px; height: 26px; }
.svc-card h3 { margin-bottom: 10px; }
.svc-card > p { font-size: 0.95rem; margin-bottom: 18px; }
.svc-points { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.svc-points li { font-size: 0.88rem; color: var(--grey); padding-left: 20px; position: relative; }
.svc-points li::before { content: ''; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 2px; background: var(--grad); }
.svc-points li b { color: var(--white); font-weight: 600; }

/* =========================================================================
   AI NEWSROOM ENGINE
   ========================================================================= */
.ai-engine {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(109,71,201,0.12), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(177,75,216,0.10), transparent 60%),
    var(--ink);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.ai-glow {
  position: absolute; top: 20%; left: 50%; transform: translate3d(-50%,0,0);
  width: 600px; height: 300px; pointer-events: none;
  background: radial-gradient(ellipse, rgba(139,92,246,0.12), transparent 70%);
}

.pipeline {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-bottom: 56px; position: relative;
}
.pipe-step {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 28px; position: relative; transition: border-color 0.4s var(--ease), transform 0.4s var(--ease);
}
.pipe-step:hover { border-color: rgba(139,92,246,0.45); transform: translateY(-6px); }
/* connector line between cards (desktop) */
.pipe-connector {
  position: absolute; top: 52px; right: -24px; width: 24px; height: 2px;
  background: linear-gradient(90deg, var(--violet), transparent); z-index: 1;
}
.pipe-step:nth-child(3n) .pipe-connector { display: none; }
.pipe-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--grad-soft);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--violet-lt); margin-bottom: 20px;
}
.pipe-icon svg { width: 26px; height: 26px; }
.pipe-num {
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.2em; color: var(--magenta); margin-bottom: 8px;
}
.pipe-step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.pipe-step p { font-size: 0.92rem; }

.ai-benefits {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding-top: 44px; border-top: 1px solid var(--line);
}
.ai-benefit { display: flex; gap: 14px; align-items: flex-start; }
.ai-benefit-mark {
  width: 10px; height: 10px; border-radius: 3px; background: var(--grad);
  margin-top: 7px; flex-shrink: 0; box-shadow: 0 0 12px rgba(139,92,246,0.6);
}
.ai-benefit-t { font-family: var(--font-display); font-weight: 600; color: var(--white); font-size: 1rem; margin-bottom: 4px; }
.ai-benefit-d { font-size: 0.88rem; color: var(--grey); }

/* =========================================================================
   AI HIGHLIGHT STRIP (under hero)
   ========================================================================= */
.ai-strip {
  display: block; background: var(--grad); position: relative; overflow: hidden;
  transition: filter 0.3s var(--ease);
}
.ai-strip::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: translateX(-100%); animation: stripShine 4.5s var(--ease) infinite;
}
@keyframes stripShine { 0% { transform: translateX(-100%); } 50%, 100% { transform: translateX(200%); } }
.ai-strip:hover { filter: brightness(1.08); }
.ai-strip-inner {
  display: flex; align-items: center; gap: 18px; padding: 16px 24px;
  position: relative; z-index: 1; flex-wrap: wrap; justify-content: center;
}
.ai-strip-badge {
  font-family: var(--font-display); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em;
  background: rgba(255,255,255,0.2); color: #fff; padding: 5px 12px; border-radius: 100px; flex-shrink: 0;
}
.ai-strip-text { color: #fff; font-size: 0.98rem; }
.ai-strip-text strong { font-family: var(--font-display); font-weight: 600; }
.ai-strip-cta {
  display: inline-flex; align-items: center; gap: 7px; color: #fff; font-weight: 600;
  font-family: var(--font-display); font-size: 0.92rem; flex-shrink: 0;
}
.ai-strip-cta svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.ai-strip:hover .ai-strip-cta svg { transform: translateX(4px); }

/* AI featured badge */
.ai-badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--magenta);
  background: var(--grad-soft); border: 1px solid rgba(139,92,246,0.35);
  padding: 8px 16px; border-radius: 100px;
}
.ai-badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--magenta);
  box-shadow: 0 0 0 0 rgba(177,75,216,0.5); animation: badgePulse 2s infinite;
}
@keyframes badgePulse {
  0% { box-shadow: 0 0 0 0 rgba(177,75,216,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(177,75,216,0); }
  100% { box-shadow: 0 0 0 0 rgba(177,75,216,0); }
}

/* AI split cards (two-sided message) */
.ai-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.ai-split-card {
  padding: 30px 32px; border-radius: var(--radius-lg);
  background: var(--ink-2); border: 1px solid var(--line); position: relative;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.ai-split-card:hover { transform: translateY(-5px); }
.ai-split-card.featured {
  background: linear-gradient(160deg, rgba(109,71,201,0.16), rgba(177,75,216,0.06));
  border-color: rgba(139,92,246,0.4);
}
.ai-split-tag {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--grey-dim); margin-bottom: 12px; font-family: var(--font-display); font-weight: 600;
}
.ai-split-card.featured .ai-split-tag { color: var(--magenta); }
.ai-split-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.ai-split-card p { font-size: 0.96rem; }

/* =========================================================================
   AI PRODUCT PAGE (ai-engine.php)
   ========================================================================= */
.aip-hero { background:
    radial-gradient(1000px 500px at 80% 0%, rgba(109,71,201,0.14), transparent 60%),
    radial-gradient(800px 400px at 10% 100%, rgba(177,75,216,0.10), transparent 60%),
    var(--ink);
  overflow: hidden;
}
.aip-hero-inner { max-width: 800px; }
.aip-lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--grey); }

.aip-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 56px 0 28px;
}
.aip-stat {
  text-align: center; padding: 28px 20px; border-radius: var(--radius-lg);
  background: var(--ink-2); border: 1px solid var(--line);
}
.aip-stat-num { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
.aip-stat-lbl { font-size: 0.85rem; color: var(--grey); margin-top: 6px; }
.aip-proof { text-align: center; font-size: 0.95rem; color: var(--grey-dim); max-width: 720px; margin: 0 auto; }

.aip-what { max-width: 760px; }
.aip-what p { font-size: 1.05rem; margin-bottom: 18px; }

/* Pipeline (8 steps, 4-col) */
.aip-pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.aip-step {
  padding: 28px 24px; border-radius: var(--radius-lg); background: var(--ink-2);
  border: 1px solid var(--line); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.aip-step:hover { border-color: rgba(139,92,246,0.45); transform: translateY(-5px); }
.aip-step-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--grad-soft);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--violet-lt); margin-bottom: 16px;
}
.aip-step-icon svg { width: 24px; height: 24px; }
.aip-step-num { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; color: var(--magenta); margin-bottom: 6px; }
.aip-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.aip-step p { font-size: 0.88rem; }

/* 10 engines */
.aip-engines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.aip-engine {
  display: flex; gap: 16px; padding: 24px 24px; border-radius: var(--radius);
  background: var(--ink); border: 1px solid var(--line); transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.aip-engine:hover { border-color: rgba(139,92,246,0.4); transform: translateY(-4px); }
.aip-engine-num {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 700;
  color: var(--magenta); flex-shrink: 0; line-height: 1.4;
}
.aip-engine h3 { font-size: 1.05rem; margin-bottom: 6px; }
.aip-engine p { font-size: 0.88rem; }

/* Dashboard */
.aip-dash { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.aip-dash-item {
  display: flex; gap: 14px; padding: 24px; border-radius: var(--radius);
  background: var(--ink-2); border: 1px solid var(--line);
}
.aip-dash-mark {
  width: 10px; height: 10px; border-radius: 3px; background: var(--grad); margin-top: 7px;
  flex-shrink: 0; box-shadow: 0 0 12px rgba(139,92,246,0.6);
}
.aip-dash-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.aip-dash-item p { font-size: 0.88rem; }

/* Cost */
.aip-cost { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.aip-cost-left p { font-size: 1.02rem; margin-top: 8px; }
.aip-cost-right {
  text-align: center; padding: 36px 30px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(109,71,201,0.16), rgba(177,75,216,0.06));
  border: 1px solid rgba(139,92,246,0.4);
}
.aip-cost-big { font-family: var(--font-display); font-size: 3.2rem; font-weight: 700; line-height: 1; }
.aip-cost-sub { font-size: 0.95rem; color: var(--white); margin-top: 10px; }
.aip-cost-note { font-size: 0.85rem; color: var(--magenta); margin-top: 14px; }

/* Who / Delivery two-col */
.aip-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.aip-list-item {
  padding: 22px 24px; border-radius: var(--radius); background: var(--ink-2);
  border: 1px solid var(--line); margin-bottom: 14px;
}
.aip-list-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.aip-list-item p { font-size: 0.9rem; }

/* Final CTA */
.aip-final { background: var(--ink-2); border-top: 1px solid var(--line); overflow: hidden; }
.aip-final-box {
  max-width: 720px; margin: 0 auto; text-align: center; padding: 48px 40px;
  border-radius: var(--radius-lg); background:
    linear-gradient(160deg, rgba(109,71,201,0.14), rgba(177,75,216,0.05));
  border: 1px solid rgba(139,92,246,0.35);
}
.aip-final-box > p { font-size: 1.05rem; max-width: 560px; margin: 0 auto; }
.aip-final-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

@media (max-width: 960px) {
  .aip-stats { grid-template-columns: repeat(2, 1fr); }
  .aip-pipeline { grid-template-columns: repeat(2, 1fr); }
  .aip-engines, .aip-dash { grid-template-columns: repeat(2, 1fr); }
  .aip-cost, .aip-two-col { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .aip-stats, .aip-pipeline, .aip-engines, .aip-dash { grid-template-columns: 1fr; }
}

/* Pricing */
.all-included {
  background: linear-gradient(120deg, rgba(109,71,201,0.12), rgba(177,75,216,0.05));
  border: 1px solid rgba(139,92,246,0.32); border-radius: var(--radius-lg);
  padding: 30px 34px; margin-bottom: 28px;
}
.all-included-head { margin-bottom: 20px; }
.all-included-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; display: block; }
.all-included-sub { font-size: 0.95rem; color: var(--grey); margin-top: 6px; display: block; }
.all-included-list {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 24px;
}
.all-included-list li { display: flex; gap: 9px; align-items: flex-start; font-size: 0.88rem; color: var(--white); line-height: 1.4; }
.all-included-list svg { width: 16px; height: 16px; color: var(--violet-lt); flex-shrink: 0; margin-top: 2px; }

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.price-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 26px; position: relative; display: flex; flex-direction: column;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.price-card:hover { transform: translateY(-6px); border-color: rgba(139,92,246,0.4); }
.price-card.popular {
  border-color: rgba(139,92,246,0.55);
  background: linear-gradient(170deg, rgba(109,71,201,0.14), var(--ink-2) 55%);
  box-shadow: 0 20px 50px rgba(109,71,201,0.18);
}
.price-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-family: var(--font-display); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.08em; padding: 6px 16px; border-radius: 100px; white-space: nowrap;
}
.price-name {
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--white); margin-bottom: 10px;
}
.price-amount { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--white); }
.price-period { font-size: 0.95rem; color: var(--grey-dim); font-weight: 400; }
.price-posts { font-size: 0.9rem; color: var(--magenta); margin: 10px 0 4px; font-weight: 500; }
.price-perpost { font-size: 0.78rem; color: var(--grey-dim); margin-bottom: 20px; }
.price-features { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 24px; flex: 1; }
.price-features li { display: flex; gap: 10px; align-items: flex-start; font-size: 0.86rem; color: var(--grey); line-height: 1.45; }
.price-features svg { width: 16px; height: 16px; color: var(--violet-lt); flex-shrink: 0; margin-top: 2px; }

.setup-note {
  text-align: center; font-size: 0.9rem; color: var(--grey-dim); margin: 32px auto 0; max-width: 640px;
  padding: 14px 20px; border: 1px dashed var(--line); border-radius: var(--radius);
}

.custom-box {
  margin-top: 24px; padding: 36px 40px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(109,71,201,0.14), rgba(177,75,216,0.06));
  border: 1px solid rgba(139,92,246,0.4);
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.custom-box-body { flex: 1; min-width: 280px; }
.custom-box-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.custom-box-body p { font-size: 0.95rem; max-width: 620px; }

.price-features li b { color: var(--white); font-weight: 600; }
.feat-all { color: var(--magenta) !important; font-weight: 500; }

@media (max-width: 960px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .custom-box { flex-direction: column; align-items: flex-start; }
  .all-included-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .all-included-list { grid-template-columns: 1fr; }
}

/* WhatsApp daily news CTA */
.btn-wa { background: #25D366; color: #06301a; }
.btn-wa:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(37,211,102,0.4); }
.wa-cta {
  margin-top: 44px; padding: 28px 32px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(37,211,102,0.10), rgba(37,211,102,0.03));
  border: 1px solid rgba(37,211,102,0.28);
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.wa-cta-icon {
  width: 56px; height: 56px; border-radius: 14px; flex-shrink: 0;
  background: rgba(37,211,102,0.15); color: #25D366;
  display: flex; align-items: center; justify-content: center;
}
.wa-cta-icon svg { width: 30px; height: 30px; }
.wa-cta-body { flex: 1; min-width: 240px; }
.wa-cta-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.wa-cta-body p { font-size: 0.92rem; }

/* =========================================================================
   NEWSROOM / PUBLISHING
   ========================================================================= */
.newsroom { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.news-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 48px;
}
.news-fact { padding: 20px 22px; border-radius: var(--radius); background: var(--ink); border: 1px solid var(--line); }
.news-fact-k { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--grey-dim); margin-bottom: 6px; }
.news-fact-v { font-family: var(--font-display); font-weight: 600; color: var(--white); font-size: 1.02rem; line-height: 1.4; }

.news-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 56px; }
.news-option {
  padding: 26px 26px; border-radius: var(--radius); background: var(--ink); border: 1px solid var(--line);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.news-option:hover { border-color: rgba(139,92,246,0.45); transform: translateY(-5px); }
.news-option h3 { font-size: 1.1rem; margin-bottom: 8px; }
.news-option p { font-size: 0.9rem; }

/* FAQ (AEO) */
.news-faq { max-width: 820px; margin: 0 auto 56px; }
.news-faq-title { text-align: center; margin-bottom: 28px; font-size: 1.4rem; }
.faq-item {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink);
  margin-bottom: 14px; overflow: hidden; transition: border-color 0.3s var(--ease);
}
.faq-item[open] { border-color: rgba(139,92,246,0.4); }
.faq-item summary {
  cursor: pointer; padding: 20px 24px; font-family: var(--font-display); font-weight: 600;
  font-size: 1.02rem; color: var(--white); list-style: none; display: flex;
  align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+'; font-size: 1.4rem; color: var(--magenta); font-weight: 400;
  transition: transform 0.3s var(--ease); flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 24px 22px; font-size: 0.95rem; color: var(--grey); }

.news-cta { text-align: center; }
.news-cta > p { font-size: 1.05rem; color: var(--white); max-width: 620px; margin: 0 auto 24px; }
.news-cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* About PDF download button */
.about-actions { margin-top: 20px; }

/* =========================================================================
   PORTFOLIO (YouTube auto-fetch)
   ========================================================================= */
.portfolio-bar { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 44px; flex-wrap: wrap; gap: 20px; }
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.video-card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.video-card:hover { transform: translateY(-6px); border-color: rgba(139,92,246,0.4); }
.video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--ink-3); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.video-card:hover .video-thumb img { transform: scale(1.06); }
.video-thumb .play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,18,0.25); transition: background 0.3s var(--ease);
}
.video-card:hover .play { background: rgba(10,10,18,0.1); }
.video-thumb .play span {
  width: 58px; height: 58px; border-radius: 50%; background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(124,75,208,0.5); transition: transform 0.3s var(--ease);
}
.video-card:hover .play span { transform: scale(1.12); }
.video-thumb .play svg { width: 22px; height: 22px; fill: #fff; margin-left: 3px; }
.video-meta { padding: 16px 18px; }
.video-meta .title { font-size: 0.95rem; font-weight: 600; color: var(--white); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-meta .date { font-size: 0.78rem; color: var(--grey-dim); margin-top: 6px; }

.portfolio-empty { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.portfolio-empty p { margin-bottom: 20px; }

/* Video modal */
.video-modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(5,5,10,0.9);
  display: none; align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(6px);
}
.video-modal.open { display: flex; }
.video-modal-inner { width: 100%; max-width: 960px; aspect-ratio: 16/9; position: relative; }
.video-modal-inner iframe { width: 100%; height: 100%; border: none; border-radius: var(--radius); }
.video-modal-close {
  position: absolute; top: -46px; right: 0; background: none; border: none; color: var(--white);
  font-size: 1.8rem; cursor: pointer; line-height: 1;
}

/* =========================================================================
   WHY US
   ========================================================================= */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.why-card { padding: 30px 28px; border-radius: var(--radius); background: var(--ink-2); border: 1px solid var(--line); transition: border-color 0.3s var(--ease); }
.why-card:hover { border-color: rgba(139,92,246,0.4); }
.why-card .n { font-family: var(--font-display); font-size: 0.8rem; color: var(--magenta); letter-spacing: 0.2em; }
.why-card h3 { margin: 12px 0 8px; font-size: 1.15rem; }
.why-card p { font-size: 0.92rem; }

/* =========================================================================
   CASE STUDIES
   ========================================================================= */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card {
  padding: 40px 32px; border-radius: var(--radius-lg);
  background: linear-gradient(160deg, var(--ink-3), var(--ink-2)); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.case-card .big { font-family: var(--font-display); font-size: 3rem; font-weight: 700; line-height: 1; }
.case-card .big-lbl { font-size: 0.85rem; color: var(--magenta); letter-spacing: 0.05em; margin-top: 4px; margin-bottom: 22px; }
.case-card h3 { margin-bottom: 10px; font-size: 1.2rem; }
.case-card p { font-size: 0.92rem; }

/* =========================================================================
   CLIENTS
   ========================================================================= */
.clients-marquee { overflow: hidden; position: relative; padding: 8px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.clients-track { display: flex; gap: 16px; width: max-content; animation: marquee 42s linear infinite; will-change: transform; }
.clients-marquee:hover .clients-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
.client-chip {
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 500; white-space: nowrap;
  padding: 14px 26px; border-radius: 100px; background: var(--ink-2); border: 1px solid var(--line); color: var(--grey);
}
.client-chip:hover { color: var(--white); border-color: var(--violet-lt); }

/* =========================================================================
   CONTACT / CTA
   ========================================================================= */
.contact { background: var(--ink-2); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 26px; margin-top: 36px; }
.contact-list li { display: flex; gap: 18px; align-items: flex-start; }
.contact-list .ico {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  background: var(--grad-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--violet-lt);
}
.contact-list .ico svg { width: 22px; height: 22px; }
.contact-list .k { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--grey-dim); }
.contact-list .v { font-size: 1.05rem; color: var(--white); font-weight: 500; }

.contact-form { background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 40px; }
.contact-form h3 { margin-bottom: 8px; }
.contact-form > p { font-size: 0.92rem; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; color: var(--grey); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: 12px; background: var(--ink-2);
  border: 1px solid var(--line); color: var(--white); font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color 0.25s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--violet-lt); }
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.82rem; color: var(--grey-dim); margin-top: 14px; text-align: center; }
.form-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 0.9rem; display: none; }
.form-msg.ok { display: block; background: rgba(80,200,120,0.12); border: 1px solid rgba(80,200,120,0.3); color: #7fe0a0; }
.form-msg.err { display: block; background: rgba(255,90,90,0.12); border: 1px solid rgba(255,90,90,0.3); color: #ff9d9d; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { background: var(--ink); border-top: 1px solid var(--line); padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand img { height: 40px; margin-bottom: 20px; }
.footer-brand p { font-size: 0.92rem; max-width: 320px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--grey-dim); margin-bottom: 18px; }
.footer-col a { display: block; font-size: 0.95rem; color: var(--grey); margin-bottom: 12px; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--grey); transition: all 0.25s var(--ease);
}
.footer-social a:hover { color: var(--white); border-color: var(--violet-lt); transform: translateY(-3px); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: 0.85rem; color: var(--grey-dim); }

/* WhatsApp float */
.wa-float {
  position: fixed; bottom: 26px; right: 26px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: #25D366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(37,211,102,0.4); transition: transform 0.3s var(--ease);
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* =========================================================================
   REVEAL ANIMATION
   ========================================================================= */
/* Reveal: elements fade up on scroll. Fail-safe below ensures content is
   NEVER stuck invisible if JS is slow or an observer misses.
   translate3d + backface-visibility push this onto the GPU so scroll stays smooth. */
.reveal { opacity: 0; transform: translate3d(0, 30px, 0); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); backface-visibility: hidden; }
.reveal.in { opacity: 1; transform: translate3d(0, 0, 0); }
.reveal.d1 { transition-delay: 0.06s; }
.reveal.d2 { transition-delay: 0.12s; }
.reveal.d3 { transition-delay: 0.18s; }

/* Fail-safe: if JS never marks reveals (script error, blocked, etc), a CSS
   animation forces everything visible after a short delay. So the page can
   never get "stuck" with hidden sections. */
@keyframes revealFallback { to { opacity: 1; transform: translate3d(0,0,0); } }
.reveal { animation: revealFallback 0.8s var(--ease) 2.5s forwards; }
.reveal.in { animation: none; }
/* When JS is present it adds .js-ready to <html>; that cancels the fallback
   timer so the normal scroll animation runs instead. */
.js-ready .reveal { animation: none; }
.js-ready .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 960px) {
  .services-grid, .video-grid, .why-grid, .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipe-connector { display: none; }
  .ai-benefits { grid-template-columns: repeat(2, 1fr); }
  .news-facts, .news-options { grid-template-columns: repeat(2, 1fr); }
  .wa-cta { flex-direction: column; align-items: flex-start; }
  .ai-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { position: fixed; inset: 0 0 0 auto; width: 78%; max-width: 320px;
    background: var(--ink-2); flex-direction: column; align-items: flex-start; justify-content: center;
    padding: 40px; gap: 26px; transform: translateX(100%); transition: transform 0.4s var(--ease);
    border-left: 1px solid var(--line); z-index: 200; box-shadow: -20px 0 60px rgba(0,0,0,0.5); }
  .nav-links.open { transform: none; }
  .nav-links a { font-size: 1.1rem; position: relative; z-index: 1; }
  .nav-toggle { display: flex; z-index: 201; position: relative; }
  /* backdrop behind the open menu */
  .nav-backdrop { position: fixed; inset: 0; background: rgba(5,5,10,0.6); z-index: 150;
    opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease); }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
  .services-grid, .video-grid, .why-grid, .cases-grid, .footer-grid { grid-template-columns: 1fr; }
  .pipeline, .ai-benefits { grid-template-columns: 1fr; }
  .news-facts, .news-options { grid-template-columns: 1fr; }
  .ai-strip-inner { flex-direction: column; gap: 10px; text-align: center; padding: 14px 20px; }
  .ai-strip-text { font-size: 0.9rem; }
  .section-pad { padding: 72px 0; }
  .about-visual { aspect-ratio: 3/4; }
}
