/* ==========================================================================
   ABS STUDIO — Design System
   Premium tech-ecosystem brand. Dark-first, full light mode.
   Type: Space Grotesk (display) · Inter (body) · JetBrains Mono (data)
   ========================================================================== */

/* ----- Tokens (dark default) ----- */
:root {
  /* Brand */
  --blue:        #3a6ff7;
  --blue-bright: #6e9bff;
  --blue-deep:   #1b3fcc;
  --blue-glow:   rgba(58, 111, 247, 0.45);

  /* Dark surfaces */
  --bg:          #07080c;
  --bg-soft:     #0c0e14;
  --surface:     #101218;
  --surface-2:   #161922;
  --border:      rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text:        #f4f6fb;
  --text-muted:  #a4abba;
  --text-faint:  #6a7283;

  /* Effects */
  --shadow:      0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --shadow-sm:   0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --ring:        0 0 0 3px rgba(58, 111, 247, 0.45);
  --grad-blue:   linear-gradient(135deg, #6e9bff 0%, #3a6ff7 45%, #1b3fcc 100%);
  --grad-text:   linear-gradient(120deg, #ffffff 0%, #b9ccff 60%, #6e9bff 100%);

  /* Type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1200px;
  --radius:    18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --nav-h:     68px;
}

[data-theme="light"] {
  --bg:          #ffffff;
  --bg-soft:     #f6f8fc;
  --surface:     #ffffff;
  --surface-2:   #f3f5fa;
  --border:      rgba(10, 20, 40, 0.10);
  --border-strong: rgba(10, 20, 40, 0.18);

  --text:        #0b0e16;
  --text-muted:  #4a5365;
  --text-faint:  #8a93a6;

  --blue-glow:   rgba(58, 111, 247, 0.22);
  --shadow:      0 24px 60px -28px rgba(20, 40, 90, 0.30);
  --shadow-sm:   0 10px 30px -16px rgba(20, 40, 90, 0.22);
  --grad-text:   linear-gradient(120deg, #0b0e16 0%, #1b3fcc 70%, #3a6ff7 100%);
}

/* ----- Reset / base ----- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .4s ease, color .4s ease;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ----- Layout helpers ----- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding-block: clamp(4.5rem, 9vw, 8.5rem); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--blue-bright);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--blue);
}

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; }

.h2 { font-size: clamp(2rem, 4vw, 3.05rem); margin-block: .85rem .9rem; }
.lead { color: var(--text-muted); font-size: clamp(1.02rem, 1.4vw, 1.18rem); }

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  letter-spacing: -0.01em;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
  background: var(--grad-blue);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--blue-glow);
}
.btn-primary:hover { box-shadow: 0 16px 40px -10px var(--blue-glow); transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-bright); transform: translateY(-2px); }
.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ----- Navbar ----- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom-color: var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.12rem; letter-spacing: -.02em; }
.brand .logo { width: 30px; height: 30px; flex: none; }
.brand small { font-family: var(--font-mono); font-size: .58rem; letter-spacing: .18em; color: var(--text-faint); font-weight: 500; align-self: flex-end; margin-bottom: 3px; }

.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  padding: .5rem .8rem; border-radius: 999px;
  font-size: .92rem; color: var(--text-muted);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }

.nav-actions { display: flex; align-items: center; gap: .6rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color .2s, border-color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }

.nav-toggle { display: none; }

/* ----- Hero ----- */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem)); padding-bottom: clamp(3rem, 7vw, 6rem); overflow: hidden; }
.hero-glow {
  position: absolute; z-index: 0; pointer-events: none;
  width: 900px; height: 900px; max-width: 130vw;
  top: -340px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle at center, var(--blue-glow), transparent 62%);
  filter: blur(20px);
}
.hero-grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 28%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 55% at 50% 28%, #000 30%, transparent 75%);
  opacity: .6;
}
.hero .container { position: relative; z-index: 1; text-align: center; }

.pill {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .4rem .85rem .4rem .5rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: .82rem; color: var(--text-muted);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  margin-bottom: 1.8rem;
}
.pill .tag {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em;
  background: var(--grad-blue); color: #fff;
  padding: .18rem .5rem; border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2.7rem, 6.4vw, 5rem);
  letter-spacing: -0.035em;
  margin-bottom: 1.4rem;
}
.hero .lead { max-width: 600px; margin: 0 auto 2.3rem; font-size: clamp(1.05rem, 1.6vw, 1.28rem); }
.hero-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

