/* ============ TOKENS ============ */
:root {
  --ink: #0D1017;
  --ink-2: #12161F;
  --panel: #171C27;
  --panel-line: rgba(255,255,255,0.08);
  --text: #ECEFF4;
  --text-dim: #9AA3B2;
  --amber: #FFB454;
  --amber-dim: #4A3A22;
  --steel: #6E9BFF;
  --steel-dim: #202B45;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

::selection { background: var(--amber); color: var(--ink); }

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

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.9rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(13,16,23,0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--panel-line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: block;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.brand-mark { color: var(--amber); }
.brand-name { color: var(--text); }

.nav-links {
  display: flex;
  gap: 2rem;
  margin-left: auto;
  margin-right: 2rem;
}

.nav-links a {
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); }

.nav-cta { flex-shrink: 0; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  margin-left: 0.75rem;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  transition: border-color 0.2s ease;
  flex-shrink: 0;
}
.lang-toggle:hover { border-color: var(--amber); }
.lang-sep { color: var(--panel-line); }
.lang-opt { transition: color 0.2s ease; }
.lang-opt.is-active { color: var(--amber); font-weight: 600; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.burger span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--amber);
  color: #1A1300;
}
.btn-primary:hover { background: #ffc677; transform: translateY(-1px); }

.btn-outline {
  border: 1px solid var(--panel-line);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--amber); color: var(--amber); }

.btn-ghost {
  border: 1px solid var(--panel-line);
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
}
.btn-ghost:hover { border-color: var(--steel); color: var(--steel); }

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 21rem 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 20%, black 40%, transparent 75%);
}

.circuit {
  width: 100%;
  height: 100%;
  color: var(--steel);
  opacity: 0.35;
}

.phoenix {
  position: absolute;
  top: -3rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(68vw, 780px);
  max-width: none;
  opacity: 0.9;
  pointer-events: none;
}

.particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  top: -5%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0;
  box-shadow: 0 0 5px rgba(236, 239, 244, 0.7);
  animation: particleFall linear infinite;
}

.particle:nth-child(1)  { left: 6%;  width: 2px; height: 2px; animation-duration: 9s;  animation-delay: 0s; }
.particle:nth-child(2)  { left: 14%; width: 3px; height: 3px; animation-duration: 11s; animation-delay: 1.2s; }
.particle:nth-child(3)  { left: 22%; width: 2px; height: 2px; animation-duration: 8s;  animation-delay: 2.4s; }
.particle:nth-child(4)  { left: 30%; width: 3px; height: 3px; animation-duration: 12s; animation-delay: 0.6s; }
.particle:nth-child(5)  { left: 38%; width: 2px; height: 2px; animation-duration: 10s; animation-delay: 3.1s; }
.particle:nth-child(6)  { left: 46%; width: 3px; height: 3px; animation-duration: 9s;  animation-delay: 1.8s; }
.particle:nth-child(7)  { left: 54%; width: 2px; height: 2px; animation-duration: 11s; animation-delay: 4.2s; }
.particle:nth-child(8)  { left: 62%; width: 3px; height: 3px; animation-duration: 8s;  animation-delay: 0.3s; }
.particle:nth-child(9)  { left: 70%; width: 2px; height: 2px; animation-duration: 10s; animation-delay: 2.9s; }
.particle:nth-child(10) { left: 78%; width: 3px; height: 3px; animation-duration: 12s; animation-delay: 1.5s; }
.particle:nth-child(11) { left: 86%; width: 2px; height: 2px; animation-duration: 9s;  animation-delay: 3.6s; }
.particle:nth-child(12) { left: 94%; width: 3px; height: 3px; animation-duration: 11s; animation-delay: 0.9s; }
.particle:nth-child(13) { left: 18%; width: 2px; height: 2px; animation-duration: 13s; animation-delay: 5s; }
.particle:nth-child(14) { left: 42%; width: 2px; height: 2px; animation-duration: 10s; animation-delay: 4.5s; }
.particle:nth-child(15) { left: 66%; width: 2px; height: 2px; animation-duration: 12s; animation-delay: 2.1s; }
.particle:nth-child(16) { left: 90%; width: 2px; height: 2px; animation-duration: 9s;  animation-delay: 3.9s; }

