/* ORQVION Features — extends home.css ox system */

.page-features,
.page-product,
.page-pricing,
.page-enterprise,
.page-security,
.page-help,
.page-docs,
.page-about,
.page-portal,
.page-download,
.page-legal,
.page-changelog,
.page-support,
.page-contact,
.page-portal-dashboard {
  background: var(--ox-bg);
}

.page-features .site-footer,
.page-product .site-footer,
.page-pricing .site-footer,
.page-enterprise .site-footer,
.page-security .site-footer,
.page-help .site-footer,
.page-docs .site-footer,
.page-about .site-footer,
.page-portal .site-footer,
.page-download .site-footer,
.page-legal .site-footer,
.page-changelog .site-footer,
.page-support .site-footer,
.page-contact .site-footer {
  border-top-color: var(--ox-line);
  background: var(--ox-bg-2);
}

/* Compact page hero (not full viewport) */
.page-features .ox-hero-page,
.page-product .ox-hero-page,
.page-pricing .ox-hero-page,
.page-enterprise .ox-hero-page,
.page-security .ox-hero-page,
.page-help .ox-hero-page,
.page-docs .ox-hero-page,
.page-about .ox-hero-page,
.page-portal .ox-hero-page,
.page-download .ox-hero-page,
.page-legal .ox-hero-page,
.page-changelog .ox-hero-page,
.page-support .ox-hero-page,
.page-contact .ox-hero-page {
  min-height: auto;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}

.page-features .ox-hero-page .ox-hero-layout,
.page-product .ox-hero-page .ox-hero-layout,
.page-pricing .ox-hero-page .ox-hero-layout,
.page-enterprise .ox-hero-page .ox-hero-layout,
.page-security .ox-hero-page .ox-hero-layout,
.page-help .ox-hero-page .ox-hero-layout,
.page-docs .ox-hero-page .ox-hero-layout,
.page-about .ox-hero-page .ox-hero-layout,
.page-legal .ox-hero-page .ox-hero-layout,
.page-changelog .ox-hero-page .ox-hero-layout,
.page-download .ox-hero-page .ox-hero-layout,
.page-support .ox-hero-page .ox-hero-layout,
.page-contact .ox-hero-page .ox-hero-layout,
.page-portal-login .ox-hero-page .ox-hero-layout,
.page-portal-register .ox-hero-page .ox-hero-layout,
.page-account .ox-hero-page .ox-hero-layout,
.page-portal .ox-portal-hero-layout {
  min-height: auto;
}

@media (min-width: 1024px) {
  .page-features .ox-hero-page .ox-hero-layout,
  .page-product .ox-hero-page .ox-hero-layout,
  .page-pricing .ox-hero-page .ox-hero-layout,
  .page-enterprise .ox-hero-page .ox-hero-layout,
  .page-security .ox-hero-page .ox-hero-layout,
  .page-help .ox-hero-page .ox-hero-layout,
  .page-docs .ox-hero-page .ox-hero-layout,
  .page-about .ox-hero-page .ox-hero-layout,
  .page-legal .ox-hero-page .ox-hero-layout,
  .page-changelog .ox-hero-page .ox-hero-layout,
  .page-download .ox-hero-page .ox-hero-layout,
  .page-support .ox-hero-page .ox-hero-layout,
  .page-contact .ox-hero-page .ox-hero-layout,
  .page-portal-login .ox-hero-page .ox-hero-layout,
  .page-portal-register .ox-hero-page .ox-hero-layout,
  .page-account .ox-hero-page .ox-hero-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    min-height: auto;
  }
}

