/* umacore.app's colors and type. content runs full width, the menu lives in a rail on the left
   like umacore's sidebar (a tab bar at the bottom on phones), never in a banner on top */
@font-face {
  font-family: "Geist";
  src: url("/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --canvas: #0a0a0f; --band: #0e0e15; --sidebar: #0d0d14; --surface: #101017; --surface-2: #16161e; --surface-3: #1d1d27;
  --line: rgb(255 255 255 / 6%); --line-strong: rgb(255 255 255 / 11%);
  --fg: #f4f4f5; --fg-soft: #d4d4d8; --fg-muted: #a1a1aa; --fg-subtle: #80808c;
  --brand: #8db3ef; --brand-solid: #4772b3; --brand-hover: #5280c4;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --rail: 300px;
  --pad: clamp(24px, 4.5vw, 88px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--canvas); color: var(--fg-soft);
  font: 16px/1.65 "Geist", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: #b3cdf5; }
p { margin: 0 0 12px; }
h1, h2, h3 { color: var(--fg); margin: 0; letter-spacing: -.02em; line-height: 1.12; }
code, kbd { font-family: var(--mono); font-size: 13px; }
code { color: var(--fg-soft); background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
kbd { background: var(--surface-3); border: 1px solid var(--line-strong); border-bottom-width: 2px; padding: 0 6px; border-radius: 6px; color: var(--fg); }
.wrap { padding: 0 var(--pad); }

/* --- shell: left rail + content ------------------------------------------------------------ */

.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.main { grid-column: 2; grid-row: 1; min-width: 0; }

.rail {
  grid-column: 1; grid-row: 1; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 1px solid var(--line); padding: 20px 18px 16px;
}
.rail-in { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--fg); padding: 0 6px; }
.brand:hover { color: var(--fg); }
.mark { width: 48px; height: 48px; flex: none; }
.brand b { display: block; font-size: 18px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; }
.brand small { display: block; font-size: 12px; color: var(--fg-subtle); }

.menu { display: grid; gap: 2px; }
.menu a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px;
  border-radius: 10px; color: var(--fg-muted); font-size: 15px; border: 1px solid transparent; transition: background-color .15s, color .15s;
}
.menu a:hover { background: var(--surface-2); color: var(--fg); }
.menu a[aria-current=page] { background: var(--surface-2); border-color: var(--line-strong); color: var(--fg); }
.pi { width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.menu a[aria-current=page] .pi { background: var(--brand); }

.get { display: grid; gap: 8px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.get .btn { justify-content: center; }
.get small { color: var(--fg-subtle); font-size: 12px; text-align: center; }

.ext { display: grid; gap: 2px; }
.ext a { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; color: var(--fg-soft); transition: background-color .15s; }
.ext a:hover { background: var(--surface-2); color: var(--fg); }
.ext b { display: block; font-size: 14px; font-weight: 500; color: var(--fg); line-height: 1.3; }
.ext small { display: block; font-size: 12px; color: var(--fg-subtle); }
.logo { width: 34px; height: 34px; flex: none; position: relative; border-radius: 30%; background: var(--surface-2); border: 1px solid var(--line); }
.logo::after { content: ''; position: absolute; inset: 9px; background: var(--fg-soft); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
.i-gh { --i: url("/icons/github.svg"); } .i-dc { --i: url("/icons/discord.svg"); } .i-kf { --i: url("/icons/kofi.svg"); }
.rail-foot { margin: 0; padding: 12px 6px 0; border-top: 1px solid var(--line); font-size: 11px; color: var(--fg-subtle); }

.bottombar { display: none; }

/* --- buttons ------------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 10px;
  background: var(--brand-solid); color: #fff; font-weight: 600; font-size: 15px; transition: background-color .15s, transform .1s;
}
.btn:hover { background: var(--brand-hover); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line-strong); }
.btn.ghost:hover { background: var(--surface-3); }
.ver { font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--brand); }
.ver:empty { display: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* --- headings with kyun's faded echo above them ---------------------------------------------- */

.echo { position: relative; }
.echo::before, .echo::after { content: attr(data-echo); position: absolute; left: 0; right: 0; pointer-events: none; text-align: inherit; }
.echo::before { top: -.55em; opacity: .07; }
.echo::after { top: -1.1em; opacity: .03; }

/* --- home: hero ---------------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 40px; min-height: 100dvh; }
.hero .text { align-self: center; padding: 72px 0; }
.hero h1 { font-size: clamp(48px, 5.4vw, 104px); font-weight: 700; letter-spacing: -.045em; white-space: nowrap; }
.hero .sub { margin: 8px 0 26px; color: var(--fg-subtle); font-size: clamp(18px, 1.4vw, 24px); }
.hero p { max-width: 54ch; color: var(--fg-muted); font-size: clamp(16px, 1.05vw, 18px); }
.hero p.strong { color: var(--fg-soft); }
.hero .cut { position: relative; align-self: end; height: min(1000px, calc(100dvh - 24px)); margin-right: clamp(0px, 3vw, 60px); }
.hero .cut video, .hero .cut img { height: 100%; width: auto; }
.hero .cut::before { content: ''; position: absolute; inset: 15% -30% 0; z-index: -1; background: radial-gradient(closest-side, rgb(71 114 179 / 24%), transparent); }

.stats { display: grid; grid-template-columns: repeat(2, max-content); gap: 18px 0; margin: 44px 0 0; padding: 0; list-style: none; }
@media (min-width: 1600px) { .stats { grid-template-columns: repeat(4, max-content); } }
.stats li { padding: 2px 26px 2px 16px; border-left: 2px solid var(--line-strong); color: var(--fg-subtle); font-size: 13px; line-height: 1.4; }
.stats b { display: block; color: var(--fg); font-size: clamp(22px, 1.8vw, 30px); font-weight: 650; letter-spacing: -.02em; }

/* --- home: bands --------------------------------------------------------------------------- */

.band { position: relative; padding: clamp(80px, 9vw, 150px) 0; }
.band.alt { background: var(--band); }
.band::before {   /* pixel dither seam, a nod to kyun's band edges */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 12px;
  background: repeating-conic-gradient(rgb(255 255 255 / 5%) 0 25%, transparent 0 50%) 0 0 / 4px 4px;
  -webkit-mask: linear-gradient(#000, transparent); mask: linear-gradient(#000, transparent);
}
.band h2 { font-size: clamp(32px, 3.2vw, 56px); font-weight: 650; margin-bottom: 18px; }
.band p { color: var(--fg-muted); max-width: 56ch; font-size: clamp(16px, 1.05vw, 18px); }
.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 100px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.split.flip > :first-child { order: 2; }
.shot { width: 100%; border-radius: 16px; border: 1px solid var(--line-strong); box-shadow: 0 40px 90px -40px rgb(0 0 4 / 95%); }
.center { text-align: center; }
.center p { margin-left: auto; margin-right: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.chips li { padding: 5px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--fg-soft); font-size: 14px; }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3vw; align-items: end; margin: 56px auto 0; max-width: 1400px; }
.trio figure { margin: 0; text-align: center; }
.trio img { width: auto; max-height: min(720px, 70vh); margin: 0 auto; }
.trio figcaption { margin-top: 14px; font-size: 14px; color: var(--fg-subtle); }

.face { width: 100%; max-width: 640px; justify-self: center; border-radius: 50%; background: radial-gradient(closest-side, rgb(71 114 179 / 18%), transparent); }

.points { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 36px; margin: 44px auto 0; max-width: 1400px; text-align: left; padding: 0; list-style: none; }
.points li { padding-left: 16px; border-left: 2px solid var(--line-strong); color: var(--fg-muted); font-size: 15px; }
.points b { display: block; color: var(--fg); font-weight: 500; font-size: 16px; }

.compare { margin: 40px 0 26px; overflow-x: auto; }
.compare table { width: 100%; max-width: 1400px; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.compare th, .compare td { text-align: left; vertical-align: top; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.compare thead th { padding-top: 14px; color: var(--fg-subtle); font-size: 13px; font-weight: 500; border-bottom-color: var(--line-strong); }
.compare thead th.us { color: var(--brand); }
.compare tbody th { width: 17%; color: var(--fg); font-weight: 500; }
.compare td { width: 41.5%; color: var(--fg-subtle); }
.compare td.us { color: var(--fg-soft); background: rgb(71 114 179 / 6%); }
.compare thead th.us { background: rgb(71 114 179 / 6%); border-radius: 12px 12px 0 0; }
.compare tbody tr:last-child td.us { border-radius: 0 0 12px 12px; }
.aside { color: var(--fg-subtle) !important; font-size: 15px !important; max-width: 90ch !important; }

.cta h2 { font-size: clamp(36px, 3.8vw, 64px); }
.cta .actions { justify-content: center; }

/* --- inner pages ----------------------------------------------------------------------------- */

.page { padding: clamp(56px, 7vw, 110px) 0 100px; }
.page > .wrap > h1 { font-size: clamp(40px, 4vw, 64px); font-weight: 700; margin-bottom: 10px; }
.page .lead { color: var(--fg-muted); font-size: 18px; max-width: 64ch; margin-bottom: 48px; }
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(40px, 5vw, 96px); }
.toc { position: sticky; top: 32px; align-self: start; display: grid; gap: 2px; font-size: 15px; }
.toc a { color: var(--fg-muted); padding: 6px 12px; border-radius: 8px; }
.toc a:hover { color: var(--fg); background: var(--surface-2); }
.toc a.on { color: var(--fg); background: var(--surface-2); }
.doc section { padding-bottom: 52px; margin-bottom: 52px; border-bottom: 1px solid var(--line); scroll-margin-top: 32px; }
.doc section:last-child { border-bottom: 0; margin-bottom: 0; }
.doc h2 { font-size: 28px; font-weight: 650; margin-bottom: 14px; }
.doc p, .doc li { color: var(--fg-muted); max-width: 78ch; }
.doc ol, .doc ul { padding-left: 22px; margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc li b, .doc p b { color: var(--fg-soft); font-weight: 500; }
.doc .shot { margin: 24px 0 8px; max-width: 1400px; }
.rows { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 10px 22px; margin: 6px 0 16px; max-width: 980px; }
.rows dt { color: var(--fg-subtle); }
.rows dd { margin: 0; color: var(--fg-muted); }
.note { padding: 14px 16px; border-radius: 12px; background: rgb(71 114 179 / 8%); border: 1px solid rgb(71 114 179 / 18%); color: var(--fg-muted); font-size: 15px; max-width: 78ch; }

.dl-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 5vw, 96px); align-items: start; }
.release { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 30px 32px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-strong); margin-bottom: 52px; }
.release h2 { font-size: 24px; margin-bottom: 4px; }
.release p { margin: 0; color: var(--fg-subtle); font-size: 14px; }

.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(40px, 5vw, 96px); align-items: start; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative; color: var(--fg); font-weight: 500; font-size: 17px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; color: var(--fg-subtle); font-size: 22px; font-weight: 300; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--fg-muted); margin: 0 0 18px; }

/* --- footer ---------------------------------------------------------------------------------- */

.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; border-top: 1px solid var(--line); padding: 28px var(--pad) 36px; color: var(--fg-subtle); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot nav a { color: var(--fg-muted); }
.foot nav a:hover { color: var(--fg); }
.foot .social { display: none; }
.foot p { margin: 0; }
.foot p:first-of-type { margin-left: auto; }

/* --- load-in ----------------------------------------------------------------------------------- */

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade { opacity: 0; animation: fadeUp .3s ease forwards; }
.d1 { animation-delay: 60ms; } .d2 { animation-delay: 140ms; } .d3 { animation-delay: 220ms; }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; opacity: 1; } }

