/* ================================================================
   SoftNex Design System — nexora.css  v5
   Matches the approved dark reference design exactly.
   Black background, cyan/blue accents.
   No purple/violet/pink in backgrounds, surfaces, cards or UI states.
   Third-party software logos keep their official brand colours.
   ================================================================ */

/* ================================================================
   1. DESIGN TOKENS
   ================================================================ */
:root {
  /* Backgrounds — pure black base */
  /* Values sampled from the approved reference screenshot */
  --nx-bg:        #01060B;
  --nx-bg-2:      #020C14;
  --nx-surface:   #031320;
  --nx-surface-2: #0B1C28;
  --nx-surface-3: #102332;

  /* Brand */
  --nx-cyan:      #00E5FF;
  --nx-cyan-rgb:  0,229,255;
  --nx-blue:      #168BFF;
  --nx-blue-rgb:  22,139,255;
  --nx-ice:       #A5F3FF;
  --nx-ice-rgb:   165,243,255;

  /* Text */
  --nx-text:      #FFFFFF;
  --nx-text-2:    #94A8B8;
  --nx-text-3:    #4A6070;

  /* Borders */
  --nx-border:        rgba(0,229,255,.12);
  --nx-border-lit:    rgba(0,229,255,.32);
  --nx-border-strong: rgba(22,139,255,.5);

  /* Radii */
  --nx-r-xs: 5px;
  --nx-r-sm: 8px;
  --nx-r-md: 12px;
  --nx-r-lg: 16px;
  --nx-r-xl: 22px;

  /* Shadows */
  --nx-shadow-sm: 0 2px 8px rgba(0,0,0,.8);
  --nx-shadow-md: 0 4px 20px rgba(0,0,0,.85), 0 1px 4px rgba(0,0,0,.5);
  --nx-shadow-lg: 0 8px 40px rgba(0,0,0,.9), 0 2px 12px rgba(0,0,0,.6);
  --nx-glow-cyan: 0 0 20px rgba(0,229,255,.22);

  /* Typography */
  --nx-font-head: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --nx-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nx-font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Transitions */
  --nx-ease:    cubic-bezier(.16,1,.3,1);
  --nx-ease-io: cubic-bezier(.4,0,.2,1);
  --nx-t1: 120ms;
  --nx-t2: 200ms;
  --nx-t3: 360ms;

  /* Legacy overrides */
  --bg:           var(--nx-bg);
  --surface:      var(--nx-surface);
  --surface-2:    var(--nx-surface-2);
  --border:       var(--nx-border);
  --border-hover: var(--nx-border-lit);
  --primary:      var(--nx-cyan);
  --primary-rgb:  var(--nx-cyan-rgb);
  --secondary:    var(--nx-blue);
  --secondary-rgb:var(--nx-blue-rgb);
  --text:         var(--nx-text);
  --muted:        var(--nx-text-2);
  --accent:       var(--nx-cyan);
  --accent-rgb:   var(--nx-cyan-rgb);
  --accent-2:     var(--nx-blue);
  --accent-2-rgb: var(--nx-blue-rgb);
  --font-head:    var(--nx-font-head);
  --font-body:    var(--nx-font-body);
  --r-xs: var(--nx-r-xs);
  --r-sm: var(--nx-r-sm);
  --r-md: var(--nx-r-md);
  --r-lg: var(--nx-r-lg);
  --r-xl: var(--nx-r-xl);
  --radius:    var(--nx-r-lg);
  --radius-sm: var(--nx-r-md);
  --radius-xs: var(--nx-r-sm);
  --transition: var(--nx-t2) var(--nx-ease-io);
}

/* ================================================================
   2. BASE
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  background: var(--nx-bg);
  color: var(--nx-text);
  font-family: var(--nx-font-body);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 { font-family: var(--nx-font-head); }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input  { font-family: inherit; }

::selection { background: rgba(0,229,255,.2); color: #fff; }

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--nx-cyan), var(--nx-blue));
  border-radius: 3px;
}

:focus-visible {
  outline: 2px solid var(--nx-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ================================================================
   3. BACKGROUND LAYERS
   ================================================================ */
