/* AI Tube — Landing Page
   Deep-purple bias to match the app aesthetic.
   ------------------------------------------------- */

:root {
  --bg:           #0a0612;
  --bg-2:         #120a22;
  --bg-3:         #1a0f30;
  --panel:        #160d28;
  --panel-2:      #1d1336;
  --border:       rgba(255,255,255,0.08);
  --border-strong:rgba(255,255,255,0.14);

  --text:         #efeaff;
  --text-dim:     #b0a8c8;
  --text-mute:    #756d8e;

  --purple:       #8b5cf6;
  --purple-2:     #a78bfa;
  --purple-deep:  #6d28d9;
  --purple-soft:  rgba(139, 92, 246, 0.14);
  --purple-glow:  rgba(139, 92, 246, 0.45);

  --font-sans:    -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Mono", Consolas, monospace;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --ease:         cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background:
    radial-gradient(ellipse 1200px 700px at 50% -10%, rgba(139, 92, 246, 0.30), transparent 70%),
    radial-gradient(ellipse 800px 500px at 90% 30%, rgba(109, 40, 217, 0.18), transparent 70%),
    radial-gradient(ellipse 1000px 600px at 10% 60%, rgba(139, 92, 246, 0.10), transparent 70%),
    linear-gradient(180deg, #0a0612 0%, #0a0612 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

/* ---------------------------------------------
   Layout primitives
--------------------------------------------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.section { padding: 96px 0; position: relative; }
.section--tight { padding: 64px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--purple-2);
  background: var(--purple-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 6px 12px;
  border-radius: 999px;
}
.eyebrow__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple-2);
  box-shadow: 0 0 12px var(--purple-2);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 16px 0 12px;
  color: var(--text);
}
.section__sub {
  font-size: 17px;
  color: var(--text-dim);
  max-width: 640px;
  line-height: 1.55;
  margin: 0;
}
.section__head { margin-bottom: 56px; max-width: 720px; }

/* ---------------------------------------------
   Nav
--------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(10, 6, 18, 0.65);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav__links {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px;
  color: var(--text-dim);
}
.nav__links a {
  transition: color .15s var(--ease);
  font-weight: 450;
}
.nav__links a:hover { color: var(--text); }

.nav__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  transition: background .15s var(--ease), border-color .15s var(--ease);
  font-weight: 500;
}
.nav__cta:hover { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.2); }
.nav__cta-stars { color: var(--text-dim); font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 12px; }

/* ---------------------------------------------
   Logo (purple play-mark + AITube wordmark)
--------------------------------------------- */
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  user-select: none;
}
.brand__mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #a78bfa 0%, #7c3aed 65%, #5b21b6 100%);
  box-shadow:
    0 10px 30px -8px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255,255,255,0.25),
    inset 0 -1px 0 rgba(0,0,0,0.3);
  flex-shrink: 0;
  overflow: hidden;
}
.brand__mark::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent 50%);
  pointer-events: none;
}
.brand__word { color: var(--text); }
.brand__word--dim { color: var(--text-dim); font-weight: 500; }
.brand__lockup { display: inline-flex; align-items: baseline; }

.brand--sm { font-size: 16px; }
.brand--sm .brand__mark { width: 28px; height: 22px; border-radius: 6px; }

.brand--lg { font-size: 64px; letter-spacing: -0.05em; gap: 14px; }
.brand--lg .brand__mark { width: 110px; height: 84px; border-radius: 22px; }

.brand--xl { font-size: 132px; letter-spacing: -0.05em; line-height: 1; gap: 22px; }
.brand--xl .brand__mark { width: 220px; height: 168px; border-radius: 40px; }

/* ---------------------------------------------
   Hero
--------------------------------------------- */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}
.hero__brand { margin: 0 auto 36px; }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.4vw, 64px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0 auto 22px;
  max-width: 820px;
  background: linear-gradient(180deg, #fff 0%, #d6cffc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(180deg, #c4b5fd 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__sub {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 38px;
  line-height: 1.5;
}

