:root {
  color-scheme: dark;
  --site-bg: #0d1711;
  --site-bg-rgb: 13, 23, 17;
  --site-surface: rgba(21, 34, 26, 0.86);
  --site-surface-soft: rgba(22, 36, 28, 0.62);
  --site-surface-elevated: rgba(11, 19, 14, 0.84);
  --site-border: rgba(58, 82, 68, 0.92);
  --site-border-strong: rgba(83, 110, 94, 0.9);
  --site-ink: #f5fbf7;
  --site-muted: #9eb7a8;
  --site-soft-text: #cfe0d6;
  --site-primary: #36e27b;
  --site-primary-rgb: 54, 226, 123;
  --site-chip-bg: rgba(54, 226, 123, 0.12);
  --site-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  --site-body-overlay: linear-gradient(180deg, rgba(12, 21, 16, 0.98) 0%, rgba(11, 18, 14, 0.95) 100%);
  --site-wallpaper-image: url("../images/bg/Mave_chat_dark.jpg");
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  position: relative;
  color: var(--site-ink);
  background: var(--site-bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: var(--site-body-overlay), var(--site-wallpaper-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at top, rgba(var(--site-primary-rgb), 0.14), transparent 30%);
  pointer-events: none;
}

body[data-theme="light"] {
  color-scheme: light;
  --site-bg: #eef4ef;
  --site-bg-rgb: 238, 244, 239;
  --site-surface: rgba(255, 255, 255, 0.88);
  --site-surface-soft: rgba(255, 255, 255, 0.68);
  --site-surface-elevated: rgba(244, 248, 244, 0.92);
  --site-border: rgba(175, 192, 181, 0.92);
  --site-border-strong: rgba(129, 157, 140, 0.92);
  --site-ink: #122117;
  --site-muted: #516659;
  --site-soft-text: #294235;
  --site-chip-bg: rgba(54, 226, 123, 0.1);
  --site-shadow: 0 26px 80px rgba(31, 61, 40, 0.14);
  --site-body-overlay: linear-gradient(180deg, rgba(244, 248, 244, 0.94) 0%, rgba(238, 244, 239, 0.96) 100%);
  --site-wallpaper-image: url("../images/bg/Mave_chat_light.jpg");
}

body[data-theme="light"] .dark\:bg-background-dark,
body[data-theme="light"] .bg-background-dark,
body[data-theme="light"] .bg-\[\#0e1711\],
body[data-theme="light"] .bg-\[\#111a14\],
body[data-theme="light"] .bg-\[\#131c16\],
body[data-theme="light"] .bg-\[\#151d17\],
body[data-theme="light"] .bg-\[\#162219\] {
  background-color: var(--site-surface-elevated) !important;
}

body[data-theme="light"] main [class~="text-white"],
body[data-theme="light"] footer [class~="text-white"],
body[data-theme="light"] nav [class~="text-white"] {
  color: var(--site-ink) !important;
}

body[data-theme="light"] main .text-text-secondary,
body[data-theme="light"] footer .text-\[\#9eb7a8\],
body[data-theme="light"] nav .text-\[\#9eb7a8\],
body[data-theme="light"] main .text-\[\#9eb7a8\],
body[data-theme="light"] main .text-\[\#a6b9ad\],
body[data-theme="light"] main .text-\[\#dbe6df\],
body[data-theme="light"] footer .text-\[\#7f9487\] {
  color: var(--site-muted) !important;
}

body[data-theme="light"] .border-border-dark,
body[data-theme="light"] .border-border-dark\/80,
body[data-theme="light"] .divide-border-dark > :not([hidden]) ~ :not([hidden]),
body[data-theme="light"] .border-\[\#29382f\] {
  border-color: var(--site-border) !important;
}

body[data-theme="light"] .bg-white\/5,
body[data-theme="light"] .bg-background-dark\/45,
body[data-theme="light"] .bg-background-dark\/60,
body[data-theme="light"] .bg-background-dark\/70,
body[data-theme="light"] .bg-surface-dark\/80,
body[data-theme="light"] .bg-surface-dark\/88 {
  background-color: rgba(255, 255, 255, 0.74) !important;
}

body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select {
  color: var(--site-ink);
}

body[data-theme="light"] input::placeholder,
body[data-theme="light"] textarea::placeholder {
  color: #66796d;
}

a {
  text-underline-offset: 0.2em;
}

img {
  display: block;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--site-primary);
  outline-offset: 2px;
}

.page-shell {
  width: 100%;
}

.surface-panel {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  box-shadow: var(--site-shadow);
  border-radius: 1.75rem;
}

.surface-panel-soft {
  background: var(--site-surface-soft);
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  border-radius: 1.5rem;
}

.section-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-radius: 999px;
  background: var(--site-chip-bg);
  border: 1px solid color-mix(in srgb, var(--site-primary) 28%, transparent);
  color: color-mix(in srgb, var(--site-primary) 76%, var(--site-ink));
  font-size: 0.8rem;
  font-weight: 700;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.metric-card {
  padding: 1rem 1.125rem;
  border-radius: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--site-border) 90%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 82%, transparent);
}

.metric-card strong {
  display: block;
  color: var(--site-ink);
  font-size: 1.2rem;
  line-height: 1.2;
}

.metric-card span {
  color: var(--site-muted);
  font-size: 0.92rem;
}

.store-links,
.store-links[data-variant="compact"] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 220px;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in srgb, var(--site-border-strong) 88%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 92%, transparent);
  color: var(--site-ink);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.store-badge:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--site-primary) 45%, var(--site-border));
  background: color-mix(in srgb, var(--site-surface) 96%, white 4%);
}

.store-badge.is-disabled {
  opacity: 0.72;
  cursor: default;
}

.store-badge__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(var(--site-primary-rgb), 0.12);
  color: var(--site-primary);
  flex-shrink: 0;
}

.store-badge__meta {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  line-height: 1.15;
}

.store-badge__meta small {
  color: var(--site-muted);
  font-size: 0.78rem;
}

.store-badge__meta strong {
  font-size: 0.98rem;
  font-weight: 700;
}

.legal-prose {
  color: var(--site-soft-text);
  font-size: 1rem;
  line-height: 1.75;
}

.legal-prose p,
.legal-prose ul,
.legal-prose ol {
  margin-bottom: 1rem;
}

.legal-prose ul,
.legal-prose ol {
  padding-left: 1.25rem;
}

.legal-prose li + li {
  margin-top: 0.5rem;
}

.legal-prose strong,
.legal-prose h3 {
  color: var(--site-ink);
}

.legal-toc {
  display: grid;
  gap: 0.75rem;
}

.legal-toc a,
.jump-strip a {
  color: var(--site-soft-text);
  border: 1px solid color-mix(in srgb, var(--site-border) 90%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 88%, transparent);
  transition: border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.legal-toc a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
}

.legal-toc a:hover,
.jump-strip a:hover {
  color: var(--site-ink);
  border-color: color-mix(in srgb, var(--site-primary) 45%, var(--site-border));
  transform: translateY(-1px);
}

.jump-strip {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.jump-strip::-webkit-scrollbar {
  display: none;
}

.jump-strip a {
  white-space: nowrap;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
}

.policy-section {
  scroll-margin-top: 8rem;
}

.hero-screens {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hero-screen-card {
  overflow: hidden;
  border-radius: 1.4rem;
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 86%, transparent);
}

.hero-screen-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stack-list {
  display: grid;
  gap: 0.9rem;
}

.stack-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.stack-list .material-symbols-outlined {
  color: var(--site-primary);
  margin-top: 0.125rem;
}

.site-shell-spacer {
  height: 6.25rem;
}

.site-shell {
  background: color-mix(in srgb, var(--site-surface) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--site-border) 92%, transparent);
  box-shadow: var(--site-shadow);
}

.site-nav-pill {
  background: color-mix(in srgb, var(--site-surface-elevated) 85%, transparent);
  border: 1px solid color-mix(in srgb, var(--site-border) 90%, transparent);
}

.site-brand-subtitle,
.site-muted,
.site-muted a {
  color: var(--site-muted);
}

.site-nav-link {
  color: var(--site-soft-text);
}

.site-nav-link:hover {
  color: var(--site-ink);
  background: rgba(var(--site-bg-rgb), 0.06);
}

.site-nav-link.is-active {
  background: var(--site-primary);
  color: #0f1a13;
  box-shadow: 0 0 18px rgba(var(--site-primary-rgb), 0.22);
}

.site-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--site-border) 90%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 90%, transparent);
  color: var(--site-ink);
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.site-theme-toggle:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--site-primary) 40%, var(--site-border));
}

