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

:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --ink: #14181f;
  --muted: #5b6572;
  --line: #e2e6eb;
  --line-strong: #d5dae1;

  /* The logo red. 4.11:1 on white — graphics and borders only, never text on it. */
  --brand: #e0463b;
  /* The same red darkened to 5.60:1 — buttons, links, anything that is or carries text. */
  --brand-deep: #be3628;
  --brand-dark: #9e2b1f;
  --brand-tint: #fcefed;

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --max-width: 1120px;
  --radius: 4px;
  --radius-lg: 6px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-deep);
}

a:hover {
  color: var(--brand-dark);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
}

.text-primary {
  color: var(--brand-deep);
}

.arrow {
  display: inline-block;
}

.eyebrow {
  margin-bottom: 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Header */

.site-header {
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2.5rem;
  min-height: 4.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-serif);
  font-size: 1.4375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.logo img {
  width: 1.5625rem;
  height: 1.5625rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.75rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-spacer {
  flex-grow: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 2.375rem;
  padding: 0 1.125rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--brand-deep);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-secondary {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.btn-secondary:hover {
  border-color: var(--muted);
  color: var(--ink);
}

.btn-lg {
  height: 3.125rem;
  padding: 0 1.75rem;
  font-size: 1rem;
}

/* Platform picker — a separate control beside the download button */

.platform-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  position: relative;
  z-index: 20;
}

.picker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.375rem;
  padding: 0 0.85rem;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}

.picker-toggle:hover {
  border-color: var(--muted);
}

.split-caret {
  width: 0.7rem;
  height: 0.7rem;
  color: var(--muted);
  transition: transform 0.15s;
}

.picker-toggle[aria-expanded="true"] .split-caret {
  transform: rotate(180deg);
}

.platform-links-lg .picker-toggle {
  height: 3.125rem;
  padding: 0 1.1rem;
  font-size: 1rem;
}

.platform-links-lg .split-caret {
  width: 0.8rem;
  height: 0.8rem;
}

.platform-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 15.5rem;
  padding: 0.35rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(20, 24, 31, 0.12);
  z-index: 30;
}

/* The closing CTA sits on the footer, so its menu drops upward. */
.platform-links-up .platform-menu {
  top: auto;
  bottom: calc(100% + 0.5rem);
}

.platform-menu[hidden] {
  display: none;
}

.platform-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius);
  text-align: left;
  text-decoration: none;
}

.platform-item:hover {
  background: var(--surface);
}

.platform-item-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.platform-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

.platform-item-meta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.platform-item-check {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--brand-deep);
  opacity: 0;
}

.platform-item.is-selected {
  background: var(--brand-tint);
}

.platform-item.is-selected .platform-item-name,
.platform-item.is-selected .platform-item-meta {
  color: var(--brand-deep);
}

.platform-item.is-selected .platform-item-check {
  opacity: 1;
}

/* Listed so people know it is planned, but there is nothing to pick yet. */
.platform-item.is-soon {
  cursor: default;
}

.platform-item.is-soon:hover {
  background: none;
}

.platform-item.is-soon .platform-item-name,
.platform-item.is-soon .platform-item-meta {
  color: #6b7482;
}

/* Hero */

.hero {
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 52.5rem;
  margin: 0 auto;
  padding: 6.75rem 2.5rem 7.25rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
  padding: 0.3rem 0.75rem 0.3rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
}

.badge-new {
  padding: 0.125rem 0.4375rem;
  border-radius: 2px;
  background: var(--brand-deep);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.hero-title {
  margin-bottom: 1.625rem;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.2vw, 3.875rem);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hero-sub {
  max-width: 32em;
  margin: 0 auto 2.5rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.hero-fine {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Hero media */

.hero-inner:has(+ .hero-media) {
  padding-bottom: 3.25rem;
}

.hero-media {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem) clamp(3.5rem, 8vw, 5.5rem);
}

.hero-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* Trust strip */

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

.trust-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.625rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem 3rem;
}

.trust-inner span {
  font-size: 0.875rem;
  font-weight: 500;
}

/* Sections */

.section {
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--line);
}

.section-alt {
  background: var(--surface);
}

