/* ================================================================
   The Web Rebellion — futuristic supercomputer redesign
   Deep space + cyan glass / cylinder scroll animation
   ================================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bg-void: #05080F;
  --bg-deep: #0A0F1C;
  --panel-glass: rgba(120, 200, 255, 0.04);
  --panel-stroke: rgba(120, 200, 255, 0.18);
  --grid-line: #1A2438;
  --grid-line-hi: #2A3E5C;
  --accent: #5CE1FF;
  --accent-glow: rgba(92, 225, 255, 0.35);
  --accent-deep: #1FA8C4;
  --text: #E8F0FF;
  --text-muted: #8FA3C2;
  --text-dim: #4A5878;
  --signal-warn: #FFB347;
  --signal-off: #4A5878;

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t: 160ms;

  --container: 64rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-void);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 800px at 70% 10%, rgba(31, 168, 196, 0.06), transparent 60%),
    radial-gradient(1000px 700px at 10% 90%, rgba(92, 225, 255, 0.04), transparent 60%),
    var(--bg-void);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t) var(--ease);
}
a:hover { color: var(--text); }

img { max-width: 100%; display: block; }

/* ================================================================
   Containers
   ================================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

main.overlay {
  position: relative;
  z-index: 1;
  padding: 7rem 0 6rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

/* ================================================================
   Cylinder stage
   ================================================================ */

.cylinder-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  --tz: 50vh;
  --panel-h: 26vh;
}

.cylinder {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--rot, 0deg));
  will-change: transform;
}

.panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110vw;
  height: var(--panel-h);
  margin: calc(var(--panel-h) / -2) 0 0 -55vw;
  transform: rotateX(var(--angle)) translateZ(var(--tz));
  transform-origin: center center;
  backface-visibility: hidden;
  opacity: 0.7;
}

.panel svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Static fallback for reduced motion */
.cylinder-stage.is-static .cylinder {
  transform: none;
}
.cylinder-stage.is-static .panel {
  transform: none;
  opacity: 0;
}
.cylinder-stage.is-static::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}

/* ================================================================
   Glass panel (reusable)
   ================================================================ */

.glass-panel {
  position: relative;
  background: var(--panel-glass);
  border: 1px solid var(--panel-stroke);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.5);
  border-radius: 2px;
}

.glass-panel::before,
.glass-panel::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.glass-panel::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--accent-deep);
  border-left: 1px solid var(--accent-deep);
}
.glass-panel::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--accent-deep);
  border-right: 1px solid var(--accent-deep);
}

/* ================================================================
   Chrome header
   ================================================================ */

.chrome-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(5, 8, 15, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--panel-stroke);
}

.chrome-header .nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}
.brand:hover { color: var(--accent); }

.brand-mark {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--accent);
  position: relative;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--accent);
  opacity: 0.4;
}

.chrome-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.chrome-nav a {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.chrome-nav a:hover { color: var(--text); }

.nav-cta {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--panel-stroke);
  color: var(--text) !important;
  transition: all var(--t) var(--ease);
}
.nav-cta:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px var(--accent-glow);
}

/* ================================================================
   Typography helpers
   ================================================================ */

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.25rem;
}

h1, h2, h3 {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
}
h2 {
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  letter-spacing: -0.015em;
}
h3 {
  font-size: 1.05rem;
  letter-spacing: -0.005em;
}

p { margin: 0; }

/* ================================================================
   Hero
   ================================================================ */

.hero {
  padding: 3.25rem clamp(1.5rem, 4vw, 3rem);
  margin: 0 auto;
  max-width: 56rem;
  width: calc(100% - 2 * var(--gutter));
}

.hero h1 {
  margin-bottom: 1.25rem;
  max-width: 22ch;
}

.hero-sub {
  color: var(--text-muted);
  max-width: 56ch;
  font-size: 1.02rem;
  margin-bottom: 2rem;
}

.hero-meta {
  margin-top: 2rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ================================================================
   Buttons
   ================================================================ */

.btn-primary,
.btn-ghost,
.btn-locked {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--t) var(--ease);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #02060C;
  border-color: var(--accent);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--text);
  color: #02060C;
  border-color: var(--text);
  box-shadow: 0 0 0 1px var(--accent), 0 0 28px var(--accent-glow);
  outline: none;
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--panel-stroke);
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px var(--accent-glow);
  outline: none;
}

.btn-locked {
  background: transparent;
  color: var(--signal-off);
  border: 1px dashed var(--signal-off);
  cursor: not-allowed;
}

/* ================================================================
   Modules section (catalog)
   ================================================================ */

.modules {
  padding: 2.5rem clamp(1.5rem, 4vw, 2.75rem);
  margin: 0 auto;
  max-width: 64rem;
  width: calc(100% - 2 * var(--gutter));
}

.section-head {
  margin-bottom: 2rem;
}
.section-head h2 {
  margin: 0.25rem 0 0.5rem;
}
.section-sub {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 50ch;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.1rem;
  margin-top: 1.5rem;
}