.site-theme-toggle .material-symbols-outlined {
  color: var(--site-primary);
}

.theme-switch-preview {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(var(--site-bg-rgb), 0.02), rgba(var(--site-bg-rgb), 0.12)), var(--site-wallpaper-image);
  background-size: cover;
  background-position: center;
}

.theme-switch-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--site-bg-rgb), 0.08), rgba(var(--site-bg-rgb), 0.38));
}

.theme-switch-preview > * {
  position: relative;
  z-index: 1;
}

.theme-kicker {
  color: var(--site-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.theme-heading {
  color: var(--site-ink);
  text-wrap: balance;
}

.theme-copy {
  color: var(--site-muted);
  text-wrap: pretty;
}

.theme-subtle {
  color: var(--site-soft-text);
}

.theme-ghost-button {
  border: 1px solid color-mix(in srgb, var(--site-border) 90%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 82%, transparent);
  color: var(--site-ink);
}

.theme-ghost-button:hover {
  border-color: color-mix(in srgb, var(--site-primary) 40%, var(--site-border));
  background: color-mix(in srgb, var(--site-surface) 94%, white 6%);
}

.app-wallpaper-card {
  min-height: 340px;
}

.flow-step {
  padding: 1.25rem;
  border-radius: 1.4rem;
  background: color-mix(in srgb, var(--site-surface-elevated) 84%, transparent);
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
}

.flow-step strong {
  display: block;
  color: var(--site-ink);
  font-size: 1rem;
}

.flow-step p {
  margin-top: 0.65rem;
  color: var(--site-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.permission-card {
  padding: 1.25rem;
  border-radius: 1.4rem;
  background: color-mix(in srgb, var(--site-surface) 86%, transparent);
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
}

.permission-card h3 {
  color: var(--site-ink);
  font-size: 1rem;
  font-weight: 700;
}

.permission-card p {
  margin-top: 0.65rem;
  color: var(--site-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.showcase-card {
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  background: color-mix(in srgb, var(--site-surface) 86%, transparent);
  box-shadow: var(--site-shadow);
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-stage {
  display: grid;
  gap: 1rem;
}

.showcase-stage--feature {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.theme-shot {
  position: relative;
  overflow: hidden;
  border-radius: 1.6rem;
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  background: color-mix(in srgb, var(--site-surface) 88%, transparent);
  box-shadow: var(--site-shadow);
}

.theme-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--site-bg-rgb), 0.06), rgba(var(--site-bg-rgb), 0.26)),
    linear-gradient(135deg, rgba(var(--site-primary-rgb), 0.12), transparent 42%);
  pointer-events: none;
  z-index: 1;
}

.theme-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.theme-shot__meta {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.theme-shot__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(var(--site-bg-rgb), 0.64);
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  color: var(--site-ink);
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.theme-shot__caption {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: rgba(var(--site-primary-rgb), 0.14);
  border: 1px solid rgba(var(--site-primary-rgb), 0.24);
  color: var(--site-ink);
  font-size: 0.8rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.theme-shot__footer {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
}

.theme-shot__footer p {
  max-width: 30ch;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(var(--site-bg-rgb), 0.68);
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  color: var(--site-ink);
  font-size: 0.86rem;
  line-height: 1.6;
  backdrop-filter: blur(12px);
}

.theme-sync-note {
  border: 1px dashed color-mix(in srgb, var(--site-border) 88%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 82%, transparent);
}

.hero-note {
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 84%, transparent);
}

.theme-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: var(--site-primary);
  box-shadow: 0 0 0 6px rgba(var(--site-primary-rgb), 0.14);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.theme-panel-table {
  border: 1px solid color-mix(in srgb, var(--site-border) 88%, transparent);
  background: color-mix(in srgb, var(--site-surface-elevated) 88%, transparent);
}

.theme-panel-table .row + .row {
  border-top: 1px solid color-mix(in srgb, var(--site-border) 75%, transparent);
}

.theme-panel-table .label {
  color: var(--site-muted);
}

.theme-panel-table .value {
  color: var(--site-ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 767px) {
  .site-shell-spacer {
    height: 5.5rem;
  }

  .store-badge {
    width: 100%;
    min-width: 0;
  }

  .metric-strip,
  .hero-screens {
    grid-template-columns: 1fr;
  }

  .app-wallpaper-card {
    min-height: 280px;
  }
}

@media (max-width: 1023px) {
  .showcase-stage--feature {
    grid-template-columns: 1fr;
  }
}
