/* Manija's site. The dark colors are the app's own dark theme; the accent is
   the brass of the logo. */

:root {
  color-scheme: dark light;
  --canvas: #0E1013;
  --background: #131619;
  --chrome: #111316;
  --raised: #202225;
  --border: #25282C;
  --foreground: #E8E9EB;
  --muted: #A9ADB3;
  --brass: #f0c964;        /* fills */
  --brass-text: #f0c964;   /* text and links on the page's surfaces */
  --brass-deep: #c2913a;
  --on-brass: #1c1303;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #F6F5F2;
    --background: #FFFFFF;
    --chrome: #EFEDE8;
    --raised: #FFFFFF;
    --border: #DCD9D2;
    --foreground: #1B1D21;
    --muted: #555A62;
    --brass-text: #7a4f12;
    --shadow: 0 30px 70px rgba(60, 45, 15, 0.18);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--foreground);
  font: 17px/1.6 var(--sans);
}

img { max-width: 100%; height: auto; }

a { color: var(--brass-text); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 2px solid var(--brass-text);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }

code, pre { font-family: var(--mono); font-size: 0.86em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 760px; }

.small { font-size: 0.87rem; color: var(--muted); }

.skip {
  position: absolute; left: 12px; top: -60px;
  background: var(--brass); color: var(--on-brass);
  padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip:focus { top: 12px; }

/* Top bar */

.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--canvas) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--foreground); font-weight: 650; text-decoration: none; }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.93rem; }
.top nav a:hover { color: var(--foreground); }

/* Hero */

.hero {
  text-align: center;
  padding: 72px 0 40px;
  background: radial-gradient(ellipse 70% 420px at 50% 0, color-mix(in srgb, var(--brass-deep) 22%, transparent), transparent);
}
.hero-logo { display: block; margin: 0 auto 20px; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35)); }
.hero h1 { font-size: clamp(3rem, 9vw, 5.25rem); letter-spacing: -0.04em; }
.tagline { font-size: clamp(1.2rem, 3vw, 1.6rem); margin: 18px auto 6px; max-width: 26em; text-wrap: balance; }
.sub { color: var(--muted); }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 28px 0 14px; }
.note { font-size: 0.9rem; color: var(--muted); margin-bottom: 44px; }

.button {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--foreground);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.button:hover { border-color: var(--brass-deep); transform: translateY(-1px); }
.button.primary {
  background: linear-gradient(#f6dc9a, #f0c964);
  border-color: #c2913a;
  color: var(--on-brass);
}
.button.primary:hover { background: linear-gradient(#fbe6ae, #f4d078); }

/* The screenshots carry their own transparent margin; the shadow follows the
   window in them, not the image's box. */
.shot { display: block; margin: 0 auto; filter: drop-shadow(var(--shadow)); }
/* The film is the window alone, without the margin the pictures carry. */
video { max-width: 100%; height: auto; }
.film { border-radius: 12px; margin-bottom: 56px; }

/* The name */

.name { padding: 40px 0 56px; text-align: center; }
.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--brass-text); margin-bottom: 12px; }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; text-align: left; }
blockquote {
  margin: 0;
  padding: 18px 22px;
  background: var(--background);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brass-deep);
  border-radius: 10px;
}
blockquote p { margin: 0; }
blockquote strong { font-size: 1.2rem; font-style: italic; }
blockquote p + p { color: var(--muted); margin-top: 4px; }

/* Sections */

section { padding: 72px 0; }
.features, .agents, .releases { background: var(--background); border-block: 1px solid var(--border); }
.section-title { font-size: clamp(1.7rem, 4.4vw, 2.5rem); text-align: center; text-wrap: balance; }
.section-lead { color: var(--muted); text-align: center; max-width: 44em; margin: 14px auto 40px; text-wrap: pretty; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
  padding: 40px 0;
}
.feature + .feature { border-top: 1px solid var(--border); }
.feature.flip > .text { order: 2; }
.feature:has(> .text + .text) { grid-template-columns: 1fr 1fr; align-items: start; }
.feature h3 { font-size: 1.5rem; margin-bottom: 12px; }
.feature .text p { color: var(--muted); }
.feature .text .shot { margin-top: 20px; }

pre {
  margin: 0;
  padding: 14px 16px;
  background: var(--chrome);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-x: auto;
  line-height: 1.5;
}
pre.aside { margin-bottom: 8px; }
:not(pre) > code { background: var(--chrome); border: 1px solid var(--border); border-radius: 5px; padding: 0.08em 0.35em; }

.wide { text-align: center; }

/* Cards */

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.cards li, .ways > li {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
}
.cards h3, .ways h3 { font-size: 1.08rem; margin-bottom: 8px; }
.cards p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.more .section-title { margin-bottom: 36px; }

/* Agents */

.chips { list-style: none; margin: 0 auto 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 820px; }
.chips li { padding: 5px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--raised); font-size: 0.93rem; }

.table-scroll { overflow-x: auto; max-width: 760px; margin: 0 auto 16px; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { padding: 10px 14px; text-align: center; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
thead th { color: var(--muted); font-weight: 600; font-size: 0.85rem; background: var(--chrome); }
th[scope="row"], thead th:first-child { text-align: left; }
td { color: var(--muted); }
.agents .small { text-align: center; max-width: 44em; margin-inline: auto; }

/* Install */

.ways { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: way; }
.ways > li { counter-increment: way; }
.ways h3::before { content: counter(way) ". "; color: var(--brass-text); }
.ways .small { margin: 12px 0 0; }
.code { position: relative; }
.copy {
  position: absolute; top: 6px; right: 6px;
  font: 600 0.75rem var(--sans);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--raised);
  color: var(--foreground);
  cursor: pointer;
}
.copy:hover { border-color: var(--brass-deep); }
.code:has(.copy) pre { padding-top: 40px; }

.releases { text-align: center; }
.releases .section-title { margin-bottom: 18px; }

/* Footer */

footer { padding: 48px 0 64px; }
.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin: 4px 0; font-size: 0.93rem; }
footer .small { margin-top: 10px; }

/* Narrow screens */

@media (max-width: 860px) {
  section { padding: 52px 0; }
  .hero { padding-top: 48px; }
  .feature, .feature:has(> .text + .text) { grid-template-columns: 1fr; gap: 24px; padding: 32px 0; }
  .feature.flip > .text { order: 0; }
  .ways { grid-template-columns: 1fr; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .quotes { grid-template-columns: 1fr; }
  .top nav { gap: 14px; }
  .top nav a[href="#features"] { display: none; }
  .actions .button { width: 100%; }
  th, td { padding: 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
  .button:hover { transform: none; }
}
