:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --ink: #09090b;
  --ink-muted: #52525b;
  --ink-subtle: #71717a;
  --border: #e4e4e7;
  --dark-bg: #09090b;
  --dark-surface: #18181b;
  --dark-border: #27272a;
  --dark-muted: #a1a1aa;
  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--ink);
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0;
}

p {
  margin: 0;
}

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

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

.container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Icons */
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 28px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.nav-links a {
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--ink);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #27272a;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 0.9375rem;
}

.btn-version {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a1a1aa;
}

/* App Logo */
.app-logo {
  position: relative;
  overflow: hidden;
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-logo-lg {
  width: 88px;
  height: 88px;
  border-radius: 22px;
}

.app-logo-sm {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.app-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
  display: block;
}

.logo-fallback {
  display: none;
  width: 60%;
  height: 60%;
  color: #ffffff;
}

.app-logo.is-fallback img {
  display: none;
}

.app-logo.is-fallback .logo-fallback {
  display: block;
}

/* 1. Hero Section */
.hero {
  padding: 80px 0 96px;
  background-color: var(--bg);
}

.hero-inner {
  max-width: 768px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-title {
  margin-top: 28px;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-tagline {
  margin-top: 16px;
  max-width: 560px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.download-status {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--ink);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  max-width: 440px;
}

.download-status[hidden] {
  display: none;
}

.download-status-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.download-status-sub {
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* 2. App Information Strip */
.app-info {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.info-cell {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.info-cell:last-child {
  border-bottom: none;
}

.info-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-subtle);
}

.info-value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.info-detail {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* Shared Section Rhythm */
.section {
  padding: 80px 0;
}

.section-muted {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.section-dark {
  background: var(--dark-bg);
  color: #ffffff;
  border-top: 1px solid #18181b;
  border-bottom: 1px solid #18181b;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 32px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.section-header-dark {
  border-bottom-color: var(--dark-border);
}

.section-header-simple {
  margin-bottom: 40px;
}

.section-title {
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.section-desc {
  max-width: 448px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.text-white {
  color: #ffffff;
}

.text-muted-dark {
  color: var(--dark-muted);
}

.section-header-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.scroll-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--ink);
  font-size: 0.9375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.scroll-btn:hover {
  background: var(--surface);
  border-color: var(--ink);
}

.scroll-btn-dark {
  background: var(--dark-surface);
  border-color: var(--dark-border);
  color: #ffffff;
}

.scroll-btn-dark:hover {
  background: #27272a;
  border-color: #71717a;
}

.scroll-btn-dark:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* 3. Features Horizontal Row */
.features-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 82vw);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d4d4d8 transparent;
}

.features-grid::-webkit-scrollbar,
.screenshots-grid::-webkit-scrollbar {
  height: 6px;
}

.features-grid::-webkit-scrollbar-track,
.screenshots-grid::-webkit-scrollbar-track {
  background: transparent;
}

.features-grid::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 999px;
}

.screenshots-grid::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 999px;
}

.card {
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  scroll-snap-align: start;
}

.card-tint {
  background: rgba(250, 250, 250, 0.75);
}

.card-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.card-subtitle {
  margin-top: 4px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-subtle);
}

.card-body {
  margin-top: 16px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #3f3f46;
  max-width: 640px;
}

.card-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.mono-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
}

/* 4. Screenshots Horizontal Row */
.screenshots-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 60vw);
  align-items: center;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #3f3f46 transparent;
}

.screenshot-item {
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

.screenshot-frame {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--dark-surface);
  border: 1px solid var(--dark-border);
  padding: 0;
  cursor: pointer;
  display: block;
  transition: transform 0.18s ease;
}

.screenshot-frame:hover {
  transform: translateY(-4px);
}

.screenshot-frame:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.screenshot-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-fallback {
  display: none;
  width: 100%;
  min-height: 280px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #d4d4d8;
  font-size: 0.875rem;
  gap: 6px;
}

.screenshot-fallback small {
  font-size: 0.75rem;
  color: #71717a;
}

.screenshot-frame.is-fallback img {
  display: none;
}

.screenshot-frame.is-fallback .screenshot-fallback {
  display: flex;
}

.screenshot-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(9, 9, 11, 0.82);
  border: 1px solid #3f3f46;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.screenshot-frame:hover .screenshot-zoom,