.bg-layers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

.bg-layers .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(180px);
  will-change: transform;
}

.bg-layers .orb--primary {
  width: 600px; height: 600px;
  top: -100px; right: 10%;
  background: #0050AA;
  opacity: .12;
  animation: nxOrbDrift 32s ease-in-out infinite;
}

.bg-layers .orb--secondary {
  width: 500px; height: 500px;
  bottom: 10%; left: -100px;
  background: #003060;
  opacity: .10;
  animation: nxOrbDrift 38s ease-in-out infinite reverse;
}

.bg-layers .orb--accent {
  width: 400px; height: 400px;
  top: 50%; left: 50%;
  background: #005580;
  opacity: .06;
  animation: nxOrbBreathe 20s ease-in-out infinite;
}

@keyframes nxOrbDrift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(40px,30px) scale(1.04); }
  66%     { transform: translate(-25px,50px) scale(.97); }
}
@keyframes nxOrbBreathe {
  0%,100% { transform: translate(-50%,-50%) scale(.9); opacity:.06; }
  50%     { transform: translate(-50%,-50%) scale(1.05); opacity:.1; }
}

/* Perspective grid */
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(0,229,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.03) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(600px) rotateX(40deg) scaleY(2.5) translateY(-10%);
  transform-origin: center bottom;
  mask-image: linear-gradient(to top, black 0%, transparent 50%);
  opacity: .8;
  top: auto; bottom: 0; height: 55%;
}

.bg-noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px;
}

.cursor-spotlight {
  position: fixed; width: 500px; height: 500px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(0,229,255,.035) 0%, transparent 70%);
  transform: translate(-50%,-50%);
  will-change: transform;
}

/* ================================================================
   4. LAYOUT
   ================================================================ */
.wrap { width: 100%; max-width: 1144px; margin: 0 auto; padding: 0 32px; }

/* ================================================================
   5. TOPBAR
   ================================================================ */
.topbar {
  position: sticky; top: 0; z-index: 200;
  height: 52px;
  display: flex; align-items: center;
  background: rgba(0,8,15,.92);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid #021F2E;
  transition: border-color var(--nx-t2) var(--nx-ease-io),
              background var(--nx-t2) var(--nx-ease-io);
}
.topbar.scrolled {
  background: rgba(0,0,0,.78);
  border-bottom-color: rgba(0,229,255,.1);
}

.topbar .wrap {
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  position: relative;
}

/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--nx-font-head);
  font-size: 16px; font-weight: 700;
  letter-spacing: .04em; color: #fff;
  flex-shrink: 0; text-decoration: none;
}
.brand-logo { display: none; }
.brand-svg { width: 32px; height: 32px; flex-shrink: 0; transition: filter var(--nx-t2) ease; }
.brand:hover .brand-svg { filter: drop-shadow(0 0 8px rgba(0,229,255,.6)); }
.brand-wordmark { font-family: var(--nx-font-head); font-size: 16px; font-weight: 700; letter-spacing: .06em; }

/* Nav — centered */
.main-nav {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
}
.main-nav a {
  position: relative; padding: 6px 16px;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,.75);
  border-radius: var(--nx-r-sm);
  transition: color var(--nx-t2) var(--nx-ease-io);
  white-space: nowrap;
}
.main-nav a::after {
  content: '';
  position: absolute; bottom: -4px; left: 16px; right: 16px;
  height: 2px;
  background: linear-gradient(90deg, var(--nx-cyan), var(--nx-blue));
  border-radius: 1px;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--nx-t2) var(--nx-ease);
}
.main-nav a:hover { color: #fff; background: none; }
.main-nav a.current { color: #fff; background: none; }
.main-nav a.current::after { transform: scaleX(1); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 8px; }

.header-search-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--nx-r-sm); color: rgba(255,255,255,.6);
  transition: all var(--nx-t2) var(--nx-ease-io);
}
.header-search-btn:hover { color: var(--nx-cyan); background: rgba(0,229,255,.08); }

