/* ================================================================
   HOME 3 — everything under the hero (2026-11-09)
   Bento blocks, light/dark bands, mono labels, the orange square of the
   logo as recurring mark. The hero above keeps home2.css.
   Motion is progressive: without JS, or with prefers-reduced-motion,
   every block is static and fully readable.
   ================================================================ */

.hx {
  --hx-mark: #ef7d57;            /* the logo square: orange in every theme */
  --hx-dark: #1a1a2e;            /* same ink as the hero: dark in every theme */
  --hx-dark-2: #23233c;
  --hx-on-dark: #f0eee9;
  --hx-on-dark-dim: rgba(240, 238, 233, .64);
  --hx-on-dark-line: rgba(240, 238, 233, .16);
  --hx-line: color-mix(in srgb, var(--color-border) 22%, transparent);
  --hx-tile: color-mix(in srgb, var(--color-background) 70%, #fff);
  --hx-gap: 14px;
  --hx-radius: 4px;
}
[data-theme="dark"] .hx { --hx-tile: #141414; --hx-dark: #15152a; --hx-dark-2: #1d1d36; }
[data-theme="televideo"] .hx { --hx-tile: #000066; }

/* ── Bands: full bleed, alternating ── */
.hx-band {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: clamp(4rem, 9vw, 7.5rem) 0;
  isolation: isolate;
}
.hx-in { max-width: min(1100px, 92vw); margin: 0 auto; position: relative; }
.hx-light { background: var(--color-background); color: var(--color-foreground); }
.hx-dark { background: var(--hx-dark); color: var(--hx-on-dark); }
.hx-dark a { color: var(--hx-on-dark); }

/* Grain: a tiny SVG noise over every band */
.hx-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .16; mix-blend-mode: multiply;
}
.hx-dark::before { opacity: .22; mix-blend-mode: screen; filter: invert(1); }

/* ── Section heads ── */
.hx-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: .9rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); max-width: 860px; }
.hx-label {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .82rem; letter-spacing: .04em;
  color: var(--color-dim);
}
.hx-dark .hx-label { color: var(--hx-on-dark-dim); }
.hx-sq { display: inline-block; flex: none; width: 10px; height: 10px; background: var(--hx-mark); }
.hx-title {
  font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  font-weight: 700; line-height: 1.04; letter-spacing: -.035em;
  color: var(--color-headers);
}
.hx-dark .hx-title { color: #fff; }
.hx-lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.6; color: var(--color-dim); max-width: 62ch; }
.hx-dark .hx-lede { color: var(--hx-on-dark-dim); }
.hx-mono { font-family: var(--font-mono); }

/* ── Bento grid ── */
.hx-bento { display: grid; gap: var(--hx-gap); grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(170px, auto); }
.hx-tile {
  position: relative; display: flex; flex-direction: column; gap: .7rem;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  background: var(--hx-tile);
  border: 1px solid var(--color-border);
  border-radius: var(--hx-radius);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: border-color .25s ease, transform .35s cubic-bezier(.2,.7,.2,1), background-color .25s ease;
}
a.hx-tile:hover, .hx-tile:focus-within { border-color: var(--hx-mark); }
a.hx-tile:hover { color: inherit; transform: translateY(-3px); }
.hx-tile.is-dark { background: var(--hx-dark); color: var(--hx-on-dark); border-color: var(--hx-dark); }
.hx-tile.is-dark a { color: var(--hx-on-dark); }
.hx-dark .hx-tile { background: var(--hx-dark-2); color: var(--hx-on-dark); border-color: var(--hx-on-dark-line); }
.hx-dark .hx-tile.is-light { background: var(--color-background); color: var(--color-foreground); border-color: var(--color-background); }
.hx-tile-k { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .03em; color: var(--color-dim); display: flex; align-items: center; gap: .5rem; }
.hx-tile.is-dark .hx-tile-k, .hx-dark .hx-tile .hx-tile-k { color: var(--hx-on-dark-dim); }
.hx-tile h3 { font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.12; letter-spacing: -.02em; font-weight: 700; }
.hx-tile p { font-size: .98rem; line-height: 1.55; }
.hx-tile .hx-go {
  margin-top: auto; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .82rem; color: inherit;
}
.hx-go::before { content: ""; width: 8px; height: 8px; background: var(--hx-mark); transition: transform .25s ease; }
a.hx-tile:hover .hx-go::before, .hx-go:hover::before { transform: rotate(45deg) scale(1.25); }
.s-2x2 { grid-column: span 2; grid-row: span 2; }
.s-2x1 { grid-column: span 2; }
.s-1x2 { grid-row: span 2; }
.s-4x1 { grid-column: span 4; }
.s-3x1 { grid-column: span 3; }

