/* ================================================
   EPISX — Main Stylesheet
   Dark, modern, AI-tech aesthetic
   Fonts: Syne (headings) + DM Sans (body)
   ================================================ */

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

:root {
  --bg: #060914;
  --bg-2: #0c1022;
  --bg-3: #111629;
  --card: #0f1526;
  --card-border: rgba(255,255,255,0.07);
  --card-border-hover: rgba(99,102,241,0.4);
  --text: #f0f2ff;
  --text-2: #8892b0;
  --text-3: #4a5578;
  --accent: #4f8ef7;
  --accent-2: #7c3aed;
  --accent-3: #38bdf8;
  --gradient: linear-gradient(135deg, #38bdf8, #4f8ef7, #7c3aed);
  --gradient-soft: linear-gradient(135deg, rgba(56,189,248,0.15), rgba(124,58,237,0.1));
  --radius: 12px;
  --radius-lg: 20px;
  --max: 1180px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ===== TYPOGRAPHY ===== */
h1,h2,h3,h4,h5 {
  font-family: 'Syne', sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

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

.eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.body-lg { font-size: 1.125rem; color: var(--text-2); line-height: 1.75; margin-bottom: 1rem; }
.body-text { font-size: 1rem; color: var(--text-2); line-height: 1.8; margin-bottom: 1.5rem; }

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 0.75rem; }
.section-sub { font-size: 1.05rem; color: var(--text-2); max-width: 560px; margin: 0 auto; }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--gradient);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79,142,247,0.3); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  background: transparent;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: rgba(79,142,247,0.5); color: var(--accent); background: rgba(79,142,247,0.05); }

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.3s, box-shadow 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(6, 9, 20, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--card-border);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-wordmark {
  font-family: 'Syne', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.logo-x { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-link {
  display: block;
  padding: 8px 14px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--accent); }

.nav-cta {
  padding: 9px 20px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 7px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(6,9,20,0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--card-border);
  padding: 1rem 24px 1.5rem;
  gap: 0.25rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 0;
  color: var(--text-2);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid var(--card-border);
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--text); }
.mobile-cta-link {
  margin-top: 1rem;
  color: var(--accent) !important;
  font-weight: 500;
  border-bottom: none !important;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 120px 24px 80px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,142,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,142,247,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(124,58,237,0.18), transparent 70%); top: -150px; right: -100px; }
.orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(79,142,247,0.15), transparent 70%); bottom: -100px; left: -100px; }
.orb-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(56,189,248,0.1), transparent 70%); top: 40%; left: 20%; }

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 860px;
  animation: heroFadeIn 0.9s ease both;
}
@keyframes heroFadeIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-3);
  letter-spacing: 0.04em;
  margin-bottom: 1.75rem;
}
.badge-pulse {
  width: 7px; height: 7px;
  background: #22d3ee;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34,211,238,0.5);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,211,238,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(34,211,238,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,211,238,0); }
}