.btn--header {
  height: 34px; padding: 0 16px;
  font-size: 13px; font-weight: 600; font-family: var(--nx-font-head);
  background: linear-gradient(135deg, var(--nx-cyan), var(--nx-blue));
  color: #000814;
  border-radius: var(--nx-r-sm);
  transition: opacity var(--nx-t1) ease, transform var(--nx-t1) ease;
  box-shadow: 0 2px 12px rgba(0,229,255,.25);
}
.btn--header:hover { opacity: .9; transform: translateY(-1px); }

.burger {
  display: none; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  border-radius: var(--nx-r-sm); color: rgba(255,255,255,.6);
}

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 0; z-index: 9999;
  padding: 10px 20px; background: var(--nx-cyan); color: #000814;
  font-size: 13px; font-weight: 700; border-radius: 0 0 8px 0;
}
.skip-link:focus { top: 0; }

/* ================================================================
   6. HERO
   ================================================================ */
.hero {
  position: relative; z-index: 1;
  min-height: 0;
  display: flex; align-items: center;
  padding: 28px 0 24px;
  overflow: hidden; animation: none;
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
  gap: 48px; align-items: center; width: 100%;
}

.hero__content { display: flex; flex-direction: column; align-items: flex-start; }

/* Eyebrow */
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--nx-cyan); margin-bottom: 22px;
}
.hero__eyebrow-line { width: 28px; height: 1px; background: var(--nx-cyan); opacity: .7; }

.hero__badge { display: none !important; }

/* Headline — matches reference: large, white, cyan accent */
.hero__title {
  font-family: var(--nx-font-head);
  font-size: clamp(36px, 3.9vw, 58px);
  font-weight: 800; line-height: 1.02;
  letter-spacing: -.04em;
  color: #ffffff;
  margin: 0 0 20px;
  max-width: none; text-align: left;
}

/* Cyan accent — solid cyan color, not gradient, not outlined */
.hero__title .gradient,
.hero__title .nx-accent {
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--nx-cyan) !important;
  background-clip: unset !important;
  color: var(--nx-cyan) !important;
  -webkit-text-stroke: 0 !important;
}

.hero__sub {
  font-size: 15px; font-weight: 400;
  color: var(--nx-text-2); max-width: 440px;
  margin: 0 0 30px; line-height: 1.7; text-align: left;
}

/* Feature pills */
.hero__features {
  display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px;
}
.hero__feature {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--nx-text-2);
}
.hero__feature-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--nx-cyan); flex-shrink: 0;
}

.hero__scroll {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--nx-text-3); margin-top: 36px;
}
.hero__scroll-line { width: 28px; height: 1px; background: var(--nx-cyan); opacity: .5; }

/* 3D glass cube scene (Three.js). Wider than tall: cube + platform. */
.hero__visual {
  position: relative;
  width: calc(100% + 120px); max-width: none;
  margin-left: 0;
  aspect-ratio: 13 / 10;
  justify-self: start;
}
.hero__scene {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none; aspect-ratio: auto; opacity: 1;
}
#hero-canvas { width: 100%; height: 100%; display: block; }

