/* NivAk Technologies — Hybrid Premium V3
   Apps & Games page
*/

.apps-v3-page {
  margin: 0;
  background: #fff;
  font-family: var(--v3-font-body);
}

.apps-v3-main {
  width: 100%;
}

.apps-v3-page h1,
.apps-v3-page h2,
.apps-v3-page h3 {
  font-family: var(--v3-font-heading);
}

/* Compact premium hero */

.apps-v3-hero {
  padding: 64px 0 68px;
  background:
    radial-gradient(circle at 80% 20%,
      rgba(28,100,190,.30), transparent 43%),
    linear-gradient(110deg,#071326,#102d59);
  color: #fff;
}

.apps-v3-hero h1 {
  margin: 16px 0;
  color: #fff;
  font-size: clamp(38px,4.6vw,62px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.045em;
}

.apps-v3-hero p {
  max-width: 650px;
  margin: 0;
  color: #c8d8eb;
  font-size: 16px;
  line-height: 1.7;
}

.apps-v3-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid #b45b27;
  border-radius: 999px;
  background: #172d49;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .025em;
}

/* Portfolio summary */

.apps-v3-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.apps-v3-stats span {
  padding: 9px 15px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: #e4edfa;
  font-size: 13px;
  font-weight: 700;
}

/* Catalog */

.apps-v3-catalog {
  padding: 56px 0 64px;
  background: #f4f7fc;
}

.apps-v3-heading {
  max-width: 820px;
  margin-bottom: 25px;
}

.apps-v3-heading .section-eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  border: 1px solid #e6b58f;
  border-radius: 999px;
  background: #fff4ec;
  color: #102d59;
  font-size: 13px;
  font-weight: 800;
}

.apps-v3-heading h2 {
  margin: 15px 0 10px;
  color: #071b3d;
  font-size: clamp(28px,3.4vw,42px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.apps-v3-heading p {
  color: #586b83;
  line-height: 1.7;
}

/* Working filters are connected in Step 54 */

.apps-v3-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.apps-v3-filters button {
  padding: 11px 18px;
  border: 1px solid #d5dfed;
  border-radius: 999px;
  background: #fff;
  color: #102d59;
  font: 700 13px var(--v3-font-body);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}

.apps-v3-filters button:hover {
  border-color: #ff7417;
}

.apps-v3-filters button.is-active {
  background: #102d59;
  border-color: #102d59;
  color: #fff;
}

/* Product cards */

.apps-v3-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 18px;
}

.apps-v3-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
  border: 1px solid #dfe7f2;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(7,19,38,.06);
  transition: transform .2s, box-shadow .2s;
}

.apps-v3-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(7,19,38,.12);
}

.apps-v3-card__top {
  display: flex;
  align-items: center;
  gap: 15px;
}

.apps-v3-card__icon {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 17px;
}

.apps-v3-card__name {
  margin: 0;
  color: #071b3d;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.3;
}

.apps-v3-card__type {
  color: #586b83;
  font-size: 12px;
}

.apps-v3-card__description {
  margin: 16px 0;
  color: #586b83;
  font-size: 14px;
  line-height: 1.65;
}

.apps-v3-card__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e7edf5;
}

.apps-v3-card__status {
  font-size: 12px;
  font-weight: 800;
  color: #102d59;
}

.apps-v3-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #102d59;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

/* Contact CTA */

.apps-v3-contact {
  padding: 45px 0;
  background: #fff;
}

.apps-v3-contact-panel {
  padding: 44px;
  border-radius: 22px;
  background: linear-gradient(
    90deg,#071326 0%,#102d59 55%,#1769d2 100%
  );
  color: #fff;
}

.apps-v3-contact-panel h2 {
  margin: 15px 0 10px;
  color: #fff;
  font-size: clamp(27px,3vw,38px);
}

.apps-v3-contact-panel p {
  max-width: 650px;
  color: #e2ebf8;
  line-height: 1.7;
}

