/* Product pages — category rows (.rp-row) and product detail pages.
   Hooks (.pd-*) and injected layers are added by product-pages.js. */

:root {
  --pd-ease: var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  --pd-orange: var(--accent-orange, #FF5A00);
}

/* ---------- Scroll reveal ---------- */
html.pd-ready .pd-reveal { opacity: 0; transform: translateY(36px); }
html.pd-ready .pd-reveal.pd-in {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--pd-ease), transform .9s var(--pd-ease);
  transition-delay: var(--pd-d, 0s);
}

/* ---------- Reading progress bar (detail pages) ---------- */
.pd-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  z-index: 10000;
  transform-origin: left center;
  transform: scaleX(var(--pd-p, 0));
  background: linear-gradient(90deg, var(--pd-orange), #FFB37A);
  box-shadow: 0 0 12px rgba(255, 90, 0, 0.7);
  pointer-events: none;
}

/* ---------- Buttons: light sweep + arrow nudge ---------- */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  z-index: -1;
  transition: left .7s var(--pd-ease);
}
.btn-primary:hover::before { left: 120%; }
.pd-arrow { display: inline-block; transition: transform .35s var(--pd-ease); }
.btn:hover .pd-arrow { transform: translateX(5px); }
.btn:hover .pd-arrow.pd-down { transform: translateY(4px); }

/* ---------- Shared HUD layers ---------- */
.pd-glare, .pd-scan, .pd-corners, .pd-hud { position: absolute; pointer-events: none; }
.pd-glare {
  inset: 0;
  z-index: 3;
  opacity: 0;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 130, 50, 0.18), transparent 45%);
  mix-blend-mode: screen;
  transition: opacity .35s ease;
}
.pd-scan {
  left: 0; right: 0; top: 0;
  height: 35%;
  z-index: 3;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(255, 90, 0, 0.06) 85%, rgba(255, 140, 60, 0.5));
  transform: translateY(-100%);
}
@keyframes pd-scan { from { transform: translateY(-100%); } to { transform: translateY(300%); } }
.pd-corners {
  inset: 14px;
  z-index: 4;
  --c: rgba(255, 90, 0, 0.95); --l: 22px; --t: 2px;
  background:
    linear-gradient(var(--c), var(--c)) left top / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) left top / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) right top / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) right top / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) left bottom / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) left bottom / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) right bottom / var(--l) var(--t),
    linear-gradient(var(--c), var(--c)) right bottom / var(--t) var(--l);
  background-repeat: no-repeat;
  transition: opacity .35s ease, transform .5s var(--pd-ease);
}
.pd-hud {
  z-index: 4;
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFD2B3;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(7, 10, 14, 0.6);
  border: 1px solid rgba(255, 90, 0, 0.35);
  transition: opacity .35s ease, transform .5s var(--pd-ease);
}
.pd-hud-tl { top: 22px; left: 22px; display: flex; align-items: center; gap: 8px; }
.pd-hud-tl::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pd-orange);
  box-shadow: 0 0 8px var(--pd-orange);
  animation: pd-blink 1.4s ease-in-out infinite;
}
.pd-hud-br { right: 22px; bottom: 22px; }
@keyframes pd-blink { 50% { opacity: .25; } }

