/* Oxlion MagPower Base - Dynamic Detail Page Styles */

:root {
  --dyn-bg: #f5f5f7;
  --dyn-ink: #111114;
  --dyn-muted: #66666d;
  --dyn-blue: #1977ff;
  --dyn-line: rgba(17, 17, 20, .1);
  --dyn-radius: 32px;
}

/* 3D Scrollytelling Story */
.product-story {
  position: relative;
  height: 500svh;
  overflow: clip;
  background: linear-gradient(180deg, #f5f5f7, #eceef2 50%, #f5f5f7);
}
.story-stage {
  position: sticky;
  z-index: 1;
  top: 0;
  height: 100svh;
  margin-bottom: -100svh;
  overflow: hidden;
}
#product-canvas {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}
.model-loader {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  color: var(--dyn-muted);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: opacity .4s;
  background: rgba(255,255,255,0.85);
  padding: 6px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  z-index: 10;
}
.model-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}
.stage-orbit {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(70vw, 880px);
  aspect-ratio: 1;
  transform: translate(-50%,-50%) rotateX(70deg);
  border: 1px solid rgba(25,119,255,.12);
  border-radius: 50%;
  box-shadow: inset 0 0 70px rgba(25,119,255,.05);
}
.story-step {
  position: relative;
  z-index: 2;
  height: 100svh;
  display: flex;
  align-items: center;
  padding: 11vh max(7vw, 28px);
  pointer-events: none;
}
.story-step--left { justify-content: flex-start; }
.story-step--right { justify-content: flex-end; }
.story-step--center { align-items: flex-end; justify-content: center; text-align: center; padding-bottom: 9vh; }
.story-copy {
  width: min(560px, 44vw);
  padding: 26px 30px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 24px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 24px 70px rgba(34,45,61,.09);
  backdrop-filter: blur(26px) saturate(160%);
  -webkit-backdrop-filter: blur(26px) saturate(160%);
}
.story-copy h2 {
  font-size: clamp(38px, 3.8vw, 64px);
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: -.055em;
  color: #111114;
}
.eyebrow {
  margin: 0 0 14px;
  color: var(--dyn-blue);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.story-copy p:last-child,
.section-head > p:last-child,
.connect-copy > p,
.flow-copy > p,
.weather-copy p,
.closing-copy p {
  color: var(--dyn-muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

/* Sections Global */
.section-pad {
  padding: clamp(90px, 12vw, 180px) max(5vw, 24px);
}
.section-head {
  width: min(1050px, 100%);
  margin: 0 auto clamp(44px, 7vw, 92px);
  text-align: center;
}
.section-head h2,
.connect-copy h2,
.flow-copy h2,
.weather-copy h2,
.closing-copy h2 {
  font-size: clamp(46px, 6.3vw, 96px);
  line-height: .95;
  letter-spacing: -.055em;
  margin: 0 0 20px;
  color: #111114;
}
.section-head > p:last-child {
  max-width: 640px;
  margin: 24px auto 0;
}

/* Power Section */
.power-section { background: #fff; }
.power-grid {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 24px;
}
.power-visual {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-radius: var(--dyn-radius);
  background: #eaf4ff;
}
.power-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.power-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  aspect-ratio: 1;
  border: 2px solid var(--dyn-blue);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: dyn-breathe 3s ease-in-out infinite;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.stat-card {
  min-height: 298px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: var(--dyn-radius);
  background: #f5f5f7;
  border: 1px solid rgba(0,0,0,0.04);
}
.stat-card strong {
  font-size: clamp(48px, 5vw, 78px);
  line-height: .9;
  letter-spacing: -.06em;
  color: #111114;
}
.stat-card em {
  margin-left: 5px;
  color: var(--dyn-blue);
  font-size: .36em;
  font-style: normal;
  letter-spacing: -.02em;
}
.stat-card p {
  margin: 0;
  color: var(--dyn-muted);
  font-size: 15px;
}

/* Connect Section */
.connect-section {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(40px, 7vw, 110px);
}
.connect-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--dyn-radius);
  background: white;
}
.connect-media img {
  width: 100%;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.connect-media:hover img { transform: scale(1.035); }
.magnetic-pulse {
  position: absolute;
  left: 45%;
  top: 46%;
  width: 7%;
  aspect-ratio: 1;
  border: 2px solid var(--dyn-blue);
  border-radius: 50%;
  animation: dyn-magnetic 2.2s ease-out infinite;
}
.connect-copy { max-width: 590px; }
.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.feature-list span {
  padding: 11px 16px;
  border: 1px solid var(--dyn-line);
  border-radius: 999px;
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: #111114;
}

/* Flow Section */
.flow-section {
  height: 150svh;
  background: #dce7ef;
  color: white;
}
.flow-sticky {
  position: sticky;
  isolation: isolate;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: 7vw;
  padding: 9vw;
  overflow: hidden;
}
.flow-sticky::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: -9%;
  background: url('../assets/11.webp') center 66% / cover no-repeat;
  filter: saturate(.92) contrast(.96) brightness(.94);
  opacity: 1;
  transform: translate3d(0, calc((var(--flow-progress, .5) - .5) * -7%), 0) scale(1.08);
  will-change: transform;
}
.flow-sticky::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 72% 48%, rgba(37,126,201,.12), transparent 34%), linear-gradient(90deg, rgba(8,19,31,.76) 0%, rgba(8,23,38,.48) 38%, rgba(12,35,54,.16) 68%, rgba(12,35,54,.06) 100%);
}
.flow-copy {
  position: relative;
  z-index: 2;
  max-width: 580px;
}
.flow-copy h2 { color: white; }
.flow-copy > p { color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.65; }
.flow-diagram {
  position: relative;
  z-index: 2;
  width: min(45vw, 700px);
  aspect-ratio: 1;
}
.flow-core, .flow-node {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.flow-core {
  left: 50%;
  top: 50%;
  width: 30%;
  aspect-ratio: 1;
  transform: translate(-50%,-50%);
  color: #0a0a0b;
  background: #fff;
  box-shadow: 0 0 90px rgba(54,145,255,.35);
  font-size: clamp(48px, 6vw, 96px);
  font-weight: 760;
  letter-spacing: -.07em;
}
.flow-core small {
  position: absolute;
  bottom: 21%;
  font-size: 12px;
  letter-spacing: .08em;
}
.flow-node {
  width: 18%;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,.38);
  background: rgba(10,30,47,.2);
  box-shadow: 0 14px 42px rgba(5,18,29,.18);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  font-size: 10px;
  letter-spacing: .12em;
  color: white;
  font-weight: 700;
}
.node-solar { left: 8%; top: 9%; }
.node-starlink { right: 3%; top: 27%; }
.node-usbc { left: 16%; bottom: 3%; }
.flow-line {
  position: absolute;
  z-index: 1;
  height: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.14);
  transform-origin: left;
}
.flow-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #3d9cff, transparent);
  animation: dyn-energy 2s linear infinite;
}
.line-a { left: 20%; top: 27%; width: 34%; transform: rotate(35deg); }
.line-b { left: 62%; top: 50%; width: 27%; transform: rotate(-23deg); }
.line-c { left: 26%; top: 70%; width: 29%; transform: rotate(-32deg); }

