/* ======================================================
   IDRO — 2026 Redesign additions
   Loaded AFTER tokens.css / style.css / public.css. Only
   adds new classes and a few narrowly-scoped overrides —
   never redeclares an existing selector wholesale, so the
   rest of the site keeps working exactly as it does today.
   ====================================================== */

/* ---- Re-assert the Phase-2 design tokens ----
   style.css (legacy, kept only for base nav/layout resets) redefines
   --font-head and other tokens on its own :root block. It loads after
   tokens.css, so without this it silently wins and every heading on
   the site renders in the old Manrope/Space Grotesk font. This file
   loads last, so this is the one place that always wins. */
:root {
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
}

/* .products-listing-hero has no position of its own — needed so the
   floating-deco-layer's position:absolute is contained to this section
   instead of falling back to <body> and covering the whole page. */
.products-listing-hero { position: relative; }

/* ---- Scroll reveal base states (driven by assets/js/motion.js) ---- */
.reveal-up, .reveal-left, .reveal-right, [data-reveal] {
  opacity: 0;
  will-change: opacity, transform;
}
.reveal-up { transform: translateY(28px); }
.reveal-left { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }
.revealed { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal-up, .reveal-left, .reveal-right, [data-reveal] { opacity: 1; transform: none; }
}

/* ---- Gradient text accent (signal -> accent) ---- */
.gradient-text {
  background: linear-gradient(90deg, var(--signal), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---- Signal CTA — reserve for the single highest-priority action per page ---- */
.btn-signal {
  border-color: var(--signal) !important;
  background: var(--signal) !important;
  color: #fff !important;
}
.btn-signal:hover {
  background: var(--signal-hover) !important;
  border-color: var(--signal-hover) !important;
  box-shadow: var(--glow-signal);
}

/* ---- Hero 3D canvas — replaces the flat SVG inside .home-hero-visual ---- */
.home-hero-visual { isolation: isolate; }
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
}

/* Static fallback shown only when the 3D scene is intentionally skipped
   (mobile / prefers-reduced-motion) — see the loader script in index.php. */
.hero-visual-fallback {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(45%, 200px);
  height: auto;
  animation: hero-fallback-float 3.5s ease-in-out infinite;
}
.home-hero-visual.no-3d .hero-visual-fallback,
.tech-robot-panel.no-3d .hero-visual-fallback { display: block; }
@keyframes hero-fallback-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual-fallback { animation: none; }
}

/* ---- Hero stat counters ---- */
.home-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin: var(--space-8) 0 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-val {
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  font-size: var(--text-4xl);
  color: var(--ink);
  line-height: var(--lh-tight);
}
.hero-stat-val .suffix { color: var(--signal); }
.hero-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

/* ---- Small-scale 3D feature scene (ground robot, technology section) ---- */
.tech-robot-panel {
  position: relative;
  min-height: 340px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 40%, rgba(125,211,252,0.18), transparent 60%),
    linear-gradient(145deg, rgba(255,255,255,0.9), rgba(239,246,255,0.92));
  box-shadow: var(--shadow);
  overflow: hidden;
}
#robot-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }

/* ---- Real IDRO product photography, hero + ground-robotics panel ----
   Replaces the procedural 3D placeholder with the actual hardware photo.
   JS (index.php) sets a mousemove/scroll tilt via transform directly on
   the <img> — no CSS transform animation here, so the two never fight. */
.hero-product-shot {
  position: relative;
  z-index: 1;
  width: 86%;
  max-width: 560px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 28px 38px rgba(15, 23, 42, 0.28));
  will-change: transform;
}
.tech-robot-panel--photo .hero-product-shot {
  width: 68%;
  max-width: 320px;
  filter: drop-shadow(0 20px 28px rgba(15, 23, 42, 0.24));
}

/* ---- Touch target fix: filter pills were 40px, 4px under the 44px a11y minimum ---- */
.pf-btn { min-height: 44px; }

/* ---- A touch of signal on the one thing we most want noticed on hover ---- */
.product-card:hover { border-color: var(--signal); }

/* ---- Gradient text: keep "Drone & Robotics" on one line in the hero,
   and give the accent a slow shimmer sweep instead of a flat fill. ---- */
.gradient-text {
  background-image: linear-gradient(100deg, var(--signal), var(--accent), var(--brand), var(--signal));
  background-size: 300% auto;
  animation: gradient-text-shimmer 7s linear infinite;
}
.gradient-text.nowrap { white-space: nowrap; }
@keyframes gradient-text-shimmer {
  to { background-position: -300% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gradient-text { animation: none; }
}

/* ---- Ambient floating decoration layer ----
   Drone / radar / gear / signal / shield line-art drifting slowly behind
   section content. Purely decorative: aria-hidden, no pointer events,
   negative z-index keeps it behind each section's real content without
   needing to touch that content's own stacking context. */
.floating-deco-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.float-deco {
  position: absolute;
  display: block;
  color: var(--accent);
  opacity: 0.4;
  filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.12));
  animation-name: float-deco-drift;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.float-deco svg { width: 100%; height: 100%; display: block; }
.float-deco--drone  { color: var(--brand); opacity: 0.4; }
.float-deco--radar  { color: var(--accent); opacity: 0.38; }
.float-deco--gear   { color: var(--text-muted); opacity: 0.3; }
.float-deco--signal { color: var(--signal); opacity: 0.4; }
.float-deco--shield { color: var(--brand); opacity: 0.32; }

@keyframes float-deco-drift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(16px, -24px) rotate(6deg); }
  50%  { transform: translate(-10px, -38px) rotate(-5deg); }
  75%  { transform: translate(-20px, -12px) rotate(3deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

@media (max-width: 768px) {
  .float-deco { opacity: 0.22; }
  .float-deco--gear, .float-deco--shield { opacity: 0.18; }
}
@media (prefers-reduced-motion: reduce) {
  .float-deco { animation: none; }
}

/* ---- Per-word heading reveal (assets/js/motion.js initTextSplit) ----
   Only hides words once JS has actually split them (.js-split-ready) —
   a heading with no JS/GSAP stays as plain, always-visible text. */
.js-split-ready .split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.3em);
}
@media (prefers-reduced-motion: reduce) {
  .js-split-ready .split-word { opacity: 1; transform: none; }
}

/* ---- Card icon hover pop — the card body itself keeps its existing
   hover treatment untouched; only the icon gets the extra flourish. ---- */
.home-card-icon {
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), background-color 0.35s ease, color 0.35s ease;
}
.home-system-card:hover,
.industry-card:hover,
.feature-card:hover {
  border-color: var(--accent);
}
.home-system-card:hover .home-card-icon,
.industry-card:hover .home-card-icon,
.feature-card:hover .home-card-icon {
  transform: scale(1.12) rotate(-6deg);
  background-color: var(--accent);
  color: #fff;
}
.home-system-card {
  transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.home-system-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}
@media (prefers-reduced-motion: reduce) {
  .home-card-icon, .home-system-card { transition: none; }
}
.home-process-step:hover {
  border-color: var(--signal);
  transform: translateX(4px);
}

@media (max-width: 760px) {
  .home-hero-stats { gap: var(--space-6); }
  .hero-stat-val { font-size: var(--text-3xl); }
}