.hero__cta {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
  margin-bottom: 28px;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .12s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  border: 1px solid transparent;
  letter-spacing: -0.005em;
}
.btn--primary {
  background: linear-gradient(180deg, #9d6bff 0%, #7c3aed 100%);
  color: #fff;
  box-shadow:
    0 10px 30px -8px rgba(139, 92, 246, 0.55),
    inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 40px -8px rgba(139, 92, 246, 0.7),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn--ghost {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
}
.btn__sub {
  color: rgba(255,255,255,0.7);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
}
.btn__sub--ghost { color: var(--text-mute); }

.hero__meta {
  display: inline-flex; align-items: center; gap: 18px;
  color: var(--text-mute);
  font-size: 13px;
  font-family: var(--font-mono);
}
.hero__meta-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------
   App preview window
--------------------------------------------- */
.window {
  margin: 60px auto 0;
  max-width: 1080px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #0d0820 0%, #0a0612 100%);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.7),
    0 60px 120px -40px rgba(139, 92, 246, 0.35),
    inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
}
.window__chrome {
  display: flex; align-items: center;
  height: 36px;
  padding: 0 14px;
  background: linear-gradient(180deg, #6d28d9 0%, #5b21b6 100%);
  border-bottom: 1px solid rgba(0,0,0,0.3);
  gap: 12px;
  position: relative;
}
.window__chrome-title {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.window__chrome-title svg { opacity: 0.9; }
.window__chrome-spacer { flex: 1; }
.window__chrome-btn {
  width: 14px; height: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
}
.window__chrome-btn svg { display: block; }

.window__body {
  position: relative;
  height: 600px;
  background:
    radial-gradient(ellipse 800px 400px at 50% 35%, rgba(139, 92, 246, 0.18), transparent 65%),
    linear-gradient(180deg, #150b25 0%, #0a0612 100%);
  overflow: hidden;
}

.app-topbar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
}
.app-topbar__left {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 13.5px;
}
.app-topbar__hamburger { display: inline-flex; flex-direction: column; gap: 3px; }
.app-topbar__hamburger span { width: 14px; height: 1.5px; background: currentColor; border-radius: 1px; }

.app-topbar__right {
  display: inline-flex; align-items: center; gap: 14px;
}
.app-topbar__settings { color: var(--text-dim); display: inline-flex; }

.counter-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 10px;
  background: rgba(20, 12, 36, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.counter-pill__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple-2);
  box-shadow: 0 0 8px var(--purple-2);
}
.counter-pill__label { color: var(--text-mute); text-transform: uppercase; }
.counter-pill__val {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.counter-pill__sep { color: var(--text-mute); }

.app-hero {
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 620px;
  padding: 0 24px;
}

.app-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.app-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: rgba(20, 12, 36, 0.85);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  cursor: default;
  transition: transform .15s var(--ease), border-color .15s var(--ease);
}
.app-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 92, 246, 0.5);
}
.app-chip__avatar {
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.app-search {
  width: 100%;
  position: relative;
}
.app-search__icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: var(--text-mute);
}
.app-search__field {
  width: 100%;
  padding: 16px 18px 16px 48px;
  background: rgba(20, 12, 36, 0.7);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
}
.app-search__field::placeholder { color: var(--text-mute); }

.app-quota {
  width: 100%;
  display: flex; flex-direction: column; gap: 6px;
}
.app-quota__bar {
  width: 100%; height: 3px; border-radius: 2px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.app-quota__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-deep), var(--purple-2));
  border-radius: 2px;
  width: 0;
  animation: quotaFill 2.4s var(--ease) forwards 0.4s;
  box-shadow: 0 0 12px var(--purple-glow);
}
@keyframes quotaFill { to { width: 14%; } }
.app-quota__label {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------
   Features grid
--------------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.feature {
  background: var(--panel);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: background .15s var(--ease);
}
.feature:hover { background: var(--panel-2); }

.feature__icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--purple-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: var(--purple-2);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 4px;
}
.feature__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--text);
}
.feature__body {
  font-size: 14.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 880px) {
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
  .features { grid-template-columns: 1fr; }
}

