:root {
  --bg: #ffffff;
  --surface: #f4f4f4;
  --surface-2: #ececec;
  --border: #e2e2e2;
  --text: #111111;
  --muted: #6b6b6b;
  --accent: #111111;
  --accent-hover: #555555;
  --icon: #9a9a9a;
  --purple: #7c3aed;
  --radius: 0px;

  /* Type scale */
  --fs-display: clamp(26px, 4.5vw, 51px); /* hero */
  --fs-heading-l: clamp(30px, 5vw, 52px); /* page + detail headings */
  --fs-heading-s: 20px; /* card + section headings */
  --fs-lede: 18px; /* lede + detail tagline */
  --fs-body: 16px; /* body, taglines, features */
  --fs-ui: 14px; /* buttons + links */
  --fs-label: 13px; /* labels + meta */
}

* { box-sizing: border-box; }
html, body { margin: 0; }

/* Visible keyboard focus */
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 2px; }

/* Skip to content */
.skip-link {
  position: absolute; left: 12px; top: -56px; z-index: 100;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-size: var(--fs-ui); font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.08);
}
.header-inner { display: flex; align-items: center; justify-content: flex-start; height: 68px; gap: 40px; }
@media (max-width: 820px) { .header-inner { justify-content: space-between; gap: 16px; } }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-logo { width: 40px; height: 40px; display: block; border-radius: 8px; }
.brand-mark { color: var(--icon); display: inline-flex; }
svg { stroke-width: 1.5; }
.brand-name { font-size: var(--fs-body); font-weight: 700; }
.header-nav { display: flex; align-items: center; flex: 1; }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; line-height: 0; }
.nav-menu { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; flex: 1; }
.nav-menu li:nth-child(4) { margin-left: auto; }
.nav-menu a {
  font-size: var(--fs-ui); font-weight: 600;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
.nav-menu a:hover { color: var(--text); }
.contact-link {
  font-size: var(--fs-ui); font-weight: 600;
  color: var(--muted); text-decoration: none; white-space: nowrap;
}
@media (max-width: 820px) {
  .header-nav { flex: 0 0 auto; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0; flex: none;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 14px;
    background: var(--bg); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 24px rgba(0,0,0,.08);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { display: block; padding: 13px 4px; }
  .nav-menu a:hover { color: var(--text); }
  .nav-menu li:nth-child(4) { margin-left: 0; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 8px; }
}
.contact-link:hover { color: var(--text); }

/* Hero */
.hero {
  padding: 68px 0 0;
  background: linear-gradient(180deg, #eceef1 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 32px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px; align-items: center;
}
.hero-copy { min-width: 0; }
.hero h1 {
  font-size: var(--fs-display);
  line-height: 1.02; margin: 0 0 28px; font-weight: 700;
  text-transform: capitalize;
}
.lede { font-size: var(--fs-lede); color: var(--muted); max-width: 52ch; margin: 0; line-height: 1.55; }
.hero-media {
  min-width: 0; margin: 0; position: relative;
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
}
.hero-slide {
  position: absolute; inset: 0; display: block; opacity: 0;
  transition: opacity 2.4s ease; pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  width: 100%; height: 100%; object-fit: cover; object-position: top; display: block;
}
.hero-slide:hover img { opacity: .95; }
.hero-caption {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  margin: 0; max-width: calc(100% - 24px);
  background: var(--accent); color: #fff; font-size: var(--fs-label);
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,.2); text-align: center; white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 0 32px; }
}
@media (max-width: 560px) {
  .hero-inner { padding: 0 20px; }
}

/* Section label above the grid */
.toolbar { padding: 44px 0 20px; display: flex; align-items: baseline; justify-content: space-between; }
.section-label { font-size: var(--fs-ui); font-weight: 700; color: var(--text); }
.section-count { font-size: var(--fs-label); color: var(--muted); font-variant-numeric: tabular-nums; }

/* Grid */
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 20px;
}

