/* ============================================
   TOKENS
   ============================================ */
:root {
  --bg: #10151C;
  --bg-elev: #161D27;
  --bg-elev-2: #1C2430;
  --fg: #F2F4F1;
  --fg-dim: #8A93A6;
  --fg-faint: #5C6577;
  --accent: #3D6EFF;
  --accent-dim: #2A4DBF;
  --teal: #1F8A70;
  --line: rgba(242, 244, 241, 0.1);
  --line-strong: rgba(242, 244, 241, 0.18);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --container: 1180px;
  --radius: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 20px 50px -25px rgba(0,0,0,0.7);
  --shadow-lift: 0 30px 70px -20px rgba(61, 110, 255, 0.25);
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul, li { list-style: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--fg); }

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

.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* ambient background glows */
.glow {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(90px);
}

.glow-hero {
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(61,110,255,0.16) 0%, transparent 70%);
}

.glow-about {
  top: 10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(31,138,112,0.12) 0%, transparent 70%);
}

.glow-services {
  bottom: -10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(61,110,255,0.1) 0%, transparent 70%);
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow-mono {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* subtle grain overlay for texture */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%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");
}

/* ============================================
   NAV
   ============================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 21, 28, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin-right: auto;
}

.logo-mark {
  font-family: var(--font-mono);
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-dim);
  transition: color 0.2s ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--accent);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: rgba(61, 110, 255, 0.08);
  box-shadow: 0 4px 16px -6px rgba(61, 110, 255, 0.4);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--fg);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 8px 32px 20px;
  gap: 4px;
  border-top: 1px solid var(--line);
}

.nav-mobile a {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--fg-dim);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.nav-cta-mobile {
  margin-top: 12px;
  text-align: center;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  border-bottom: 1px solid var(--line-strong) !important;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative;
  padding: 96px 32px 120px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
  opacity: 0.5;
  animation: grid-drift 30s linear infinite;
}

.hero-inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  text-align: center;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-dim);
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  margin-bottom: 32px;
  animation: fade-up 0.7s ease both;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(31, 138, 112, 0.5);
  animation: pulse-dot 2.2s ease-in-out infinite;
}

.status-dot-sm { width: 6px; height: 6px; }

.status-sep { color: var(--fg-faint); }

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
  animation: fade-up 0.7s ease 0.1s both;
}

.cursor {
  display: inline-block;
  width: 0.5em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
}

.hero-sub {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 18px;
  color: var(--fg-dim);
  animation: fade-up 0.7s ease 0.2s both;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 80px;
  animation: fade-up 0.7s ease 0.3s both;
}

.btn {
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px 26px;
  border-radius: 7px;
  transition: transform 0.35s var(--ease), background 0.3s ease, border-color 0.3s ease, box-shadow 0.35s var(--ease);
  display: inline-block;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 8px 24px -8px rgba(61, 110, 255, 0.5);
}

.btn-primary:hover { background: var(--accent-dim); transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--fg);
}

.btn-ghost:hover { border-color: var(--fg-dim); transform: translateY(-2px); background: rgba(255,255,255,0.02); }

.btn-block { width: 100%; text-align: center; border: none; }

/* terminal card */
.hero-terminal {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  animation: fade-up 0.8s var(--ease) 0.4s both;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.hero-terminal:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), var(--shadow-lift);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--line);
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-r { background: #FF5F57; }
.dot-y { background: #FEBC2E; }
.dot-g { background: #28C840; }

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
}

.terminal-body {
  padding: 22px 20px;
  font-family: var(--font-mono);
  font-size: 14px;
  text-align: left;
}

.terminal-body p { margin-bottom: 10px; }
.terminal-body p:last-child { margin-bottom: 0; }

.tk-prompt { color: var(--accent); }
.tk-cmd { color: var(--fg); }
.tk-flag { color: var(--fg-faint); }
.tk-out { color: var(--fg-dim); padding-left: 18px; }
.tk-dim { color: var(--fg-faint); }
.tk-accent { color: var(--teal); }
.tk-blink { animation: blink 1s step-end infinite; color: var(--fg); }

/* ============================================
   ABOUT
   ============================================ */
.about {
  position: relative;
  padding: 120px 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.eyebrow { margin-bottom: 20px; }

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
}

.about-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.about-copy p {
  color: var(--fg-dim);
  margin-bottom: 18px;
  max-width: 540px;
}

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--accent);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
}

