/* echo landing. One accent (Ember), one radius scale (8px controls, 12px surfaces), dark/light by system. */
@font-face { font-family: "Geist"; src: url("/assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0c0d0f; --surface: #121316; --surface-2: #181a1e; --line: #23252a; --line-2: #34373d;
  --fg: #e8e9eb; --fg-2: #b9bdc3; --muted: #8b9098;
  --accent: #f5a94e; --on-accent: #1f1405; --accent-soft: rgb(245 169 78 / .12);
  --shadow: 0 30px 80px -30px rgb(0 0 0 / .7);
  --r: 8px; --r-lg: 12px;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5f6; --surface: #fbfbfc; --surface-2: #eceef0; --line: #e2e4e8; --line-2: #cfd2d8;
    --fg: #16181c; --fg-2: #3f444c; --muted: #5d636d;
    --accent: #b5660a; --on-accent: #ffffff; --accent-soft: rgb(181 102 10 / .1);
    --shadow: 0 30px 80px -34px rgb(40 50 70 / .35);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
code, kbd, pre { font-family: var(--mono); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.wrap { width: min(1240px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: var(--r); z-index: 100; }
.skip:focus { left: 8px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav-row { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 1.125rem; letter-spacing: -.02em; }
.nav nav { margin-left: auto; display: flex; gap: 4px; }
.nav nav a { color: var(--fg-2); text-decoration: none; font-size: .9375rem; padding: 8px 12px; border-radius: var(--r); white-space: nowrap; transition: color .2s, background-color .2s; }
.nav nav a:hover { color: var(--fg); background: var(--surface-2); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: var(--r); font: 600 .9375rem/1 var(--sans); text-decoration: none; white-space: nowrap; border: 1px solid transparent; cursor: pointer; transition: transform .2s cubic-bezier(.16, 1, .3, 1), background-color .2s, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 38px; padding: 0 16px; }

/* hero */
.hero-clip { overflow: clip; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; padding-block: 56px 72px; align-items: center; }
.hero-copy { max-width: 600px; position: relative; z-index: 1; }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -.045em; line-height: 1.02; }
.lede { margin-top: 24px; font-size: 1.1875rem; color: var(--fg-2); max-width: 44ch; }
.cta-row { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-shot { margin: 0; }
.hero-shot img { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); background: var(--surface); }

/* sections */
.section { padding-block: 88px; border-top: 1px solid var(--line); }
.section h2 { font-size: clamp(1.875rem, 3.6vw, 3rem); max-width: 18ch; }
.sub { margin-top: 16px; color: var(--fg-2); font-size: 1.125rem; max-width: 52ch; }
.eyebrow { margin-bottom: 16px; font: 500 .75rem/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }

kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--fg); font-size: .9375rem; font-weight: 500; }
kbd.inline { min-width: 0; height: auto; padding: 1px 6px; font-size: .8125rem; border-bottom-width: 1px; vertical-align: 1px; }

/* workflow */
.keys { list-style: none; margin: 48px 0 0; padding: 0; display: grid; gap: 0; }
.keys li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding: 28px 0; align-items: start; }
.keys li + li { border-top: 1px solid var(--line); }
.keycaps { display: flex; gap: 6px; padding-top: 2px; }
.keys h3 { font-size: 1.375rem; letter-spacing: -.025em; }
.keys p { margin-top: 8px; color: var(--fg-2); max-width: 60ch; }

/* bento: 5 items, 6-col grid (4+2, 2+2+2) */
.bento { margin-top: 48px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cell { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); padding: 28px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; }
.cell h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.cell p { color: var(--fg-2); font-size: .96875rem; max-width: 46ch; }
.cell-trace { grid-column: span 4; }
.cell-hunks { grid-column: span 2; }
.cell-drawer, .cell-themes, .cell-place { grid-column: span 2; }
.cell-trace picture, .cell-hunks picture { margin-top: auto; padding-top: 16px; }
.cell-trace img, .cell-hunks img { border: 1px solid var(--line-2); border-radius: var(--r); width: 100%; }
.cell-hunks img { max-height: 190px; object-fit: cover; object-position: left top; }
.cell-drawer { background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--surface); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.cell-place { background-image: radial-gradient(var(--line-2) 1px, transparent 1px); background-size: 16px 16px; background-color: var(--surface); }
.swatches { list-style: none; margin: auto 0 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sw span { display: block; aspect-ratio: 4 / 3; border-radius: var(--r); border: 1px solid var(--line-2); position: relative; overflow: hidden; transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.sw span::after { content: ""; position: absolute; left: 14%; right: 38%; bottom: 22%; height: 4px; border-radius: 2px; background: var(--a); }
.sw span::before { content: ""; position: absolute; left: 14%; right: 55%; top: 22%; height: 4px; border-radius: 2px; background: var(--f); opacity: .7; }
.sw span { background: var(--b); }
.sw:hover span { transform: translateY(-2px); }
.sw-ink { --b: #0c0d0f; --f: #e8e9eb; --a: #f5a94e; }
.sw-paper { --b: #f4f5f6; --f: #16181c; --a: #b5660a; }
.sw-tokyo { --b: #1a1b26; --f: #c0caf5; --a: #7aa2f7; }
.sw-nord { --b: #2e3440; --f: #eceff4; --a: #88c0d0; }
.sw-gruv { --b: #282828; --f: #ebdbb2; --a: #fabd2f; }
.sw-mocha { --b: #1e1e2e; --f: #cdd6f4; --a: #cba6f7; }
.sw-owl { --b: #011627; --f: #d6deeb; --a: #82aaff; }
.sw-rose { --b: #191724; --f: #e0def4; --a: #ebbcba; }

/* performance */
.metrics { margin: 48px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.metrics > div { padding: 8px 24px 8px 0; }
.metrics > div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.metrics dt { color: var(--muted); font-size: .875rem; }
.metrics dd { margin: 12px 0 0; font-family: var(--mono); font-weight: 500; font-size: clamp(2.5rem, 4.4vw, 3.75rem); letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.metrics small { font-size: .3em; letter-spacing: 0; margin-left: 6px; color: var(--accent); font-weight: 500; }
.method { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.method pre { margin: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; font-size: .8125rem; line-height: 1.75; color: var(--fg); }
.method .c { color: var(--muted); }
.method > p { color: var(--fg-2); max-width: 46ch; }

/* local */
.facts { margin: 48px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.facts > div { border-top: 1px solid var(--line-2); padding-top: 20px; }
.facts dt { font-weight: 600; font-size: 1.0625rem; letter-spacing: -.015em; }
.facts dd { margin: 8px 0 0; color: var(--fg-2); font-size: .96875rem; }

/* install */
.install { margin-top: 32px; max-width: 820px; }
.tabs { display: flex; gap: 4px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { height: 38px; padding: 0 14px; border-radius: var(--r); border: 1px solid transparent; background: transparent; color: var(--fg-2); font: 500 .9375rem var(--sans); cursor: pointer; transition: background-color .2s, color .2s; }
.tabs button:hover { background: var(--surface-2); color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--surface-2); color: var(--fg); border-color: var(--line-2); }
.panel { position: relative; }
.panel[hidden] { display: none; }
.panel pre { margin: 0; padding: 20px 96px 20px 20px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); overflow-x: auto; font-size: .875rem; line-height: 1.5; }
.copy { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--fg); font: 500 .8125rem var(--sans); cursor: pointer; transition: background-color .2s, color .2s; }
.copy:hover { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.after { margin-top: 28px; color: var(--fg-2); }
.install.run { margin-top: 12px; }
.note { margin-top: 20px; color: var(--muted); font-size: .9375rem; max-width: 64ch; }
.note code, .faq code { font-size: .875em; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); color: var(--fg); }

/* faq */
.faq { margin-top: 40px; max-width: 820px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 1.125rem; font-weight: 500; letter-spacing: -.015em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.5rem var(--mono); color: var(--accent); transition: transform .25s cubic-bezier(.16, 1, .3, 1); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--fg-2); max-width: 64ch; }

/* footer */
.footer { border-top: 1px solid var(--line); padding-block: 40px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; }
.footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.footer nav a { color: var(--fg-2); text-decoration: none; }
.footer p a { color: var(--fg-2); text-decoration: underline; text-underline-offset: 3px; }
.footer nav a:hover, .footer p a:hover { color: var(--fg); }
.footer nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer p { margin-left: auto; color: var(--muted); font-size: .875rem; }

/* motion: entry + scroll reveal (opacity/transform only) */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .8s cubic-bezier(.16, 1, .3, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-shot { animation: rise 1s .2s cubic-bezier(.16, 1, .3, 1) both; }
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s cubic-bezier(.16, 1, .3, 1), transform .8s cubic-bezier(.16, 1, .3, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
}

/* large screens: let the screenshot bleed past the container to the right */
@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 40px; padding-block: 48px 88px; }
  .hero-shot { width: min(1080px, 78vw); }
  .hero-shot img { width: 100%; max-width: none; }
}

@media (max-width: 1023px) {
  .nav nav a:not(:last-child) { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell-trace { grid-column: span 2; }
  .cell-hunks { grid-column: span 2; }
  .cell-drawer, .cell-themes { grid-column: span 1; }
  .cell-place { grid-column: span 2; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 0; }
  .metrics > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .method { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .section { padding-block: 64px; }
  .keys li { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .cell-trace, .cell-hunks, .cell-drawer, .cell-themes, .cell-place { grid-column: auto; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .metrics { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer p { margin-left: 0; }
  .nav-row { gap: 12px; }
}
