/* TechCorp 2.0 — Main Stylesheet */
:root {
  --bg-deep: #06080f;
  --bg-surface: #0c0c1a;
  --cyan: #00d4ff;
  --blue: #0066ff;
  --orange: #ff4500;
  --gold: #ffb16a;
  --green: #00ffb8;
  --text: #eaf6ff;
  --text-dim: #b8c8d8;
  --border: rgba(0,212,255,.18);
  --glow-cyan: 0 0 24px rgba(0,212,255,.3);
  --glow-blue: 0 0 32px rgba(0,102,255,.4);
  --glow-orange: 0 0 28px rgba(255,69,0,.35);
  --radius: 18px;
  --radius-sm: 10px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

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

html { scroll-behavior: smooth; }
body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
body.loaded { cursor: auto; }
body.loaded .custom-cursor { display: block; }
a, button { cursor: none; }
body.loaded a, body.loaded button { cursor: none; }

/* =============================================
   PRELOADER
   ============================================= */
#techcorp-preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: var(--bg-deep);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity .5s;
}
.pl-grid {
  display: flex; gap: 4px; margin-bottom: 24px;
}
.pl-dot {
  width: 10px; height: 10px;
  background: var(--cyan);
  border-radius: 2px;
  opacity: .15;
  transition: opacity .3s, box-shadow .3s;
}
.pl-pct {
  color: var(--cyan);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .1em;
}

/* =============================================
   CUSTOM CURSOR
   ============================================= */
.custom-cursor {
  display: none;
  position: fixed; z-index: 99998;
  width: 20px; height: 20px;
  border: 2px solid var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%,-50%);
  transition: width .2s, height .2s, border-color .2s;
  mix-blend-mode: difference;
}
.custom-cursor.hover {
  width: 40px; height: 40px;
  border-color: var(--orange);
  box-shadow: 0 0 20px rgba(255,69,0,.5);
}
.cursor-trail {
  display: none;
  position: fixed; z-index: 99997;
  width: 4px; height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%,-50%);
}
.cursor-particle {
  position: fixed; z-index: 99996;
  width: 4px; height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 6px var(--cyan);
}

/* =============================================
   SCROLL PROGRESS
   ============================================= */
#hud-progress {
  position: fixed; top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--blue));
  z-index: 10000;
  transition: width .1s linear;
}

/* =============================================
   NAVIGATION
   ============================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9990;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px; height: 64px;
  transition: background .3s, backdrop-filter .3s, box-shadow .3s;
}
.site-header.transparent { background: transparent; }
.site-header.scrolled {
  background: rgba(6,8,15,.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.site-branding a {
  font-size: 22px; font-weight: 800; color: #fff; text-decoration: none;
  letter-spacing: .02em;
}
.site-branding i { color: var(--cyan); font-style: normal; }
.primary-menu { display: flex; gap: 8px; list-style: none; }
.primary-menu a {
  display: block; padding: 8px 16px;
  color: rgba(255,255,255,.7);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: color .2s, background .2s;
}
.primary-menu a:hover,
.primary-menu .current-menu-item a {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 1px;
  transition: transform .3s;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; }
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: 0 24px;
}
.hero-kicker {
  display: inline-block;
  color: var(--cyan);
  font-size: 14px; font-weight: 800;
  letter-spacing: .15em;
  margin-bottom: 20px;
  padding: 6px 18px;
  border: 1px solid rgba(0,212,255,.3);
  border-radius: 30px;
  background: rgba(0,212,255,.05);
}
.hero-title {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.1;
  font-weight: 900;
  color: #fff;
  margin-bottom: 20px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#hero-subtitle {
  font-size: clamp(16px, 2.5vw, 22px);
  color: var(--text-dim);
  margin-bottom: 36px;
  min-height: 30px;
}
.hero-cta {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.btn-primary, .btn-outline {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 28px;
  font-size: 15px; font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0088ff);
  color: #fff;
  box-shadow: var(--glow-blue);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(0,102,255,.6);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transform: translateX(-100%);
  transition: transform .6s;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-outline {
  border: 1px solid var(--cyan);
  color: var(--cyan);
  background: rgba(0,212,255,.05);
}
.btn-outline:hover {
  background: rgba(0,212,255,.15);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

/* =============================================
   SECTION COMMONS
   ============================================= */
.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  position: relative; z-index: 1;
}
.section-label {
  display: inline-block;
  color: var(--cyan);
  font-size: 13px; font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.2;
}
.section-desc {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.8;
}