.page-features .ox-hero-page h1,
.page-product .ox-hero-page h1,
.page-pricing .ox-hero-page h1,
.page-enterprise .ox-hero-page h1,
.page-security .ox-hero-page h1,
.page-help .ox-hero-page h1,
.page-docs .ox-hero-page h1,
.page-about .ox-hero-page h1 {
  font-family: var(--ox-display);
  font-size: clamp(2rem, 4.2vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 1rem;
  color: #fff;
}

.page-features .ox-hero-page .ox-lead,
.page-product .ox-hero-page .ox-lead {
  max-width: 38rem;
}

/* Hero visual — layered capability cards (click to bring forward) */
.ox-feat-visual {
  position: relative;
  min-height: 280px;
  perspective: 900px;
}

.ox-feat-stack {
  position: relative;
  width: min(100%, 380px);
  margin-inline: auto;
  transform-style: preserve-3d;
  transition: transform 0.45s ease;
}

.ox-feat-stack[data-ox-stack] {
  min-height: 9.5rem;
}

.ox-feat-stack[data-ox-stack][data-stack-count="4"] {
  min-height: 12rem;
}

.page-features.home-js .ox-feat-stack,
.page-product.home-js .ox-feat-stack,
.page-pricing.home-js .ox-feat-stack,
.page-enterprise.home-js .ox-feat-stack,
.page-security.home-js .ox-feat-stack,
.page-help.home-js .ox-feat-stack,
.page-docs.home-js .ox-feat-stack,
.page-about.home-js .ox-feat-stack,
.page-legal.home-js .ox-feat-stack,
.page-changelog.home-js .ox-feat-stack,
.page-download.home-js .ox-feat-stack,
.page-support.home-js .ox-feat-stack,
.page-contact.home-js .ox-feat-stack,
.page-portal-login.home-js .ox-feat-stack,
.page-portal-register.home-js .ox-feat-stack,
.page-account.home-js .ox-feat-stack {
  animation: ox-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.ox-feat-card {
  position: relative;
  padding: 1rem 1.15rem;
  border: 1px solid var(--ox-line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

[data-ox-stack] .ox-feat-card {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    top 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-ox-stack] .ox-feat-card:focus-visible {
  outline: 2px solid var(--ox-violet);
  outline-offset: 3px;
}

.ox-feat-card strong {
  display: block;
  font-family: var(--ox-display);
  font-size: 0.92rem;
  font-weight: 650;
  color: #fff;
  margin-bottom: 0.35rem;
}

.ox-feat-card span {
  font-size: 0.82rem;
  color: var(--ox-muted);
  line-height: 1.45;
}

/* Accent per card identity (DOM order) */
.ox-feat-card:nth-child(1) {
  border-color: rgba(77, 212, 255, 0.25);
}

.ox-feat-card:nth-child(2) {
  border-color: rgba(139, 123, 255, 0.28);
}

.ox-feat-card:nth-child(3) {
  border-color: rgba(176, 106, 255, 0.22);
}

.ox-feat-card:nth-child(4) {
  border-color: rgba(176, 106, 255, 0.3);
}

/* Stack depth slots — same look as original overlap; JS swaps pos classes on click */
[data-ox-stack] .ox-feat-card.ox-stack-pos-0 {
  top: 0;
  left: 0;
  z-index: 3;
  transform: translateZ(40px) rotateY(-6deg) rotateX(4deg);
}

[data-ox-stack] .ox-feat-card.ox-stack-pos-1 {
  top: 2.5rem;
  left: 1.5rem;
  z-index: 2;
  transform: translateZ(20px) rotateY(-3deg) rotateX(2deg);
}

[data-ox-stack] .ox-feat-card.ox-stack-pos-2 {
  top: 5rem;
  left: 3rem;
  z-index: 1;
  transform: translateZ(0) rotateY(2deg);
}

[data-ox-stack] .ox-feat-card.ox-stack-pos-3 {
  top: 7.2rem;
  left: 4.25rem;
  z-index: 0;
  transform: translateZ(-8px) rotateY(4deg);
}

.ox-feat-glow {
  position: absolute;
  inset: 10% 0 auto;
  height: 70%;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(139, 123, 255, 0.22), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.page-features [data-ox-hero]:hover .ox-feat-stack,
.page-product [data-ox-hero]:hover .ox-feat-stack,
.page-pricing [data-ox-hero]:hover .ox-feat-stack,
.page-enterprise [data-ox-hero]:hover .ox-feat-stack,
.page-security [data-ox-hero]:hover .ox-feat-stack,
.page-help [data-ox-hero]:hover .ox-feat-stack,
.page-docs [data-ox-hero]:hover .ox-feat-stack,
.page-about [data-ox-hero]:hover .ox-feat-stack,
.page-legal [data-ox-hero]:hover .ox-feat-stack,
.page-changelog [data-ox-hero]:hover .ox-feat-stack,
.page-download [data-ox-hero]:hover .ox-feat-stack,
.page-support [data-ox-hero]:hover .ox-feat-stack,
.page-contact [data-ox-hero]:hover .ox-feat-stack {
  transform: rotateY(-2deg) rotateX(2deg);
}

/* Sticky TOC */
.ox-toc {
  position: sticky;
  top: 64px;
  z-index: 45;
  border-top: 1px solid var(--ox-line);
  border-bottom: 1px solid var(--ox-line);
  background: rgba(6, 6, 10, 0.82);
  backdrop-filter: blur(16px) saturate(1.1);
  padding: 0.65rem 0;
}

.ox-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 123, 255, 0.42) var(--ox-bg-2, #0b0b12);
  -webkit-overflow-scrolling: touch;
}

.ox-toc ul::-webkit-scrollbar {
  height: 5px;
}

.ox-toc ul::-webkit-scrollbar-track {
  background: var(--ox-bg-2, #0b0b12);
  border-radius: 999px;
}

.ox-toc ul::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(139, 123, 255, 0.38);
}

.ox-toc ul::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 123, 255, 0.55);
}

.ox-toc ul::-webkit-scrollbar-corner {
  background: var(--ox-bg-2, #0b0b12);
}

.ox-toc a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.8125rem;
  font-weight: 560;
  color: var(--ox-muted);
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.ox-toc a:hover {
  color: var(--ox-ink);
  border-color: var(--ox-line);
  background: rgba(255, 255, 255, 0.03);
}

.ox-toc a.is-active {
  color: #fff;
  border-color: rgba(139, 123, 255, 0.35);
  background: rgba(139, 123, 255, 0.12);
}

/* Product hub grid */
.ox-hub {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
}

.ox-hub-card {
  display: block;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--ox-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  text-decoration: none;
  transition: transform 0.35s ease, border-color 0.25s, box-shadow 0.35s;
  transform: perspective(800px) rotateX(0);
}

.ox-hub-card:hover {
  transform: translateY(-4px) perspective(800px) rotateX(2deg);
  border-color: rgba(139, 123, 255, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(139, 123, 255, 0.08);
}

.ox-hub-card h3 {
  margin: 0 0 0.45rem;
  font-family: var(--ox-display);
  font-size: 1rem;
  font-weight: 650;
  color: #fff;
  letter-spacing: -0.02em;
}

.ox-hub-card p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--ox-muted);
}

.ox-hub-card::after {
  content: "→";
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--ox-violet);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s, transform 0.25s;
}

.ox-hub-card:hover::after {
  opacity: 1;
  transform: none;
}

/* Feature tiles */
.ox-tiles {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.ox-tile {
  position: relative;
  padding: 1.25rem 1.3rem 1.3rem;
  border: 1px solid var(--ox-line);
  border-radius: 16px;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%, rgba(77, 212, 255, 0.06), transparent 55%),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.25s;
}

.ox-tile::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ox-grad);
  opacity: 0.55;
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 0.45s ease;
}

