/* ============================================
   HAYESTEC — Intelligent Insight for an Evolving World
   Cyan TRON + Logo-Derived Palette
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Backgrounds */
  --bg-void:       #030609;
  --bg-deep:       #060b14;
  --bg-primary:    #081018;
  --bg-card:       rgba(8, 18, 32, 0.75);
  --bg-card-hover: rgba(12, 26, 44, 0.85);

  /* Neon — derived from logo teal */
  --cyan:          #00d4ff;
  --cyan-bright:   #40e0ff;
  --cyan-dim:      #0090b8;
  --glow:          rgba(0, 212, 255, 0.35);
  --glow-soft:     rgba(0, 212, 255, 0.08);
  --glow-wide:     rgba(0, 212, 255, 0.12);

  /* Warm accent — derived from logo red gears */
  --accent:        #e63946;
  --accent-glow:   rgba(230, 57, 70, 0.30);

  /* Text */
  --text-bright:   #eef2f6;
  --text-primary:  #bcc8d4;
  --text-secondary:#6a7a8c;
  --text-muted:    #3c4c5c;

  /* Borders */
  --border:        rgba(0, 212, 255, 0.08);
  --border-hover:  rgba(0, 212, 255, 0.22);

  /* Fonts */
  --font:          'Inter', system-ui, -apple-system, sans-serif;
  --font-display:  'Orbitron', sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  /* Motion */
  --ease:          cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --max-w:         1180px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--cyan); text-decoration: none; transition: all 0.3s var(--ease); }
a:hover { color: var(--text-bright); }
img { max-width: 100%; display: block; }
.container { width: 90%; max-width: var(--max-w); margin: 0 auto; }

/* ===== GLOBAL ATMOSPHERE ===== */
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    linear-gradient(rgba(0, 212, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.015) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none; z-index: 0;
}

/* ===== LOGO MARK ===== */
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}

.logo-mark {
  width: 34px; height: 34px; object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.2));
  transition: filter 0.3s;
}

.logo:hover .logo-mark {
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.35));
}

.logo-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-bright);
}

.logo-wordmark span {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(0, 212, 255, 0.3);
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; padding: 0 5%;
  transition: all 0.4s var(--ease);
}

.nav-bg {
  position: absolute; inset: 0;
  background: rgba(3, 6, 9, 0);
  backdrop-filter: blur(0);
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease);
}

.nav.scrolled .nav-bg {
  background: rgba(3, 6, 9, 0.82);
  backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}

.nav-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto; height: 72px;
}

.nav-links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}

.nav-links a {
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-secondary); position: relative; padding: 4px 0;
  transition: color 0.3s var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--glow);
  transition: width 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a.active { color: var(--cyan); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--cyan); border-radius: 1px;
  transition: all 0.3s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ===== HERO ===== */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; z-index: 1;
}

.hero-bg {
  position: absolute; inset: 0;
  background: url('../images/hero-city.jpg') center 40% / cover no-repeat;
  animation: drift 25s ease-in-out infinite alternate;
}

@keyframes drift {
  0%   { transform: scale(1.04); }
  100% { transform: scale(1.08) translate(-8px, -4px); }
}

.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 60%),
    linear-gradient(180deg,
      rgba(3, 6, 9, 0.45) 0%,
      rgba(3, 6, 9, 0.25) 35%,
      rgba(3, 6, 9, 0.55) 65%,
      var(--bg-void) 100%
    );
  z-index: 1;
}

/* Scan line */
.hero-scan {
  position: absolute; left: 0; right: 0;
  height: 1px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  box-shadow: 0 0 30px var(--glow), 0 0 60px rgba(0, 212, 255, 0.1);
  animation: scan 8s ease-in-out infinite;
}

@keyframes scan {
  0%   { top: 20%; opacity: 0; }
  8%   { opacity: 0.35; }
  92%  { opacity: 0.35; }
  100% { top: 80%; opacity: 0; }
}

.hero-content {
  position: relative; z-index: 3;
  max-width: 740px; padding: 0 20px;
}

