/* Marser Labs Base Layout & Component Styles */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--shadow-md);
}

.skip-link:focus {
  top: 16px;
  text-decoration: none;
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.container-narrow {
  max-width: var(--prose-w);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--nav-h);
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-lockup:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-lockup img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  flex-shrink: 0;
}

.brand-sub {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 400px) {
  .brand-sub {
    display: none;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--bg-subtle);
  text-decoration: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Theme toggle icon swap */
.theme-toggle .icon-sun {
  display: none;
}
.theme-toggle .icon-moon {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 11px 14px;
    font-size: 1rem;
  }
}

/* Breadcrumb bar on subdomains */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

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

.breadcrumb a:hover {
  color: var(--text);
}

.breadcrumb .sep {
  opacity: 0.45;
  user-select: none;
}

/* Sections & Hero */
.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 88px) clamp(36px, 5vw, 64px);
  background-image: var(--hero-glow);
  overflow: hidden;
}

.section {
  padding-block: clamp(40px, 6vw, 72px);
}

.section-bordered {
  border-top: 1px solid var(--border);
}

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

.section-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.6vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--text-muted);
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

:root[data-theme="dark"] .eyebrow {
  color: var(--accent-2);
}

h1.display {
  margin: 0;
  font-size: clamp(2.1rem, 4.8vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  text-wrap: balance;
}

.gradient-text {
  background: linear-gradient(125deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  margin: 18px 0 0;
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--text-muted);
  max-width: 60ch;
  line-height: 1.65;
}

/* Split hero layout */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

@media (max-width: 860px) {
  .hero-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.btn-row-tight {
  margin-top: 0;
}

.prose-compact {
  padding-block: 18px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding-inline: 12px;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-subtle);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.87rem;
  border-radius: var(--radius-sm);
}

/* Google Play CTA button */
.btn-play {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.16);
  padding: 10px 20px;
  box-shadow: var(--shadow-md);
}

:root[data-theme="dark"] .btn-play {
  background: #f8fafc;
  color: #0f172a;
  border-color: transparent;
}

.btn-play:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-play .play-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.btn-play .play-small {
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.btn-play .play-big {
  font-size: 1rem;
  font-weight: 700;
}

/* Grids & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-interactive {
  position: relative;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card-interactive:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.card-stretched-link {
  color: inherit;
  text-decoration: none;
}

.card-stretched-link:hover {
  color: var(--accent);
  text-decoration: none;
}

:root[data-theme="dark"] .card-stretched-link:hover {
  color: var(--accent-2);
}

.card-stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.card-interactive .card-footer {
  position: relative;
  z-index: 2;
}

/* Light/dark adaptive app icons */
.icon-for-dark {
  display: none;
}

:root[data-theme="dark"] .icon-for-light {
  display: none;
}

:root[data-theme="dark"] .icon-for-dark {
  display: block;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-for-light {
    display: none;
  }
  :root:not([data-theme="light"]) .icon-for-dark {
    display: block;
  }
}

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.app-icon {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.app-icon-lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-footer {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.status-live {
  color: var(--success);
  background: var(--success-soft);
}

.status-soon {
  color: var(--warn);
  background: var(--warn-soft);
}

.status-lab {
  color: var(--accent);
  background: var(--accent-soft);
}

:root[data-theme="dark"] .status-lab {
  color: var(--accent-2);
}

/* Tag chips */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
}

/* Feature blocks */
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

:root[data-theme="dark"] .feature-icon {
  color: var(--accent-2);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

/* Callout / banner */
.callout {
  padding: clamp(20px, 4vw, 28px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.callout h2,
.callout h3 {
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.callout p {
  margin: 0;
  color: var(--text-muted);
  max-width: 58ch;
}

/* Legal / Privacy prose */
.prose {
  padding-block: clamp(32px, 5vw, 56px);
}

.prose-header {
  padding-bottom: 24px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.prose-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.prose-toc {
  padding: 18px 20px;
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.prose-toc-title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.prose-toc ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 20px;
  font-size: 0.92rem;
}

.prose h2 {
  margin: 34px 0 12px;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--nav-h) + 20px);
}

.prose p {
  margin: 0 0 14px;
  color: var(--text);
}

.prose a,
.prose code,
.footer-bottom {
  overflow-wrap: anywhere;
}

.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.notice-box {
  padding: 16px 18px;
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  background: var(--warn-soft);
  border: 1px solid var(--border-strong);
  font-size: 0.93rem;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding-block: 44px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 28px;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.footer-brand p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 34ch;
}

.footer-col h4 {
  margin: 0 0 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--text-faint);
}

@media print {
  .site-header,
  .site-footer,
  .prose-toc,
  .btn-row {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }
}
