/* ============================================================
   GainMaster — dark theme, blue accent
   ============================================================ */
:root {
  --bg:        #0b0f17;
  --bg-2:      #0f1623;
  --surface:   #121a28;
  --surface-2: #182233;
  --border:    #1f2c40;
  --text:      #e6ecf5;
  --muted:     #93a1b8;
  --faint:     #64748b;
  --blue:      #3b8cff;
  --blue-2:    #5aa0ff;
  --blue-soft: rgba(59, 140, 255, 0.12);
  --radius:    14px;
  --radius-sm: 10px;
  --maxw:      1280px;
  --shadow:    0 20px 50px -20px rgba(0, 0, 0, 0.6);
  --font:      'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* soft blue glow behind hero */
body::before {
  content: "";
  position: fixed;
  top: -25%;
  left: 50%;
  width: 900px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(59, 140, 255, 0.16), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

/* ---------- Floating ghosts (side gutters) ---------- */
.ambient { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; overflow: hidden; display: none; }

.ghost {
  position: absolute;
  color: rgba(90, 160, 255, 0.13);
  filter: drop-shadow(0 0 22px rgba(59, 140, 255, 0.25));
}
.ghost svg { width: 100%; height: 100%; display: block; }

/* size + position + independent float timing */
.ghost--1 { width: 78px;  left: 3.5%;  top: 13%;  animation: bob 8s  ease-in-out infinite; }
.ghost--2 { width: 52px;  left: 6.5%;  top: 47%;  animation: bob 11s ease-in-out infinite 1.2s; }
.ghost--3 { width: 64px;  left: 2.5%;  top: 78%;  animation: bob 9.5s ease-in-out infinite 0.6s; }
.ghost--4 { width: 90px;  right: 3%;   top: 22%;  animation: bob 10s ease-in-out infinite 0.4s; }
.ghost--5 { width: 50px;  right: 7%;   top: 55%;  animation: bob 12s ease-in-out infinite 1.8s; }
.ghost--6 { width: 70px;  right: 4%;   top: 83%;  animation: bob 8.5s ease-in-out infinite 1s; }

@keyframes bob {
  0%, 100% { transform: translateY(0)     rotate(-3deg); }
  50%      { transform: translateY(-22px) rotate(3deg); }
}

@media (min-width: 1200px) { .ambient { display: block; } }
@media (prefers-reduced-motion: reduce) { .ghost { animation: none !important; } }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-2);
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(59, 140, 255, 0.6);
}
.btn--primary:hover { background: var(--blue-2); transform: translateY(-2px); }
.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--blue); color: var(--blue-2); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 15, 23, 0.7);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--border); background: rgba(11, 15, 23, 0.9); }
.nav__inner { display: flex; align-items: center; gap: 28px; height: 68px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand__name { font-size: 1.1rem; letter-spacing: -0.02em; }
.brand__mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
}
.brand__mark span {
  width: 3px;
  background: var(--blue);
  border-radius: 2px;
  animation: bars 1.4s ease-in-out infinite;
}
.brand__mark span:nth-child(1) { height: 40%; animation-delay: 0s; }
.brand__mark span:nth-child(2) { height: 75%; animation-delay: 0.15s; }
.brand__mark span:nth-child(3) { height: 100%; animation-delay: 0.3s; }
.brand__mark span:nth-child(4) { height: 60%; animation-delay: 0.45s; }
.brand__mark span:nth-child(5) { height: 30%; animation-delay: 0.6s; }
@keyframes bars { 0%, 100% { transform: scaleY(0.5); } 50% { transform: scaleY(1); } }

.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { color: var(--muted); font-size: 0.95rem; font-weight: 500; transition: color 0.2s ease; }
.nav__links a:hover { color: var(--text); }
.nav__cta { padding: 9px 18px; }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: 0.25s; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: 84px 0 64px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 20px; }
.lead { color: var(--muted); font-size: 1.12rem; max-width: 520px; }
.lead strong { color: var(--text); font-weight: 600; }
.hero__actions { display: flex; gap: 14px; margin: 30px 0 28px; flex-wrap: wrap; }
.hero__meta { display: flex; gap: 28px; list-style: none; flex-wrap: wrap; }
.hero__meta li { color: var(--muted); font-size: 0.9rem; }
.hero__meta span { display: block; color: var(--text); font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }

