/* Syntaktika documentation. One stylesheet, no build step. Ink on white with the rose accent from the logo. */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --text: #2b2b2b;
  --muted: #5c5c5c;
  --faint: #8c8c8c;
  --tint: #fbe6ee;      /* a step darker than the page, for code, hovers and inputs */
  --line: #e8e6ea;

  --rose: #ff006f;       /* rgb(255, 0, 111), matches the hero animation */
  --blue: #6874b2;       /* logo blue */
  --rose-ink: #d1005b;   /* same hue, dark enough for text on white (5.4:1) */
  --rose-soft: #ffdbe9;  /* active menu items; darker than --tint so they stand out */
  --night: #14121a;      /* logo near-black */

  --sans: Aptos, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Aptos Mono", Consolas, "Cascadia Mono", ui-monospace, monospace;

  --measure: 700px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
/* White image backgrounds take the colour behind them; the hero animation keeps its own colours. */
main img { mix-blend-mode: multiply; }
main .hero-mark img { mix-blend-mode: normal; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rose); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--rose-ink); text-decoration-color: var(--rose-ink); }
::selection { background: var(--rose); color: #fff; }

h1, h2, h3 { color: var(--ink); font-weight: 600; line-height: 1.25; margin: 0 0 .45em; }
h1 { font-size: 2.1rem; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: 1.45rem; margin-top: 1.2em; }
h3 { font-size: 1.12rem; margin-top: 1em; }
p, ul, ol, dl { margin: 0 0 .8em; }
strong { color: var(--ink); font-weight: 600; }
code { font-family: var(--mono); font-size: .88em; background: var(--tint); padding: .08em .3em; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }

/* ---------- header and footer ---------- */
.site-header { position: relative; z-index: 20; background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 24px; padding-top: 12px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.2rem; text-decoration: none; }
.brand img { width: 22px; height: 22px; align-self: center; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 5px 12px; font-size: .95rem; transition: background-color .15s, color .15s; }
.nav a:hover { color: var(--ink); background: var(--tint); }
.nav a[aria-current="page"] { color: var(--rose-ink); background: var(--rose-soft); font-weight: 600; }

.site-footer { margin-top: 24px; padding: 14px 0 16px; background: var(--night); color: #9b97a6; font-size: .88rem; }
.site-footer a { color: #e9e6ee; }
.site-footer a:hover { color: var(--rose); }
.home + .site-footer { margin-top: 0; }

main { padding-bottom: 16px; }

/* ---------- page elements ---------- */
.lede { font-size: 1.15rem; color: var(--muted); }
.muted, .note { color: var(--muted); }
.note { font-size: .95rem; }

figure { margin: .8em 0; }
figcaption { font-size: .88rem; color: var(--faint); margin-top: .3em; }

.contents { list-style: none; padding: 0; columns: 1; }
.contents li { margin: .15em 0; }
.contents span { color: var(--faint); font-variant-numeric: tabular-nums; display: inline-block; min-width: 3.4em; }

pre.cite { background: var(--night); color: #e9e6ee; border-left: 3px solid var(--rose); padding: 18px 20px; overflow-x: auto; font: .85rem/1.6 var(--mono); margin: 0; white-space: pre-wrap; }

/* ---------- templates ---------- */
.file { font-family: var(--mono); font-size: .82rem; color: var(--faint); margin: -.3em 0 0; }
.plan img { width: 100%; max-height: 440px; object-fit: contain; }
/* drawing and Grasshopper definition share one frame, so switching does not move the page */
.plan-stage { aspect-ratio: 2.15 / 1; cursor: zoom-in; }
.plan-stage img { display: block; width: 100%; height: 100%; max-height: none; object-fit: contain; }
.plan-stage img[hidden] { display: none; }
.plan-nav { margin-top: 4px; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(255, 255, 255, .97); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox img[src$=".svg"] { width: 100%; height: 100%; }
.lightbox-close { position: absolute; top: 12px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: none; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; }
.lightbox-close:hover { background: var(--rose-soft); color: var(--rose-ink); }
.lightbox-close:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

.flow { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .95rem; }
.flow li { display: inline-flex; align-items: center; gap: 6px; }
.flow li + li::before { content: "→"; color: var(--faint); margin-right: 2px; }
.flow img { width: 18px; height: 18px; }

dl.params dt { color: var(--ink); font-weight: 600; margin-top: .35em; }
dl.params dd { margin: 0; color: var(--muted); }

/* ---------- components ---------- */
.search { width: 100%; padding: 12px 18px; border: 1px solid var(--line); background: var(--tint); color: var(--ink); font: inherit; }
.search:focus { outline: 2px solid var(--rose); outline-offset: 1px; background: var(--bg); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 6px 0 4px; font-size: .92rem; color: var(--muted); }
.count { color: var(--faint); margin-left: auto; }
.cats { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: .95rem; }

.subcat h2 { display: flex; align-items: baseline; gap: 10px; }
.subcat h2 span { font-size: .9rem; font-weight: 400; color: var(--faint); }
.subcat p { color: var(--muted); margin-bottom: .4em; }

.comp { margin: 0 0 4px; }
.comp > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; padding: 6px 0; }
.comp > summary::-webkit-details-marker { display: none; }
.comp > summary img { width: 22px; height: 22px; margin-top: 2px; }
.comp-title { color: var(--ink); font-weight: 600; }
.comp-nick { font-family: var(--mono); font-size: .78rem; color: var(--faint); margin-left: 8px; font-weight: 400; }
.comp-desc { color: var(--muted); font-size: .95rem; white-space: pre-line; }
.comp > summary:hover .comp-title { color: var(--rose-ink); }
.comp[open] > summary .comp-title { color: var(--rose-ink); }
.comp-body { padding: 0 0 10px 34px; }
@media (max-width: 600px) { .comp-body { padding-left: 0; } }
.comp-body h4 { font-size: .8rem; font-weight: 600; color: var(--faint); margin: 10px 0 2px; }
table.ptable { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.ptable td { padding: 4px 12px 4px 0; vertical-align: top; }
table.ptable td:first-child { white-space: nowrap; color: var(--ink); width: 1%; }
table.ptable td:nth-child(2) { white-space: nowrap; color: var(--faint); font-size: .84rem; width: 1%; }
table.ptable td:last-child { color: var(--muted); white-space: pre-line; padding-right: 0; }
@media (max-width: 600px) {
  table.ptable, table.ptable tbody, table.ptable tr, table.ptable td { display: block; width: auto; }
  table.ptable tr { padding: 4px 0; }
  table.ptable td, table.ptable td:first-child, table.ptable td:nth-child(2) { padding: 0; width: auto; white-space: normal; }
  table.ptable td:first-child { display: inline; }
  table.ptable td:nth-child(2) { display: inline; margin-left: .5em; }
}
.empty { color: var(--faint); padding: 32px 0; }

/* ---------- guide layout (templates): sticky sidebar menu + content ---------- */
.wrap.wide { max-width: 1060px; }

.crumbs { font-size: .88rem; color: var(--faint); margin: 8px 0 .6em; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.guide-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .9rem; color: var(--faint); }
.guide-meta span:empty { display: none; }
.guide-meta span + span::before { content: "·"; margin-right: 14px; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-ink); margin: 1.8em 0 .2em; }
.eyebrow + h2 { margin-top: 0; }
.back-top { margin-top: 1.6em; font-size: .92rem; }
.back-top a { color: var(--muted); }

.guide-nav { font-size: .93rem; }
.guide-label { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 0 0 10px; }
.guide-progress { display: flex; gap: 3px; height: 2px; }
.guide-progress i { flex: 1; background: var(--tint); transition: background-color .15s; }
.guide-progress i.on { background: var(--rose); }

.guide-list { list-style: none; padding: 0; margin: 0; }
.guide-list a { display: flex; gap: 12px; align-items: baseline; padding: 6px 10px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.guide-list a:hover { color: var(--ink); }
.guide-list a[aria-current] { color: var(--rose-ink); background: var(--rose-soft); font-weight: 600; }
.guide-list .n { flex: none; width: 1.6em; color: var(--faint); font-weight: 400; font-variant-numeric: tabular-nums; font-size: .85em; }
.guide-list a[aria-current] .n { color: var(--rose-ink); }

.guide-toggle { display: none; }
.guide-main section { scroll-margin-top: 24px; }

/* Desktop: two columns, the menu stays in view. */
@media (min-width: 960px) {
  .guide { display: grid; grid-template-columns: 230px minmax(0, var(--measure)); gap: 56px; align-items: start; }
  .guide-nav { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding-top: 14px; display: flex; flex-direction: column; }
  .guide-nav .guide-progress { order: 2; margin: 0 10px 12px 0; }
  .guide-panel { display: contents; }
  .guide-label { order: 1; padding-right: 10px; }
  .guide-list { order: 3; }
}

/* Mobile and tablet: the menu collapses into a sticky bar above the content. */
@media (max-width: 959px) {
  html { scroll-padding-top: 64px; }
  .guide-main section { scroll-margin-top: 64px; }
  .guide { max-width: var(--measure); }
  .guide-nav { position: sticky; top: 0; z-index: 10; background: var(--bg); margin: 0 -16px; padding: 0 16px; }
  .guide-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0 10px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
  .guide-toggle-label { font-weight: 600; }
  .guide-current { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .guide-chevron { width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .15s; }
  .guide-nav.open .guide-chevron { transform: rotate(-135deg) translate(-2px, 0); }
  .guide-panel { display: none; padding: 12px 0 14px; max-height: 70vh; overflow-y: auto; }
  .guide-nav.open .guide-panel { display: block; }
  .guide-nav.open { box-shadow: 0 10px 18px -14px rgba(0,0,0,.35); }
}
@media (min-width: 720px) and (max-width: 959px) { .guide-nav { margin: 0 -24px; padding: 0 24px; } }

/* ---------- components sidebar: one drop-down per category ---------- */
.side-cat { margin: 0 0 2px; }
.side-cat > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: var(--ink); font-weight: 600; user-select: none; }
.side-cat > summary::-webkit-details-marker { display: none; }
.side-cat > summary::before { content: ""; flex: none; width: 6px; height: 6px; border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint); transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.side-cat[open] > summary::before { transform: rotate(45deg) translate(-1px, -1px); }
.side-cat > summary:hover { background: var(--tint); }
.side-name { flex: 1; }
.side-count { color: var(--faint); font-weight: 400; font-size: .85em; font-variant-numeric: tabular-nums; }
.side-list { list-style: none; padding: 0 0 8px; margin: 0; }
.side-list a { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 28px; color: var(--muted); text-decoration: none; font-size: .9rem; line-height: 1.3; }
.side-list a:hover { color: var(--ink); }
.side-list a[aria-current] { color: var(--rose-ink); background: var(--rose-soft); font-weight: 600; }
.side-list img { width: 16px; height: 16px; flex: none; }
.side-empty { color: var(--faint); padding: 6px 10px; margin: 0; }
.subcat { scroll-margin-top: 24px; }
.comp { scroll-margin-top: 24px; }
@media (min-width: 960px) { .guide-nav .side-cats { order: 3; } }
@media (max-width: 959px) { .subcat, .comp { scroll-margin-top: 64px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; border: 1.5px solid transparent; transition: background-color .15s, color .15s, border-color .15s, transform .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 7px 16px; font-size: .9rem; }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-ink); color: #fff; }
.btn-secondary { background: var(--bg); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }

/* ---------- home ---------- */
main.home { padding-bottom: 0; overflow-x: clip; }
.home h1, .home h2, .home h3 { margin-top: 0; }
.cards, .split { grid-template-columns: minmax(0, 1fr); }
.split > * { min-width: 0; }

.hero { padding: 0; }
.hero-mark { margin: 0; }
/* The animation's pink band fills the window width exactly, with no white around it.
   In the 1807 x 569 file the band runs x 18-1771, y 49-537; the crop keeps x 20-1769, y 51-535
   (1750 x 485, 2px inside its soft edge). Percentage margins are relative to the window width,
   so: width = 1807/1750, left = -20/1750, top = -51/1750, bottom = -(569-536)/1750. */
.hero-mark { overflow: hidden; }
.hero-mark img { display: block; max-width: none; height: auto;
  width: 103.2571%; margin: -2.9143% 0 -1.8857% -1.1429%; }
.intro { padding: 12px 0 24px; text-align: center; }
@media (min-width: 900px) { .intro { padding: 16px 0 28px; } }
.intro .lede { font-size: 1.2rem; color: var(--text); max-width: 36em; margin: 0 auto; }
.intro .cta-row { justify-content: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0 0; }


.section { padding: 20px 0; }
@media (min-width: 900px) { .section { padding: 28px 0; } }
.section-tint { background: var(--bg); }
.section .eyebrow { margin-top: 0; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.4rem); letter-spacing: -0.025em; font-weight: 700; line-height: 1.12; }
.section-lede { color: var(--muted); font-size: 1.1rem; max-width: 40em; }

.cards { display: grid; gap: 32px 40px; margin-top: 8px; }
@media (min-width: 760px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); padding: 16px 18px 18px; transition: border-color .15s; }
.card:hover, .card:has(:focus-visible) { border-color: var(--rose); }
.card-media { overflow: hidden; margin-bottom: 4px; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.card-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
/* card galleries: several images per method, stepped with arrows or dots */
.gallery { position: relative; }
.gallery img[hidden] { display: none; }
.gallery:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.gallery-nav { display: flex; justify-content: center; align-items: center; gap: 2px; margin: 0; }
.gallery-btn { width: 30px; height: 30px; padding: 0 0 3px; border: 0; border-radius: 50%; background: none;
  color: var(--ink); font: 600 1.5rem/1 var(--sans); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.gallery-btn:hover { background: var(--rose-soft); color: var(--rose-ink); }
.gallery-btn:focus-visible, .gallery-dot:focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; border-radius: 50%; }
.gallery-dot { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.gallery-dot::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--faint); opacity: .45; }
.gallery-dot[aria-current="true"]::before { background: var(--rose); opacity: 1; }
.gallery-title { text-align: center; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--rose-ink); margin: 0 0 12px; min-height: 1.4em; }
.gallery-title:empty { display: none; }
.gallery-nav:has(+ .gallery-title:empty) { margin-bottom: 10px; }
/* replay button: top-right of a card image, shown on hover (always shown on touch screens) */
.card-media { position: relative; }
.replay { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line);
  border-radius: 50%; background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s, background .15s, color .15s; }
.replay[hidden] { display: none; }
.replay svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-media:hover .replay, .replay:focus-visible { opacity: 1; }
.replay:hover { background: var(--rose-soft); color: var(--rose-ink); }
.replay:focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; }
@media (hover: none) { .replay { opacity: .85; } }
.card-label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-ink); margin-bottom: .4em; }
.card h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
.card p { color: var(--muted); }
.more { margin-top: auto; font-weight: 600; text-decoration: none; color: var(--ink); }
.more::after { content: " \2192"; color: var(--rose); }
.more:hover { color: var(--rose-ink); }

