/* =============================================================
   Drishti hero carousel — scoped styles
   Ported from public/drishti-carousel.html inline <style> (hero
   carousel only). Every selector is scoped under .drishti-croot so
   these rules win over the host page's /styles.css and
   /styles/products/product-page.css.
   ============================================================= */

.drishti-croot {
  /* Palette + type tokens the carousel uses (was :root) */
  --bg-deep:        #0a0e14;
  --bg-deep-2:      #131a23;
  --bg-mid:         #1c2530;
  --bg-light:       #f2f0e9;
  --bg-light-2:     #e8e4d6;

  --signal:         #ffd23f;     /* signal/road-marking yellow */
  --signal-soft:    #f5c518;
  --steel-cyan:     #4ec9d4;
  --steel-cyan-2:   #2a9aa6;
  --hazard:         #ff5b3a;     /* hazard accent */
  --line-gold:      #c8a04a;

  --ink-light:      #f2f0e9;
  --ink-mute-light: #b9b3a3;
  --ink-dark:       #0a0e14;
  --ink-soft:       #475569;
  --ink-mute:       #6b7785;

  --grid-line:      rgba(242, 240, 233, 0.06);
  --grid-line-dark: rgba(10, 14, 20, 0.08);

  --sans:    'Inter', -apple-system, system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'Inter', sans-serif;
  --mono:    'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --slide-duration: 7000ms;

  /* Re-apply the body-level base the global resets used to provide */
  font-family: var(--sans);
  color: var(--ink-dark);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: block;
}

/* Scoped reset (replaces global * / html / body resets) */
.drishti-croot,
.drishti-croot * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.drishti-croot .carousel {
  position: relative;
  width: 100%;
  /* Match the iframe-era rendered height (.carousel-embed__frame in
     product-page.css): in embed mode the carousel filled the iframe,
     so 100vh-inside-iframe == iframe height == this clamp. */
  height: clamp(545px, 74vh, 760px);
  overflow: hidden;
  background: var(--bg-deep);
  font-family: var(--sans);
}

.drishti-croot .carousel__track { position: relative; width: 100%; height: 100%; }

.drishti-croot .slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 900ms cubic-bezier(.65,.05,.35,1), visibility 0s linear 900ms;
  will-change: opacity;
}
.drishti-croot .slide.is-active {
  opacity: 1; visibility: visible;
  transition: opacity 900ms cubic-bezier(.65,.05,.35,1), visibility 0s linear;
  z-index: 2;
}

.drishti-croot .slide__inner {
  position: relative; width: 100%; height: 100%;
  max-width: 1440px; margin: 0 auto;
  padding: clamp(40px, 6vh, 72px) clamp(24px, 5vw, 80px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 0 clamp(16px, 2vw, 32px);
}

.drishti-croot .grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.drishti-croot .slide[data-theme="light"] .grid-bg {
  background-image:
    linear-gradient(to right, var(--grid-line-dark) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-dark) 1px, transparent 1px);
}

.drishti-croot .eyebrow {
  grid-column: 1 / -1; align-self: start;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; z-index: 2;
}
.drishti-croot .eyebrow__id { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid currentColor; opacity: 0.7; }
.drishti-croot .eyebrow__id::before { content: ''; width: 6px; height: 6px; background: var(--signal); border-radius: 50%; box-shadow: 0 0 8px var(--signal); animation: drishti-pulse 1.6s ease-in-out infinite; }
@keyframes drishti-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.drishti-croot .eyebrow__title { letter-spacing: 0.18em; opacity: 0.85; }
.drishti-croot .eyebrow__line { flex: 1; height: 1px; background: currentColor; opacity: 0.2; max-width: 200px; }
.drishti-croot .eyebrow__client { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; opacity: 0.55; }

