/* ═══════════════════════════════════════════════
   SparkForge Design Overhaul - Shared Styles
   Kill AI template patterns, add real design
   ═══════════════════════════════════════════════ */

/* ── BACKGROUND: Diagonal scan lines + drifting gradient mesh ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 3px,
    rgba(245,158,11,0.02) 3px,
    rgba(245,158,11,0.02) 4px
  );
  background-size: auto;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  top: -30%;
  right: -15%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(
    ellipse at center,
    rgba(245,158,11,0.035) 0%,
    rgba(249,115,22,0.015) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
  animation: meshDrift 25s ease-in-out infinite;
}

@keyframes meshDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-3%, 5%) scale(1.05); }
  66% { transform: translate(2%, -3%) scale(0.95); }
}

/* ── CUSTOM CURSOR (desktop only) ── */
@media (pointer: fine) {
  body.custom-cursor, body.custom-cursor * { cursor: none !important; }
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #f59e0b;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  box-shadow: 0 0 10px rgba(245,158,11,0.5), 0 0 20px rgba(245,158,11,0.2);
  transform: translate(-50%, -50%);
  will-change: left, top;
}

/* ── ACTIVE PAGE NAV INDICATOR ── */
.nav-links a.active-page {
  color: var(--text, #f1f5f9) !important;
  border-bottom: 1px solid rgba(245,158,11,0.5);
  padding-bottom: 1px;
}
.nav-drawer ul a.active-page {
  color: var(--text, #f1f5f9) !important;
}

/* ── NAV SCROLL PROGRESS BAR ── */
.nav-progress {
  position: fixed;
  top: 57px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #f59e0b, #f97316);
  z-index: 501;
  width: 0%;
  pointer-events: none;
}

/* ── CARD SHIMMER (light sweep on hover) ── */
.shimmer-card {
  position: relative;
  overflow: hidden;
}
.shimmer-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(245,158,11,0.06) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}
.shimmer-card:hover::after {
  animation: shimmerSweep 0.7s ease-out forwards;
}
@keyframes shimmerSweep {
  from { left: -75%; }
  to { left: 125%; }
}

/* ── VARIED CARD HOVERS (break the uniform translateY pattern) ── */

/* Service cards: glow / scale / default lift */
.scard:nth-child(3n+1):hover {
  transform: none !important;
  box-shadow: 0 0 30px rgba(245,158,11,0.12), inset 0 0 30px rgba(245,158,11,0.03);
}
.scard:nth-child(3n+2):hover {
  transform: scale(1.02) !important;
}

/* Hero capability cards: alternate scale vs lift */
.hcap:nth-child(odd):hover {
  transform: scale(1.025) !important;
}
.hcap:nth-child(even):hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 6px 24px rgba(245,158,11,0.08);
}

/* Automation catalog cards */
.auto-card:nth-child(3n+1):hover {
  transform: none !important;
  box-shadow: 0 0 24px rgba(245,158,11,0.1);
}
.auto-card:nth-child(3n+2):hover {
  transform: scale(1.015) !important;
}

/* Spec cards */
.spec-card:nth-child(odd):hover {
  box-shadow: 0 0 24px rgba(245,158,11,0.08);
}

/* ── VARIED REVEAL ANIMATIONS ── */
.reveal-from-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .72s ease, transform .72s ease;
}
.reveal-from-left.in {
  opacity: 1;
  transform: none;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity .72s ease, transform .72s ease;
}
.reveal-scale.in {
  opacity: 1;
  transform: none;
}

/* Delay classes work with all reveal types */
.reveal-from-left.reveal-d1, .reveal-scale.reveal-d1 { transition-delay: .08s; }
.reveal-from-left.reveal-d2, .reveal-scale.reveal-d2 { transition-delay: .16s; }
.reveal-from-left.reveal-d3, .reveal-scale.reveal-d3 { transition-delay: .24s; }
.reveal-from-left.reveal-d4, .reveal-scale.reveal-d4 { transition-delay: .32s; }

/* ── HERO WORD STAGGER ── */
.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}
.hero-word.in {
  opacity: 1;
  transform: none;
}