/* Shown only when WebGL is unavailable */
.hero__scene-fallback {
  position: absolute; inset: 0;
  display: none;
  background: url("images/hero-crystal.png") center / contain no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 58% 64% at 50% 50%, #000 66%, transparent 100%);
          mask-image: radial-gradient(ellipse 58% 64% at 50% 50%, #000 66%, transparent 100%);
}

/* ================================================================
   7. SEARCH — matches reference: wide field, cyan button
   ================================================================ */
.search-wrap { max-width: none; margin: 0; position: relative; }
.hero__content .search-wrap { width: 100%; max-width: 524px; }

/* Field = one rounded container: icon | input | cyan button (as in the reference) */
.search-field {
  position: relative;
  display: flex; align-items: center;
  height: 56px;
  padding: 0 6px 0 0;
  background: #031320;
  border: 1px solid rgba(0,229,255,.2);
  border-radius: 12px;
  transition: border-color var(--nx-t2) ease, box-shadow var(--nx-t2) ease;
}
.search-field:focus-within {
  border-color: rgba(0,229,255,.55);
  box-shadow: 0 0 0 3px rgba(0,229,255,.1);
}
.search-field::after { content: none; display: none; }

.search-field .search-field__icon {
  position: static; transform: none;
  display: block; flex-shrink: 0;
  margin-left: 20px;
  color: rgba(255,255,255,.75);
  font-size: 15px;
  cursor: pointer;
}

.search-field input {
  flex: 1; min-width: 0;
  height: 100%;
  padding: 0 14px !important;
  font-size: 14px; font-weight: 400;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 0;
  outline: none;
  box-shadow: none;
  backdrop-filter: none;
}
.search-field input::placeholder { color: rgba(164,184,200,.6); }
.search-field input:focus { background: transparent; border: none; box-shadow: none; }

.search-field__go {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: #00D0FB;
  color: #00131D;
  box-shadow: 0 0 18px rgba(0,208,251,.35);
  transition: transform var(--nx-t1) ease, box-shadow var(--nx-t1) ease, background var(--nx-t1) ease;
}
.search-field__go:hover { background: #22DCFF; box-shadow: 0 0 26px rgba(0,208,251,.55); }
.search-field__go:active { transform: scale(.96); }

.search-empty {
  display: none; text-align: center;
  padding: 48px 24px; color: var(--nx-text-2); font-size: 15px;
}

/* ================================================================
   8. CATALOG SECTION
   ================================================================ */
.catalog { position: relative; z-index: 1; padding: 0 0 80px; }
.catalog .wrap { animation: none; }

.catalog-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 28px; padding-top: 0;
  border-top: none;
}

/* "— Catalog" heading matching reference */
.catalog-header h2 {
  font-family: var(--nx-font-head);
  font-size: 22px; font-weight: 700; letter-spacing: -.02em;
  color: #fff;
  display: flex; align-items: center; gap: 14px;
}
.catalog-header h2::before {
  content: '';
  display: block; width: 28px; height: 2px;
  background: var(--nx-cyan);
  border-radius: 1px; flex-shrink: 0;
}

/* "View All →" link */
.catalog-viewall {
  font-size: 13px; font-weight: 600;
  color: var(--nx-cyan);
  display: flex; align-items: center; gap: 5px;
  transition: opacity var(--nx-t1) ease;
}
.catalog-viewall:hover { opacity: .75; }

.catalog-count { font-size: 13px; color: var(--nx-text-3); }
.catalog-page-label { font-size: 15px; font-weight: 400; color: var(--nx-text-2); margin-left: 6px; }

/* ================================================================
   9. TILE GRID — 3 cols desktop
   ================================================================ */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ================================================================
   10. TILE / CARD — matches reference exactly
   ================================================================ */
.tile {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--nx-surface-2);
  border: 1px solid #023E56;
  border-radius: var(--nx-r-lg);
  overflow: hidden;
  transition:
    transform var(--nx-t2) var(--nx-ease),
    border-color var(--nx-t2) ease,
    box-shadow var(--nx-t2) ease;
  will-change: transform;
}

.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(0,229,255,.35);
  box-shadow: 0 8px 32px rgba(0,0,0,.8), 0 0 20px rgba(0,229,255,.08);
}

/* Cover — wide crop, as in the reference */
.tile__cover {
  position: relative;
  aspect-ratio: 16 / 6;
  overflow: hidden;
  background: #030c14;
  flex-shrink: 0;
}