.platform-row {
  display: flex; align-items: center; justify-content: center; gap: 1.6rem;
  margin-top: 2.6rem; color: var(--text-faint);
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .05em;
  flex-wrap: wrap;
}
.platform-row span { display: inline-flex; align-items: center; gap: .45rem; }
.platform-row svg { width: 15px; height: 15px; opacity: .85; }

/* ----- Logos / trust strip ----- */
.trust { border-block: 1px solid var(--border); }
.trust .container { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.trust p { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); }
.trust-row { display: flex; gap: clamp(1.5rem, 5vw, 4rem); flex-wrap: wrap; justify-content: center; align-items: center; color: var(--text-muted); }
.trust-row b { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; opacity: .75; }

/* ----- Product cards ----- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.product-card { display: flex; flex-direction: column; min-height: 320px; }
.product-card .app-icon {
  width: 56px; height: 56px; border-radius: 15px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #fff;
  box-shadow: var(--shadow-sm); margin-bottom: 1.1rem;
}
.product-card h3 { font-size: 1.3rem; margin-bottom: .15rem; }
.product-card .kicker { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: .7rem; }
.product-card p { color: var(--text-muted); font-size: .94rem; margin-bottom: 1.1rem; }
.product-card .feat { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.product-card .feat span { font-size: .76rem; padding: .28rem .6rem; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.product-card .learn { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .92rem; color: var(--blue-bright); }
.product-card .learn .arrow { transition: transform .2s; }
.product-card:hover .learn .arrow { transform: translateX(4px); }
.product-card .platforms { display: flex; gap: .5rem; margin-bottom: 1rem; color: var(--text-faint); }
.product-card .platforms svg { width: 15px; height: 15px; }

/* coming soon variant */
.card.soon { border-style: dashed; }
.card.soon .badge-soon {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  padding: .25rem .55rem; border-radius: 999px;
  border: 1px solid var(--border-strong); color: var(--text-faint);
}

/* ----- Ecosystem (signature) ----- */
.eco { background: var(--bg-soft); border-block: 1px solid var(--border); }
.eco-stage {
  position: relative;
  display: grid; place-items: center;
  min-height: 460px;
  margin-top: 2.5rem;
}
.eco-ring {
  position: absolute; border: 1px solid var(--border); border-radius: 50%;
  inset: 50% auto auto 50%; translate: -50% -50%;
}
.eco-ring.r1 { width: 200px; height: 200px; }
.eco-ring.r2 { width: 340px; height: 340px; }
.eco-ring.r3 { width: 480px; height: 480px; border-style: dashed; opacity: .55; }
.eco-orbit { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; width: 340px; height: 340px; animation: spin 40s linear infinite; }
.eco-orbit.slow { width: 480px; height: 480px; animation-duration: 70s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.eco-core {
  position: relative; z-index: 3;
  width: 132px; height: 132px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--grad-blue); color: #fff;
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--blue) 14%, transparent), 0 20px 50px -10px var(--blue-glow);
  font-family: var(--font-display);
}
.eco-core b { font-size: 1.05rem; display: block; }
.eco-core small { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .14em; opacity: .85; }

.eco-node {
  position: absolute; z-index: 4;
  width: 96px; height: 96px; margin: -48px;
  border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border-strong);
  display: grid; place-items: center; text-align: center; gap: .15rem;
  box-shadow: var(--shadow-sm);
  animation: counter-spin 40s linear infinite;
  transition: transform .25s ease, border-color .25s ease;
}
@keyframes counter-spin { to { transform: rotate(-360deg); } }
.eco-orbit.slow .eco-node { animation-duration: 70s; animation-direction: reverse; }
.eco-node:hover { border-color: var(--blue); transform: scale(1.08); }
.eco-node svg { width: 26px; height: 26px; color: var(--blue-bright); }
.eco-node b { font-size: .8rem; font-family: var(--font-display); }
/* positions on each orbit (top, right, bottom, left) */
.eco-orbit .n-top    { top: 0; left: 50%; }
.eco-orbit .n-right  { top: 50%; left: 100%; }
.eco-orbit .n-bottom { top: 100%; left: 50%; }
.eco-orbit .n-left   { top: 50%; left: 0; }

