@font-face { font-family: "Martian Mono"; src: url(fonts/martian-mono.woff2) format("woff2"); font-weight: 400 800; font-stretch: 75% 112.5%; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0c0d0f;
  --dot: #1c1f24;
  --glow: rgb(245 165 36 / .07);
  --surface: #111316;
  --surface-2: #16191d;
  --tab: #20242a;
  --line: #22262c;
  --line-2: #343941;
  --text: #e4e6ea;
  --text-2: #a9aeb7;
  --muted: #7f858f;
  --amber: #f5a524;
  --amber-text: #f7b84e;
  --owl-line: #e4e6ea;
  --shot: brightness(.92);

  --display: "Martian Mono", ui-monospace, monospace;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --row: 30px;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='square'%3E%3Cpath d='M5 11 11 5M6 5h5v5'/%3E%3C/svg%3E");
}

:root[data-theme="day"] {
  color-scheme: light;
  --bg: #f4f4f2;
  --dot: #d9dad6;
  --glow: rgb(245 165 36 / .14);
  --surface: #ffffff;
  --surface-2: #ececea;
  --tab: #ffffff;
  --line: #dfdfdb;
  --line-2: #c6c7c2;
  --text: #16181b;
  --text-2: #454a52;
  --muted: #676c75;
  --amber-text: #985a00;
  --owl-line: #16181b;
  --shot: none;
}