.tile__cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--nx-ease), filter .35s ease;
  filter: brightness(.9) saturate(.95);
}

.tile:hover .tile__cover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1.05);
}

/* Bottom gradient on cover */
.tile__cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(11,25,41,.6) 80%,
    rgba(11,25,41,.95) 100%
  );
  pointer-events: none;
}

.tile__cover::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 30%, rgba(0,229,255,.07), transparent 70%);
  opacity: 0; transition: opacity .35s ease;
  z-index: 1; pointer-events: none;
}
.tile:hover .tile__cover::before { opacity: 1; }

/* Label badge — cyan pill */
.tile__label {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: #000814;
  background: var(--nx-cyan);
  border-radius: 100px;
  z-index: 2;
}

/* Card body — title / description / [stats | button] row, as in the reference */
.tile__body {
  padding: 14px 16px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "title title"
    "desc  desc"
    "stats cta";
  column-gap: 10px;
  align-items: center;
  flex: 1;
  background: var(--nx-surface-2);
}
.tile__body > h3      { grid-area: title; }
.tile__body > p       { grid-area: desc; align-self: start; }
.tile__body > .tile__stats { grid-area: stats; margin-bottom: 0 !important; }
.tile__body > .btn    { grid-area: cta; justify-self: end; }

.tile__body h3 {
  font-family: var(--nx-font-head);
  font-size: 14px; font-weight: 700;
  line-height: 1.3; letter-spacing: -.015em;
  color: #fff; margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tile__body p {
  font-size: 12px; color: var(--nx-text-2);
  line-height: 1.5; margin-bottom: 12px; flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stats + button row */
.tile__stats {
  display: flex; align-items: center;
  gap: 6px; margin-bottom: 12px; flex-wrap: wrap;
}

/* Stat badges */
.stat-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px 5px;
  border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1;
  background: rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.08);
  transition: border-color var(--nx-t2) ease;
}
.tile:hover .stat-badge { border-color: rgba(0,229,255,.2); }

.stat-badge__icon {
  width: 18px; height: 18px; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; flex-shrink: 0;
}
.stat-badge__value { font-size: 12px; font-weight: 700; color: #fff; letter-spacing: -.01em; }

.stat-badge--downloads { border-color: rgba(0,229,255,.15); background: rgba(0,229,255,.06); }
.stat-badge--downloads .stat-badge__icon { background: rgba(0,229,255,.15); color: var(--nx-cyan); }

.stat-badge--rating { border-color: rgba(255,200,55,.15); background: rgba(255,200,55,.05); }
.stat-badge--rating .stat-badge__icon { background: rgba(255,200,55,.15); color: #FFD040; }
.stat-badge--rating .stat-badge__value { color: #FFD040; }

/* CTA button — "Open Page →" matching reference */
.tile .btn--primary.btn--sm {
  align-self: center;
  height: 34px; padding: 0 14px;
  font-size: 12.5px; font-weight: 600;
  font-family: var(--nx-font-head);
  background: linear-gradient(135deg, var(--nx-cyan), var(--nx-blue));
  color: #000814;
  border-radius: var(--nx-r-sm);
  box-shadow: none;
  transition: transform var(--nx-t1) ease, box-shadow var(--nx-t1) ease;
}
.tile .btn--primary.btn--sm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,229,255,.3);
}

/* ================================================================
   11. SCROLL REVEAL
   ================================================================ */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity var(--nx-t3) var(--nx-ease), transform var(--nx-t3) var(--nx-ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.tile.reveal:nth-child(1) { transition-delay:  0ms; }
.tile.reveal:nth-child(2) { transition-delay: 50ms; }
.tile.reveal:nth-child(3) { transition-delay:100ms; }
.tile.reveal:nth-child(4) { transition-delay:150ms; }
.tile.reveal:nth-child(5) { transition-delay:200ms; }
.tile.reveal:nth-child(6) { transition-delay:250ms; }

/* ================================================================
   12. BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 22px;
  font-family: var(--nx-font-head); font-size: 14px; font-weight: 600;
  border-radius: var(--nx-r-sm);
  transition: transform var(--nx-t1) var(--nx-ease), box-shadow var(--nx-t1) ease;
  white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--nx-cyan), var(--nx-blue));
  color: #000814;
  box-shadow: 0 4px 16px rgba(0,229,255,.2);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,229,255,.35);
}
.btn--ghost {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(0,229,255,.2);
  color: var(--nx-text-2);
}
.btn--ghost:hover {
  background: rgba(0,229,255,.05);
  border-color: rgba(0,229,255,.35);
  color: #fff; transform: translateY(-1px);
}
.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn--download {
  height: 50px; padding: 0 34px; font-size: 15px;
  background: linear-gradient(135deg, var(--nx-cyan), var(--nx-blue));
  color: #000814; box-shadow: 0 4px 24px rgba(0,229,255,.28);
}
.btn--download:hover { transform: translateY(-2px); box-shadow: 0 8px 36px rgba(0,229,255,.45); }

/* ================================================================
   13. PAGER
   ================================================================ */
.pager { display: flex; justify-content: center; align-items: center; gap: 5px; margin-top: 48px; }
.pager__btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--nx-font-head); font-size: 13px; font-weight: 600;
  color: var(--nx-text-2);
  background: var(--nx-surface-2); border: 1px solid rgba(0,229,255,.12);
  border-radius: var(--nx-r-sm);
  transition: all var(--nx-t1) ease;
}
.pager__btn:hover {
  background: var(--nx-surface-3); border-color: rgba(0,229,255,.28);
  color: #fff; transform: translateY(-1px);
}
.pager__btn.on, .pager__btn.active {
  background: var(--nx-cyan); border-color: var(--nx-cyan);
  color: #000814; box-shadow: 0 2px 12px rgba(0,229,255,.35);
}