/* Hero branding */
.hero-brand {
  margin-bottom: 28px;
}

.hero-icon {
  width: 88px; height: 88px;
  margin: 0 auto 22px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.25));
  animation: icon-pulse 5s ease-in-out infinite alternate;
}

@keyframes icon-pulse {
  0%   { filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.2)); }
  100% { filter: drop-shadow(0 0 22px rgba(0, 212, 255, 0.35)); }
}

.hero-wordmark {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--text-bright);
  text-shadow:
    0 0 10px rgba(0, 212, 255, 0.25),
    0 0 30px rgba(0, 212, 255, 0.1);
  margin-bottom: 8px;
}

.hero-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.2vw, 0.75rem);
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--cyan-dim);
}

.hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.3rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  margin: 36px 0 20px;
}

.hero h1 strong {
  font-weight: 700;
  color: var(--text-bright);
}

.hero-sub {
  font-size: clamp(0.88rem, 1.6vw, 1rem);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 4px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.5px; cursor: pointer; border: none;
  transition: all 0.3s var(--ease);
}

.btn-glow {
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.06);
}
.btn-glow:hover {
  background: rgba(0, 212, 255, 0.14);
  border-color: var(--cyan);
  color: var(--text-bright);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.12);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-ghost:hover {
  color: var(--text-bright);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

/* ===== SECTIONS ===== */
section { position: relative; z-index: 1; }
.section-pad { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 60px; }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--cyan-dim); margin-bottom: 14px; display: block;
}

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 700; color: var(--text-bright);
  margin-bottom: 14px; line-height: 1.2;
}

.section-desc {
  font-size: 0.95rem; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto; line-height: 1.7;
}

/* Dividers */
.glow-line {
  height: 1px; width: 60%; margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
}

/* ===== SERVICES ===== */
.services {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(0, 212, 255, 0.025) 0%, transparent 60%),
    var(--bg-deep);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  position: relative;
  padding: 34px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.4s var(--ease);
}

/* Top edge glow */
.service-card::before {
  content: '';
  position: absolute; top: -1px; left: 20%; right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 40px rgba(0, 212, 255, 0.03);
}
.service-card:hover::before { opacity: 0.6; }

.service-icon {
  width: 44px; height: 44px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  background: rgba(0, 212, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--cyan);
  transition: all 0.4s var(--ease);
}

.service-card:hover .service-icon {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.1);
}

.service-card h3 {
  font-size: 1.02rem; font-weight: 600;
  color: var(--text-bright); margin-bottom: 10px;
}
.service-card p {
  font-size: 0.86rem; color: var(--text-secondary); line-height: 1.65;
}

/* ===== TRACK RECORD / CAPABILITIES ===== */
.track {
  background: var(--bg-void);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.track-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.track-item {
  padding: 52px 36px;
  text-align: center;
  position: relative;
  transition: background 0.4s var(--ease);
}

.track-item:not(:last-child) {
  border-right: 1px solid var(--border);
}

.track-item:hover {
  background: rgba(0, 212, 255, 0.015);
}

.track-num {
  font-family: var(--font-display);
  font-size: 0.6rem; font-weight: 700;
  letter-spacing: 2px; color: var(--cyan-dim);
  margin-bottom: 18px; display: block;
}

.track-icon {
  width: 52px; height: 52px; margin: 0 auto 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--cyan);
  transition: all 0.4s var(--ease);
}

.track-item:hover .track-icon {
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.track-item h3 {
  font-size: 1.08rem; font-weight: 600;
  color: var(--text-bright); margin-bottom: 10px;
}
.track-item p {
  font-size: 0.86rem; color: var(--text-secondary);
  line-height: 1.6; max-width: 260px; margin: 0 auto;
}

/* ===== MISSION ===== */
.mission {
  padding: 64px 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.mission-quote {
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  padding: 0 24px;
  font-style: italic;
}

.mission-quote::before {
  content: '';
  display: block;
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  margin: 0 auto 24px;
}

/* ===== ABOUT ===== */
.about {
  background:
    radial-gradient(ellipse at 30% 50%, rgba(0, 212, 255, 0.02) 0%, transparent 50%),
    var(--bg-deep);
}

.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 72px; align-items: center;
}

.about-text .section-label { text-align: left; }

.about-text h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700; color: var(--text-bright);
  margin-bottom: 22px; line-height: 1.2;
}
.about-text p {
  font-size: 0.92rem; color: var(--text-secondary);
  margin-bottom: 14px; line-height: 1.7;
}
.about-text .btn { margin-top: 18px; }

