:root {
  color-scheme: dark;
  --bg: #070b14;
  --surface: #0d1424;
  --surface-2: #121c31;
  --border: #1e2d4a;
  --border-strong: #2d4675;
  --ink: #f1f5fb;
  --muted: #93a4c3;
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --blue-soft: rgba(37, 99, 235, 0.14);
  --content: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  color: #fff;
  background: var(--blue);
}

/* Utilities */
.container {
  width: min(var(--content), calc(100% - 36px));
  margin: 0 auto;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.eyebrow {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-bright);
}

/* Sticky Top Bar (No inline section links; clean brand + Menu button) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid var(--border);
  background: rgba(7, 11, 20, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: #000;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-domain {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-trigger {
  min-height: 44px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-trigger:hover {
  border-color: var(--blue-bright);
  background: var(--surface-2);
}

.menu-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 16px;
}

.menu-bars span {
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
}

/* Slide-over Navigation Drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 6, 12, 0.76);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(340px, 88vw);
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px calc(22px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-strong);
  background: var(--surface);
  transform: translateX(102%);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.drawer-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.close-btn {
  min-width: 44px;
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
}

.close-btn:hover {
  border-color: var(--blue-bright);
}

.drawer-links {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.drawer-link {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.drawer-link:hover,
.drawer-link.active {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.drawer-link span.num {
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  margin-right: 10px;
}

.drawer-stores {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Official Store Badge Images */
.store-badge-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.store-badge-link:hover {
  transform: translateY(-1px);
  opacity: 0.94;
}

.store-badge-img {
  height: 40px;
  width: auto;
  border-radius: 7px;
  object-fit: contain;
}

.store-badge-img.sm {
  height: 36px;
}

/* Hero */
.hero {
  padding: 54px 0 46px;
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 36px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.hero h1 span {
  color: #60a5fa;
}

.hero-lead {
  max-width: 520px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn-blue {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--blue-bright);
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.btn-blue:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-outline {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.btn-outline:hover {
  border-color: var(--blue-bright);
  background: var(--surface-2);
}

.hero-featured-card {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 18px;
  background: var(--surface);
}

.hero-featured-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.tag-pill {
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--blue-soft);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 600;
}

.hero-showcase-frame {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #05080f;
}

.hero-showcase-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-featured-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-featured-footer h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.hero-featured-footer p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* Sections */
.section {
  padding: 58px 0;
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-sub {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* Primary 3 Flagship Apps */
.primary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.primary-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.primary-card:hover {
  border-color: var(--blue-bright);
  transform: translateY(-2px);
}

.primary-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.primary-app-icon {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: #090d16;
  flex-shrink: 0;
}

.primary-card-meta {
  min-width: 0;
}

.primary-card-meta h3 {
  margin: 4px 0 2px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.primary-card-meta p {
  margin: 0;
  font-size: 12px;
  color: #60a5fa;
  font-weight: 600;
}

.primary-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.spec-tag {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 500;
}

.primary-badges {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Interactive ATEM Screenshot Preview */
.preview-box {
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
}

.preview-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.preview-app-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-app-id img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
}

.preview-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.preview-tab {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.preview-tab.active,
.preview-tab:hover {
  border-color: var(--blue-bright);
  background: var(--blue-soft);
  color: #fff;
}

.preview-stage {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #05080f;
  overflow: hidden;
  touch-action: pan-y;
}

.preview-stage img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  margin: 0 auto;
  cursor: zoom-in;
}

.preview-bar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.preview-caption {
  font-size: 13px;
  color: var(--muted);
}

.preview-caption strong {
  color: var(--ink);
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.icon-btn:hover {
  border-color: var(--blue-bright);
  background: var(--surface-2);
}

/* Full Android & iOS Catalog */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  max-width: 100%;
}

.filter-pill {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
}

.filter-pill.active,
.filter-pill:hover {
  border-color: var(--blue-bright);
  background: var(--blue-soft);
  color: #fff;
}

.search-input {
  min-height: 44px;
  width: min(290px, 100%);
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
}

.search-input::placeholder {
  color: var(--muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--blue-bright);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.catalog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  background: var(--surface);
  transition: border-color 0.2s ease;
}

.catalog-card:hover {
  border-color: var(--border-strong);
}

.catalog-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.catalog-icon {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  background: #080c15;
  flex-shrink: 0;
}

.catalog-card h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
}

.catalog-brand {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #60a5fa;
  font-weight: 600;
}

.catalog-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

.catalog-actions {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.details-link {
  min-height: 38px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.details-link:hover {
  border-color: var(--blue-bright);
}

/* Setup Guide */
.setup-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.setup-step {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: var(--surface);
}

.step-num {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--blue-soft);
  color: #93c5fd;
  font-size: 11px;
  font-weight: 700;
}

.setup-step h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.setup-step p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

/* Privacy & Support */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.info-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  background: var(--surface);
}

.info-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.info-card p,
.info-card li {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.65;
}

.info-card ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.support-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer */
.footer {
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom, 0px));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-note {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

/* Modal & Lightbox */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 6, 12, 0.82);
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  width: min(560px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 22px;
  background: var(--surface);
}

.lightbox-card {
  width: min(960px, 100%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
}

.lightbox-card img {
  width: 100%;
  max-height: 74dvh;
  object-fit: contain;
  border-radius: 10px;
  background: #05080f;
}

/* Responsive Breakpoints */
@media (max-width: 920px) {
  .hero-grid,
  .primary-grid,
  .catalog-grid,
  .setup-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 36px 0 38px;
  }

  .section {
    padding: 42px 0;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    border-radius: 18px 18px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }
}