/* Product card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.25rem 1.1rem;
  min-height: 14rem;
  background: rgba(10, 15, 28, 0.55);
  border: 1px solid var(--panel-stroke);
  backdrop-filter: blur(10px) saturate(130%);
  -webkit-backdrop-filter: blur(10px) saturate(130%);
  border-radius: 2px;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 24px var(--accent-glow);
}

.product-card::before,
.product-card::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}
.product-card::before {
  top: -1px;
  left: -1px;
  border-top: 1px solid var(--accent-deep);
  border-left: 1px solid var(--accent-deep);
}
.product-card::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 1px solid var(--accent-deep);
  border-right: 1px solid var(--accent-deep);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--grid-line);
}

.card-id {
  color: var(--accent);
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
}
.card-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.product-card.is-unavailable .card-id { color: #6B7FA8; }
.product-card.is-unavailable .card-status {
  color: var(--text-muted);
}
.product-card.is-unavailable .card-status .dot {
  background: #6B7FA8;
  box-shadow: none;
}

.card-title {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}

.card-price {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.product-card.is-unavailable .card-price { color: var(--text-dim); }

.product-card.is-tba {
  border-style: dashed;
  border-color: rgba(120, 200, 255, 0.12);
}
.product-card.is-tba:hover {
  border-color: var(--accent-deep);
  transform: none;
  box-shadow: 0 0 0 1px var(--accent-deep), 0 18px 40px rgba(0, 0, 0, 0.55);
}

.product-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 4px 32px var(--accent-glow);
}
.product-card.is-featured::before {
  border-top-color: var(--accent);
  border-left-color: var(--accent);
}
.product-card.is-featured::after {
  border-bottom-color: var(--accent);
  border-right-color: var(--accent);
}
.product-card.is-featured:hover {
  box-shadow: 0 0 0 1px var(--accent), 0 8px 48px var(--accent-glow), 0 18px 40px rgba(0, 0, 0, 0.55);
}
.card-badge {
  position: absolute;
  top: -1px;
  left: 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg-void);
  background: var(--accent);
  padding: 0.18rem 0.5rem;
  border-radius: 0 0 2px 2px;
  white-space: nowrap;
  pointer-events: none;
}

/* Blurred / accessible text pattern (reused) */
.text-blur-illegible {
  filter: blur(5px) contrast(0.85);
  user-select: none;
  pointer-events: none;
  display: inline-block;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ================================================================
   Product detail page
   ================================================================ */

.product-page-main {
  position: relative;
  z-index: 1;
  padding: 7rem 0 6rem;
}

.crumb {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.crumb:hover { color: var(--accent); }

.product-detail {
  position: relative;
  padding: 1.5rem clamp(1.25rem, 3vw, 2.25rem) 2rem;
  max-width: 64rem;
  margin: 0 auto;
  background: rgba(10, 15, 28, 0.6);
  border: 1px solid var(--panel-stroke);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 60px rgba(0,0,0,0.5);
}
.product-detail::before,
.product-detail::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.product-detail::before {
  top: -1px; left: -1px;
  border-top: 1px solid var(--accent-deep);
  border-left: 1px solid var(--accent-deep);
}
.product-detail::after {
  bottom: -1px; right: -1px;
  border-bottom: 1px solid var(--accent-deep);
  border-right: 1px solid var(--accent-deep);
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--grid-line);
  margin-bottom: 1.5rem;
}
.detail-head .id { color: var(--accent); }
.detail-head .status { display: inline-flex; align-items: center; gap: 0.4rem; }
.detail-head .status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.detail-head.is-offline .id { color: var(--signal-off); }
.detail-head.is-offline .status .dot { background: var(--signal-off); box-shadow: none; }

.offline-banner {
  margin: -0.5rem 0 1.25rem;
  padding: 0.55rem 0.9rem;
  border: 1px dashed var(--signal-off);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-bottom: 0.85rem;
  max-width: 30ch;
}
.detail-desc {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 1.75rem;
}

.testimonial {
  position: relative;
  margin: 0 0 1.75rem;
  padding: 1rem 1.15rem 1rem 1.4rem;
  max-width: 60ch;
  border-left: 1px solid var(--accent-deep);
  background: rgba(92, 225, 255, 0.03);
}
.testimonial blockquote {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.55;
  font-style: italic;
}
.testimonial figcaption {
  margin-top: 0.55rem;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}

.detail-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .detail-body { grid-template-columns: 1fr; }
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #02060C;
  border: 1px solid var(--panel-stroke);
  border-radius: 2px;
  overflow: hidden;
}
.video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-shell.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.spec-sheet {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--panel-stroke);
  background: rgba(5, 8, 15, 0.55);
  border-radius: 2px;
}

.spec-price {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 2.4rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1;
}

.spec-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.spec-features li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.5;
}
.spec-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.spec-cta {
  margin-top: 0.5rem;
}

.cta-subscribe {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.cta-subscribe a {
  color: var(--accent);
  text-decoration: none;
}
.cta-subscribe a:hover {
  text-decoration: underline;
}

/* 404 / not-found card */
.not-found {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--panel-stroke);
}
.not-found h2 { margin-bottom: 0.5rem; }

/* ================================================================
   Footer
   ================================================================ */

.chrome-footer {
  position: relative;
  z-index: 1;
  margin: 5rem auto 2rem;
  padding: 1.25rem clamp(1.25rem, 3vw, 2rem);
  max-width: var(--container);
  width: calc(100% - 2 * var(--gutter));
}

.footer-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ================================================================
   Focus ring (consistent across all interactives)
   ================================================================ */

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 1px var(--accent), 0 0 18px var(--accent-glow);
  border-radius: 2px;
}

/* ================================================================
   Responsive
   ================================================================ */

@media (max-width: 720px) {
  .cylinder-stage {
    --tz: 38vh;
    --panel-h: 38vh;
    perspective: 1100px;
  }
  main.overlay { gap: 2.5rem; padding: 5.5rem 0 4rem; }
  .hero { padding: 2.25rem 1.4rem; }
  .modules { padding: 1.75rem 1.4rem; }
  .product-grid { grid-template-columns: 1fr; }
  .footer-wrap { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

/* ================================================================
   Reduced motion
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  .cylinder { transform: none !important; }
  .panel { transform: none !important; opacity: 0 !important; }
}