/* ── 1. Problems ── */
.hx-problems .hx-bento { grid-template-areas: "a a e e" "b c e e"; }
.hx-problems .p-a { grid-area: a; } .hx-problems .p-b { grid-area: b; }
.hx-problems .p-c { grid-area: c; } .hx-problems .p-e { grid-area: e; }
.hx-problem h3 { font-size: clamp(1.35rem, 2.1vw, 1.85rem); }
.hx-problem h3::before { content: "\201C"; color: var(--hx-mark); margin-right: .05em; }
.hx-problem h3::after { content: "\201D"; color: var(--hx-mark); margin-left: .02em; }
.hx-stat { display: flex; flex-direction: column; gap: .6rem; }
.hx-stat-num {
  font-size: clamp(4.2rem, 10vw, 8.5rem); font-weight: 700; line-height: .9; letter-spacing: -.05em;
  color: var(--hx-mark); font-variant-numeric: tabular-nums;
}
.hx-stat-num small { font-size: .45em; letter-spacing: -.02em; }
.hx-src { font-family: var(--font-mono); font-size: .72rem; line-height: 1.5; opacity: .75; }
.hx-src a { text-decoration: underline; text-underline-offset: 2px; }

/* ── Tech ribbon ── */
.hx-ribbon {
  width: 100vw; margin-left: calc(-50vw + 50%);
  overflow: hidden; background: var(--hx-mark); color: #1a1a2e;
  border-block: 1px solid #1a1a2e;
  font-family: var(--font-mono); font-size: clamp(.95rem, 1.4vw, 1.15rem); font-weight: 500;
}
.hx-ribbon-track { display: flex; width: max-content; }
.hx-ribbon ul { display: flex; flex: none; list-style: none; margin: 0; padding: .85rem 0; }
.hx-ribbon li { display: inline-flex; align-items: center; gap: 1.4rem; padding-right: 1.4rem; white-space: nowrap; }
.hx-ribbon li::after { content: ""; width: 7px; height: 7px; background: #1a1a2e; }
html.fx .hx-ribbon-track { animation: hx-marquee 38s linear infinite; }
.hx-ribbon:hover .hx-ribbon-track { animation-play-state: paused; }
@keyframes hx-marquee { to { transform: translateX(-50%); } }
/* Without the duplicated list (no JS) the ribbon wraps instead of scrolling */
html:not(.fx) .hx-ribbon ul { flex-wrap: wrap; justify-content: center; width: min(1100px, 92vw); margin: 0 auto; padding: .85rem 0; row-gap: .3rem; }
html:not(.fx) .hx-ribbon-track { width: auto; }
html:not(.fx) .hx-ribbon ul[aria-hidden] { display: none; }

/* ── 2. Cases: the story pinned to the scroll ── */
.hx-cases { padding-bottom: clamp(3rem, 6vw, 5rem); }
.hx-case { position: relative; }
.hx-case + .hx-case { margin-top: clamp(2.5rem, 6vw, 4rem); }
.hx-case-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.hx-case-n { font-family: var(--font-mono); font-size: .8rem; color: var(--hx-on-dark-dim); display: flex; align-items: center; gap: .6rem; }
.hx-case-title { font-size: clamp(1.7rem, 3.2vw, 2.6rem); line-height: 1.06; letter-spacing: -.03em; color: #fff; margin: .7rem 0 .8rem; }
.hx-case-who { color: var(--hx-on-dark-dim); font-size: 1rem; line-height: 1.5; }
.hx-case-tags { margin-top: 1.1rem; font-family: var(--font-mono); font-size: .75rem; color: var(--hx-on-dark-dim); }
.hx-case-nav { list-style: none; margin: 1.6rem 0 0; padding: 0; display: none; gap: .35rem; }
.hx-case-nav li {
  display: flex; align-items: center; gap: .65rem;
  font-family: var(--font-mono); font-size: .82rem; color: var(--hx-on-dark-dim);
  transition: color .3s ease;
}
.hx-case-nav li::before { content: ""; width: 9px; height: 9px; border: 1px solid currentColor; transition: background-color .3s ease, transform .3s ease; }
.hx-case-bar { display: none; height: 2px; margin-top: 1.2rem; background: var(--hx-on-dark-line); overflow: hidden; }
.hx-case-bar span { display: block; height: 100%; background: var(--hx-mark); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.hx-steps { display: grid; gap: 1rem; }
.hx-step {
  padding: clamp(1.1rem, 2.2vw, 1.7rem);
  border: 1px solid var(--hx-on-dark-line);
  border-radius: var(--hx-radius);
  background: var(--hx-dark-2);
}
.hx-step-k { font-family: var(--font-mono); font-size: .78rem; color: var(--hx-mark); display: flex; align-items: center; gap: .55rem; margin-bottom: .55rem; }
.hx-step-k::before { content: ""; width: 8px; height: 8px; background: var(--hx-mark); }
.hx-step-t { font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.4; color: #fff; letter-spacing: -.01em; }
.hx-step ul { margin: .2rem 0 0; padding: 0; list-style: none; display: grid; gap: .55rem; }
.hx-step li { position: relative; padding-left: 1.2rem; font-size: 1.02rem; line-height: 1.5; color: var(--hx-on-dark); }
.hx-step li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; background: var(--hx-on-dark-dim); }
.hx-step .hx-big { display: block; font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 700; line-height: 1; letter-spacing: -.04em; color: var(--hx-mark); margin-bottom: .4rem; font-variant-numeric: tabular-nums; }
.hx-draft { display: inline-block; margin-top: .9rem; font-family: var(--font-mono); font-size: .7rem; color: var(--hx-on-dark-dim); border: 1px dashed var(--hx-on-dark-line); padding: .15rem .45rem; }

/* Pinned mode (html.hx-pin, set by home.js when motion is allowed and the window is tall enough) */
html.hx-pin .hx-case { height: 280vh; }
html.hx-pin .hx-case + .hx-case { margin-top: 0; }
html.hx-pin .hx-case-pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: flex-start; padding-top: calc(var(--nav-h-compact, 54px) + min(12vh, 110px)); }
html.hx-pin .hx-case-pin > .hx-in { width: 100%; }
html.hx-pin .hx-case-nav { display: grid; }
html.hx-pin .hx-case-bar { display: block; }
html.hx-pin .hx-steps { display: grid; grid-template-areas: "s"; gap: 0; }
html.hx-pin .hx-step {
  grid-area: s; align-self: center;
  opacity: 0; transform: translateY(40px) scale(.98); filter: blur(3px);
  transition: opacity .55s ease, transform .7s cubic-bezier(.2,.7,.2,1), filter .5s ease;
  pointer-events: none;
}
html.hx-pin .hx-case[data-step="0"] .hx-step:nth-child(1),
html.hx-pin .hx-case[data-step="1"] .hx-step:nth-child(2),
html.hx-pin .hx-case[data-step="2"] .hx-step:nth-child(3) { opacity: 1; transform: none; filter: none; pointer-events: auto; }
html.hx-pin .hx-case[data-step="1"] .hx-step:nth-child(1),
html.hx-pin .hx-case[data-step="2"] .hx-step:nth-child(1),
html.hx-pin .hx-case[data-step="2"] .hx-step:nth-child(2) { transform: translateY(-40px) scale(.98); }
html.hx-pin .hx-case[data-step="0"] .hx-case-nav li:nth-child(1),
html.hx-pin .hx-case[data-step="1"] .hx-case-nav li:nth-child(-n+2),
html.hx-pin .hx-case[data-step="2"] .hx-case-nav li { color: #fff; }
html.hx-pin .hx-case[data-step="0"] .hx-case-nav li:nth-child(1)::before,
html.hx-pin .hx-case[data-step="1"] .hx-case-nav li:nth-child(2)::before,
html.hx-pin .hx-case[data-step="2"] .hx-case-nav li:nth-child(3)::before { background: var(--hx-mark); border-color: var(--hx-mark); transform: rotate(45deg); }
html.hx-pin .hx-step { min-height: 300px; display: flex; flex-direction: column; justify-content: center; }

/* ── 3. Projects ── */
.hx-shot { position: relative; margin: -.2rem -.2rem 0; border-radius: 2px; overflow: hidden; border: 1px solid var(--hx-line); background: #ddd; aspect-ratio: 16 / 10; }
.hx-shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hx-demo { position: relative; flex: 1; min-height: 320px; border-radius: 2px; overflow: hidden; border: 1px solid var(--hx-line); background: #f4f4f4; }
.hx-demo img, .hx-demo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.hx-demo img { object-fit: cover; object-position: top center; }
.hx-demo iframe { opacity: 0; transition: opacity .5s ease; background: #fff; }
.hx-demo.is-live iframe { opacity: 1; }
.hx-demo-open { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: flex-end; padding: .6rem; text-decoration: none; }
.hx-demo-open span { font-family: var(--font-mono); font-size: .75rem; background: #1a1a2e; color: #fff; padding: .25rem .55rem; }
.hx-demo.is-live .hx-demo-open { display: none; }
.hx-demo-tag {
  position: absolute; z-index: 2; left: .6rem; top: .6rem;
  font-family: var(--font-mono); font-size: .7rem; padding: .2rem .5rem;
  background: #1a1a2e; color: #fff; display: inline-flex; align-items: center; gap: .4rem;
}
.hx-demo-tag::before { content: ""; width: 7px; height: 7px; background: var(--hx-mark); }
.hx-demo.is-live .hx-demo-tag::before { background: #3ddc84; animation: hx-blink 1.6s steps(2, end) infinite; }
@keyframes hx-blink { 50% { opacity: .2; } }

/* client showcase (2026-11-10): screenshot tiles, rows sized by content */
.hx-work { grid-auto-rows: auto; }
.hx-site h3 { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
.hx-site p { font-size: .93rem; }
.hx-site.s-2x1 h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.hx-site.s-2x1 p { font-size: .98rem; max-width: 52ch; }
.hx-site .hx-shot img { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
a.hx-site:hover .hx-shot img { transform: scale(1.025); }
.hx-pf { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .4rem 2rem; }
.hx-pf .hx-tile-k { grid-column: 1 / -1; }
.hx-pf .hx-go { margin-top: 0; }
@media (max-width: 960px) {
  .hx-pf { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  a.hx-site:hover .hx-shot img { transform: none; }
}

/* the /build taste: a prompt that opens /build with the text already in */
.hx-build { background: #0f0f1c !important; color: #e8e8f0; border-color: #0f0f1c !important; font-family: var(--font-mono); }
.hx-build .hx-tile-k { color: rgba(232,232,240,.6) !important; }
.hx-build h3 { font-family: var(--font-body); color: #fff; }
.hx-build form { display: flex; align-items: center; gap: .6rem; margin-top: auto; border: 1px solid rgba(232,232,240,.25); padding: .55rem .7rem; }
.hx-build label { color: var(--hx-mark); }
.hx-build input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: #fff;
  font: inherit; font-size: .95rem; caret-color: var(--hx-mark);
}
.hx-build input::placeholder { color: rgba(232,232,240,.45); }
.hx-build button {
  flex: none; font: inherit; font-size: .8rem; cursor: pointer;
  background: var(--hx-mark); color: #1a1a2e; border: 0; padding: .35rem .7rem;
}
.hx-build form:focus-within { border-color: var(--hx-mark); }
.hx-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.hx-chips a { font-size: .74rem; padding: .2rem .55rem; border: 1px solid rgba(232,232,240,.22); color: rgba(232,232,240,.8) !important; }
.hx-chips a:hover { border-color: var(--hx-mark); color: #fff !important; }

/* ── 4. How we work ── */
.hx-how .hx-bento { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: auto; }
.hx-how-n { font-family: var(--font-mono); font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; color: var(--hx-mark); letter-spacing: -.04em; }
.hx-how .hx-tile h3 { color: #fff; }
.hx-how .hx-tile p { color: var(--hx-on-dark-dim); }
.hx-how-proof {
  margin-top: var(--hx-gap); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.4rem; border: 1px dashed var(--hx-on-dark-line); border-radius: var(--hx-radius);
}
.hx-how-proof p { color: var(--hx-on-dark); max-width: 60ch; }

/* ── 5. Prices ── */
.hx-prices .hx-bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: auto; }
.hx-price { min-height: 250px; }
.hx-price-v { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.hx-price-v small { display: block; font-family: var(--font-mono); font-size: .76rem; font-weight: 400; letter-spacing: 0; color: var(--color-dim); margin-bottom: .35rem; }
.hx-price.is-dark .hx-price-v small { color: var(--hx-on-dark-dim); }
.hx-price.is-dark .hx-price-v { color: var(--hx-mark); }
.hx-annual {
  margin-top: var(--hx-gap); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .4rem 1.5rem; align-items: baseline;
  padding: 1.2rem 1.4rem; border: 1px solid var(--color-border); border-radius: var(--hx-radius);
}
.hx-annual strong { font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -.03em; white-space: nowrap; }
.hx-note { margin-top: 1rem; font-family: var(--font-mono); font-size: .76rem; color: var(--color-dim); }

/* ── 6. Blog: an editorial index ── */
.hx-index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hx-on-dark-line); }
.hx-index li { border-bottom: 1px solid var(--hx-on-dark-line); }
.hx-index a {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 2rem; align-items: baseline; gap: 1.5rem;
  padding: clamp(1rem, 2vw, 1.45rem) 0; text-decoration: none; color: var(--hx-on-dark);
  transition: padding-left .35s cubic-bezier(.2,.7,.2,1), color .2s ease;
}
.hx-index time { font-family: var(--font-mono); font-size: .8rem; color: var(--hx-on-dark-dim); }
.hx-index-t { font-size: clamp(1.3rem, 2.6vw, 2.15rem); font-weight: 700; line-height: 1.12; letter-spacing: -.025em; }
.hx-index-arrow { justify-self: end; width: 10px; height: 10px; background: var(--hx-mark); transform: scale(.6); transition: transform .3s ease; }
.hx-index a:hover { color: #fff; padding-left: .8rem; }
.hx-index a:hover .hx-index-t { color: var(--hx-mark); }
.hx-index a:hover .hx-index-arrow { transform: rotate(45deg) scale(1.2); }
.hx-index a:focus-visible { outline: 2px solid var(--hx-mark); outline-offset: 4px; }
.hx-all { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.6rem; font-family: var(--font-mono); font-size: .85rem; }
.hx-all::before { content: ""; width: 8px; height: 8px; background: var(--hx-mark); }

/* ── 7. Games: one teaser in the NES skin ── */
.hx-nes {
  --nes-night: #040643; --nes-blue: #096dab; --nes-white: #fcfcfc; --nes-orange: #f87858; --nes-yellow: #f8b800; --nes-black: #000;
  background: var(--nes-night); color: var(--nes-white);
}
.hx-nes::before { opacity: 0 !important; }
.hx-nes .hx-label { color: #bcbcbc; }
.hx-nes .hx-sq { background: var(--nes-orange); }
.hx-nes-box {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.4rem, 3vw, 2.6rem); align-items: center;
  border: 4px solid var(--nes-white); box-shadow: 0 0 0 4px var(--nes-black), 8px 8px 0 4px var(--nes-black);
  background: var(--nes-black); padding: clamp(1rem, 2.4vw, 1.8rem);
}
.hx-nes-title { font-family: 'Press Start 2P', var(--font-mono); font-size: clamp(1.25rem, 2.6vw, 2rem); line-height: 1.4; color: var(--nes-yellow); text-transform: uppercase; letter-spacing: .02em; }
.hx-nes p { font-family: var(--font-mono); color: #dcdcdc; line-height: 1.6; margin: 1rem 0 1.4rem; max-width: 46ch; }
.hx-nes-start {
  display: inline-block; font-family: 'Press Start 2P', var(--font-mono); font-size: .85rem; text-transform: uppercase;
  color: var(--nes-black) !important; background: var(--nes-orange); padding: .9rem 1.1rem;
  box-shadow: inset -4px -4px 0 0 #922707; image-rendering: pixelated;
}
.hx-nes-start:hover { background: var(--nes-yellow); }
html.fx .hx-nes-start span { animation: hx-blink 1.1s steps(2, end) infinite; }
.hx-nes-more { display: inline-block; margin-left: 1rem; font-family: var(--font-mono); font-size: .8rem; color: #bcbcbc !important; text-decoration: underline; text-underline-offset: 3px; }
.hx-nes .hx-demo { border: 4px solid var(--nes-blue); border-radius: 0; min-height: 0; aspect-ratio: 4 / 3; background: #000; }

/* ── 8. About + contacts ── */
.hx-about-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.hx-about-text { font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.65; max-width: 58ch; }
.hx-about-text + .hx-about-text { margin-top: 1rem; }
.hx-years { display: flex; align-items: baseline; gap: .8rem; margin-top: 1.8rem; }
.hx-years .hx-stat-num { font-size: clamp(3.4rem, 7vw, 5.5rem); }
.hx-years { flex-wrap: wrap; column-gap: 2.2rem; }
.hx-years > div { display: flex; align-items: baseline; gap: .7rem; }
.hx-years-l { font-family: var(--font-mono); font-size: .85rem; color: var(--color-dim); }
.hx-contact { display: grid; gap: 1rem; }
.hx-wa {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.4rem 1.5rem; background: var(--hx-mark); color: #1a1a2e !important;
  border-radius: var(--hx-radius); text-decoration: none;
  transition: transform .25s ease, background-color .25s ease;
}
.hx-wa:hover { transform: translateY(-3px); background: #f08d6b; }
.hx-wa strong { display: block; font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -.02em; line-height: 1.1; }
.hx-wa > span > span { display: block; margin-top: .3rem; font-family: var(--font-mono); font-size: .85rem; }
.hx-wa svg { width: 34px; height: 34px; flex: none; }
.hx-small { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-family: var(--font-mono); font-size: .85rem; }
.hx-small a { display: inline-flex; align-items: center; gap: .45rem; text-decoration: underline; text-decoration-color: var(--hx-line); text-underline-offset: 3px; }
.hx-small a:hover { text-decoration-color: var(--hx-mark); }
.hx-small svg { width: 15px; height: 15px; }
.hx-piva { font-family: var(--font-mono); font-size: .75rem; color: var(--color-dimmer); }

/* ── The cursor: a square that follows and grows on things you can use ── */
/* Cursor companion: a small square trailing the pointer, offset so it never covers it */
.hx-cursor {
  position: fixed; left: 0; top: 0; z-index: 120; pointer-events: none;
  width: 8px; height: 8px; margin: 14px 0 0 12px;
  display: grid; place-items: center;
  background: var(--hx-mark, #ef7d57); color: #1a1a2e;
  transition: width .2s cubic-bezier(.2,.7,.2,1), height .2s cubic-bezier(.2,.7,.2,1), opacity .3s ease;
  opacity: 0;
}
.hx-cursor.is-on { opacity: 1; }
.hx-cursor.is-big { width: 22px; height: 22px; }
.hx-cursor svg { width: 14px; height: 14px; }
.hx-cursor.is-glitch { animation: hx-cur-glitch .32s steps(1) both; }
@keyframes hx-cur-glitch {
  0%   { clip-path: inset(0 0 60% 0); translate: 2px 0; }
  25%  { clip-path: inset(40% 0 0 0); translate: -2px 0; }
  50%  { clip-path: inset(0 0 30% 0); translate: 1px 0; }
  75%  { clip-path: inset(20% 0 0 0); translate: -1px 0; }
  100% { clip-path: none; translate: 0 0; }
}

/* ── Reveal tweaks (fx.js adds .fx-r / .is-in) ── */
html.fx .hx-tile.fx-r.is-in:hover { transform: translateY(-3px); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .hx-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-problems .hx-bento { grid-template-areas: "e e" "a a" "b c"; }
  .s-3x1, .s-4x1 { grid-column: span 2; }
  .hx-prices .hx-bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-how .hx-bento { grid-template-columns: minmax(0, 1fr); }
  .hx-about-grid, .hx-nes-box { grid-template-columns: minmax(0, 1fr); }
  .hx-case-grid { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  html.hx-pin .hx-case-nav { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: 1rem; }
  html.hx-pin .hx-case-title { margin: .4rem 0; }
  html.hx-pin .hx-case-who, html.hx-pin .hx-case-tags { display: none; }
  html.hx-pin .hx-step { min-height: 0; }
}
@media (max-width: 600px) {
  .hx-bento, .hx-prices .hx-bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .hx-problems .hx-bento { grid-template-areas: "e" "a" "b" "c"; }
  .s-2x2, .s-2x1, .s-3x1, .s-4x1 { grid-column: auto; grid-row: auto; }
  .s-1x2 { grid-row: auto; }
  .hx-demo { min-height: 300px; }
  .hx-index a { grid-template-columns: minmax(0, 1fr) 1rem; gap: .35rem 1rem; }
  .hx-index time { grid-column: 1 / -1; }
  .hx-annual { grid-template-columns: minmax(0, 1fr); }
  .hx-price { min-height: 0; }
  .hx-nes-more { display: block; margin: 1rem 0 0; }
  .hx-wa { padding: 1.15rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hx-ribbon-track { animation: none !important; }
  .hx-ribbon ul { flex-wrap: wrap; justify-content: center; width: min(1100px, 92vw); margin: 0 auto; row-gap: .3rem; }
  .hx-ribbon-track { width: auto; }
  .hx-ribbon ul[aria-hidden] { display: none; }
  .hx-tile, .hx-index a, .hx-wa { transition: none !important; }
  a.hx-tile:hover, .hx-wa:hover { transform: none; }
  .hx-nes-start span, .hx-demo-tag::before { animation: none !important; }
  .hx-cursor { display: none; }
}

/* One case only (2026-11-09): a shorter scroll and bigger type, so the pinned block fills the screen */
html.hx-pin .hx-case:only-of-type { height: 230vh; }
.hx-case:only-of-type .hx-case-title { font-size: clamp(2rem, 4.2vw, 3.4rem); }
.hx-case:only-of-type .hx-step-t { font-size: clamp(1.2rem, 2.1vw, 1.75rem); }
.hx-case:only-of-type .hx-step li { font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
html.hx-pin .hx-case:only-of-type .hx-step { min-height: 360px; }
@media (max-width: 960px) { html.hx-pin .hx-case:only-of-type .hx-step { min-height: 0; } }