/* Scenes Grid */
.scene-section { background: #fff; }
.scene-grid {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}
.scene-card {
  position: relative;
  grid-column: span 5;
  min-height: 520px;
  overflow: hidden;
  margin: 0;
  border-radius: var(--dyn-radius);
  background: #ddd;
}
.scene-card--wide { grid-column: span 7; }
.scene-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.scene-card:hover img { transform: scale(1.04); }
.scene-card figcaption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: white;
  font-size: 22px;
  font-weight: 700;
  text-shadow: 0 2px 18px rgba(0,0,0,.5);
}
.scene-card figcaption span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* Weather Section */
.weather-section {
  position: relative;
  height: 80svh;
  overflow: hidden;
  color: white;
}
.weather-section > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.weather-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(1,10,22,.82), rgba(1,10,22,.12) 65%);
}
.weather-copy {
  position: absolute;
  left: max(7vw, 28px);
  top: 50%;
  width: min(600px, 46vw);
  transform: translateY(-50%);
}
.weather-copy h2 { color: white; }
.weather-copy p {
  color: rgba(255,255,255,.72);
  font-size: 16px;
  line-height: 1.65;
}

/* Tech Specs Section */
.spec-section { background: #f0f2f5; }
.spec-layout {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.spec-product {
  overflow: hidden;
  border-radius: var(--dyn-radius);
  background: white;
}
.spec-product img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.spec-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.spec-row {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-radius: 22px;
  background: white;
}
.spec-row span { color: var(--dyn-muted); font-size: 14px; }
.spec-row strong { font-size: clamp(24px, 2.5vw, 38px); letter-spacing: -.04em; color: #111; }
.spec-row i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(var(--level, 0) * 1%);
  height: 3px;
  background: linear-gradient(90deg, #1977ff, #74c5ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(.2,.8,.2,1);
}
.spec-row.in-view i { transform: scaleX(1); }
.io-grid {
  width: min(1240px, calc(100% - 48px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.io-card {
  min-height: 210px;
  padding: 26px;
  border-radius: 26px;
  background: #121216;
  color: white;
}
.io-card > span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #70b9ff;
  background: rgba(25,119,255,.15);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .1em;
}
.io-card h3 {
  margin: 32px 0 8px;
  font-size: 22px;
  letter-spacing: -.035em;
  color: white;
}
.io-card p {
  margin: 0;
  color: #9b9ba4;
  font-size: 13px;
  line-height: 1.5;
}

/* Gallery Track */
.gallery-section { background: white; }
.gallery-track {
  width: min(1240px, calc(100% - 48px));
  margin: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.gallery-track figure {
  overflow: hidden;
  margin: 0;
  border-radius: var(--dyn-radius);
  background: #f5f5f7;
}
.gallery-track img {
  width: 100%;
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
}
.gallery-track figure:hover img { transform: scale(1.035); }

/* Closing Section */
.closing-section {
  position: relative;
  width: min(1240px, calc(100% - 48px));
  margin: 60px auto;
  border-radius: 28px;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  text-align: center;
  box-shadow: 0 12px 36px rgba(0,0,0,0.04);
}
.closing-section > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .88;
}
.closing-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.1), white 72%);
}
.closing-copy {
  position: relative;
  z-index: 2;
  margin-top: 40vh;
}
.closing-copy p { margin: 18px 0 26px; }

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(42px) scale(.985);
  transition: opacity .8s ease, transform 1s cubic-bezier(.2,.8,.2,1);
}
.reveal.in-view {
  opacity: 1;
  transform: none;
}

@keyframes dyn-breathe { 50% { transform: translate(-50%,-50%) scale(1.06); opacity: .65; } }
@keyframes dyn-magnetic { from { transform: scale(.7); opacity: .85; } to { transform: scale(3.4); opacity: 0; } }
@keyframes dyn-energy { from { transform: translateX(-110%); } to { transform: translateX(110%); } }

@media (max-width: 900px) {
  .story-copy { width: min(410px, 72vw); }
  .power-grid, .connect-section, .flow-sticky, .spec-layout { grid-template-columns: 1fr; }
  .power-visual { min-height: auto; aspect-ratio: 1; }
  .flow-section { height: auto; }
  .flow-sticky { position: relative; min-height: 100svh; padding: 120px 7vw; }
  .flow-diagram { width: min(80vw, 580px); margin: auto; }
  .scene-card, .scene-card--wide { grid-column: span 6; min-height: 430px; }
  .weather-copy { width: min(620px, 80vw); }
  .io-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .story-step { align-items: flex-end; justify-content: center; padding: 0 18px 8vh; }
  .story-copy { width: 100%; padding: 21px; }
  .story-copy h2 { font-size: 38px; }
  .stat-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-card { min-height: 190px; }
  .scene-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .scene-card, .scene-card--wide { min-width: 86vw; min-height: 500px; scroll-snap-align: center; }
  .weather-copy { left: 22px; width: calc(100% - 44px); }
  .weather-copy h2 { font-size: 48px; }
  .io-grid, .gallery-track { grid-template-columns: 1fr; }
}