/* ================================================================
   14. FOOTER
   ================================================================ */
.site-ft {
  position: relative; z-index: 1; margin-top: auto;
  padding: 56px 0 28px;
  background: #030507;
  border-top: none;
}
.site-ft::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg,
    transparent 0%, rgba(0,229,255,.3) 25%,
    rgba(22,139,255,.3) 75%, transparent 100%);
}

.ft-brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--nx-font-head); font-size: 16px; font-weight: 700;
  letter-spacing: .04em; margin-bottom: 10px;
}
.ft-brand .brand-logo { display: none; }
.ft-brand .brand-svg { width: 28px; height: 28px; }
.ft-desc { font-size: 13px; color: var(--nx-text-2); max-width: 280px; line-height: 1.6; }
.ft-head {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 36px; flex-wrap: wrap; gap: 24px;
}
.ft-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 28px; margin-bottom: 40px;
}
.ft-links h3 {
  font-family: var(--nx-font-head);
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--nx-text-3); margin-bottom: 12px;
}
.ft-links ul li { margin-bottom: 8px; }
.ft-links ul li a { font-size: 13px; color: var(--nx-text-2); transition: color var(--nx-t2) ease; }
.ft-links ul li a:hover { color: var(--nx-cyan); }
.ft-legal {
  text-align: center; padding-top: 22px;
  border-top: 1px solid rgba(0,229,255,.07);
  font-size: 11.5px; color: var(--nx-text-3);
}

/* ================================================================
   15. DETAIL PAGE
   ================================================================ */
.item-detail { padding: 0 0 60px; }

.item-cinema {
  position: relative; width: 100%; height: 440px;
  overflow: hidden;
}
.item-cinema img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top;
  filter: brightness(.6) saturate(.85);
}
.item-cinema::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.1) 0%,
    rgba(0,0,0,.05) 40%,
    rgba(0,0,0,.75) 78%,
    #000 100%
  );
}
.item-cinema__title {
  position: absolute; bottom: 0; left: 0; right: 0;
  z-index: 1; padding: 0 0 32px;
}
.item-cinema__title .wrap h1 {
  font-family: var(--nx-font-head);
  font-size: clamp(24px, 4vw, 48px); font-weight: 800;
  letter-spacing: -.04em; color: #fff;
  line-height: 1.1; max-width: 680px;
}