.eco-list { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 2.5rem; }
.eco-list span { font-family: var(--font-mono); font-size: .8rem; color: var(--text-muted); padding: .4rem .8rem; border: 1px solid var(--border); border-radius: 999px; }
.eco-list b { color: var(--blue-bright); }

/* ----- Stats ----- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.stat { text-align: center; padding: 1.5rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.stat .num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 4vw, 2.9rem); letter-spacing: -.03em; line-height: 1; }
.stat .num .gradient-text { display: inline; }
.stat .lbl { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-top: .7rem; }

/* ----- Future vision ----- */
.future-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.future-card {
  padding: 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
  position: relative; overflow: hidden; min-height: 180px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform .25s, border-color .25s;
}
.future-card:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.future-card .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--blue-bright); margin-bottom: 1.2rem; }
.future-card .fi svg { width: 22px; height: 22px; }
.future-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.future-card p { color: var(--text-muted); font-size: .9rem; }
.future-card .soon-tag { position: absolute; top: 1.1rem; right: 1.1rem; font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }

/* ----- Testimonials ----- */
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.quote {
  padding: 1.6rem; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.quote .stars { color: var(--blue); letter-spacing: .15em; margin-bottom: .9rem; font-size: .9rem; }
.quote p { font-size: 1rem; margin-bottom: 1.3rem; }
.quote .who { display: flex; align-items: center; gap: .7rem; }
.quote .av { width: 38px; height: 38px; border-radius: 50%; background: var(--grad-blue); display: grid; place-items: center; color: #fff; font-weight: 700; font-family: var(--font-display); font-size: .9rem; }
.quote .who b { font-size: .9rem; display: block; }
.quote .who small { color: var(--text-faint); font-size: .8rem; }

/* ----- Big CTA ----- */
.cta-band { position: relative; overflow: hidden; }
.cta-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 5rem);
  text-align: center;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--blue) 26%, transparent), transparent 60%),
    var(--surface);
  overflow: hidden;
}
.cta-card h2 { font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; }
.cta-card p { color: var(--text-muted); max-width: 480px; margin: 0 auto 2rem; }
.cta-card .hero-cta { justify-content: center; }

/* ----- Footer ----- */
.footer { border-top: 1px solid var(--border); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; background: var(--bg-soft); }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2rem; }
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { color: var(--text-muted); font-size: .9rem; max-width: 280px; }
.footer-col h4 { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); font-weight: 500; margin-bottom: 1rem; }
.footer-col a { display: block; color: var(--text-muted); font-size: .9rem; padding: .3rem 0; transition: color .2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--border); color: var(--text-faint); font-size: .82rem; }
.footer-bottom .socials { display: flex; gap: .6rem; }

/* ----- Page hero (sub pages) ----- */
.page-hero { padding-top: calc(var(--nav-h) + clamp(3rem, 7vw, 5rem)); padding-bottom: clamp(2rem, 5vw, 3.5rem); position: relative; overflow: hidden; text-align: center; }
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin-block: 1rem; }
.page-hero .lead { max-width: 560px; margin-inline: auto; }

/* category section */
.cat { scroll-margin-top: calc(var(--nav-h) + 20px); }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.cat-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cat-head .count { font-family: var(--font-mono); font-size: .78rem; color: var(--text-faint); }

/* category chips nav */
.chip-nav { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: 1.8rem; }
.chip-nav a { padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--border); font-size: .85rem; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: .03em; transition: all .2s; }
.chip-nav a:hover { border-color: var(--blue); color: var(--blue-bright); }

/* ----- Reveal animation ----- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ----- Mobile menu panel ----- */
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 24px 1.6rem;
  display: none; flex-direction: column; gap: .2rem;
  transform: translateY(-12px); opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.mobile-menu.open { display: flex; transform: none; opacity: 1; }
.mobile-menu a { padding: .85rem .4rem; font-size: 1.05rem; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .btn { margin-top: 1rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .grid-3, .future-grid, .quote-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: grid; }
  .grid-3, .grid-2, .future-grid, .quote-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .eco-stage { min-height: 380px; transform: scale(.82); }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
  .stats-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .platform-row { gap: 1rem; }
}