@media (pointer: coarse) { :root { --row: 36px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background-color: var(--bg);
  /* warm glow behind the tree, painted on the page itself so no box can clip it */
  background-image: radial-gradient(720px 480px at calc(50% + 300px) 340px, var(--glow), transparent 70%), radial-gradient(circle at 1px 1px, var(--dot) 1px, transparent 0);
  background-size: auto, 24px 24px;
  background-repeat: no-repeat, repeat;
  color: var(--text);
  font: 400 .9375rem/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.skip { position: absolute; left: 16px; top: -48px; z-index: 10; padding: 8px 14px; background: var(--amber); color: #0c0d0f; border-radius: 6px; font-weight: 600; }
.skip:focus { top: 12px; }
.ico-arrow { display: inline-block; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; }

/* ── owl (line art, see dev/brand/owl.mjs) ─────────
   drawn with the same 2px line as the tree at every size */
.owl { display: block; overflow: visible; }
.owl :is(.owl-body, .owl-ring, .owl-branch, .owl-wings, .owl-feet, .owl-lids) { stroke-width: 2px; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.owl-body, .owl-ring { fill: var(--bg); stroke: var(--owl-line); }
.owl-branch { fill: none; stroke: var(--text-2); }
.owl-wings { fill: none; stroke: var(--muted); stroke-width: 1.5px !important; }
.owl-iris, .owl-beak { fill: var(--amber); }
.owl-pupils { fill: #0c0d0f; transform: translate(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px)); transition: transform .25s ease-out; }
.owl-feet, .owl-lids { fill: none; stroke: var(--amber); }
.owl-lids { display: none; }
/* blinks at night, sleeps through the day (and wakes up while hovered) */
.owl.blink .owl-eyes, [data-theme="day"] .owl:not(:hover) .owl-eyes { display: none; }
.owl.blink .owl-lids, [data-theme="day"] .owl:not(:hover) .owl-lids { display: inline; }

/* ── header ──────────────────────────────────────── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 700 1.05rem/1 var(--display); letter-spacing: -.02em; }
.brand .owl { width: 40px; height: 36px; }
.top nav { display: flex; align-items: center; gap: 2px; }
.top nav a { padding: 6px 10px; border-radius: 6px; color: var(--text-2); text-decoration: none; font-size: .875rem; }
.top nav a:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 640px) { .top nav a { display: none; } }
.theme-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 6px 12px 6px 9px;
  border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--text-2);
  font: 500 .8125rem/1 var(--mono); cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: square; }
.theme-toggle .sun, [data-theme="day"] .theme-toggle .moon { display: none; }
[data-theme="day"] .theme-toggle .sun { display: block; }

/* ── hero: one `tree` printout ──────────────────────
   root wordmark → trunk past the intro → (wide screens) a rail the three
   directories hang from, with the owl perched on it */
.hero {
  --trunk: 14px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  grid-template-areas: "cmd cmd" "root owl" "intro intro" "tree tree" "sum sum" "prompt prompt";
  padding: 32px 0 8px;
}
.hero-cmd { grid-area: cmd; margin-bottom: 14px; font-size: .8125rem; color: var(--muted); }
.hero-cmd b, .hero-prompt b, .cmd b { color: var(--amber-text); font-weight: 600; }
.hero-root { grid-area: root; font: 800 clamp(2rem, 9vw, 5rem)/1 var(--display); font-stretch: 112.5%; letter-spacing: -.035em; }
.hero-root b { color: var(--amber); font-weight: inherit; }
.hero-intro { grid-area: intro; margin-left: var(--trunk); padding: 18px 0 26px 30px; border-left: 2px solid var(--line-2); }
.lede { max-width: 48ch; margin-top: 6px; font-size: 1.0625rem; color: var(--text-2); text-wrap: pretty; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.socials a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface); color: var(--text-2); font-size: .8125rem; text-decoration: none; transition: color .15s, border-color .15s; }
.socials a:hover { color: var(--text); border-color: var(--amber); }
.socials svg { width: 15px; height: 15px; fill: currentColor; }

.hero-owl { grid-area: owl; position: relative; justify-self: end; }
.hero-owl .owl { width: 60px; height: 60px; }
/* narrow screens: a short branch from the wordmark to the owl's feet */
@media (max-width: 999px) {
  .hero-root { display: flex; align-items: flex-end; }
  .hero-root::after { content: ""; flex: 1; margin: 0 0 6px 12px; border-bottom: 2px solid var(--line-2); }
  .hero-owl { margin-bottom: 6px; padding-right: 4px; border-bottom: 2px solid var(--line-2); }
}
.zz { position: absolute; right: -4px; top: -10px; display: none; font: 700 .8125rem/1 var(--mono); color: var(--amber-text); }
.zz i { display: inline-block; font-style: normal; }
.zz i + i { font-size: .625rem; transform: translateY(-8px); }
[data-theme="day"] .hero-owl:not(:has(.owl:hover)) .zz { display: block; }
@media (prefers-reduced-motion: no-preference) { .zz i { animation: snore 2.8s ease-in-out infinite; } .zz i + i { animation-delay: .5s; } }
@keyframes snore { 0%, 100% { opacity: .3; translate: 0 2px; } 50% { opacity: 1; translate: 0 -2px; } }

.tree { grid-area: tree; container: tree / inline-size; font-size: .875rem; line-height: 1.2; }
.tree ul { margin: 0; padding: 0; list-style: none; }
.tree > ul { margin-left: var(--trunk); }
.tree li { position: relative; padding-left: 24px; }
.tree li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; border-left: 2px solid var(--line-2); }
.tree li:last-child::before { bottom: auto; height: calc(var(--row) / 2 + 1px); }
.tree li::after { content: ""; position: absolute; left: 0; top: calc(var(--row) / 2 - 1px); width: 16px; border-top: 2px solid var(--line-2); transition: border-color .15s; }
.tree li li { padding-left: 22px; }
.tree li ul { margin-left: 4px; }
.tree .row { display: flex; align-items: center; gap: 10px; min-height: var(--row); }
.tree .dir { color: var(--amber-text); font-weight: 700; text-decoration: none; }
.tree .dir:hover { text-decoration: underline; text-underline-offset: 3px; }
.leaf { margin-left: -6px; padding: 0 8px 0 6px; border-radius: 4px; text-decoration: none; transition: background-color .15s; }
.leaf .name { white-space: nowrap; }
.leaf .dots { flex: 1; min-width: 12px; border-bottom: 2px dotted var(--line-2); transform: translateY(4px); }
.leaf .hint { color: var(--muted); white-space: nowrap; }
.leaf .ico-arrow { width: 12px; height: 12px; opacity: 0; transition: opacity .15s; }
.leaf:hover, .leaf:focus-visible { background: color-mix(in oklab, var(--accent) 16%, transparent); }
.leaf:hover .ico-arrow, .leaf:focus-visible .ico-arrow { opacity: 1; }
.tree li:has(> .leaf:hover)::after, .tree li:has(> .leaf:focus-visible)::after { border-color: var(--accent); }
@container tree (max-width: 430px) { .leaf .dots, .leaf .hint { display: none; } .leaf { flex: 1; } .leaf .ico-arrow { margin-left: auto; } }

.tree-sum { grid-area: sum; margin-top: 18px; font-size: .8125rem; color: var(--muted); }
.hero-prompt { grid-area: prompt; display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .8125rem; }
.cursor { display: inline-block; width: .6em; height: 1.15em; background: var(--amber); }
@media (prefers-reduced-motion: no-preference) { .cursor { animation: blink 1.1s steps(1) infinite; } }
@keyframes blink { 50% { opacity: 0; } }

@media (min-width: 1000px) {
  .hero { grid-template-areas: "cmd cmd" "root root" "intro owl" "tree tree" "sum sum" "prompt prompt"; padding-top: 56px; }
  .hero-owl .owl { width: 150px; height: 150px; }
  .zz { top: -14px; font-size: 1rem; }
  .zz i + i { font-size: .75rem; }
  /* the trunk turns into a rail; each directory drops from it into its own column */
  .tree > ul { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 28px; border-top: 2px solid var(--line-2); }
  .tree > ul > li { padding-top: 20px; container: dir / inline-size; }
  .tree > ul > li::before, .tree > ul > li:last-child::before { bottom: auto; height: calc(20px + var(--row) / 2 + 1px); }
  .tree > ul > li::after { top: calc(20px + var(--row) / 2 - 1px); }
  .tree .leaf { font-size: .8125rem; }
}
@container dir (max-width: 300px) { .leaf .dots, .leaf .hint { display: none; } .leaf { flex: 1; } .leaf .ico-arrow { margin-left: auto; } }

/* ── sections ────────────────────────────────────── */
.section { padding-top: clamp(64px, 9vw, 112px); }
.section-head { display: grid; gap: 12px 48px; margin-bottom: 28px; align-items: end; }
@media (min-width: 860px) {
  .section-head { grid-template-columns: minmax(0, 1fr) auto; }
  .section-head .note { max-width: 68ch; text-align: right; }
}
.cmd { font-size: .8125rem; color: var(--muted); }
.section-head h2 { font: 700 clamp(1.6rem, 1rem + 2.4vw, 2.75rem)/1.1 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.section-head .prompt { color: var(--muted); font-weight: 500; }
.section-head .prompt b { color: var(--amber-text); font-weight: 700; }
.section-head .note { color: var(--text-2); text-wrap: pretty; }

.cards { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 310px), 1fr)); }
.cards--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); }