.home-heading {
  font-size: 18px; font-weight: 700;
  margin: 38px 0 42px; text-align: center;
}
@media (max-width: 960px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative; background: #fff;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 0 28px 28px; cursor: pointer;
  display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.08);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 14px 34px rgba(0,0,0,.12);
}
.card-top { display: flex; align-items: flex-start; justify-content: space-between; }
.card-icon {
  color: #fff; background: var(--purple); border-radius: 0 0 8px 8px;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
}
.card-cat {
  color: var(--muted); font-size: var(--fs-label); font-weight: 700;
}
.card-name { font-weight: 700; font-size: var(--fs-heading-s); margin: 0; }
.card-tag { color: var(--muted); font-size: var(--fs-body); margin: 0; }
.card-features { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-features li { position: relative; padding-left: 18px; font-size: var(--fs-body); color: var(--text); line-height: 1.45; }
.card-features li::before {
  content: ""; position: absolute; left: 3px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent);
}
.card-actions {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 8px;
  padding-top: 4px;
}
.card-actions .btn { flex: 1 1 130px; justify-content: center; min-width: 0; }

.empty { color: var(--muted); padding: 48px 0; }

/* Press / featured strip */
.press { text-align: center; margin-top: 48px; }
.press-item { display: inline-flex; flex-direction: row; align-items: center; gap: 14px; text-decoration: none; }
.press-logo { height: 32px; max-height: 40px; width: auto; opacity: .85; transition: opacity .12s ease; }
.press-line { font-size: var(--fs-body); color: var(--muted); transition: color .12s ease; }
.press-item:hover .press-logo { opacity: 1; }
.press-item:hover .press-line { color: var(--text); }
@media (max-width: 480px) { .press-item { flex-direction: column; gap: 10px; } }