.item-grid { display: flex; flex-direction: column; gap: 0; }
.item-grid > figure.tile__cover { display: none; }
.item-info { padding: 24px 0 0; }
.item-info h1 { display: none; }

.item-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.item-meta .stat-badge { padding: 6px 12px 6px 8px; }
.item-meta .stat-badge__icon { width: 26px; height: 26px; }
.item-meta .stat-badge__value { font-size: 14px; }

.item-desc { font-size: 15px; line-height: 1.75; color: var(--nx-text-2); margin-bottom: 22px; max-width: 600px; }

.password-badge {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 12px; padding: 8px 16px;
  background: rgba(255,180,0,.07); border: 1px solid rgba(255,180,0,.28);
  color: #FFB800;
  font-family: var(--nx-font-mono); font-size: 12.5px; font-weight: 500; letter-spacing: .04em;
  border-radius: var(--nx-r-sm); animation: none; box-shadow: none;
}
.password-badge::before {
  content: '\f023';
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  font-size: 11px; opacity: .7;
}

.detail-section { padding: 28px 0; border-bottom: 1px solid rgba(0,229,255,.07); }
.detail-section:last-of-type { border-bottom: none; }
.detail-section .wrap { max-width: 860px; }
.detail-section h2 {
  font-family: var(--nx-font-head);
  font-size: 18px; font-weight: 700; letter-spacing: -.02em;
  margin-bottom: 16px; color: #fff;
  display: flex; align-items: center; gap: 10px;
}
.detail-section h2::before {
  content: ''; display: block; width: 22px; height: 2px;
  background: var(--nx-cyan); border-radius: 1px; flex-shrink: 0;
}

.detail-section li {
  position: relative; padding-left: 13px;
  color: var(--nx-text-2); font-size: 14px; margin-bottom: 8px;
}
.detail-section li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--nx-cyan);
}

.detail-section ol { padding-left: 0; counter-reset: steps; }
.detail-section ol li { counter-increment: steps; padding-left: 24px; }
.detail-section ol li::before {
  content: counter(steps);
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(0,229,255,.1); border: 1px solid rgba(0,229,255,.25);
  color: var(--nx-cyan); font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; top: 4px;
}

.info-row {
  background: rgba(0,0,0,.4); border: 1px solid rgba(0,229,255,.1);
  border-radius: var(--nx-r-sm); transition: border-color var(--nx-t2) ease;
}
.info-row:hover { border-color: rgba(0,229,255,.22); }
.info-label { color: var(--nx-text-2); }
.info-label i { color: var(--nx-cyan); }
.info-value { color: #fff; }

.detail-section details {
  background: rgba(0,0,0,.35); border: 1px solid rgba(0,229,255,.1);
  border-radius: var(--nx-r-sm);
}
.detail-section details:hover { border-color: rgba(0,229,255,.18); }
.detail-section summary { font-family: var(--nx-font-head); color: #fff; }
.detail-section details[open] summary { border-bottom: 1px solid rgba(0,229,255,.1); }

.similar-section { padding: 48px 0; }
.similar-section .wrap { animation: none; }
.similar-section h2 {
  font-family: var(--nx-font-head); font-size: 20px; font-weight: 700;
  letter-spacing: -.025em; margin-bottom: 22px;
  display: flex; align-items: center; gap: 12px;
}
.similar-section h2::before {
  content: ''; display: block; width: 24px; height: 2px;
  background: var(--nx-cyan); border-radius: 1px;
}

/* ================================================================
   16. FAQ / CONTENT BLOCKS
   ================================================================ */
.content-section { position: relative; z-index: 1; padding: 64px 0; }
.content-section .wrap { max-width: 780px; animation: none; }

.pg-title {
  font-family: var(--nx-font-head);
  font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -.04em;
  text-align: center; margin-bottom: 12px; color: #fff;
}
.pg-sub { text-align: center; color: var(--nx-text-2); font-size: 15px; max-width: 560px; margin: 0 auto 40px; line-height: 1.65; }

.content-block {
  background: var(--nx-surface-2); border: 1px solid rgba(0,229,255,.1);
  border-radius: var(--nx-r-lg); padding: 28px 32px; margin-bottom: 16px;
  position: relative; overflow: hidden;
  transition: border-color var(--nx-t2) ease, box-shadow var(--nx-t2) ease;
}
.content-block::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--nx-cyan), var(--nx-blue));
  border-radius: 0 2px 2px 0; opacity: 0; transition: opacity var(--nx-t2) ease;
}
.content-block:hover { border-color: rgba(0,229,255,.22); box-shadow: 0 4px 20px rgba(0,0,0,.5); }
.content-block:hover::before { opacity: 1; }
.content-block h3 {
  font-family: var(--nx-font-head); font-size: 17px; font-weight: 700;
  letter-spacing: -.02em; color: #fff; margin-bottom: 11px;
}
.content-block p, .content-block [data-cyrex-description] {
  color: var(--nx-text-2); line-height: 1.75; font-size: 14px;
}