/* ----- A11y ----- */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Apps Marketplace
   ========================================================================== */
.search-wrap { max-width: 540px; margin: 1.8rem auto 0; position: relative; }
.search-wrap svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-faint); pointer-events: none; }
.search-wrap input {
  width: 100%; padding: .95rem 1.1rem .95rem 2.9rem;
  border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: .98rem;
  transition: border-color .2s, box-shadow .2s;
}
.search-wrap input::placeholder { color: var(--text-faint); }
.search-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-glow); outline: none; }

.filter-bar { display: flex; gap: .55rem; flex-wrap: wrap; justify-content: center; margin-top: 1.3rem; }
.filter-bar button {
  padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--border);
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .02em; color: var(--text-muted);
  transition: all .2s;
}
.filter-bar button:hover { border-color: var(--blue); color: var(--blue-bright); }
.filter-bar button.active { background: var(--grad-blue); color: #fff; border-color: transparent; box-shadow: 0 8px 22px -10px var(--blue-glow); }

.market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; margin-top: 2.6rem; }
.app-card { display: flex; flex-direction: column; min-height: 296px; }
.app-card .app-icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); margin-bottom: 1.05rem;
}
.app-card .app-icon svg { width: 27px; height: 27px; }
.app-card h3 { font-size: 1.18rem; margin-bottom: .15rem; }
.app-card .app-meta { display: flex; align-items: center; gap: .55rem; margin: .25rem 0 1rem; font-family: var(--font-mono); font-size: .72rem; color: var(--text-faint); flex-wrap: wrap; }
.app-card .app-meta .dot { width: 3.5px; height: 3.5px; border-radius: 50%; background: var(--text-faint); }
.app-card p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.1rem; }
.app-card .card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.btn-sm { padding: .55rem 1.15rem; font-size: .85rem; }

.market-empty { text-align: center; color: var(--text-muted); padding: 3.5rem 0; display: none; }
.market-empty.show { display: block; }
.market-empty b { font-family: var(--font-display); color: var(--text); display: block; font-size: 1.1rem; margin-bottom: .3rem; }

.android-badge { display: inline-flex; align-items: center; gap: .35rem; }
.android-badge svg { width: 13px; height: 13px; }

