/* ============================================
   CAC NEXUS — Landing Page Styles
   ============================================ */

/* ---- Variables ---- */
:root {
  --bg-primary:    #0a0f1e;
  --bg-secondary:  #0f1628;
  --bg-card:       #141c35;
  --accent-purple: #7B2FFF;
  --accent-cyan:   #00CFFF;
  --gradient:      linear-gradient(135deg, #7B2FFF, #00CFFF);
  --gradient-rev:  linear-gradient(135deg, #00CFFF, #7B2FFF);
  --text-primary:  #f0f4ff;
  --text-muted:    #7a8ab0;
  --border:        rgba(123, 47, 255, 0.2);
  --border-cyan:   rgba(0, 207, 255, 0.2);

  --font-display: 'Orbitron', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --transition: 0.3s ease;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* ---- Utility ---- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 15, 30, 0.97);
  border-bottom-color: rgba(123, 47, 255, 0.4);
}

.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 48px;
  width: auto;
  transition: opacity var(--transition);
}

.nav-logo:hover img {
  opacity: 0.85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gradient);
  transition: width var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(123, 47, 255, 0.35);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(123, 47, 255, 0.55);
  filter: brightness(1.08);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent-purple);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 16px 40px;
  font-size: 1rem;
}

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

/* Grid lines background */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.hero-orb--purple {
  width: 480px;
  height: 480px;
  background: rgba(123, 47, 255, 0.18);
  right: -80px;
  top: 10%;
  animation: orbDrift 10s ease-in-out infinite alternate;
}

.hero-orb--cyan {
  width: 380px;
  height: 380px;
  background: rgba(0, 207, 255, 0.12);
  left: -60px;
  bottom: 5%;
  animation: orbDrift 12s ease-in-out infinite alternate-reverse;
}

@keyframes orbDrift {
  from { transform: translate(0, 0); }
  to   { transform: translate(20px, -30px); }
}

/* Hero layout */
.hero-container {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Hero logo block */
.hero-logo-block {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(123, 47, 255, 0.15);
}

.hero-logo-block img {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.hero-logo-block .hero-logo-tag {
  font-size: 11px;
  letter-spacing: 2px;
  color: #7a8ab0;
  text-transform: uppercase;
}

/* Title */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
  color: var(--text-primary);
}

/* Description */
.hero-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

/* Actions */
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Trust indicators */
.hero-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-trust span {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Terminal ---- */
.hero-terminal-wrap {
  animation: terminalFloat 5s ease-in-out infinite;
}

@keyframes terminalFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-14px); }
}

.hero-terminal {
  background: #0d1327;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background-clip: padding-box;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 0 1px var(--border), 0 0 40px rgba(123, 47, 255, 0.12);
}

/* Gradient border via pseudo */
.hero-terminal::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot--red    { background: #ff5f57; }
.terminal-dot--yellow { background: #febc2e; }
.terminal-dot--green  { background: #28c840; }

.terminal-title {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: 22px 22px 28px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.8rem;
  line-height: 1.8;
  min-height: 280px;
}

.terminal-line {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
}

.t-prompt   { color: var(--accent-cyan); }
.t-cmd      { color: #f0f4ff; }
.t-comment  { color: #4a5e7a; }
.t-success  { color: #28c840; }
.t-purple   { color: var(--accent-purple); }
.t-cyan     { color: var(--accent-cyan); }
.t-yellow   { color: #febc2e; }
.t-empty    { display: block; height: 0.4em; }

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--accent-cyan);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

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

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-purple), transparent);
}

.scroll-label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section {
  padding: 100px 0;
}

.section--alt {
  background: var(--bg-secondary);
}

.section-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 56px;
  letter-spacing: -0.01em;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto;
  gap: 24px;
}

.project-card--featured {
  grid-column: 1 / 3;
}

.project-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 47, 255, 0.5);
  box-shadow: 0 16px 48px rgba(123, 47, 255, 0.15);
}

.project-card:hover .project-card-glow {
  opacity: 1;
}

.project-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(123, 47, 255, 0.07), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.project-card-inner {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
}

.project-tags-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-tag {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-cyan);
  background: rgba(0, 207, 255, 0.08);
  border: 1px solid rgba(0, 207, 255, 0.15);
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.04em;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 100px;
  width: fit-content;
}

.project-status--wip {
  color: #febc2e;
  background: rgba(254, 188, 46, 0.08);
  border: 1px solid rgba(254, 188, 46, 0.2);
}

.project-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.project-tech {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tech-tag {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 3px 10px;
  border-radius: 6px;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: color var(--transition);
}

.project-link:hover {
  color: var(--accent-cyan);
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #28c840;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(40, 200, 64, 0.7);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(40, 200, 64, 0.7); }
  50%       { box-shadow: 0 0 12px rgba(40, 200, 64, 1); }
}

/* ============================================
   SERVICES
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(123, 47, 255, 0.55);
  box-shadow: 0 16px 48px rgba(123, 47, 255, 0.12);
}

.service-number {
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.12;
  line-height: 1;
  user-select: none;
}

.service-card:hover .service-number {
  opacity: 0.22;
  transition: opacity var(--transition);
}

.service-icon {
  color: var(--accent-cyan);
  margin-bottom: 18px;
}

.service-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================
   CONTACT
   ============================================ */
.section--contact {
  background: var(--bg-primary);
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-inner .section-title {
  margin-bottom: 16px;
}

.contact-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

.social-link {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all var(--transition);
}

.social-link:hover {
  border-color: var(--accent-purple);
  color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(123, 47, 255, 0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  padding: 40px 0 28px;
}

.footer-line {
  height: 1px;
  background: var(--gradient);
  margin-bottom: 40px;
  opacity: 0.3;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}

.footer-logo img {
  height: 36px;
  width: auto;
  opacity: 0.85;
  transition: opacity var(--transition);
}

.footer-logo:hover img {
  opacity: 1;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 24px;
}

.footer-link {
  font-size: 0.82rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-domain {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(122, 138, 176, 0.4);
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}

/* ============================================
   RESPONSIVE — Tablet (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 56px;
    text-align: center;
  }

  .hero-description {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-trust {
    justify-content: center;
  }

  .hero-orb--purple {
    width: 340px;
    height: 340px;
    right: -60px;
    top: 5%;
  }

  .hero-orb--cyan {
    width: 260px;
    height: 260px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card--featured {
    grid-column: 1;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE — Mobile (≤640px)
   ============================================ */
@media (max-width: 640px) {
  .hero {
    padding: 88px 0 60px;
  }

  .hero-title {
    font-size: 1.7rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-trust {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .section {
    padding: 72px 0;
  }

  .section-title {
    margin-bottom: 36px;
  }

  .project-card-inner {
    padding: 24px 20px;
  }

  .service-card {
    padding: 28px 22px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(10, 15, 30, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 24px 0;
    gap: 0;
    border-bottom: 1px solid var(--border);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-link {
    display: block;
    padding: 14px 28px;
    font-size: 1rem;
  }

  .nav-link::after {
    display: none;
  }
}