/* Social links (About page) */
.social-label { margin-bottom: 8px !important; }
.social-links { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.social-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); transition: color .12s ease, border-color .12s ease;
}
.social-links a:hover { color: var(--text); border-color: var(--muted); }
.social-links svg { width: 20px; height: 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  padding: 11px 18px; border-radius: 8px; font-size: var(--fs-ui); cursor: pointer;
  font-weight: 600; font-family: inherit;
  text-decoration: none; transition: .12s;
}
.btn:hover { border-color: var(--accent); color: var(--accent-hover); }
.btn.small { padding: 9px 14px; font-size: var(--fs-label); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn.block { width: 100%; justify-content: center; padding: 14px 18px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.read-more { background: var(--surface); border-color: var(--surface); color: var(--text); }
.btn.read-more:hover { background: var(--surface-2); border-color: var(--surface-2); color: var(--text); }
.btn.is-installed { background: var(--surface); border-color: var(--surface); color: var(--muted); cursor: default; pointer-events: none; }

/* Detail page */
.detail-hero {
  background: linear-gradient(180deg, #eceef1 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 44px;
}
.detail { padding-top: 48px; padding-bottom: 64px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--muted);
  text-decoration: none; font-size: var(--fs-ui);
  margin-bottom: 48px;
}
.back-link:hover { color: var(--text); }
.detail-head {
  display: flex; gap: 14px; align-items: flex-start;
}
.detail-headings { min-width: 0; }
.detail-cta { margin-left: auto; flex: 0 0 auto; align-self: flex-start; }
@media (max-width: 620px) {
  .detail-head { flex-wrap: wrap; }
  .detail-cta { margin-left: 0; width: 100%; justify-content: center; }
}
.detail-icon { color: var(--icon); display: inline-flex; flex: 0 0 auto; margin-top: 0; }
.detail-icon svg { width: var(--fs-heading-l); height: var(--fs-heading-l); display: block; }
.detail-name { font-size: var(--fs-heading-l); line-height: 1.05; margin: 0 0 14px; font-weight: 700; }
.detail-tag { color: var(--muted); font-size: var(--fs-lede); line-height: 1.55; margin: 0; max-width: none; }
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; }
@media (max-width: 800px) { .detail-grid { grid-template-columns: 1fr; gap: 40px; } }
.detail-about p { font-size: var(--fs-body); line-height: 1.6; color: var(--text); margin: 0 0 20px; max-width: 62ch; }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; margin: 0 0 24px; box-shadow: 0 4px 12px rgba(0,0,0,.08), 0 20px 48px rgba(0,0,0,.14); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Screenshot carousel */
.carousel { position: relative; margin: 32px 0 40px; }
.carousel-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; padding: 2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.shot {
  flex: 0 0 auto; scroll-snap-align: start; padding: 0; line-height: 0;
  border: 0; border-radius: 10px; background: #fff;
  cursor: zoom-in; overflow: hidden; transition: opacity .12s ease;
}
.shot:hover { opacity: .9; }
.shot img { display: block; height: 150px; width: auto; }
.carousel-nav {
  position: absolute; top: calc(50% - 6px); transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.carousel-nav { transition: background .12s ease, opacity .2s ease; }
.carousel-nav:hover { background: var(--accent-hover); }
.carousel.lb-open .carousel-nav { opacity: 0; pointer-events: none; }
.carousel-nav.prev { left: -12px; }
.carousel-nav.next { right: -12px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; padding: 48px; }
.lb-img { transition: transform .32s ease, opacity .32s ease; }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; width: 92vw; max-height: 88vh; }
.lb-img { max-width: 92vw; max-height: 76vh; border-radius: 8px; }
.lb-caption {
  align-self: center; margin: 0; max-width: calc(100% - 24px);
  background: var(--accent); color: #fff; font-size: 14px; line-height: 1.4;
  padding: 8px 16px; border-radius: 999px; text-align: center;
}
.lb-btn {
  position: absolute; background: var(--accent); color: #fff; border: 0;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: var(--accent-hover); }
.lb-close { top: 20px; right: 24px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.detail-side { border-top: 2px solid var(--accent); padding-top: 20px; }
.side-title { font-size: var(--fs-label); font-weight: 700; color: var(--muted); margin-bottom: 16px; }
.detail-side .card-features { margin-bottom: 28px; }

/* Legal / prose pages */
.legal { padding-top: 56px; padding-bottom: 72px; }
.legal-title { font-size: var(--fs-heading-l); line-height: 1.05; font-weight: 700; margin: 0 0 8px; }
.legal-updated { color: var(--muted); font-size: var(--fs-label); margin: 0 0 56px; }
.legal h2 { font-size: var(--fs-heading-s); font-weight: 700; margin: 40px 0 12px; }
.legal p { font-size: var(--fs-body); line-height: 1.6; color: var(--text); margin: 0 0 16px; }
.legal-list { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legal-list li { position: relative; padding-left: 18px; font-size: var(--fs-body); line-height: 1.6; color: var(--text); }
.legal-list li::before { content: ""; position: absolute; left: 3px; top: 10px; width: 5px; height: 5px; border-radius: 50%; background: var(--purple); }

/* Numbered steps (install / getting-started pages) */
.steps { list-style: none; counter-reset: step; margin: 4px 0 24px; padding: 0; }
.steps li { position: relative; padding-left: 46px; margin-bottom: 20px; font-size: var(--fs-body); line-height: 1.6; color: var(--text); }
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 30px; height: 30px;
  background: var(--purple); color: #fff; border-radius: 8px;
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.steps strong { font-weight: 700; }
.legal a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--muted); }

/* Footer */
.site-footer { margin-top: 64px; padding: 32px 0; background: var(--surface); }
.site-footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.site-footer p { color: var(--muted); font-size: var(--fs-label); margin: 0; max-width: 70ch; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: var(--fs-ui); font-weight: 600; }
.footer-links a:hover { color: var(--text); }
.site-footer .copyright { margin-top: 0; font-size: var(--fs-label); }

@media (max-width: 620px) {
  .hero { padding: 48px 0 40px; }
  .toolbar { padding: 32px 0 16px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .header-inner { height: 60px; }
  .brand-name { font-size: 14px; }
}