/* ============================================
   SERVICES
   ============================================ */
.services {
  position: relative;
  padding: 120px 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.services-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  margin-bottom: 56px;
  max-width: 600px;
}

.cmd-list {
  display: flex;
  flex-direction: column;
}

.cmd-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 36px 24px;
  margin: 0 -24px;
  border-top: 1px solid var(--line);
  border-radius: 12px;
  transition: padding-left 0.4s var(--ease), background 0.4s var(--ease), border-color 0.3s ease;
}

.cmd-row:last-child { border-bottom: 1px solid var(--line); }

.cmd-row:hover {
  padding-left: 36px;
  background: linear-gradient(90deg, rgba(61,110,255,0.06), transparent 60%);
}

.cmd-row:hover .cmd-prompt {
  color: var(--teal);
}

.cmd-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-mono);
}

.cmd-prompt { color: var(--accent); font-size: 18px; transition: color 0.3s ease; }

.cmd-name {
  font-size: 18px;
  color: var(--fg);
}

.cmd-right h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 10px;
}

.cmd-right p {
  color: var(--fg-dim);
  max-width: 520px;
}

/* ============================================
   CONTACT
   ============================================ */
.contact {
  padding: 120px 0 100px;
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  margin: 16px 0 18px;
  letter-spacing: -0.01em;
}

.contact-sub {
  color: var(--fg-dim);
  max-width: 400px;
  margin-bottom: 40px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.contact-detail:last-child { border-bottom: 1px solid var(--line); }

.detail-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
}

.detail-value {
  font-size: 16px;
  transition: color 0.2s ease;
}

a.contact-detail:hover .detail-value { color: var(--accent); }

.contact-form {
  background: linear-gradient(160deg, var(--bg-elev), var(--bg-elev-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: fit-content;
  box-shadow: var(--shadow-card);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
}

.field input,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 110, 255, 0.15);
}

.form-note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--teal);
  min-height: 18px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-elev) 100%);
  overflow: hidden;
}

/* sliding marquee */
.marquee {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  animation: marquee-slide 26s linear infinite;
}

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

.marquee-item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 3.4vw, 34px);
  color: transparent;
  -webkit-text-stroke: 1px var(--line-strong);
  text-stroke: 1px var(--line-strong);
  padding: 0 28px;
  white-space: nowrap;
  transition: color 0.3s ease, -webkit-text-stroke 0.3s ease;
}

.marquee-item:hover {
  color: var(--accent);
  -webkit-text-stroke: 1px var(--accent);
}

.marquee-dot {
  color: var(--accent);
  font-size: 14px;
}

@keyframes marquee-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.footer-main {
  padding: 64px 0 0;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-col a {
  color: var(--fg-dim);
  font-size: 14px;
  width: fit-content;
  position: relative;
  transition: color 0.25s ease;
}

.footer-col a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.footer-col a:hover {
  color: var(--fg);
}

.footer-col a:hover::after {
  width: 100%;
}

.footer-static {
  color: var(--fg-faint);
  font-size: 14px;
}

.footer-tagline {
  color: var(--fg-dim);
  font-size: 14px;
  max-width: 260px;
  line-height: 1.6;
}

.status-line-footer {
  margin-top: 8px;
  width: fit-content;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 32px;
  border-top: 1px solid var(--line);
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-faint);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 64px 64px, 64px 64px; }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(31, 138, 112, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(31, 138, 112, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 138, 112, 0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-soft), transform 0.8s var(--ease-soft);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .nav.is-open .nav-mobile { display: flex; }
  .nav.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .cmd-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
    padding: 28px 4px;
  }
  .cmd-row:hover { padding-left: 4px; }

  .about-stats { gap: 28px; flex-wrap: wrap; }

  .hero { padding: 64px 20px 80px; }
  .about, .services, .contact { padding: 80px 0; }
  .section-inner { padding: 0 20px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px 24px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .hero-grid { animation: none; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; width: 100%; }
  .btn { text-align: center; }
}