/* ---------------------------------------------
   How it works
--------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.steps--four { grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps--four .step { padding: 24px; }
.step {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
}
.step__num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--purple-2);
  letter-spacing: 0.1em;
}
.step__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
.step__body {
  font-size: 14.5px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.55;
}

@media (max-width: 1080px) {
  .steps--four { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 880px) {
  .steps, .steps--four { grid-template-columns: 1fr; }
}

/* ---------------------------------------------
   Install
--------------------------------------------- */
.install {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.install__col-text {
  padding-top: 8px;
}

/* ---------------------------------------------
   Download card
--------------------------------------------- */
.dlcard {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(0,0,0,0.5),
    0 0 0 1px rgba(139, 92, 246, 0.06) inset;
}
.dlcard__head {
  display: flex; align-items: center; gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.06), transparent);
}
.dlcard__filemark {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--purple-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  color: var(--purple-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.dlcard__filemeta { flex: 1; min-width: 0; }
.dlcard__filename {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dlcard__filesub {
  font-size: 12.5px;
  color: var(--text-mute);
  margin-top: 2px;
}
.dlcard__badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--purple-2);
  background: var(--purple-soft);
  border: 1px solid rgba(139, 92, 246, 0.28);
  padding: 4px 9px;
  border-radius: 999px;
  flex-shrink: 0;
}
.dlcard__list {
  list-style: none; margin: 0; padding: 6px 22px;
}
.dlcard__list li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.dlcard__list li:last-child { border-bottom: none; }
.dlcard__k { color: var(--text-mute); }
.dlcard__v { color: var(--text); font-weight: 500; }
.dlcard__v--mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); font-weight: 400; }
.dlcard__foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
}
.dlcard__hint { font-size: 12.5px; color: var(--text-mute); }
.dlcard__link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--purple-2);
  transition: color .15s var(--ease);
}
.dlcard__link:hover { color: var(--text); }

@media (max-width: 880px) {
  .install { grid-template-columns: 1fr; }
}

/* ---------------------------------------------
   Footer
--------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 64px;
}
.footer__inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer__brand-side {
  display: flex; flex-direction: column; gap: 12px;
  max-width: 320px;
}
.footer__tagline {
  color: var(--text-mute);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0;
}
.footer__cols {
  display: flex; gap: 56px;
}
.footer__col-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mute);
  margin: 0 0 14px;
}
.footer__col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer__col a {
  font-size: 13.5px;
  color: var(--text-dim);
  transition: color .15s var(--ease);
  display: inline-flex; align-items: center; gap: 6px;
}
.footer__col a:hover { color: var(--text); }

.footer__bottom {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-mute);
}

/* ---------------------------------------------
   Misc
--------------------------------------------- */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
  margin: 0 auto;
  max-width: 600px;
  margin-bottom: 12px;
}

::selection { background: var(--purple-soft); color: var(--text); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }

/* ─────────────────────────────────────────────────────
   Hero brand letter-spacing — em so it scales with font
───────────────────────────────────────────────────── */
.brand--xl .brand__word--dim { letter-spacing: -0.06em; }

/* ─────────────────────────────────────────────────────
   ≤ 600px: collapse nav text links, keep GitHub CTA
───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .nav__links a:not(.nav__cta) { display: none; }
  .nav__links { gap: 0; }
}

/* ─────────────────────────────────────────────────────
   ≤ 640px: mobile layout
───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .section { padding: 60px 0; }

  /* Hero */
  .hero { padding: 44px 0 32px; }
  .hero__sub { font-size: 16px; margin-bottom: 28px; }
  .hero__brand { margin-bottom: 20px; }

  /* Scale down the giant hero logo */
  .brand--xl { font-size: 68px; gap: 12px; }
  .brand--xl .brand__mark { width: 112px; height: 86px; border-radius: 22px; }

  /* App preview window */
  .window { margin-top: 36px; }
  .window__body { height: 300px; }

  /* Scale in-window brand */
  .brand--lg { font-size: 34px; gap: 8px; }
  .brand--lg .brand__mark { width: 56px; height: 44px; border-radius: 12px; }

  /* Tighten in-window layout */
  .app-topbar { padding: 12px 14px; }
  .app-hero { gap: 12px; padding: 0 14px; }
  .app-chips { display: none; }
  .app-search__field { padding: 12px 12px 12px 40px; font-size: 13px; }
  .app-search__icon { left: 12px; }

  /* Counter pill */
  .counter-pill { font-size: 10px; gap: 5px; padding: 4px 8px; }
}

/* ─────────────────────────────────────────────────────
   ≤ 480px: footer bottom stacks
───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .footer__bottom { flex-direction: column; gap: 6px; align-items: flex-start; }
}