.faq-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; color: var(--nx-text-2); font-size: 13px; font-weight: 500; transition: color .2s; }
.faq-back:hover { color: var(--nx-cyan); }

/* ================================================================
   17. SHARE BUTTONS
   ================================================================ */
.share-btn { border-radius: var(--nx-r-sm); font-size: 13px; font-weight: 600; }
.share-tg { background: #229ED9; }
.share-tg:hover { background: #1a8bbf; }
.share-tw { background: #111; }
.share-tw:hover { background: #000; }

/* ================================================================
   18. REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .cursor-spotlight { display: none; }
  /* scene renders one still frame instead of animating (handled in premium.js) */
  .hero__scene { display: block; }
}

/* ================================================================
   19. RESPONSIVE
   ================================================================ */
@media (max-width: 1280px) {
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1180px) {
  .hero__visual { width: calc(100% + 60px); }
}

@media (max-width: 1024px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .hero .wrap { gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hero__visual { width: 100%; }
}

@media (max-width: 768px) {
  .topbar { height: 58px; }

  .hero { min-height: auto; padding: 44px 0 36px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .hero__content { align-items: center; }
  .hero__title { font-size: clamp(32px, 8vw, 48px); text-align: center; }
  .hero__sub { text-align: center; max-width: 420px; }
  .hero__features { justify-content: center; }
  .hero__visual { width: 100%; max-width: 560px; margin-left: 0; justify-self: center; }
  .hero__scene { max-width: none; opacity: 1; }
  .search-wrap { width: 100%; }

  .main-nav {
    position: fixed; top: 58px; left: 0; right: 0;
    transform: none; flex-direction: column; gap: 0;
    background: rgba(0,0,0,.97);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(0,229,255,.1);
    padding: 8px 0; display: none; opacity: 0;
    transition: opacity .2s ease;
  }
  .topbar.nav-open .main-nav { display: flex; opacity: 1; }
  .main-nav a { padding: 13px 20px; font-size: 15px; border-radius: 0; width: 100%; }
  .main-nav a::after { display: none; }

  .btn--header { display: none; }
  .burger { display: flex; }

  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .item-cinema { height: 260px; }
  .ft-head { flex-direction: column; }
  .wrap { padding: 0 16px; }
}

@media (max-width: 480px) {
  .tile-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero__title { font-size: 30px; }
  .item-cinema { height: 200px; }
  .content-block { padding: 20px 16px; }
  .search-field { height: 50px; }
  .search-field__go { width: 38px; height: 38px; }
  .hero__features { gap: 10px 14px; }
}