/* ---------- Hero app mock ---------- */
.dot { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; padding: 3px 9px; border-radius: 20px; }
.dot--live { color: var(--blue-2); background: var(--blue-soft); }
.dot--live::before { content: "●"; margin-right: 5px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.app {
  background: linear-gradient(165deg, var(--surface), #0c121d);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.02) inset;
  overflow: hidden;
}

/* window chrome */
.app__bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border);
}
.app__dots { display: flex; gap: 6px; }
.app__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.app__dots i:nth-child(1) { background: #ff5f57; border-color: #ff5f57; opacity: .55; }
.app__dots i:nth-child(2) { background: #febc2e; border-color: #febc2e; opacity: .55; }
.app__dots i:nth-child(3) { background: #28c840; border-color: #28c840; opacity: .55; }
.app__title { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0 auto 0 4px; }
.brand__mark--sm { height: 14px; gap: 2px; }
.brand__mark--sm span { width: 2px; }

.app__main { display: flex; }
.app__side {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 10px;
  border-right: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
}
.app__tab {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--faint);
  cursor: default;
}
.app__tab svg { width: 20px; height: 20px; }
.app__tab.is-active { color: var(--blue-2); background: var(--blue-soft); border-color: rgba(59,140,255,.3); }
.app__tab--bottom { margin-top: auto; }

.app__body { flex: 1; min-width: 0; padding: 18px; display: flex; flex-direction: column; gap: 16px; }

/* device row */
.device { display: flex; align-items: center; justify-content: space-between; }
.device__left { display: flex; align-items: center; gap: 12px; }
.device__icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-soft); color: var(--blue-2); }
.device__icon svg { width: 20px; height: 20px; }
.device__left b { display: block; font-size: 0.92rem; font-weight: 600; }
.device__left small { color: var(--faint); font-size: 0.72rem; }
.device__badge { font-size: 0.7rem; font-weight: 600; color: var(--muted); padding: 5px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.device__right { display: flex; align-items: center; gap: 12px; }

/* spectrum + EQ curve */
.viz { display: flex; gap: 10px; }
.viz__scale { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 0 16px; }
.viz__scale span { font-size: 0.6rem; color: var(--faint); line-height: 1; }
.viz__plot { position: relative; flex: 1; height: 140px; border-radius: var(--radius-sm); background: rgba(0,0,0,0.25); border: 1px solid var(--border); padding: 8px 10px 16px; overflow: hidden; }
.viz__grid { position: absolute; inset: 8px 0 16px; background-image: repeating-linear-gradient(to bottom, transparent, transparent calc(33.33% - 1px), var(--border) calc(33.33% - 1px), var(--border) 33.33%); opacity: 0.5; }
.eq { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 100%; }
.eq__bar { flex: 1; min-width: 0; background: linear-gradient(180deg, var(--blue-2), var(--blue)); border-radius: 3px 3px 1px 1px; opacity: 0.9; transition: height 0.28s cubic-bezier(.4,0,.2,1); box-shadow: 0 0 8px -2px rgba(59,140,255,.6); }
.eq__curve { position: absolute; inset: 8px 10px 16px; width: calc(100% - 20px); height: calc(100% - 24px); z-index: 2; pointer-events: none; }
.viz__freqs { position: absolute; left: 10px; right: 10px; bottom: 3px; display: flex; justify-content: space-between; }
.viz__freqs span { font-size: 0.58rem; color: var(--faint); }

/* stereo level meters */
.levels { display: flex; flex-direction: column; gap: 6px; }
.level { display: flex; align-items: center; gap: 10px; }
.level__ch { font-size: 0.62rem; font-weight: 700; color: var(--faint); width: 10px; }
.level__track { flex: 1; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.level__fill { display: block; height: 100%; width: 40%; border-radius: 6px; background: linear-gradient(90deg, var(--blue), var(--blue-2) 70%, #ff5f57); transition: width 0.12s linear; }

/* controls */
.controls { display: flex; align-items: flex-start; gap: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.knob { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; }
.knob label { font-size: 0.7rem; color: var(--faint); }
.knob output { font-size: 0.72rem; font-weight: 600; color: var(--blue-2); font-variant-numeric: tabular-nums; }
.knob__dial {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--surface-2), #0c121d);
  border: 1px solid var(--border);
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.5), 0 1px 0 rgba(255,255,255,.03);
}
.knob__dial::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px solid rgba(59,140,255,.18); }
.knob__dial i { position: absolute; top: 5px; left: 50%; width: 2px; height: 13px; background: var(--blue-2); transform-origin: bottom center; transform: translateX(-50%) rotate(var(--rot, -38deg)); border-radius: 2px; box-shadow: 0 0 6px rgba(90,160,255,.8); }
.toggle__switch { width: 46px; height: 25px; border-radius: 20px; background: var(--blue); position: relative; box-shadow: 0 0 12px -2px rgba(59,140,255,.7); }
.toggle__switch b { position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: 0.2s; }

/* ---------- Trust strip (logo marquee) ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); position: relative; z-index: 1; padding: 30px 0; }
.strip__label { text-align: center; color: var(--faint); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 22px; }

.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: scroll-x 45s linear infinite;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 56px;
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.logo:hover { opacity: 1; }
.logo img { width: 26px; height: 26px; display: block; }

@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 1; padding: 88px 0; }
.section--alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section__head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section__head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 14px; }
.section__head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Grid / cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--blue); }
.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-2);
  margin-bottom: 18px;
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.18rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step { position: relative; padding: 30px 26px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step__num { font-size: 0.85rem; font-weight: 700; color: var(--blue-2); letter-spacing: 0.1em; }
.step h3 { font-size: 1.18rem; margin: 14px 0 8px; }
.step p { color: var(--muted); font-size: 0.96rem; }

/* ---------- Specs ---------- */
.specs { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.specs__copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 14px; }
.specs__copy p { color: var(--muted); margin-bottom: 26px; }
.specs__list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.specs__list li { background: var(--surface); padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.specs__list span { color: var(--faint); font-size: 0.8rem; }
.specs__list b { font-size: 0.98rem; font-weight: 600; }

/* ---------- Download CTA ---------- */
.cta { max-width: 620px; margin: 0 auto; text-align: center; }
.cta h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); margin-bottom: 14px; }
.cta p { color: var(--muted); font-size: 1.08rem; margin-bottom: 30px; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }
.cta__note { display: block; margin-top: 18px; color: var(--faint); font-size: 0.85rem; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); position: relative; z-index: 1; padding: 56px 0 28px; }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 36px; }
.footer__brand p { color: var(--muted); font-size: 0.92rem; max-width: 280px; margin-top: 14px; }
.footer__col h4 { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 16px; }
.footer__col a { display: block; color: var(--muted); font-size: 0.95rem; margin-bottom: 10px; transition: color 0.2s ease; }
.footer__col a:hover { color: var(--blue-2); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }
.footer__legal { display: flex; gap: 22px; }
.footer__legal a:hover { color: var(--blue-2); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Install modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__overlay { position: absolute; inset: 0; background: rgba(5, 8, 13, 0.72); backdrop-filter: blur(6px); animation: fade 0.25s ease; }
.modal__box {
  position: relative;
  width: 100%; max-width: 760px;
  background: linear-gradient(165deg, var(--surface), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 32px 26px;
  box-shadow: var(--shadow);
  animation: pop 0.28s cubic-bezier(.2,.8,.2,1);
}
.modal__close { position: absolute; top: 14px; right: 16px; background: none; border: 0; color: var(--faint); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: color 0.2s ease; }
.modal__close:hover { color: var(--text); }

/* horizontal header: icon beside the text */
.modal__head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; padding-right: 28px; }
.modal__icon { flex-shrink: 0; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--blue-soft); color: var(--blue-2); }
.modal__icon svg { width: 24px; height: 24px; }
.modal__box h3 { font-size: 1.3rem; margin-bottom: 3px; }
.modal__sub { color: var(--muted); font-size: 0.92rem; }
.modal__sub b { color: var(--text); }