.ox-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 123, 255, 0.28);
}

.ox-tile:hover::before {
  transform: scaleX(1);
}

.ox-tile h3 {
  margin: 0 0 0.55rem;
  font-family: var(--ox-display);
  font-size: 1.02rem;
  font-weight: 650;
  color: #fff;
  letter-spacing: -0.02em;
}

.ox-tile p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ox-muted);
}

.ox-head-wide {
  max-width: 46rem;
}

/* Comparison matrix */
.ox-matrix-wrap {
  overflow-x: auto;
  border: 1px solid var(--ox-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.015);
}

.ox-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ox-matrix th,
.ox-matrix td {
  padding: 0.95rem 1.1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--ox-line);
}

.ox-matrix thead th {
  font-family: var(--ox-display);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ox-muted);
  background: rgba(255, 255, 255, 0.02);
}

.ox-matrix tbody th[scope="row"] {
  font-weight: 600;
  color: #fff;
  min-width: 10rem;
}

.ox-matrix tbody td {
  color: var(--ox-muted);
  line-height: 1.45;
}

.ox-matrix tbody tr:last-child th,
.ox-matrix tbody tr:last-child td {
  border-bottom: 0;
}

.ox-matrix td:last-child {
  color: #d8d8e4;
  background: rgba(139, 123, 255, 0.06);
}

.ox-matrix-note {
  margin: 1rem 0 0;
  font-size: 0.875rem;
  max-width: 52rem;
}

.page-features .section-tight {
  padding: clamp(2rem, 4vw, 2.75rem) 0;
}

@media (prefers-reduced-motion: reduce) {
  .ox-feat-stack,
  .ox-hub-card,
  .ox-tile,
  [data-ox-stack] .ox-feat-card {
    transition: none !important;
    animation: none !important;
  }
}