/* --- in between: narrower rail ------------------------------------------------------------------ */

@media (max-width: 1400px) {
  :root { --rail: 264px; }
  .points { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- tablets and phones: no rail, a tab bar at the bottom ------------------------------------------ */

@media (max-width: 1099px) {
  .shell { grid-template-columns: 1fr; }
  .main { grid-column: 1; }
  .rail { display: none; }
  body { padding-bottom: 64px; }
  .bottombar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgb(13 13 20 / 92%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--line-strong); padding-bottom: env(safe-area-inset-bottom);
  }
  .bottombar a { display: grid; justify-items: center; gap: 2px; padding: 9px 0 8px; color: var(--fg-muted); font-size: 12px; }
  .bottombar a[aria-current=page] { color: var(--fg); }
  .bottombar a[aria-current=page] .pi { background: var(--brand); }
  .bottombar .pi { width: 20px; height: 20px; }
  .foot .social { display: flex; gap: 10px; }
  .foot .social a { width: 36px; height: 36px; border-radius: 30%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); }
  .foot .social i { width: 16px; height: 16px; background: var(--fg-soft); -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }
  .foot p:first-of-type { margin-left: 0; }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .hero .text { padding: 48px 0 8px; }
  .hero h1 { white-space: normal; }
  .hero .cut { height: 460px; justify-self: center; margin: 0; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 52px; }
  .split.flip > :first-child { order: 0; }
  .trio img { max-height: 300px; }
  .points { grid-template-columns: 1fr; }
  .compare thead { display: none; }
  .compare table, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .compare tbody th, .compare td { border: 0; padding: 6px 0; width: auto; }
  .compare td.us { padding: 10px 12px; border-radius: 10px; }
  .compare td::before { display: block; font-size: 12px; color: var(--fg-subtle); }
  .compare td.us::before { content: 'UmaStudio'; color: var(--brand); }
  .compare td:not(.us)::before { content: 'UmaViewer'; }
  .docs { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .rows { grid-template-columns: 120px minmax(0, 1fr); }
  .dl-grid, .faq { grid-template-columns: 1fr; }
  .release { grid-template-columns: 1fr; }
}