/* ── HERO GRID LAYOUT (index.html) ── */
.hero-top {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.hero-top .hero-inner {
  max-width: none;
  margin: 0;
  text-align: left;
}
.hero-top .hero-btns {
  justify-content: flex-start;
}

/* ── TERMINAL VISUAL ── */
.hero-terminal {
  background: rgba(12,12,26,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  line-height: 1.7;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  animation: terminalFadeIn 1s ease 0.6s both;
}
@keyframes terminalFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1rem;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.terminal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #28c840; }
.terminal-title {
  margin-left: 0.75rem;
  font-size: 0.65rem;
  color: var(--muted, #64748b);
  font-family: 'Inter', system-ui, sans-serif;
  letter-spacing: 0.02em;
}
.terminal-body {
  padding: 1rem 1.25rem;
  margin: 0;
  color: var(--muted2, #94a3b8);
  font-family: 'Courier New', monospace;
  font-size: 0.72rem;
  line-height: 1.7;
  text-align: left;
}
.terminal-line.t-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.terminal-line.t-row .t-left {
  flex: 1;
  white-space: nowrap;
}
.terminal-line.t-row .t-left .t-tag {
  display: inline-block;
  min-width: 9.5ch;
}
.terminal-line.t-row .t-ok,
.terminal-line.t-row .t-right-group {
  white-space: nowrap;
  text-align: right;
}
.terminal-line.t-cmd {
  white-space: pre;
}
.terminal-line.t-spacer {
  height: 0.6em;
  display: block;
  line-height: 0;
}
.t-prompt { color: var(--amber-l, #fbbf24); font-weight: bold; }
.t-ok { color: var(--green, #22c55e); }
.t-tag { color: var(--amber, #f59e0b); font-weight: bold; opacity: 0.8; }
.t-pending { color: var(--orange, #f97316); }
.t-bar { color: var(--amber, #f59e0b); }

.terminal-line {
  opacity: 0;
  animation: termLineIn 0.3s ease forwards;
}

@keyframes termLineIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 1000px) {
  .hero-top {
    grid-template-columns: 1fr;
  }
  .hero-terminal {
    display: none;
  }
  .hero-top .hero-inner {
    text-align: center;
  }
  .hero-top .hero-btns {
    justify-content: center;
  }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-drawer { display: block; }
}

/* ── STEP PULSE ON REVEAL ── */
@keyframes stepPulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}
.step-n.pulse {
  animation: stepPulse 0.7s ease-out forwards;
}

/* ── STEP ARROW SEQUENCE ── */
.step-arrow {
  opacity: 0 !important;
  transition: opacity 0.5s ease !important;
}
.step-arrow.visible {
  opacity: 1 !important;
}

/* ── SECTION LABEL VARIETY (break the pattern in 3 spots) ── */

/* "Services" section: left-border accent */
#services > .container > .reveal > .section-label {
  border-left: 2px solid var(--amber, #f59e0b);
  padding-left: 0.75rem;
  color: var(--muted2, #94a3b8);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
}

/* "Process" section: pill/badge style */
#how > .container > .reveal > .section-label {
  display: inline-block;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  padding: 0.25rem 0.85rem;
  border-radius: 100px;
  font-size: 0.62rem;
}

/* "Contact/CTA" section: muted down */
.cta > .container > .cta-inner > .reveal > .section-label {
  color: var(--muted, #64748b);
  opacity: 0.5;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
}

/* ── FOOTER WATERMARK ── */
footer {
  overflow: hidden !important;
}
.footer-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(4rem, 14vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(255,255,255,0.015);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
footer > * {
  position: relative;
  z-index: 1;
}

/* ── MOBILE DRAWER STAGGER ── */
.nav-drawer ul a {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s !important;
}
.nav-drawer.open ul a {
  opacity: 1;
  transform: none;
}
.nav-drawer.open ul li:nth-child(1) a { transition-delay: 0.05s; }
.nav-drawer.open ul li:nth-child(2) a { transition-delay: 0.1s; }
.nav-drawer.open ul li:nth-child(3) a { transition-delay: 0.15s; }
.nav-drawer.open ul li:nth-child(4) a { transition-delay: 0.2s; }
.nav-drawer.open ul li:nth-child(5) a { transition-delay: 0.25s; }
.nav-drawer.open ul li:nth-child(6) a { transition-delay: 0.3s; }

.nav-drawer .drawer-cta {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}
.nav-drawer.open .drawer-cta {
  opacity: 1;
  transform: none;
  transition-delay: 0.35s;
}