@keyframes particleFall {
  0%   { transform: translateY(0); opacity: 0; }
  8%   { opacity: 0.9; }
  92%  { opacity: 0.9; }
  100% { transform: translateY(110vh); opacity: 0; }
}

@media (max-width: 720px) {
  .phoenix { width: min(105vw, 460px); top: -1.5rem; }
}

.circuit-lines path {
  opacity: 0.5;
}

.hero-inner { position: relative; z-index: 1; max-width: 760px; }

.hero-title {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.08;
  margin-bottom: 1.4rem;
}
.hero-title .hl { color: var(--amber); }

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 2.2rem;
}

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

.stat-strip {
  position: relative;
  z-index: 1;
  margin-top: 5rem;
  width: 100%;
  max-width: var(--container);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--panel-line);
}

.stat {
  padding: 1.8rem 1rem;
  border-right: 1px solid var(--panel-line);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.stat:last-child { border-right: none; }

.stat-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  color: var(--amber);
}
.stat-label {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ============ SECTIONS ============ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 7rem 1.5rem;
}
.section-alt {
  max-width: none;
  background: var(--ink-2);
  border-top: 1px solid var(--panel-line);
  border-bottom: 1px solid var(--panel-line);
}
.section-alt > * { max-width: var(--container); margin-left: auto; margin-right: auto; }

.section-head {
  max-width: 620px;
  margin-bottom: 3.5rem;
}
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

/* ============ SERVICES ============ */
.grid { display: grid; gap: 1.25rem; }
.services-grid { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover {
  border-color: var(--amber-dim);
  transform: translateY(-3px);
}
.card-icon {
  font-size: 1.4rem;
  color: var(--amber);
  margin-bottom: 1rem;
}
.card h3 { font-size: 1.08rem; margin-bottom: 0.6rem; }
.card p { color: var(--text-dim); font-size: 0.93rem; }

/* ============ WHY ============ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem 3rem;
}
.why-item { border-left: 2px solid var(--steel-dim); padding-left: 1.5rem; }
.why-num {
  font-family: var(--font-mono);
  color: var(--steel);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.5rem;
}
.why-item h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.why-item p { color: var(--text-dim); font-size: 0.93rem; }

/* ============ TESTIMONIALS ============ */
.testi-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.testi {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  padding: 2rem;
}
.testi p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}
.testi footer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.testi-initial {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--steel-dim);
  color: var(--steel);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

/* ============ CTA ============ */
.cta {
  max-width: var(--container);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}
.cta-inner {
  background: linear-gradient(135deg, var(--panel), var(--ink-2));
  border: 1px solid var(--panel-line);
  border-radius: 20px;
  padding: 4rem 2rem;
  text-align: center;
}
.cta-inner h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.9rem; }
.cta-inner p { color: var(--text-dim); max-width: 480px; margin: 0 auto 2rem; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--panel-line);
  padding: 4rem 1.5rem 2rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
}

.footer-icon {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  display: block;
}

.footer-brand-text .brand-mark,
.footer-brand-text .brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 0.8rem;
  max-width: 320px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--amber); }

.footer-bottom {
  max-width: var(--container);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--panel-line);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .circuit-lines path { animation: none; }
  .particle { animation: none; opacity: 0; }
  html { scroll-behavior: auto; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  .services-grid, .testi-track { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: flex; }
  .lang-toggle { margin-left: auto; margin-right: 0.5rem; }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--ink-2);
    padding: 1.5rem;
    border-bottom: 1px solid var(--panel-line);
    gap: 1.2rem;
    margin: 0;
  }
  .hero { padding-top: 15rem; }
}