.screenshot-frame:focus-visible .screenshot-zoom {
  opacity: 1;
}

.screenshot-title {
  margin-top: 16px;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
}

.screenshot-caption {
  margin-top: 6px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--dark-muted);
}

/* 5. Warnings Grid */
.warnings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.card-simple {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.warning-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.warning-head h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.warning-summary {
  margin-top: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.warning-text {
  margin-top: 8px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-muted);
}

/* 6. Installation Steps */
.steps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.step-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.step-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-subtle);
  display: block;
}

.step-title {
  margin-top: 12px;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
}

.step-desc {
  margin-top: 12px;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* 7. FAQ Section */
.faq-section {
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.faq-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.faq-intro {
  margin-top: 16px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.faq-tabs {
  margin-top: 24px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #f4f4f5;
  border: 1px solid var(--border);
}

.faq-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.faq-tab:hover {
  color: var(--ink);
}

.faq-tab.active {
  background: var(--ink);
  color: #ffffff;
}

.faq-list {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item[hidden] {
  display: none;
}

.faq-trigger {
  width: 100%;
  border: none;
  background: transparent;
  padding: 4px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.faq-category {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-subtle);
  margin-bottom: 4px;
}

.faq-question {
  display: block;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
}

.faq-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  color: #3f3f46;
}

.faq-answer {
  margin-top: 12px;
  padding-right: 40px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-muted);
}

.faq-answer[hidden] {
  display: none;
}

/* 8. Support & Footer */
.footer {
  background: var(--dark-bg);
  color: #ffffff;
  border-top: 1px solid #18181b;
}

.footer-inner {
  padding-top: 64px;
  padding-bottom: 64px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--dark-border);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.footer-desc {
  margin-top: 16px;
  max-width: 448px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--dark-muted);
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-self: center;
}

.social-card {
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--dark-border);
  background: rgba(24, 24, 27, 0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.social-card:hover {
  background: var(--dark-surface);
  border-color: #3f3f46;
}

.social-card:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.social-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid #3f3f46;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.social-platform {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--dark-muted);
}

.social-handle {
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

.social-arrow {
  color: #71717a;
  font-size: 1rem;
}

.social-card:hover .social-arrow {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.75rem;
  color: #71717a;
}

.footer-credit {
  color: #d4d4d8;
  font-weight: 500;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links a:hover {
  color: #ffffff;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-card {
  width: auto;
  min-width: min(90vw, 320px);
  max-width: min(92vw, 760px);
  background: var(--dark-bg);
  border: 1px solid var(--dark-border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.lightbox-counter {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--dark-muted);
}

.lightbox-close {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: transparent;
  color: #d4d4d8;
  cursor: pointer;
  font-size: 1rem;
}

.lightbox-close:hover {
  background: var(--dark-surface);
  color: #ffffff;
}

.lightbox-media {
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--dark-border);
  background: var(--dark-surface);
  display: flex;
  justify-content: center;
}

.lightbox-media img {
  width: auto;
  max-width: 100%;
  max-height: 72vh;
  height: auto;
  display: block;
}

.lightbox-actions {
  margin-top: 18px;
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn-outline-dark {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--dark-border);
  background: transparent;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.btn-outline-dark:hover {
  background: var(--dark-surface);
}

/* Responsive Breakpoints */
@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }

  .hero {
    padding: 96px 0 112px;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .info-cell {
    padding: 24px;
  }

  .info-cell:nth-child(odd) {
    padding-left: 0;
    border-right: 1px solid var(--border);
  }

  .info-cell:nth-child(n + 3) {
    border-bottom: none;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .section-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .section-header-right {
    flex-direction: row;
    align-items: flex-end;
    gap: 20px;
  }

  .features-grid {
    grid-auto-columns: 332px;
    gap: 20px;
  }

  .screenshots-grid {
    grid-auto-columns: 252px;
    gap: 20px;
  }

  .warnings-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .social-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .info-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .info-cell {
    border-bottom: none;
    border-right: 1px solid var(--border);
    padding: 24px;
  }

  .info-cell:first-child {
    padding-left: 0;
  }

  .info-cell:last-child {
    border-right: none;
    padding-right: 0;
  }

  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .faq-layout {
    grid-template-columns: 4fr 8fr;
    gap: 48px;
  }

  .footer-top {
    grid-template-columns: 4fr 8fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