@media (max-width: 980px) { .market-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .market-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Hero device mockups + app UIs + marquee  (v2 premium upgrade)
   ========================================================================== */

/* Google-Play style download button */
.store-btn {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .7rem 1.2rem; border-radius: 14px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); transition: transform .18s, border-color .2s, background .2s;
}
.store-btn:hover { transform: translateY(-2px); border-color: var(--blue); }
.store-btn svg { width: 24px; height: 24px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.store-btn span small { font-size: .62rem; color: var(--text-faint); letter-spacing: .06em; text-transform: uppercase; }
.store-btn span b { font-family: var(--font-display); font-size: 1rem; font-weight: 600; }

/* Device cluster */
.device-cluster {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; justify-content: center;
  gap: -40px; margin-top: clamp(3rem, 7vw, 5rem);
  perspective: 1600px;
}
.phone {
  position: relative; flex: none;
  width: 236px; aspect-ratio: 9 / 19.3;
  border-radius: 36px; padding: 8px;
  background: linear-gradient(145deg, #1a1d26, #0a0c11);
  box-shadow: 0 50px 90px -30px rgba(0,0,0,.75), inset 0 0 0 1px rgba(255,255,255,.06), 0 0 0 1px rgba(0,0,0,.4);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 28px; overflow: hidden; background: #0b0e13; }
.phone .notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 58px; height: 16px; background: #07080c; border-radius: 10px; z-index: 6; }
.phone--center { z-index: 3; transform: translateY(-22px); }
.phone--left   { z-index: 2; transform: translateX(60px) rotate(-9deg) scale(.9); transform-origin: bottom right; }
.phone--right  { z-index: 2; transform: translateX(-60px) rotate(9deg) scale(.9); transform-origin: bottom left; }
.device-cluster:hover .phone--center { transform: translateY(-30px); }
.device-cluster:hover .phone--left   { transform: translateX(50px) rotate(-11deg) scale(.9); }
.device-cluster:hover .phone--right  { transform: translateX(-50px) rotate(11deg) scale(.9); }

/* In-app UI */
.pscreen { position: absolute; inset: 0; display: flex; flex-direction: column; text-align: left; }
.app-top { padding: 30px 16px 16px; color: #fff; }
.app-eyebrow { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .18em; opacity: .8; }
.app-h { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-top: 3px; letter-spacing: -.01em; }
.app-sub { font-size: 10px; opacity: .82; margin-top: 3px; }
.app-tabs { display: flex; gap: 6px; margin-top: 12px; }
.app-tabs span { font-size: 9px; padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,.16); }
.app-tabs span.on { background: #fff; color: #111; font-weight: 600; }
.app-prog { height: 5px; border-radius: 999px; background: rgba(255,255,255,.22); margin-top: 12px; overflow: hidden; }
.app-prog i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.app-body { flex: 1; background: #0b0e13; padding: 14px 13px; display: flex; flex-direction: column; gap: 9px; }

/* task rows (Plan) */
.task { display: flex; align-items: center; gap: 9px; background: #14171f; border: 1px solid rgba(255,255,255,.05); border-radius: 11px; padding: 9px 10px; }
.task .ck { width: 16px; height: 16px; border-radius: 50%; border: 1.6px solid #3a4150; flex: none; position: relative; }
.task.done .ck { background: var(--accent); border-color: var(--accent); }
.task.done .ck::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 7px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
.task .tx { font-size: 11px; color: #e7eaf0; }
.task.done .tx { color: #7d8494; text-decoration: line-through; }
.task .tx small { display: block; font-size: 8.5px; color: #6a7180; text-decoration: none; }

/* poster grid (Track) */
.posters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.poster { aspect-ratio: 2/3; border-radius: 8px; position: relative; overflow: hidden; box-shadow: inset 0 -24px 30px -16px rgba(0,0,0,.7); }
.poster .rt { position: absolute; top: 4px; right: 4px; font-size: 7.5px; background: rgba(0,0,0,.6); color: #ffd54a; padding: 1px 4px; border-radius: 5px; font-weight: 600; }
.poster .pt { position: absolute; left: 5px; bottom: 4px; right: 5px; font-size: 7.5px; color: #fff; font-weight: 600; }

/* chapter rows (Study) */
.ring { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-left: auto; background: conic-gradient(#fff var(--p,68%), rgba(255,255,255,.22) 0); }
.ring i { width: 42px; height: 42px; border-radius: 50%; background: #1b3fcc; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #fff; }
.chap { background: #14171f; border: 1px solid rgba(255,255,255,.05); border-radius: 11px; padding: 9px 10px; }
.chap .ct { font-size: 11px; color: #e7eaf0; display: flex; justify-content: space-between; }
.chap .ct b { color: var(--accent); font-weight: 600; }
.chap .cb { height: 4px; border-radius: 999px; background: rgba(255,255,255,.1); margin-top: 7px; overflow: hidden; }
.chap .cb i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.app-card-mini { background: linear-gradient(135deg, rgba(58,111,247,.22), rgba(27,63,204,.1)); border: 1px solid rgba(110,155,255,.25); border-radius: 11px; padding: 10px; }
.app-card-mini b { font-size: 11px; color: #fff; font-family: var(--font-display); }
.app-card-mini p { font-size: 8.5px; color: #aeb6c6; margin-top: 2px; }

/* App marquee */
.appstrip { border-block: 1px solid var(--border); background: var(--bg-soft); padding-block: 1.6rem; }
.appstrip .lbl { text-align: center; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 1.3rem; }
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.mq-track { display: flex; gap: 2.4rem; width: max-content; animation: mq 42s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-app { display: flex; align-items: center; gap: .65rem; white-space: nowrap; color: var(--text-muted); font-weight: 500; font-size: .98rem; }
.mq-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm); }
.mq-ic svg { width: 21px; height: 21px; }
@keyframes mq { to { transform: translateX(-50%); } }

@media (max-width: 860px) {
  .phone--left, .phone--right { display: none; }
  .phone--center { transform: none; }
  .device-cluster:hover .phone--center { transform: translateY(-6px); }
}
@media (max-width: 420px) {
  .phone { width: 210px; }
}