/* Orbital graphic */
.orbital { display: flex; align-items: center; justify-content: center; }

.orbital-wrap {
  width: 100%; max-width: 380px; aspect-ratio: 1; position: relative;
}

.orbit {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(0, 212, 255, 0.06);
  animation: spin 28s linear infinite;
}
.orbit:nth-child(1) { inset: 0; }
.orbit:nth-child(2) { inset: 15%; border-color: rgba(0, 212, 255, 0.09); animation-duration: 21s; animation-direction: reverse; }
.orbit:nth-child(3) { inset: 30%; border-color: rgba(0, 212, 255, 0.13); animation-duration: 15s; }

.orbit-dot {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); top: 50%; right: -3px; transform: translateY(-50%);
  box-shadow: 0 0 10px var(--glow);
}

/* Red accent dot on one orbit — from logo gears */
.orbit:nth-child(2) .orbit-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.orbital-core {
  position: absolute; inset: 37%;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.02);
  border: 1px solid rgba(0, 212, 255, 0.12);
}

.orbital-core img {
  width: 60%; height: 60%; object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.2));
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== CONTACT ===== */
.contact { background: var(--bg-void); }

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
}

.contact-info .section-label { text-align: left; }

.contact-info h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700; color: var(--text-bright); margin-bottom: 18px;
}
.contact-info > p {
  color: var(--text-secondary); font-size: 0.92rem;
  line-height: 1.7; margin-bottom: 32px;
}

.contact-details { display: flex; flex-direction: column; gap: 18px; }
.contact-row { display: flex; align-items: center; gap: 14px; }

.contact-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 212, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--cyan); flex-shrink: 0;
}
.contact-label {
  font-size: 0.68rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1px;
}
.contact-val { font-size: 0.9rem; color: var(--text-primary); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.contact-form input,
.contact-form textarea {
  width: 100%; padding: 12px 16px;
  background: rgba(8, 18, 32, 0.6);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary); font-family: var(--font);
  font-size: 0.88rem;
  transition: all 0.3s var(--ease); outline: none;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.06);
}
.contact-form textarea { min-height: 120px; resize: vertical; }

/* ===== FOOTER ===== */
.footer {
  padding: 36px 0 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-void);
  position: relative; z-index: 1;
}

.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}

.footer-left { display: flex; align-items: center; gap: 16px; }

.footer .logo-mark { width: 22px; height: 22px; }
.footer .logo-wordmark { font-size: 0.78rem; letter-spacing: 2px; }

.footer-copy { font-size: 0.75rem; color: var(--text-muted); }

.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.75rem; color: var(--text-secondary); }
.footer-links a:hover { color: var(--cyan); }

/* ===== REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.r1 { transition-delay: 0.06s; }
.r2 { transition-delay: 0.12s; }
.r3 { transition-delay: 0.18s; }
.r4 { transition-delay: 0.24s; }
.r5 { transition-delay: 0.30s; }
.r6 { transition-delay: 0.36s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .track-grid { grid-template-columns: 1fr; }
  .track-item:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .orbital { order: -1; }
  .orbital-wrap { max-width: 260px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section-pad { padding: 72px 0; }

  .nav-links {
    display: none; position: absolute;
    top: 72px; left: -5vw; right: -5vw;
    flex-direction: column;
    background: rgba(3, 6, 9, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 13px 5vw; }
  .nav-links a::after { display: none; }
  .nav-toggle { display: flex; }

  .hero-icon { width: 64px; height: 64px; }
  .services-grid { grid-template-columns: 1fr; }
  .form-pair { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-left { flex-direction: column; }
}
