/* halay.app: plain CSS, system fonts, no external resources. */
:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --surface: #ffffff;
  --ink: #0e0e11;
  --muted: #55555d;
  --line: #dcdce1;
  --lime: #c9f53f;
  --on-lime: #0e0e11;
  --focus: #0e0e11;
  --term-bg: #0e0e11;
  --term-ink: #f4f4f5;
  --term-dim: #8e8e98;
  --shadow: 0 1px 2px rgb(0 0 0 / .05), 0 18px 40px -18px rgb(0 0 0 / .25);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0e;
    --surface: #131317;
    --ink: #f4f4f5;
    --muted: #a1a1ab;
    --line: #27272d;
    --lime: #d2ff4d;
    --focus: #d2ff4d;
    --term-bg: #000000;
    --shadow: 0 1px 2px rgb(0 0 0 / .5), 0 18px 40px -18px rgb(0 0 0 / .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: .22em; }
@media (hover: hover) { a:hover { background: var(--lime); color: var(--on-lime); text-decoration-color: transparent; } }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
code, pre { font-family: var(--mono); }
:not(pre) > code { font-size: .86em; padding: .1em .35em; border-radius: 4px; background: color-mix(in srgb, var(--ink) 8%, transparent); }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }
ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 100; background: var(--ink); color: var(--bg); padding: .6rem 1rem; }
.skip:focus { left: .5rem; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.03em; }
.brand:hover { background: none; color: inherit; }
.brand img { display: block; border-radius: 7px; }
.nav { display: flex; gap: 1.6rem; font-size: .93rem; font-weight: 500; }
.nav a { text-decoration: none; padding: .3rem .15rem; }
.nav-gh { font-weight: 700; }
@media (max-width: 720px) { .nav a:not(.nav-gh) { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0 1.3rem; border-radius: 6px; font-weight: 700; font-size: .98rem; text-decoration: none; border: 2px solid var(--ink); transition: transform .1s; }
.btn-primary { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.btn-ghost { background: transparent; color: var(--ink); }
@media (hover: hover) {
  .btn:hover { transform: translate(-1px, -1px); }
  .btn-primary:hover { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
  .btn-ghost:hover { background: var(--ink); color: var(--bg); box-shadow: none; }
}
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 0; }

/* hero */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }
h1 { font-size: clamp(3.4rem, 12.5vw, 9.5rem); font-weight: 800; letter-spacing: -.06em; line-height: 1.02; margin: 0 0 clamp(1.8rem, 4vw, 3rem) -.04em; }
.mark { background: var(--lime); color: var(--on-lime); padding: 0 .06em; border-radius: .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.5; margin: 0; max-width: 34em; }
.hero-note { margin: .9rem 0 0; font-size: .9rem; color: var(--muted); }
.hero-install .cta-row { margin-top: 1.2rem; }

.install { display: flex; align-items: center; gap: .8rem; max-width: 30rem; background: var(--term-bg); color: var(--term-ink); border-radius: 8px; padding: .5rem .5rem .5rem 1.1rem; border: 1px solid color-mix(in srgb, var(--term-ink) 18%, transparent); }
.install code.multi { white-space: pre; line-height: 1.6; }
.install .ln::before { content: "$ "; color: var(--lime); font-weight: 700; user-select: none; }
.try { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .5rem; margin: .7rem 0 0; font-size: .9rem; color: var(--muted); }
.try code { font-size: .88rem; color: var(--ink); background: none; padding: 0; }
.step-note { margin: .8rem 0 0; font-size: .92rem; color: var(--muted); }
.install-prompt { font: 700 1rem var(--mono); color: var(--lime); user-select: none; }
.install code { background: none; color: inherit; text-align: left; flex: 1; min-width: 0; font-size: 1.05rem; overflow-x: auto; white-space: nowrap; scrollbar-width: none; padding: .4rem 0; }
.install code::-webkit-scrollbar { display: none; }
.copy { display: inline-flex; align-items: center; gap: .45rem; flex: none; min-height: 2.5rem; padding: 0 .85rem; border-radius: 5px; border: 1px solid color-mix(in srgb, var(--term-ink) 25%, transparent); background: transparent; color: var(--term-ink); font: 600 .85rem var(--sans); cursor: pointer; }
.copy:hover { background: var(--lime); color: #0e0e11; border-color: var(--lime); }
.copy .i-ok { display: none; }
.copy.copied { background: var(--lime); color: #0e0e11; border-color: var(--lime); }
.copy.copied .i-ok { display: block; }
.copy.copied .i-copy { display: none; }
.copy-mini { min-height: 1.9rem; padding: 0 .5rem; font-size: .78rem; border-color: var(--muted); color: var(--ink); }
.copy-mini .i-copy, .copy-mini .i-ok { width: 15px; height: 15px; }
.copy-mini:hover, .copy-mini.copied { color: #0e0e11; }
.install :focus-visible { outline-color: var(--lime); }

/* screenshots: real image if present, styled placeholder otherwise */
.shot { margin: 0; }
.window { display: flex; align-items: center; gap: .4rem; padding: .6rem .9rem; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
.window i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--line); }
.window span { margin-left: .6rem; font: 500 .75rem var(--mono); color: var(--muted); }
.shot-frame { border: 1px solid var(--line); border-radius: 0 0 10px 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.shot-img { display: block; width: 100%; height: auto; }
.shot-missing { display: none; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; padding: 1.5rem; color: var(--muted); font-size: .9rem; background: repeating-linear-gradient(135deg, transparent 0 12px, color-mix(in srgb, var(--ink) 6%, transparent) 12px 13px), var(--surface); }
.shot-missing strong { color: var(--ink); }
.shot-missing span { font: .8rem var(--mono); }
.shot:not(.is-missing) .window { display: none; }
.shot:not(.is-missing) .shot-frame { border: 0; box-shadow: none; background: none; border-radius: 0; overflow: visible; }
.shot.is-missing .shot-img, .shot.is-missing picture { display: none; }
.shot.is-missing .shot-missing { display: flex; aspect-ratio: 16 / 10; outline: 2px dashed var(--line); outline-offset: -12px; }
.sec .shot.is-missing .shot-missing { aspect-ratio: 7 / 4; }
.shot-phone { max-width: 340px; width: 100%; justify-self: end; }
.shot-phone.is-missing .shot-frame { border-radius: 34px; border: 7px solid var(--ink); }
.shot-phone.is-missing .shot-missing { aspect-ratio: 1 / 2; outline-offset: -10px; }

/* sections: gutter + body */
.sec { border-top: 1px solid var(--line); padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.sec-grid { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem clamp(1.5rem, 5vw, 4rem); }
.sec h2 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; align-self: start; position: sticky; top: 5rem; display: flex; gap: .7rem; align-items: baseline; }
.sn { font: 500 .8rem var(--mono); color: var(--muted); }
.sec-body { max-width: 52rem; min-width: 0; }
.sec-body > p, .sec-body > .phone-row p { color: var(--muted); }
.statement { font-size: clamp(1.55rem, 3.4vw, 2.4rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; color: var(--ink) !important; margin-bottom: 1.2rem !important; }
.more { margin-top: 1.6rem; font-size: .95rem; }

.facts { margin: 2rem 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 500 .85rem var(--mono); color: var(--muted); padding-top: .15rem; }
.facts dd { margin: 0; }

#features .gallery { margin-bottom: 2.5rem; }
.index { border-top: 2px solid var(--ink); }
.index li { display: grid; grid-template-columns: 2.6rem 12.5rem minmax(0, 1fr); gap: .5rem 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.index .n { font: 500 .8rem var(--mono); color: var(--muted); }
.index h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.01em; }
.index p { margin: 0; color: var(--muted); font-size: .98rem; }
.index code { color: var(--ink); }

.phone-row { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; align-items: center; max-width: none; }
.dashes { display: grid; gap: .8rem; margin-top: 1.2rem; }
.dashes li { position: relative; padding-left: 1.6rem; color: var(--muted); }
.dashes li::before { content: ""; position: absolute; left: 0; top: .78em; width: .9rem; height: 3px; background: var(--ink); }
.dashes strong { color: var(--ink); }

.steps { display: grid; gap: 0; border-top: 2px solid var(--ink); }
.steps li { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1.2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.num { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; background: var(--lime); color: var(--on-lime); font: 700 1.1rem var(--mono); border-radius: 4px; }
.steps h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.02em; margin-bottom: .4rem; }
.steps p { margin: 0; color: var(--muted); }
.mini { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 6px; background: var(--term-bg); color: var(--term-ink); overflow-x: auto; font-size: .95rem; width: fit-content; max-width: 100%; }
.mini code { background: none; padding: 0; color: inherit; }
.mini code::before { content: "$ "; color: var(--lime); }

.agents { width: 100%; border-collapse: collapse; margin-top: 1.6rem; border-top: 2px solid var(--ink); font-size: .98rem; }
.agents th, .agents td { text-align: left; padding: 1rem 1rem 1rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.agents thead th { font: 500 .8rem var(--mono); color: var(--muted); padding-block: .7rem; }
.agents tbody th { font-size: 1.05rem; font-weight: 700; white-space: nowrap; }
.agents td { color: var(--muted); }
.tag { display: inline-block; padding: .15rem .6rem; border-radius: 4px; background: var(--lime); color: var(--on-lime); font: 700 .75rem/1.5 var(--mono); }
.tag-warn { background: transparent; color: var(--muted); border: 1px dashed var(--muted); }

.callout { margin: 2rem 0 0 !important; padding: 1.1rem 1.3rem; border: 2px solid var(--ink); border-radius: 6px; color: var(--ink) !important; background: color-mix(in srgb, var(--lime) 22%, transparent); }

.chain { display: block; width: min(100%, 520px); height: auto; margin-bottom: 1.6rem; color: var(--ink); }
.chain circle { fill: var(--ink); }
.chain .lead { fill: var(--lime); stroke: var(--ink); stroke-width: 2; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 1.5rem; font-size: .95rem; overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 10rem 14rem minmax(0, 1fr); gap: 2rem; }
.foot-h { font-size: .8rem; font-weight: 500; font-family: var(--mono); color: var(--muted); margin-bottom: .9rem; }
.foot-grid li { margin-bottom: .45rem; }
.fine { margin: 0; font-size: .8rem; color: var(--muted); max-width: 40rem; }
.wordmark { margin: 2.5rem 0 0; font-size: clamp(5rem, 33vw, 23rem); font-weight: 800; letter-spacing: -.07em; line-height: 1.05; color: var(--ink); user-select: none; white-space: nowrap; margin-left: -.04em; }

.notfound { min-height: 55vh; display: grid; align-items: center; padding: 4rem 0; }
.notfound h1 { font-size: clamp(5rem, 20vw, 12rem); margin-bottom: 1rem; }

/* responsive */
@media (max-width: 900px) {
  .sec-grid { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .sec h2 { position: static; }
  .hero-row { grid-template-columns: 1fr; }
  .phone-row { grid-template-columns: 1fr; }
  .shot-phone { justify-self: start; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .fine { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .index li { grid-template-columns: 2.2rem 1fr; }
  .index p { grid-column: 2; }
  .facts div { grid-template-columns: 1fr; gap: .1rem; }
  .agents thead { display: none; }
  .agents, .agents tbody, .agents tr, .agents th, .agents td { display: block; }
  .agents tr { padding: 1rem 0; border-bottom: 1px solid var(--line); }
  .agents th, .agents td { border: 0; padding: 0 0 .4rem; }
  .copy .copy-label { display: none; }
  .install { gap: .5rem; padding-left: .85rem; }
  .install code { font-size: .9rem; }
  .btn { flex: 1 1 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* gallery: native scroll-snap, arrows and dots are added by main.js */
.gallery { position: relative; }
.g-track { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.g-track::-webkit-scrollbar { display: none; }
.g-track:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.g-slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.g-slide .shot { margin: 0; }
.g-slide figcaption { margin-top: .25rem; padding: 0 .25rem; color: var(--muted); font-size: .95rem; line-height: 1.5; max-width: 52ch; }
.g-slide figcaption strong { color: var(--ink); font-weight: 600; margin-right: .35rem; }
.g-nav { display: flex; align-items: center; justify-content: center; gap: .9rem; margin-top: 1rem; }
.g-nav[hidden] { display: none; }
.g-btn { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; padding: 0; }
.g-btn:focus-visible, .g-dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.g-btn[disabled] { opacity: .35; cursor: default; }
.g-dots { display: flex; gap: .15rem; }
.g-dot { width: 1.5rem; height: 1.5rem; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.g-dot::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--line); transition: background .15s, transform .15s; }
.g-dot[aria-current="true"]::before { background: var(--ink); transform: scale(1.25); }
@media (hover: hover) { .g-btn:not([disabled]):hover { background: var(--ink); color: var(--bg); } }
@media (prefers-reduced-motion: no-preference) { .g-track { scroll-behavior: smooth; } }

/* phone-sized captures replace the desktop ones on narrow screens so the text stays readable */
.g-slide .shot-m { display: none; }
@media (max-width: 640px) {
  .g-slide .shot-d { display: none; }
  .g-slide .shot-m { display: block; width: min(100%, 300px); margin: 0 auto; }
  .g-slide figcaption { text-align: center; margin-left: auto; margin-right: auto; }
}