.drishti-croot .slide__copy { grid-column: 1 / span 7; align-self: center; max-width: 760px; z-index: 2; position: relative; }
.drishti-croot .slide__copy h1 { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 5.4vw, 84px); line-height: 0.96; letter-spacing: -0.025em; margin-bottom: clamp(20px, 2.8vh, 30px); }
.drishti-croot .slide__copy h1 .highlight { color: var(--signal); position: relative; display: inline-block; }
.drishti-croot .slide__copy h1 .highlight::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0.05em; height: 0.12em; background: currentColor; opacity: 0.25; }
.drishti-croot .slide__copy h1 .scan { color: var(--steel-cyan); }
.drishti-croot .slide[data-theme="light"] .slide__copy h1 .scan { color: var(--steel-cyan-2); }
.drishti-croot .slide__copy p { font-size: clamp(15px, 1.05vw, 17px); line-height: 1.55; font-weight: 400; max-width: 580px; margin-bottom: clamp(28px, 3.5vh, 40px); opacity: 0.85; }
.drishti-croot .slide__copy p strong { color: var(--signal); font-weight: 500; }
.drishti-croot .slide[data-theme="light"] .slide__copy p strong { color: var(--ink-dark); background: var(--signal); padding: 0 4px; }
.drishti-croot .slide[data-theme="signal"] .slide__copy p strong { color: var(--ink-dark); background: var(--ink-dark); color: var(--signal); padding: 0 6px; font-weight: 600; }

.drishti-croot .ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.drishti-croot .btn { display: inline-flex; align-items: center; gap: 12px; padding: 16px 24px; font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0.01em; text-decoration: none; border: 1px solid transparent; transition: transform 280ms cubic-bezier(.4,0,.2,1), background 240ms ease, color 240ms ease, border-color 240ms ease, box-shadow 240ms ease; cursor: pointer; white-space: nowrap; position: relative; }
.drishti-croot .btn .arrow { display: inline-block; transition: transform 320ms cubic-bezier(.4,0,.2,1); font-family: var(--mono); }
.drishti-croot .btn:hover .arrow { transform: translateX(4px); }
.drishti-croot .btn--primary { background: var(--signal); color: var(--ink-dark); box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); }
.drishti-croot .btn--primary:hover { background: var(--signal-soft); transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(255, 210, 63, 0.4); }
.drishti-croot .btn--ghost-dark { background: transparent; color: var(--ink-light); border-color: rgba(242, 240, 233, 0.3); }
.drishti-croot .btn--ghost-dark:hover { background: var(--ink-light); color: var(--ink-dark); border-color: var(--ink-light); }
.drishti-croot .btn--ghost-light { background: transparent; color: var(--ink-dark); border-color: rgba(10, 14, 20, 0.25); }
.drishti-croot .btn--ghost-light:hover { background: var(--ink-dark); color: var(--ink-light); border-color: var(--ink-dark); }