/* Get started: three step tabs over one large video */
.stepper { margin-top: 8px; }
.step-tabs { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 4px; }
@media (min-width: 760px) { .step-tabs { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.step-tab { position: relative; padding: 10px 14px 14px; cursor: pointer; border-top: 3px solid var(--line); transition: background-color .15s; }
.step-tab::before { content: ""; position: absolute; top: -3px; left: 0; height: 3px; width: calc(var(--progress, 0) * 100%); background: var(--rose); }
.step-tab:hover { background: var(--tint); }
.step-tab[aria-current] { background: var(--rose-soft); }
.step-tab h3 { font-size: 1.2rem; margin: 0 0 4px; }
.step-tab h3 button { all: unset; cursor: pointer; }
.step-tab h3 button:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.step-tab p { color: var(--muted); margin: 0; font-size: .95rem; }
.step-tab:not([aria-current]) p { display: none; }
@media (min-width: 760px) { .step-tab:not([aria-current]) p { display: block; } }
.step-n { font: 700 .9em/1 var(--mono); color: var(--rose-ink); margin-right: .35em; }


.split { display: grid; gap: 8px 56px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.6fr; } }


/* core concepts */
.concepts h3 { font-size: 1.3rem; letter-spacing: -0.01em; margin: .9em 0 .3em; }
.concepts h3:first-child { margin-top: .2em; }
.deps { margin: .8em 0 0; border-top: 1px solid var(--line); }
.deps dt { color: var(--ink); font-weight: 700; padding-top: 11px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.deps dt span { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rose-ink); }
.deps dd { margin: 2px 0 0; padding-bottom: 11px; border-bottom: 1px solid var(--line); color: var(--muted); }
.py-steps { padding-left: 1.3em; }
.py-steps li { margin-bottom: .4em; color: var(--muted); }
.py-steps li::marker { color: var(--rose-ink); font-weight: 700; }
.py-steps strong { color: var(--ink); }

/* ---------- overview: section titles and ledes centred, everything else left-aligned ---------- */
.home .section-title, .home .section-lede, .home .split .muted { text-align: center; }
/* Cite keeps its original layout: title and note in a left column, the citation beside them, all left-aligned. */
.home #cite .section-title, .home #cite .muted { text-align: left; }
.home .section-lede { margin-left: auto; margin-right: auto; }
.home .split { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .home #cite .split { grid-template-columns: 1fr 1.6fr; } }
.home .concepts { max-width: 46em; margin-left: auto; margin-right: auto; }

/* ---------- get started: placeholder animations, one per step (6 s loops) ---------- */
.step-video { aspect-ratio: 1920 / 1140; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.step-video video { width: 100%; height: 100%; display: block; object-fit: contain; }
.anim { width: 100%; height: 100%; display: block; overflow: visible; }
.anim text { font: 600 11px var(--sans); fill: var(--ink); }
.anim .win, .anim .field, .anim .comp { fill: #fff; stroke: var(--ink); stroke-width: 1.5; }
.anim .comp { fill: var(--tint); }

/* 01 install: type the name, press Install, fill the bar, tick */
.anim-install .typed { clip-path: inset(0 100% 0 0); animation: a-type 6s steps(10) infinite; }
.anim-install .btn-shape { fill: var(--rose); animation: a-press 6s infinite; transform-box: fill-box; transform-origin: center; }
.anim-install .btn-text { fill: #fff; }
.anim-install .bar-bg { fill: var(--tint); }
.anim-install .bar { fill: var(--rose); transform-box: fill-box; transform-origin: left; transform: scaleX(0); animation: a-fill 6s infinite; }
.anim-install .tick { fill: none; stroke: var(--rose-ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; animation: a-tick 6s infinite; }
@keyframes a-type { 0%, 5% { clip-path: inset(0 100% 0 0); } 25%, 100% { clip-path: inset(0 0 0 0); } }
@keyframes a-press { 0%, 30% { transform: none; } 33% { transform: scale(.94); } 36%, 100% { transform: none; } }
@keyframes a-fill { 0%, 36% { transform: scaleX(0); } 70%, 100% { transform: scaleX(1); } }
@keyframes a-tick { 0%, 72% { opacity: 0; } 76%, 94% { opacity: 1; } 100% { opacity: 0; } }

/* 02 template: cursor right-clicks the component, menu opens, an item is picked, the definition appears */
.anim-template .cursor { fill: var(--ink); stroke: #fff; stroke-width: 1; animation: a-cursor 6s infinite; }
.anim-template .menu { opacity: 0; animation: a-menu 6s infinite; }
.anim-template .pick { fill: var(--rose-soft); stroke: none; opacity: 0; animation: a-pick 6s infinite; }
.anim-template .graph { opacity: 0; animation: a-graph 6s infinite; }
.anim-template .wire { fill: none; stroke: var(--faint); stroke-width: 1.5; }
@keyframes a-cursor { 0% { transform: translate(250px, 30px); } 20%, 30% { transform: translate(100px, 92px); } 48%, 60% { transform: translate(200px, 100px); } 75%, 100% { transform: translate(250px, 30px); } }
@keyframes a-menu { 0%, 30% { opacity: 0; } 34%, 62% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes a-pick { 0%, 48% { opacity: 0; } 50%, 62% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes a-graph { 0%, 64% { opacity: 0; } 70%, 94% { opacity: 1; } 100% { opacity: 0; } }

/* 03 floorplan: draw the boundary, drop in the obstacles, then the isovist appears */
.anim-plan .boundary { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: a-draw 6s infinite; }
.anim-plan .obstacle { fill: var(--ink); opacity: 0; animation: a-obst 6s infinite; }
.anim-plan .obstacle + .obstacle { animation-delay: .3s; }
.anim-plan .isovist { fill: var(--rose); fill-opacity: .28; opacity: 0; animation: a-iso 6s infinite; }
.anim-plan .viewer { fill: var(--rose-ink); opacity: 0; animation: a-iso 6s infinite; }
@keyframes a-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 35%, 92% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes a-obst { 0%, 38% { opacity: 0; } 45%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes a-iso { 0%, 55% { opacity: 0; } 65%, 92% { opacity: 1; } 100% { opacity: 0; } }

/* Without motion, show each animation's end state. */
@media (prefers-reduced-motion: reduce) {
  .anim * { animation: none !important; }
  .anim-install .typed { clip-path: none; }
  .anim-install .bar { transform: none; }
  .anim-install .tick, .anim-template .graph, .anim-plan .obstacle, .anim-plan .isovist, .anim-plan .viewer { opacity: 1; }
  .anim-plan .boundary { stroke-dashoffset: 0; }
  .anim-template .cursor { transform: translate(250px, 30px); }
}

/* environment: floor plans as polygons with holes; the holes (obstacles) show the section background */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: .6em 0 .2em; }
@media (min-width: 600px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plans img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