.apps-v3-contact-panel a {
  display: inline-flex;
  margin-top: 18px;
  padding: 13px 22px;
  border-radius: 999px;
  background: #ff7417;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

/* Responsive */

@media (max-width: 900px) {
  .apps-v3-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 600px) {
  .apps-v3-hero {
    padding: 44px 0;
  }

  .apps-v3-catalog {
    padding: 40px 0;
  }

  .apps-v3-grid {
    grid-template-columns: 1fr;
  }

  .apps-v3-card {
    padding: 18px;
  }

  .apps-v3-contact-panel {
    padding: 28px 22px;
  }

  .apps-v3-stats {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apps-v3-card {
    transition: none;
  }
}

/* NIVAK APPS ACTIVE NAV STEP 55 */

.apps-v3-page .header .nav a[href="/"] {
  color: #ffffff !important;
}

.apps-v3-page .header .nav a[href="/apps/"] {
  color: #ff7417 !important;
  font-weight: 800;
}


/* Apps & Games — Digital Product Universe */

.apps-v3-hero > .wrap {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  align-items: center;
  gap: 35px;
}

.apps-v3-universe {
  position: relative;
  height: 350px;
  min-width: 0;
  isolation: isolate;
}

.apps-v3-universe__orbit {
  position: absolute;
  inset: 18% 6%;
  border: 1px dashed rgba(106,166,235,.4);
  border-radius: 50%;
  transform: rotate(-18deg);
  animation: nivakOrbit 18s ease-in-out infinite alternate;
}

.apps-v3-universe__phone {
  position: absolute;
  width: 146px;
  height: 265px;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) rotate(-8deg);
  border: 3px solid #5389c9;
  border-radius: 27px;
  padding: 9px;
  background: #112e56;
  box-shadow: 0 20px 75px rgba(20,110,220,.35);
}

.apps-v3-universe__screen {
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  height: 100%;
  padding: 12px;
  border-radius: 17px;
  background: linear-gradient(155deg,#071326,#184178);
  text-align: center;
}

.apps-v3-universe__caption {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.apps-v3-universe__icons {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 10px;
}

.apps-v3-universe__icons img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}

.apps-v3-universe__floating {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 170px;
  padding: 10px;
  border: 1px solid #46668d;
  border-radius: 13px;
  background: #112949;
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  animation: nivakFloat 5s ease-in-out infinite alternate;
}

.apps-v3-universe__floating img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.apps-v3-universe__floating--one { left: 0; top: 5%; }
.apps-v3-universe__floating--two { right: 0; top: 12%; animation-delay: -2s; }
.apps-v3-universe__floating--three { left: 0; bottom: 8%; animation-delay: -1s; }
.apps-v3-universe__floating--four { right: 0; bottom: 4%; animation-delay: -3s; }

@keyframes nivakFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

@keyframes nivakOrbit {
  from { transform: rotate(-18deg); }
  to { transform: rotate(18deg); }
}

@media (max-width: 900px) {
  .apps-v3-hero > .wrap {
    grid-template-columns: 1fr;
  }

  .apps-v3-universe {
    width: min(100%,510px);
    margin-inline: auto;
  }
}

@media (max-width: 480px) {
  .apps-v3-universe { height: 295px; }
  .apps-v3-universe__phone { width: 120px; height: 222px; }
  .apps-v3-universe__floating { max-width: 125px; font-size: 10px; padding: 7px; }
  .apps-v3-universe__floating img { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .apps-v3-universe__orbit,
  .apps-v3-universe__floating {
    animation: none;
  }
}

/* NIVAK PHONE GRID STEP 57 */

.apps-v3-universe__phone {
  width: 168px;
  height: 292px;
}

.apps-v3-universe__screen {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.apps-v3-universe__icons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  grid-template-rows: repeat(3, auto);
  gap: 10px;
}

.apps-v3-universe__icons img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
}

.apps-v3-universe__publisher {
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 480px) {
  .apps-v3-universe__phone {
    width: 150px;
    height: 270px;
  }

  .apps-v3-universe__icons {
    gap: 8px;
  }
}


/* NIVAK ORBITING APP CARDS STEP 59 */

/*
 * Four app cards travel along the same elliptical orbit.
 * Each animation starts at a different quarter of the path.
 */

.apps-v3-universe {
  --orbit-x: 43%;
  --orbit-y: 33%;
  overflow: visible;
}

.apps-v3-universe__floating {
  left: 50% !important;
  right: auto !important;
  top: 50% !important;
  bottom: auto !important;
  width: 150px;
  max-width: 150px;
  z-index: 3;
  transform: translate(-50%, -50%);
  animation: nivakAppOrbit 24s linear infinite !important;
}

.apps-v3-universe__floating--one {
  animation-delay: 0s !important;
}

.apps-v3-universe__floating--two {
  animation-delay: -6s !important;
}

.apps-v3-universe__floating--three {
  animation-delay: -12s !important;
}

.apps-v3-universe__floating--four {
  animation-delay: -18s !important;
}

.apps-v3-universe__phone {
  z-index: 4;
}

@keyframes nivakAppOrbit {
  0% {
    transform: translate(
      calc(-50% + var(--orbit-x)),
      -50%
    );
  }

  25% {
    transform: translate(
      -50%,
      calc(-50% + var(--orbit-y))
    );
  }

  50% {
    transform: translate(
      calc(-50% - var(--orbit-x)),
      -50%
    );
  }

  75% {
    transform: translate(
      -50%,
      calc(-50% - var(--orbit-y))
    );
  }

  100% {
    transform: translate(
      calc(-50% + var(--orbit-x)),
      -50%
    );
  }
}

/* Smaller elliptical orbit on mobile */

@media (max-width: 600px) {
  .apps-v3-universe {
    --orbit-x: 34%;
    --orbit-y: 34%;
  }

  .apps-v3-universe__floating {
    width: 110px;
    max-width: 110px;
  }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
  .apps-v3-universe__floating {
    animation: none !important;
  }

  .apps-v3-universe__floating--one {
    transform: translate(-50%, -50%) translateX(115px);
  }

  .apps-v3-universe__floating--two {
    transform: translate(-50%, -50%) translateY(105px);
  }

  .apps-v3-universe__floating--three {
    transform: translate(-50%, -50%) translateX(-115px);
  }

  .apps-v3-universe__floating--four {
    transform: translate(-50%, -50%) translateY(-105px);
  }
}


/* NIVAK OUTER ORBIT FIX STEP 60 */

.apps-v3-universe {
  --orbit-radius-x: 235px;
  --orbit-radius-y: 125px;
  overflow: visible;
}

.apps-v3-universe__floating {
  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: 142px;
  max-width: 142px;
  z-index: 6;

  transform: none !important;
  offset-rotate: 0deg;

  offset-path: ellipse(
    var(--orbit-radius-x)
    var(--orbit-radius-y)
    at 0px 0px
  );

  animation: nivakSmoothOrbit 30s linear infinite !important;
}

.apps-v3-universe__floating--one {
  animation-delay: 0s !important;
}

.apps-v3-universe__floating--two {
  animation-delay: -7.5s !important;
}

.apps-v3-universe__floating--three {
  animation-delay: -15s !important;
}

.apps-v3-universe__floating--four {
  animation-delay: -22.5s !important;
}

.apps-v3-universe__phone {
  z-index: 4;
}

@keyframes nivakSmoothOrbit {
  from {
    offset-distance: 0%;
  }
  to {
    offset-distance: 100%;
  }
}

@media (max-width: 1100px) {
  .apps-v3-universe {
    --orbit-radius-x: 190px;
    --orbit-radius-y: 115px;
  }
}

@media (max-width: 600px) {
  .apps-v3-universe {
    --orbit-radius-x: 145px;
    --orbit-radius-y: 105px;
  }

  .apps-v3-universe__floating {
    width: 105px;
    max-width: 105px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apps-v3-universe__floating {
    animation: none !important;
  }

  .apps-v3-universe__floating--one {
    offset-distance: 0%;
  }

  .apps-v3-universe__floating--two {
    offset-distance: 25%;
  }

  .apps-v3-universe__floating--three {
    offset-distance: 50%;
  }

  .apps-v3-universe__floating--four {
    offset-distance: 75%;
  }
}


/* NIVAK FLOATING CONSTELLATION STEP 61 */

.apps-v3-hero {
  overflow: hidden;
}

.apps-v3-universe {
  position: relative;
  height: 390px;
  overflow: visible;
}

.apps-v3-universe__orbit {
  inset: 17% 8%;
  border: 1px dashed rgba(95,159,225,.22);
  border-radius: 50%;
  transform: rotate(-15deg);
  animation: none !important;
}

.apps-v3-universe__phone {
  z-index: 5;
}

.apps-v3-universe__floating {
  position: absolute;
  z-index: 6;
  width: 145px;
  max-width: 145px;
  margin: 0;
  offset-path: none !important;
  offset-distance: 0 !important;
  transform: none !important;
  animation: nivakConstellationFloat 5s ease-in-out infinite alternate !important;
}

.apps-v3-universe__floating--one {
  left: 0 !important;
  right: auto !important;
  top: 8% !important;
  bottom: auto !important;
  animation-delay: 0s !important;
}

.apps-v3-universe__floating--two {
  left: auto !important;
  right: 0 !important;
  top: 10% !important;
  bottom: auto !important;
  animation-delay: -1.5s !important;
}

.apps-v3-universe__floating--three {
  left: 0 !important;
  right: auto !important;
  top: auto !important;
  bottom: 8% !important;
  animation-delay: -3s !important;
}

.apps-v3-universe__floating--four {
  left: auto !important;
  right: 0 !important;
  top: auto !important;
  bottom: 8% !important;
  animation-delay: -2s !important;
}

@keyframes nivakConstellationFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-9px); }
}

@media (max-width: 600px) {
  .apps-v3-universe {
    height: 340px;
  }

  .apps-v3-universe__floating {
    width: 105px;
    max-width: 105px;
    padding: 7px;
    font-size: 10px;
  }

  .apps-v3-universe__floating--one,
  .apps-v3-universe__floating--three {
    left: 0 !important;
  }

  .apps-v3-universe__floating--two,
  .apps-v3-universe__floating--four {
    right: 0 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apps-v3-universe__floating {
    animation: none !important;
  }
}


/* NIVAK APPS MOTION ENGINE STEP 62 */

.apps-v3-hero {
  overflow: hidden;
}

.apps-v3-universe {
  position: relative;
  isolation: isolate;
}

.apps-v3-universe__phone {
  z-index: 4;
}

.apps-v3-universe__floating,
.apps-v3-universe__floating--one,
.apps-v3-universe__floating--two,
.apps-v3-universe__floating--three,
.apps-v3-universe__floating--four {
  position: absolute !important;
  right: auto !important;
  bottom: auto !important;
  margin: 0 !important;
  offset-path: none !important;
  animation: none !important;
  transition: none !important;
  z-index: 5;
}

.apps-v3-universe__orbit {
  animation: none !important;
  opacity: .25;
}