/* steps laid out in a row */
.modal__steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.modal__steps li {
  counter-increment: step;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.modal__steps li b { color: var(--text); font-weight: 600; }
.modal__steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 24px; height: 24px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 0.78rem; font-weight: 700;
}
.modal__actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.modal__retry { color: var(--faint); font-size: 0.85rem; text-decoration: underline; }
.modal__retry:hover { color: var(--blue-2); }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .modal__steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 400px) {
  .modal__steps { grid-template-columns: 1fr; }
}

/* ---------- Large screens (1440p+) ---------- */
@media (min-width: 1400px) {
  :root { --maxw: 1340px; }
  .section { padding: 104px 0; }
  .hero { padding: 100px 0 76px; }
  .hero__inner { gap: 72px; }
  .lead { max-width: 580px; }
}
@media (min-width: 1700px) {
  :root { --maxw: 1480px; }
  html { font-size: 17.5px; }
  .container { padding: 0 40px; }
  .section { padding: 120px 0; }
  .hero { padding: 120px 0 88px; }
}
@media (min-width: 2100px) {
  :root { --maxw: 1640px; }
  html { font-size: 19px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__panel { order: -1; max-width: 440px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; gap: 32px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav__links, .nav__cta { display: none; }
  .nav__links.is-open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 16px 24px;
  }
  .nav__toggle { display: flex; margin-left: auto; }
  .grid--3, .grid--2, .specs__list { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__meta { gap: 20px; }
}