/* ── card ────────────────────────────────────────── */
.card > a {
  display: flex; flex-direction: column; height: 100%; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  text-decoration: none; transition: border-color .2s, box-shadow .25s, transform .25s;
}
.card > a:hover, .card > a:focus-visible {
  border-color: color-mix(in oklab, var(--accent) 60%, var(--line));
  box-shadow: 0 26px 48px -30px color-mix(in oklab, var(--accent) 70%, transparent);
  transform: translateY(-3px);
}
.frame { overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; }
.frame-bar { display: flex; align-items: flex-end; gap: 12px; height: 30px; padding: 0 10px; }
.frame-dots { display: flex; gap: 5px; align-self: center; }
.frame-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.frame-tab {
  display: flex; align-items: center; gap: 7px; min-width: 0; max-width: 78%; height: 23px; padding: 0 12px 0 9px;
  background: var(--tab); border-radius: 5px 5px 0 0; font: 400 .6875rem/1 system-ui, sans-serif; color: var(--text-2);
}
.frame-tab img { flex: none; width: 13px; height: 13px; }
.frame-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-shot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; filter: var(--shot); transition: transform .5s, filter .3s; }
.card > a:hover .frame-shot { transform: scale(1.015); filter: none; }

.card-body { display: flex; flex: 1; flex-direction: column; padding: 16px 8px 6px; }
.card h3 { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 700 1.125rem/1.25 var(--display); letter-spacing: -.02em; }
.card h3 .ico-arrow { color: var(--muted); transition: color .2s, transform .2s; }
.card > a:hover h3 .ico-arrow { color: var(--text); transform: translate(2px, -2px); }
.domain { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: .8125rem; color: var(--muted); }
.domain::before { content: ""; width: 7px; height: 7px; background: var(--accent); }
.tagline { margin-top: 6px; font-size: .875rem; color: var(--muted); }
.desc { margin-top: 12px; color: var(--text-2); font-size: .875rem; line-height: 1.65; text-wrap: pretty; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; padding: 16px 0 0; list-style: none; }
.tags li { padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 4px; font-size: .71875rem; line-height: 1.3; color: var(--muted); }
.tags li::before { content: "#"; color: var(--line-2); }

/* featured product */
.feature { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .feature > a { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: center; }
  .feature .card-body { padding: 24px 28px; }
}
.feature h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.status { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-bottom: 16px; padding: 4px 10px; border: 1px solid color-mix(in oklab, var(--accent) 55%, var(--line)); border-radius: 4px; font-size: .75rem; color: var(--text-2); }
.status::before { content: ""; width: 7px; height: 7px; background: var(--accent); }
.points { display: grid; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; color: var(--text-2); font-size: .875rem; }
.points li { display: flex; gap: 10px; }
.points li::before { content: "+"; color: var(--muted); }
.cta { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 22px; padding: 10px 16px; border-radius: 6px; background: var(--accent); color: #0c0d0f; font-weight: 700; font-size: .875rem; }

/* ── footer ──────────────────────────────────────── */
.foot { margin-top: clamp(80px, 10vw, 128px); padding: 28px 0 36px; border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: .8125rem; }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot .brand { color: var(--text); }
.foot a:not(.brand) { color: var(--text-2); text-underline-offset: 3px; }