/* ---------- Category rows ---------- */
.rp-media {
  display: block;
  --rx: 0deg; --ry: 0deg; --px: 0px; --py: 0px;
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .7s var(--pd-ease), box-shadow .45s ease, border-color .35s ease;
}
.rp-media:hover {
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px);
  transition: transform .12s linear, box-shadow .45s ease, border-color .35s ease;
  border-color: rgba(255, 90, 0, 0.55);
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.9), 0 0 55px -12px rgba(255, 90, 0, 0.5);
}
.rp-media img, .rp-media video { transition: transform .8s var(--pd-ease), filter .4s ease; }
.rp-media:hover img, .rp-media:hover video {
  transform: scale(1.15) translate(calc(var(--px) * -1), calc(var(--py) * -1));
  transition: transform .6s var(--pd-ease), filter .4s ease;
  filter: saturate(1.2) contrast(1.05);
}
.rp-media .pd-corners { opacity: 0; transform: scale(1.06); }
.rp-media .pd-hud { opacity: 0; transform: translateY(6px); }
.rp-media:hover .pd-glare, .rp-media:hover .pd-corners, .rp-media:hover .pd-hud { opacity: 1; transform: none; }
.rp-media:hover .pd-scan { opacity: 1; animation: pd-scan 2.8s cubic-bezier(.45, 0, .55, 1) infinite; }
.pd-view {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%) scale(.85);
  opacity: 0;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: #0B0F14;
  background: var(--pd-orange);
  box-shadow: 0 12px 30px -8px rgba(255, 90, 0, 0.8);
  pointer-events: none;
  transition: opacity .35s ease, transform .45s var(--pd-ease);
}
.rp-media:hover .pd-view { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.rp-content { position: relative; isolation: isolate; }
.pd-num {
  position: absolute;
  top: -58px; right: 0;
  font-family: var(--font-mono, monospace);
  font-weight: 800;
  font-size: clamp(5rem, 9vw, 8.5rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.07);
  pointer-events: none;
  user-select: none;
  z-index: -1;
  transition: -webkit-text-stroke-color .5s ease, transform .8s var(--pd-ease);
}
.rp-row:hover .pd-num { -webkit-text-stroke-color: rgba(255, 90, 0, 0.35); transform: translateY(-6px); }
.rp-title { position: relative; display: inline-block; }
.rp-title::after {
  content: '';
  display: block;
  height: 2px;
  width: 100%;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--pd-orange), transparent);
  transform: scaleX(.18);
  transform-origin: left;
  transition: transform .7s var(--pd-ease);
}
.rp-row:hover .rp-title::after { transform: scaleX(1); }
.rp-desc { transition: color .35s ease; }
.rp-row:hover .rp-desc { color: #D5DDE8; }
.rp-tags .product-category-tag, .rp-tags .product-type-tag { transition: box-shadow .35s ease, background .35s ease; }
.rp-row:hover .rp-tags .product-category-tag { box-shadow: 0 0 18px -2px rgba(255, 90, 0, 0.5); background: rgba(255, 90, 0, 0.2); }
.rp-row:hover .rp-tags .product-type-tag { background: rgba(0, 210, 255, 0.14); }

/* Media slides in from its own side */
html.pd-ready .rp-row .rp-media.pd-reveal { transform: translateX(-60px); }
html.pd-ready .rp-row.reverse .rp-media.pd-reveal { transform: translateX(60px); }
html.pd-ready .rp-row .rp-media.pd-reveal.pd-in {
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: opacity 1s var(--pd-ease), transform 1s var(--pd-ease);
}
html.pd-ready .rp-row .rp-media.pd-reveal.pd-in:hover {
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(-6px);
  transition: transform .12s linear, box-shadow .45s ease, border-color .35s ease;
}

/* ---------- Detail page hero ---------- */
.pd-hero-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl, 18px);
  border: 1px solid var(--border-light, rgba(255, 255, 255, 0.12));
  --rx: 0deg; --ry: 0deg; --px: 0px; --py: 0px;
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .7s var(--pd-ease), box-shadow .45s ease;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 90, 0, 0.08);
  animation: pd-float 6s ease-in-out infinite;
}
.pd-hero-media:hover {
  transition: transform .12s linear, box-shadow .45s ease;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.9), 0 0 60px -14px rgba(255, 90, 0, 0.55);
  animation-play-state: paused;
}
@keyframes pd-float { 50% { translate: 0 -10px; } }
.pd-hero-media img { display: block; width: 100%; border: 0 !important; border-radius: 0 !important; transition: transform .6s var(--pd-ease); }
.pd-hero-media:hover img { transform: scale(1.05) translate(calc(var(--px) * -1), calc(var(--py) * -1)); transition: transform .3s var(--pd-ease); }
.pd-hero-media:hover .pd-scan { opacity: 1; animation: pd-scan 3s cubic-bezier(.45, 0, .55, 1) infinite; }
.pd-hero-media:hover .pd-glare { opacity: 1; }
.pd-hero-media .pd-corners { inset: 12px; }
.pd-hero-glow {
  position: absolute;
  inset: 10% 5%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 90, 0, 0.28), transparent);
  filter: blur(40px);
  pointer-events: none;
}
.pd-hero-media-host { position: relative; isolation: isolate; }

/* Hero text entrance */
html.pd-ready .pd-rise { opacity: 0; transform: translateY(26px); }
html.pd-ready .pd-rise.pd-in {
  opacity: 1;
  transform: none;
  transition: opacity .9s var(--pd-ease), transform .9s var(--pd-ease);
  transition-delay: var(--pd-d, 0s);
}

/* Breadcrumb */
.pd-crumbs a { position: relative; transition: color .25s ease; }
.pd-crumbs a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1px;
  background: var(--pd-orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--pd-ease);
}
.pd-crumbs a:hover { color: var(--pd-orange) !important; }
.pd-crumbs a:hover::after { transform: scaleX(1); }