.drishti-croot .slide__visual { grid-column: 8 / span 5; grid-row: 2 / 3; align-self: center; justify-self: end; width: 100%; max-width: 460px; aspect-ratio: 1 / 1; position: relative; z-index: 1; }
.drishti-croot .slide__foot { grid-column: 1 / span 12; align-self: end; display: flex; align-items: stretch; gap: 0; padding-top: 28px; border-top: 1px solid currentColor; opacity: 0.9; z-index: 2; position: relative; flex-wrap: wrap; }
.drishti-croot .slide__foot .stat { flex: 1; min-width: 140px; padding-right: 32px; position: relative; }
.drishti-croot .slide__foot .stat + .stat { border-left: 1px solid currentColor; padding-left: 32px; opacity: 1; }
.drishti-croot .slide__foot .stat strong { display: block; font-family: var(--display); font-size: clamp(28px, 2.4vw, 36px); font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.drishti-croot .slide__foot .stat span { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; margin-top: 8px; font-weight: 500; opacity: 0.7; }
.drishti-croot .slide[data-theme="dark"] .slide__foot, .drishti-croot .slide[data-theme="dark"] .slide__foot .stat + .stat { border-color: rgba(242, 240, 233, 0.14); }
.drishti-croot .slide[data-theme="light"] .slide__foot, .drishti-croot .slide[data-theme="light"] .slide__foot .stat + .stat { border-color: rgba(10, 14, 20, 0.14); }
.drishti-croot .slide[data-theme="signal"] .slide__foot, .drishti-croot .slide[data-theme="signal"] .slide__foot .stat + .stat { border-color: rgba(10, 14, 20, 0.18); }

/* was #slide-1 */
.drishti-croot .slide-1 { background: #ffffff; color: var(--ink-dark); }
.drishti-croot .visual--road { position: relative; }
.drishti-croot .road-frame { position: absolute; inset: 0; border: 1px solid rgba(78, 201, 212, 0.3); overflow: hidden; background: linear-gradient(180deg, #1a2330 0%, #232d3d 40%, #2c3848 70%, #1a2330 100%); }
.drishti-croot .road-frame::before { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; height: 65%; background: linear-gradient(180deg, #2a3441 0%, #1f2832 50%, #15191f 100%); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); }
.drishti-croot .road-frame::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 4%; height: 65%; background: repeating-linear-gradient(180deg, transparent 0px, transparent 12px, var(--signal) 12px, var(--signal) 36px); clip-path: polygon(45% 0, 55% 0, 100% 100%, 0 100%); opacity: 0.85; }
.drishti-croot .road-frame .corner { position: absolute; width: 20px; height: 20px; border: 2px solid var(--steel-cyan); }
.drishti-croot .road-frame .corner--tl { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.drishti-croot .road-frame .corner--tr { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.drishti-croot .road-frame .corner--bl { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }
.drishti-croot .road-frame .corner--br { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.drishti-croot .detect-box { position: absolute; border: 2px solid; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; }
.drishti-croot .detect-box .label { position: absolute; top: -22px; left: -2px; padding: 3px 6px; color: var(--ink-dark); white-space: nowrap; font-size: 9px; }
.drishti-croot .detect-box.box-pothole { border-color: var(--hazard); top: 60%; left: 35%; width: 18%; height: 12%; box-shadow: 0 0 18px rgba(255, 91, 58, 0.4); }
.drishti-croot .detect-box.box-pothole .label { background: var(--hazard); color: white; }
.drishti-croot .detect-box.box-crack { border-color: var(--signal); top: 38%; left: 56%; width: 22%; height: 6%; }
.drishti-croot .detect-box.box-crack .label { background: var(--signal); }
.drishti-croot .detect-box.box-sign { border-color: var(--steel-cyan); top: 16%; left: 12%; width: 14%; height: 18%; }
.drishti-croot .detect-box.box-sign .label { background: var(--steel-cyan); }
.drishti-croot .hud-strip { position: absolute; bottom: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--steel-cyan); padding: 8px 12px; background: rgba(10, 14, 20, 0.65); backdrop-filter: blur(6px); border-top: 1px solid rgba(78, 201, 212, 0.3); }
.drishti-croot .hud-strip span { display: flex; align-items: center; gap: 8px; }
.drishti-croot .hud-strip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 6px var(--signal); }

/* was #slide-2 */
.drishti-croot .slide-2 { background: #ffffff; color: var(--ink-dark); }
.drishti-croot .panel { position: absolute; inset: 0; background: var(--bg-deep); border: 1px solid rgba(10, 14, 20, 0.12); box-shadow: 0 30px 80px -30px rgba(10, 14, 20, 0.35), inset 0 0 0 6px rgba(242, 240, 233, 0.04); display: flex; flex-direction: column; overflow: hidden; color: var(--ink-light); }
.drishti-croot .panel-head { padding: 14px 20px; border-bottom: 1px solid rgba(242, 240, 233, 0.08); display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--steel-cyan); }
.drishti-croot .panel-head .live { display: inline-flex; align-items: center; gap: 6px; color: var(--signal); }
.drishti-croot .panel-head .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 8px var(--signal); animation: drishti-pulse 1.6s ease-in-out infinite; }
.drishti-croot .panel-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.drishti-croot .det-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: rgba(242, 240, 233, 0.03); border-left: 2px solid; font-family: var(--mono); font-size: 11px; }
.drishti-croot .det-row .name { color: var(--ink-light); font-weight: 500; letter-spacing: 0.04em; }
.drishti-croot .det-row .acc { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.drishti-croot .det-row .icon { font-size: 14px; text-align: center; font-weight: 700; }
.drishti-croot .det-row.row-pothole { border-color: var(--hazard); } .drishti-croot .det-row.row-pothole .acc, .drishti-croot .det-row.row-pothole .icon { color: var(--hazard); }
.drishti-croot .det-row.row-surface { border-color: var(--signal); } .drishti-croot .det-row.row-surface .acc, .drishti-croot .det-row.row-surface .icon { color: var(--signal); }
.drishti-croot .det-row.row-crack { border-color: var(--steel-cyan); } .drishti-croot .det-row.row-crack .acc, .drishti-croot .det-row.row-crack .icon { color: var(--steel-cyan); }
.drishti-croot .det-row.row-kerb { border-color: var(--line-gold); } .drishti-croot .det-row.row-kerb .acc, .drishti-croot .det-row.row-kerb .icon { color: var(--line-gold); }
.drishti-croot .sparkline { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 12px 14px; background: rgba(242, 240, 233, 0.03); border: 1px solid rgba(242, 240, 233, 0.08); margin-top: 4px; font-family: var(--mono); font-size: 10px; color: var(--ink-mute-light); letter-spacing: 0.1em; text-transform: uppercase; }
.drishti-croot .sparkline svg { flex: 1; height: 36px; }
.drishti-croot .sparkline strong { color: var(--signal); font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }

/* was #slide-3 */
.drishti-croot .slide-3 { background: #ffffff; color: var(--ink-dark); }
.drishti-croot .map-stage { position: relative; width: 100%; height: 100%; background: var(--bg-deep); border: 1px solid rgba(10, 14, 20, 0.18); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(10, 14, 20, 0.4); }
.drishti-croot .map-stage::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(to right, rgba(78, 201, 212, 0.06) 1px, transparent 1px), linear-gradient(to bottom, rgba(78, 201, 212, 0.06) 1px, transparent 1px); background-size: 24px 24px; }
.drishti-croot .map-stage svg.route { position: absolute; inset: 0; width: 100%; height: 100%; }
.drishti-croot .map-pin { position: absolute; width: 28px; height: 28px; border-radius: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ink-dark); box-shadow: 0 8px 20px -6px rgba(0,0,0,0.5); }
.drishti-croot .map-pin.pin-1 { top: 22%; left: 28%; background: var(--signal); }
.drishti-croot .map-pin.pin-2 { top: 48%; left: 62%; background: var(--steel-cyan); }
.drishti-croot .map-pin.pin-3 { top: 72%; left: 38%; background: var(--hazard); color: white; }
.drishti-croot .map-pin.pin-4 { top: 38%; left: 82%; background: var(--bg-light); }
.drishti-croot .map-pin::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid currentColor; opacity: 0.4; animation: drishti-ping 2.2s ease-out infinite; }
.drishti-croot .map-pin.pin-2::after { animation-delay: 0.5s; } .drishti-croot .map-pin.pin-3::after { animation-delay: 1s; } .drishti-croot .map-pin.pin-4::after { animation-delay: 1.5s; }
@keyframes drishti-ping { 0% { transform: scale(0.7); opacity: 0.7; } 70%, 100% { transform: scale(2); opacity: 0; } }
.drishti-croot .map-meta { position: absolute; bottom: 14px; left: 14px; display: flex; gap: 18px; font-family: var(--mono); font-size: 9px; color: var(--steel-cyan); letter-spacing: 0.16em; text-transform: uppercase; }
.drishti-croot .map-meta-r { position: absolute; top: 14px; right: 14px; font-family: var(--mono); font-size: 9px; color: var(--steel-cyan); letter-spacing: 0.16em; text-transform: uppercase; padding: 4px 8px; border: 1px solid rgba(78, 201, 212, 0.4); }

.drishti-croot .carousel__nav { position: absolute; bottom: clamp(20px, 4vh, 32px); right: clamp(24px, 5vw, 80px); z-index: 10; display: flex; gap: 8px; }
.drishti-croot .carousel__nav button { width: 44px; height: 44px; border: 1px solid currentColor; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 240ms ease, color 240ms ease; color: inherit; }
.drishti-croot .carousel__nav button:hover { background: currentColor; }
.drishti-croot .carousel__nav button:hover svg { stroke: var(--bg-deep); }
.drishti-croot .carousel[data-theme="light"] .carousel__nav button:hover svg, .drishti-croot .carousel[data-theme="signal"] .carousel__nav button:hover svg { stroke: var(--bg-light); }
.drishti-croot .carousel[data-theme="signal"] .carousel__nav button:hover { background: var(--ink-dark); color: var(--signal); }
.drishti-croot .carousel__nav svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none; transition: stroke 240ms ease; }

.drishti-croot .carousel[data-theme="dark"]   { color: var(--ink-light); }
.drishti-croot .carousel[data-theme="light"]  { color: var(--ink-dark); }
.drishti-croot .carousel[data-theme="signal"] { color: var(--ink-dark); }

@keyframes drishti-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }
.drishti-croot .slide.is-active .eyebrow      { animation: drishti-rise 700ms cubic-bezier(.2,.7,.2,1) 100ms both; }
.drishti-croot .slide.is-active h1            { animation: drishti-rise 900ms cubic-bezier(.2,.7,.2,1) 220ms both; }
.drishti-croot .slide.is-active p             { animation: drishti-rise 700ms cubic-bezier(.2,.7,.2,1) 480ms both; }
.drishti-croot .slide.is-active .ctas         { animation: drishti-rise 700ms cubic-bezier(.2,.7,.2,1) 620ms both; }
.drishti-croot .slide.is-active .slide__foot  { animation: drishti-rise 700ms cubic-bezier(.2,.7,.2,1) 760ms both; }
.drishti-croot .slide.is-active .slide__visual{ animation: drishti-rise 1000ms cubic-bezier(.2,.7,.2,1) 320ms both; }

@media (max-width: 960px) {
  .drishti-croot .carousel { height: auto; min-height: clamp(475px, 70vh, 700px); max-height: none; background: var(--bg-light); }
  .drishti-croot .carousel__track { height: auto; min-height: clamp(475px, 70vh, 700px); }
  .drishti-croot .slide { position: relative; inset: auto; display: none; }
  .drishti-croot .slide.is-active { display: block; }
  .drishti-croot .slide__inner { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto auto; padding: 80px 24px 110px; gap: 28px; min-height: clamp(475px, 70vh, 700px); }
  .drishti-croot .slide__copy, .drishti-croot .slide__foot, .drishti-croot .slide__visual { grid-column: 1 / -1; }
  .drishti-croot .slide__visual { order: 1; max-width: 320px; justify-self: center; margin-bottom: 4px; }
  .drishti-croot .slide__copy { order: 2; }
  .drishti-croot .slide__foot { order: 3; padding-top: 20px; }
  .drishti-croot .slide__copy h1 { font-size: clamp(38px, 9vw, 56px); }
  .drishti-croot .slide__foot { gap: 0; flex-wrap: wrap; }
  .drishti-croot .slide__foot .stat { flex: 1 1 45%; min-width: 0; padding-right: 16px; padding-bottom: 16px; }
  .drishti-croot .slide__foot .stat + .stat { padding-left: 16px; border-left: none; border-top: none; }
  .drishti-croot .carousel__nav { right: 24px; bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .drishti-croot .slide, .drishti-croot .slide.is-active * { animation: none !important; transition: opacity 200ms ease !important; }
  .drishti-croot .map-pin::after { animation: none; }
}