/* =============================================
   PRODUCT CARDS (3-column grid)
   ============================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 24px;
}
.flip-card {
  perspective: 1000px;
  height: 420px;
  transition: transform .4s;
}
.flip-card-inner {
  position: relative; width: 100%; height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(12,12,26,.85);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .3s, box-shadow .3s;
}
.flip-card:hover .flip-card-inner {
  border-color: var(--cyan);
  box-shadow: 0 0 40px rgba(0,212,255,.15);
}
.flip-card-img {
  height: 240px; overflow: hidden;
  background: linear-gradient(135deg, rgba(0,102,255,.1), rgba(0,212,255,.05));
  display: flex; align-items: center; justify-content: center;
}
.flip-card-img img { /* homepage */
  width: 100%; height: 100%; object-fit: contain; padding: 2px;
}
.flip-card-body {
  padding: 20px; flex: 1;
  display: flex; flex-direction: column;
  gap: 8px;
}
.flip-card-cat {
  font-size: 12px; color: var(--green); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
}
.flip-card-body h3 {
  font-size: 20px; color: #fff; font-weight: 800;
}
.flip-card-body p { color: var(--text-dim); font-size: 14px; line-height: 1.7; }
.flip-card-body .scene {
  font-size: 12px; color: rgba(255,255,255,.4);
  margin-top: auto;
}
.flip-card-actions {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 0 20px 20px;
}
.flip-card-actions a {
  display: block; padding: 10px; text-align: center;
  border-radius: 8px; font-size: 13px; font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(0,212,255,.3);
  color: var(--cyan);
  transition: all .2s;
}
.flip-card-actions a.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.flip-card-actions a:hover {
  background: rgba(0,212,255,.1);
  border-color: var(--cyan);
}

/* =============================================
   TECH TREE SECTION
   ============================================= */
.tech-tree-wrap {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: center;
}
.tech-tree-visual {
  position: relative;
  min-height: 350px;
  display: flex; flex-direction: column;
  align-items: center; gap: 20px;
}
.tech-tree-visual::before {
  content: '';
  position: absolute; top: 60px; bottom: 60px; width: 2px;
  background: linear-gradient(to bottom, var(--cyan), var(--blue), var(--cyan));
  left: 50%; transform: translateX(-50%);
  opacity: .4;
}
.tech-node {
  position: relative; z-index: 2;
  padding: 16px 24px;
  background: rgba(12,12,26,.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #fff;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: all .3s;
  text-align: center;
  min-width: 200px;
}
.tech-node:hover {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: scale(1.05);
  background: rgba(0,212,255,.08);
}
.tech-node .dot {
  display: block; width: 12px; height: 12px;
  background: var(--cyan);
  border-radius: 50%;
  margin: 0 auto 8px;
  box-shadow: 0 0 12px var(--cyan);
}

/* Tech Panel (slide-in) */
#tech-panel {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  width: 90%; max-width: 500px;
  background: rgba(12,12,26,.96);
  border: 1px solid var(--cyan);
  border-radius: var(--radius);
  padding: 32px;
  z-index: 9995;
  backdrop-filter: blur(40px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 0 60px rgba(0,212,255,.2);
}
#tech-panel.active { transform: translate(-50%,-50%) scale(1); }
.tp-title { font-size: 22px; color: #fff; font-weight: 800; margin-bottom: 12px; }
.tp-desc { color: var(--text-dim); margin-bottom: 20px; line-height: 1.8; }
.tp-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.tp-stat { text-align: center; }
.tp-stat-val { font-size: 24px; color: var(--cyan); font-weight: 800; }
.tp-stat-label { font-size: 11px; color: rgba(255,255,255,.4); margin-top: 4px; }
#tech-panel-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: #fff; font-size: 24px;
  cursor: pointer; opacity: .5;
}
#tech-panel-close:hover { opacity: 1; }

/* =============================================
   HEATING TERMINAL GRID (4-col)
   ============================================= */
.terminal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 20px;
}
.terminal-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(12,12,26,.7);
  overflow: hidden;
  transition: all .3s;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
}
.terminal-card:hover {
  border-color: var(--orange);
  box-shadow: var(--glow-orange);
  transform: translateY(-4px);
}
.terminal-card-img {
  height: 200px; overflow: hidden;
  background: linear-gradient(135deg, rgba(255,69,0,.15), rgba(0,102,255,.1));
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.terminal-card-img img {
  width: 100%; height: 100%; object-fit: contain; padding: 2px;
}
.terminal-card-body {
  padding: 16px;
}
.terminal-card-body h4 {
  font-size: 16px; color: #fff; font-weight: 700; margin-bottom: 6px;
}
.terminal-card-body p {
  font-size: 13px; color: var(--text-dim); line-height: 1.6;
}

/* =============================================
   SCROLLYTELLING (Tech Narrative)
   ============================================= */
.scrolly-section {
  position: relative;
  padding: 120px 0;
}
.scrolly-step {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.scrolly-card {
  max-width: 650px;
  text-align: center;
  padding: 48px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(12,12,26,.8);
  backdrop-filter: blur(20px);
}
.scrolly-icon {
  font-size: 48px; margin-bottom: 20px;
}
.scrolly-card h3 {
  font-size: 28px; color: #fff; margin-bottom: 12px;
  font-weight: 900;
}
.scrolly-card p {
  color: var(--text-dim); line-height: 1.9; font-size: 16px;
}
.scrolly-big-num {
  font-size: 72px; font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 16px 0;
}

/* =============================================
   DATA DASHBOARD
   ============================================= */
.dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 20px;
}
.dash-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(12,12,26,.8);
  padding: 28px;
  text-align: center;
  position: relative; overflow: hidden;
}
.dash-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .5;
}
.dash-val {
  font-size: 36px; font-weight: 900; color: #fff;
  margin: 8px 0;
}
.dash-label {
  font-size: 13px; color: var(--text-dim); letter-spacing: .06em;
}
.dash-sub {
  font-size: 11px; color: var(--green); margin-top: 4px;
}
.deploy-map {
  position: relative; width: 100%; height: 200px;
  background: radial-gradient(circle at center, rgba(0,102,255,.1), transparent);
  border-radius: var(--radius);
  overflow: hidden;
}
.deploy-dot {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: dotPulse 2s infinite;
  box-shadow: 0 0 10px var(--cyan);
}
@keyframes dotPulse {
  0%,100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(2.5); opacity: 1; }
}