/* "What it does" panel */
.pd-panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .35s ease, box-shadow .45s ease;
}
.pd-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 110, 30, 0.1), transparent 50%);
  opacity: 0;
  transition: opacity .35s ease;
}
.pd-panel:hover { border-color: rgba(255, 90, 0, 0.45) !important; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.85), 0 0 50px -16px rgba(255, 90, 0, 0.45); }
.pd-panel:hover::before { opacity: 1; }
.pd-panel .pd-corners { inset: 10px; --l: 16px; opacity: 0; transform: scale(1.04); }
.pd-panel:hover .pd-corners { opacity: 1; transform: none; }
.pd-panel [style*="border-left"] { transition: padding-left .45s var(--pd-ease), border-color .35s ease; }
.pd-panel:hover [style*="border-left"] { padding-left: 26px !important; }

/* Section headings: underline draws in */
.pd-heading { position: relative; }
.pd-heading::after {
  content: '';
  display: block;
  width: 0;
  height: 3px;
  margin-top: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pd-orange), transparent);
  transition: width 1.2s var(--pd-ease) .3s;
}
.pd-heading.pd-in::after, html:not(.pd-ready) .pd-heading::after { width: 90px; }

@media (max-width: 992px) {
  .pd-num { top: -40px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-hero-media, .pd-hero-glow, .pd-scan, .pd-hud-tl::before { animation: none !important; }
  .rp-media, .pd-hero-media { transform: none !important; }
}

/* ---------- Alternate detail layout (antariksh-* pages): give its bare elements proper styling ---------- */
.page-hero .overline, .related-products .overline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 20px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pd-orange);
  background: rgba(255, 90, 0, 0.1);
  border: 1px solid rgba(255, 85, 0, 0.25);
}
.page-hero .overline::before, .related-products .overline::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--pd-orange);
  box-shadow: 0 0 8px var(--pd-orange);
  animation: pd-blink 1.6s ease-in-out infinite;
}
.hero-title {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(2.4rem, 3.6vw + 1rem, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-transform: uppercase;
  color: var(--text-primary, #F5F5F2);
  margin-bottom: 18px;
}
.related-products {
  padding: 100px 0;
  position: relative;
  border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  background: rgba(21, 27, 34, 0.35);
}
.related-products .section-title {
  font-family: var(--font-display, sans-serif);
  font-size: clamp(1.8rem, 2.2vw + 1rem, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary, #F5F5F2);
  margin-bottom: 48px;
}

/* ---------- Category pages: capability / related boxes (.pd-info, tagged by cards.js) ---------- */
.pd-info:hover { border-color: rgba(255, 90, 0, 0.55) !important; }
.pd-info::before {                         /* accent bar that grows along the top */
  content: '';
  position: absolute;
  top: 0; left: 24px;
  right: 24px; height: 2px;
  z-index: 2;
  background: linear-gradient(90deg, var(--pd-orange), rgba(255, 90, 0, 0));
  transform: scaleX(.08);
  transform-origin: left;
  transition: transform .6s var(--pd-ease);
}
.pd-info:hover::before { transform: scaleX(1); }
.pd-info h4 { transition: color .3s ease, transform .5s var(--pd-ease); }
.pd-info:hover h4 { color: #fff !important; transform: translateX(4px); }
.pd-info p { transition: color .3s ease; }
.pd-info:hover p { color: #D5DDE8 !important; }
.pd-info .product-category-tag, .pd-info .product-type-tag { transition: background .3s ease; }
.pd-info:hover .product-category-tag { background: rgba(255, 90, 0, 0.22); }
.pd-info:hover .product-type-tag { background: rgba(0, 210, 255, 0.16); }

/* Integration banner */
.pd-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 22px;
  transition: box-shadow .45s ease, border-color .35s ease;
}
.pd-banner::before {                       /* sheen sweeping across */
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255, 150, 80, 0.14), transparent);
  transform: translateX(-120%) skewX(-20deg);
  animation: pd-sheen 5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pd-sheen { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(440%) skewX(-20deg); } }
.pd-banner:hover { box-shadow: 0 0 50px -14px rgba(255, 90, 0, 0.55); border-color: rgba(255, 90, 0, 0.7) !important; }
.pd-banner p { position: relative; margin: 0; }
.pd-net { flex: none; width: 74px; height: 44px; position: relative; }
.pd-net svg { width: 100%; height: 100%; overflow: visible; }
.pd-net line { stroke: rgba(255, 90, 0, 0.45); stroke-width: 1.2; stroke-dasharray: 3 3; animation: pd-dash 1.2s linear infinite; }
.pd-net circle { fill: #0E141B; stroke: var(--pd-orange); stroke-width: 1.4; }
.pd-net circle.pd-core { fill: var(--pd-orange); animation: pd-core 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pd-dash { to { stroke-dashoffset: -12; } }
@keyframes pd-core { 50% { transform: scale(1.35); opacity: .7; } }

@media (max-width: 640px) { .pd-net { display: none; } }
@media (prefers-reduced-motion: reduce) { .pd-banner::before, .pd-net line, .pd-net circle.pd-core { animation: none; } }

/* ---------- Category pages: compact capability cards + link cards ---------- */
.cap-card, .link-card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), transparent 60%), var(--bg-card, #11161D);
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
  border-radius: var(--radius-xl, 18px);
}
.cap-card { display: flex; flex-direction: column; padding: 26px 24px 24px; }
.cap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.cap-icon {
  flex: none;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  color: var(--pd-orange);
  background: rgba(255, 90, 0, 0.08);
  border: 1px solid rgba(255, 90, 0, 0.25);
  transition: transform .45s var(--pd-ease), background .3s ease, color .3s ease;
}
.cap-icon svg { width: 24px; height: 24px; }
.cap-card:hover .cap-icon { background: var(--pd-orange); color: #0B0F14; transform: rotate(-6deg) scale(1.06); }
.cap-head .product-category-tag, .cap-head .product-type-tag { white-space: nowrap; }
.cap-title {
  font-family: var(--font-display, sans-serif);
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--text-primary, #F5F5F2);
  margin: 0 0 8px;
}
.cap-line { color: var(--text-secondary, #8A94A6); font-size: 0.9rem; line-height: 1.55; margin: 0 0 18px; }
.cap-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; margin: auto 0 0; padding: 0; }
.cap-chips li {
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: #C3CEDC;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color .3s ease, color .3s ease, background .3s ease, transform .35s var(--pd-ease);
}
.cap-card:hover .cap-chips li { border-color: rgba(255, 90, 0, 0.4); background: rgba(255, 90, 0, 0.08); color: #fff; transform: translateY(-2px); }
.cap-card:hover .cap-chips li:nth-child(2) { transition-delay: .04s; }
.cap-card:hover .cap-chips li:nth-child(3) { transition-delay: .08s; }
.cap-card:hover .cap-chips li:nth-child(4) { transition-delay: .12s; }

.link-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg, 14px);
}
.link-dot {
  flex: none;
  position: relative;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pd-orange);
  background: rgba(255, 90, 0, 0.06);
  transition: background .3s ease, color .3s ease;
}
.link-dot::before {                        /* dashed ring that spins on hover */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(255, 90, 0, 0.55);
}
.link-card:hover .link-dot { background: var(--pd-orange); color: #0B0F14; }
.link-card:hover .link-dot::before { animation: pd-ring 4s linear infinite; inset: -5px; }
@keyframes pd-ring { to { transform: rotate(360deg); } }
.link-card h4 {
  font-family: var(--font-display, sans-serif);
  font-size: 1.02rem;
  color: var(--text-primary, #F5F5F2);
  margin: 0 0 3px;
}
.link-card p { color: var(--text-secondary, #8A94A6); font-size: 0.86rem; line-height: 1.5; margin: 0; }
.link-card .plus { color: var(--pd-orange); margin: 0 4px; }

/* Row videos fill their frame (the 16:9 clip would otherwise letterbox inside the 16:11 frame) */
.rp-media video { object-fit: cover; }

/* ---------- In-place hover zoom (.rp-zoom rows: Materials & Services, Energy & Resilience) ---------- */
/* The zoom replaces the other hover effects on these images */
.rp-media.rp-zoom:hover,
html.pd-ready .rp-row .rp-media.rp-zoom.pd-reveal.pd-in:hover { transform: none !important; }
.rp-media.rp-zoom .pd-scan, .rp-media.rp-zoom .pd-glare, .rp-media.rp-zoom .pd-corners,
.rp-media.rp-zoom .pd-hud, .rp-media.rp-zoom .pd-view { display: none !important; }
.rp-media.rp-zoom img { transition: transform .35s ease, filter .3s ease !important; }
.rp-media.rp-zoom:hover img { transform: none !important; filter: none !important; }
/* the pointer position is written to transform-origin by product-pages.js */
.rp-media.rp-zoom.is-zooming img { transform: scale(var(--rp-zoom, 2.5)) !important; cursor: zoom-in; }