.hero-title {
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-2);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  gap: 0;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2.5rem;
}
.stat-num {
  font-family: 'Syne', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-num sup { font-size: 1rem; vertical-align: super; }
.stat-label { font-size: 0.78rem; color: var(--text-3); letter-spacing: 0.05em; text-transform: uppercase; }
.stat-sep { width: 1px; height: 40px; background: var(--card-border); }

/* ===== TICKER ===== */
.ticker-wrap {
  overflow: hidden;
  background: var(--bg-2);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 0;
}
.ticker-track {
  display: inline-flex;
  gap: 2rem;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ticker-track span { flex-shrink: 0; }
.tsep { color: var(--accent-2); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ===== ABOUT ===== */
.about-section {
  padding: 120px 0;
  background: var(--bg);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.about-left h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  margin-bottom: 1.5rem;
}
.about-left h2 em { font-style: normal; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pillar {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}
.pillar:hover { border-color: var(--card-border-hover); transform: translateY(-3px); }
.pillar-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.info-icon { font-size: 1.2rem; margin-right: 0.75rem; color: var(--accent); }
.pillar h4 { font-size: 0.95rem; font-family: 'Syne', sans-serif; margin-bottom: 0.5rem; }
.pillar p { font-size: 0.85rem; color: var(--text-2); line-height: 1.6; }

/* ===== MISSION ===== */
.mission-section {
  padding: 120px 0;
  background: var(--bg-2);
}
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.mv-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.mv-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #38bdf8, #4f8ef7);
}
.mv-card--alt::before { background: linear-gradient(90deg, #4f8ef7, #7c3aed); }
.mv-card:hover { border-color: var(--card-border-hover); }
.mv-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.mv-card h3 { font-size: 1.4rem; margin-bottom: 1rem; line-height: 1.3; }
.mv-card p { color: var(--text-2); line-height: 1.75; }

/* ===== SERVICES ===== */
.services-section {
  padding: 120px 0;
  background: var(--bg);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.svc-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.svc-card:hover {
  border-color: var(--card-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(79,142,247,0.08);
}
.svc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.svc-num {
  font-family: 'Syne', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-3);
  letter-spacing: 0.1em;
}
.svc-ico { font-size: 1.75rem; }
.svc-card h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.svc-card p { font-size: 0.88rem; color: var(--text-2); line-height: 1.7; margin-bottom: 1.25rem; }
.svc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.svc-tags span {
  font-size: 0.72rem;
  padding: 4px 10px;
  background: rgba(79,142,247,0.08);
  color: var(--accent);
  border: 1px solid rgba(79,142,247,0.15);
  border-radius: 100px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ===== PROCESS ===== */
.process-section {
  padding: 120px 0;
  background: var(--bg-2);
}
.process-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
.process-step {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.process-step:hover { border-color: var(--card-border-hover); transform: translateY(-4px); }
.ps-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.ps-num {
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.process-step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.process-step p { font-size: 0.83rem; color: var(--text-2); line-height: 1.6; }
.ps-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.75rem;
  margin-top: 3rem;
  color: var(--text-3);
  font-size: 1.2rem;
  opacity: 0.5;
}
.ps-connector::before { content: '→'; }

/* ===== VALUES ===== */
.values-section {
  padding: 120px 0;
  background: var(--bg);
}
.values-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.val {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.val:hover { border-color: var(--card-border-hover); transform: translateY(-4px); }
.val-num {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}
.val h3 { font-size: 1rem; margin-bottom: 0.6rem; }
.val p { font-size: 0.83rem; color: var(--text-2); line-height: 1.65; }

/* ===== TECH ===== */
.tech-section {
  padding: 100px 0;
  background: var(--bg-2);
}
.tech-table {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.tech-cat {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--card-border);
}
.tech-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.tech-pills span {
  font-size: 0.82rem;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  color: var(--text-2);
  transition: border-color 0.2s, color 0.2s;
}
.tech-pills span:hover { border-color: rgba(79,142,247,0.3); color: var(--text); }

/* ===== CTA ===== */
.cta-section {
  position: relative;
  padding: 140px 0;
  overflow: hidden;
  background: var(--bg);
}
.cta-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
}
.cta-orb-1 { width: 700px; height: 500px; background: radial-gradient(circle, rgba(124,58,237,0.2), transparent 70%); top: -100px; left: -150px; }
.cta-orb-2 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(56,189,248,0.12), transparent 70%); bottom: -100px; right: -100px; }

.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
.light-eyebrow { color: var(--accent-3) !important; }
.cta-content h2 { font-size: clamp(2.2rem, 5vw, 3.5rem); margin-bottom: 1.25rem; }
.cta-content p { font-size: 1.1rem; color: var(--text-2); margin-bottom: 2.5rem; }
.cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--card-border);
  padding: 80px 0 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 4rem;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--card-border);
}
.footer-brand .f-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.fx { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-brand p { font-size: 0.9rem; color: var(--text-2); line-height: 1.7; margin-bottom: 1.5rem; }
.f-social { display: flex; gap: 0.75rem; }
.f-social a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.f-social a:hover { border-color: rgba(79,142,247,0.4); color: var(--accent); }

.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.fn-col h5 {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.fn-col { display: flex; flex-direction: column; gap: 0.6rem; }
.fn-col h5 { margin-bottom: 0.5rem; }
.fn-col a { font-size: 0.88rem; color: var(--text-2); text-decoration: none; transition: color 0.2s; padding: 2px 0; }
.fn-col a:hover { color: var(--text); }
.fn-highlight { color: var(--accent) !important; font-weight: 500; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .values-row { grid-template-columns: repeat(3, 1fr); }
  .tech-table { grid-template-columns: repeat(2, 1fr); }
  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .ps-connector { display: none; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero-stats {
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
  }
  .stat-sep { width: 40px; height: 1px; }
  .hero-stat { padding: 0; }

  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .mv-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .values-row { grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: 1fr 1fr; }
  .tech-table { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .values-row { grid-template-columns: 1fr; }
  .process-steps { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr; }
  .hero-stats { flex-direction: column; }
  .stat-sep { display: none; }
  .pillars-grid { grid-template-columns: 1fr; }
}