.section-title {
  max-width: 18em;
  margin-bottom: 1.125rem;
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 3.2vw, 2.375rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.section-lead {
  max-width: 34em;
  margin-bottom: 3.5rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

/* Pillar cards */

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

.info-card {
  padding: 1.875rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.info-card svg {
  width: 1.625rem;
  height: 1.625rem;
  margin-bottom: 1.25rem;
  color: var(--brand);
}

.info-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.info-card p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

/* Feature catalog */

.feature-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3.5rem;
  padding-bottom: 2.25rem;
  margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.feature-bank:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.feature-banner {
  flex: 0 0 10rem;
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 600;
}

.feature-tiles {
  flex: 999 1 35rem;
  min-width: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.375rem 2rem;
}

.feature-tile strong {
  display: block;
  margin-bottom: 0.3125rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.feature-tile span {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
}

/* FAQ */

.faq-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 4.5rem;
}

.faq-intro {
  flex: 0 0 17.5rem;
}

.faq-intro .section-title {
  margin-bottom: 1rem;
}

.faq-intro p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.faq-list {
  flex: 999 1 32.5rem;
  min-width: 0;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-plus {
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.15s;
}

.faq-item[open] .faq-plus {
  transform: rotate(45deg);
}

.faq-item p {
  max-width: 46em;
  margin-bottom: 1.375rem;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
}

/* Closing call to action */

.section-cta {
  background: var(--ink);
}

.cta-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}

.cta-copy {
  flex: 999 1 26rem;
  min-width: 0;
}

.cta-copy h2 {
  margin-bottom: 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #fff;
}

.cta-copy p {
  font-size: 1rem;
  line-height: 1.6;
  color: #aab2bd;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.section-cta .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.section-cta .btn-secondary:hover {
  border-color: #fff;
  color: #fff;
}

.section-cta .picker-toggle {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.section-cta .picker-toggle:hover {
  border-color: #fff;
}

.section-cta .split-caret {
  color: rgba(255, 255, 255, 0.7);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 2rem;
}

.footer-brand {
  flex: 999 1 20rem;
  min-width: 0;
}

.footer-brand .logo {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.footer-brand .logo img {
  width: 1.375rem;
  height: 1.375rem;
}

.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted);
}

.footer-col {
  flex: 0 0 11.25rem;
}

.footer-col h6 {
  margin-bottom: 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5625rem;
}

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

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

.footer-bottom {
  padding-top: 1.375rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Install page */

.install {
  background: var(--surface);
}

.install-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem 2.5rem 5.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem 4.5rem;
  align-items: flex-start;
}

.install-intro {
  flex: 0 0 20rem;
}

.install-started {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1c7a4b;
}

.install-started svg {
  width: 0.9375rem;
  height: 0.9375rem;
}

.install-title {
  margin-bottom: 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.install-intro p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.install-intro p + p {
  margin-top: 1.75rem;
  font-size: 0.875rem;
}

.install-main {
  flex: 999 1 33.75rem;
  min-width: 0;
}

.os-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}

.os-tab {
  padding: 0.8125rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.os-tab:hover {
  border-color: var(--muted);
}

.os-tab-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
}

.os-tab-meta {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.os-tab.is-active {
  border-color: var(--brand-deep);
  background: var(--brand-tint);
}

.os-tab.is-active .os-tab-name,
.os-tab.is-active .os-tab-meta {
  color: var(--brand-deep);
}

/* Shown so people know it is planned, but there is nothing to select yet. */
.os-tab.is-soon {
  cursor: default;
  border-style: dashed;
}

.os-tab.is-soon:hover {
  border-color: var(--line-strong);
}

.os-tab.is-soon .os-tab-name,
.os-tab.is-soon .os-tab-meta {
  color: #6b7482;
}

.os-panel-wrap {
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.os-panel[hidden] {
  display: none;
}

.install-note {
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  border-left: 3px solid #b8860b;
  background: #fdf8ec;
  font-size: 0.875rem;
  line-height: 1.6;
}

.install-steps {
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

.install-steps li {
  margin-bottom: 0.875rem;
}

.install-steps li:last-child {
  margin-bottom: 0;
}

.install-steps code,
.install-note code {
  padding: 0.0625rem 0.3125rem;
  border-radius: 3px;
  background: #f0f2f5;
  font-size: 0.8125rem;
}

.install-again {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.install-file {
  font-size: 0.8125rem;
  color: var(--muted);
}

.install-foot {
  margin-top: 1.5rem;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Responsive */

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

@media (max-width: 768px) {
  .container,
  .nav,
  .trust-inner,
  .cta-inner,
  .install-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero-inner {
    padding: 4.5rem 1.5rem 5rem;
  }

  .section {
    padding: 4rem 0;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .feature-bank {
    gap: 1rem;
  }

  .feature-banner {
    flex: 0 0 100%;
  }

  .faq-intro {
    flex: 0 0 100%;
  }
}

@media (max-width: 560px) {
  .feature-tiles {
    grid-template-columns: 1fr;
  }

  .nav-links {
    gap: 1.125rem;
  }

  .trust-inner {
    gap: 0.5rem 1.5rem;
  }
}

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

  * {
    transition: none !important;
  }
}

/* Too small to read on a phone, and nothing should move under reduced motion:
   the poster frame stands in for the loop. main.js withholds the source in
   both cases, so the video is never fetched. */
@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }

  .hero-media::after {
    content: "";
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    background: url("/img/hero-poster.jpg") center / cover no-repeat;
  }
}