/* =============================================
   HEXAGON SCENE GRID
   ============================================= */
.hex-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 16px; max-width: 800px; margin: 0 auto;
}
.hex-cell {
  width: 180px; height: 160px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: rgba(12,12,26,.8);
  border: 1px solid var(--border);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: all .3s;
  cursor: pointer;
  position: relative;
}
.hex-cell:hover,
.hex-cell.hex-active {
  border-color: var(--cyan);
  background: rgba(0,212,255,.08);
  box-shadow: var(--glow-cyan);
  transform: scale(1.1);
  z-index: 2;
}
.hex-icon { font-size: 28px; margin-bottom: 6px; }
.hex-label { font-size: 13px; color: #fff; font-weight: 600; }

/* =============================================
   TIMELINE + CERTIFICATES
   ============================================= */
.timeline-cert-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.timeline {
  position: relative;
  padding-left: 30px;
}
.timeline::before {
  content: '';
  position: absolute; left: 8px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--cyan), var(--blue), var(--orange));
}
.tl-item {
  position: relative; margin-bottom: 28px;
  padding-left: 20px;
}
.tl-item::before {
  content: '';
  position: absolute; left: -26px; top: 4px;
  width: 10px; height: 10px;
  background: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cyan);
}
.tl-year {
  font-size: 12px; color: var(--cyan); font-weight: 700;
  letter-spacing: .1em;
}
.tl-title {
  font-size: 15px; color: #fff; font-weight: 600;
}
.cert-stream {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 20px 0;
}
.cert-card {
  min-width: 160px; height: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(12,12,26,.8);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-dim);
  transition: all .3s;
  flex-shrink: 0;
}
.cert-card:hover {
  border-color: var(--gold);
  box-shadow: 0 0 20px rgba(255,177,106,.2);
  transform: translateY(-4px);
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  position: relative; z-index: 1;
  padding: 60px 24px 36px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.05);
  background: linear-gradient(to top, rgba(0,102,255,.03), transparent);
}
.footer-brand {
  color: var(--cyan);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 900px;
  margin: 0 auto 40px;
  text-align: left;
}
.footer-col h4 {
  font-size: 13px; color: var(--cyan); font-weight: 700;
  letter-spacing: .08em; margin-bottom: 12px; text-transform: uppercase;
}
.footer-col a, .footer-col p {
  display: block; font-size: 13px; color: rgba(255,255,255,.5);
  text-decoration: none; margin-bottom: 6px; transition: color .2s;
}
.footer-col a:hover { color: var(--cyan); }
.footer-bottom {
  font-size: 13px; color: rgba(255,255,255,.3);
}
.footer-bottom a {
  color: rgba(255,255,255,.4); text-decoration: none;
}
.footer-bottom a:hover { color: var(--cyan); }

/* =============================================
   PARTICLE CANVAS
   ============================================= */
#particle-canvas {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .terminal-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard { grid-template-columns: repeat(2, 1fr); }
  .tech-tree-wrap { grid-template-columns: 1fr; }
  .timeline-cert-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .primary-menu { display: none; }
  #primary-nav.open .primary-menu {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: rgba(6,8,15,.95);
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
  }
  .nav-toggle { display: flex; }
  .product-grid { grid-template-columns: 1fr; }
  .terminal-grid { grid-template-columns: 1fr 1fr; }
  .dashboard { grid-template-columns: 1fr; }
  .hero-title { font-size: 32px; }
  .section-wrap { padding: 48px 16px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 480px) {
  .terminal-grid { grid-template-columns: 1fr; }
  .hex-cell { width: 140px; height: 124px; }
  .hero-cta { flex-direction: column; align-items: center; }
}
