/* Homepage Services, modeled on odama.io's Services section (Ed, 2026-12-02). Odama's measured
   geometry inside the homepage's own section rhythm: a 12-column grid with 8px gaps; the label in
   columns 1-6 and the intro in 7-10; rows with the number at the left edge and the icon and name from
   column 7; a 4:3 cube stage at 14% from the left, min(34vw, 560px) wide and centred on the list; a
   pill that slides behind the active row. Type is the homepage's Geist Pixel ('LER Home Pixel'). */
.hsv {
  --hsv-ink: #0a0a0a;
  --hsv-muted: #6b6b6b;
  --hsv-pill: #eeece6;
  --hsv-orange: #dd3d06;
  position: relative;
  z-index: 1;
  overflow: clip;
  padding: clamp(72px, 7vw, 110px) clamp(20px, 2.222vw, 44px);
  background: #f8f7f4;
  color: var(--hsv-ink);
  scroll-margin-top: 130px;
}
.hsv__inner { position: relative; max-width: 1900px; margin: 0 auto; }
.hsv :is(h2, p, ul, li, a, button, span) { font-family: 'LER Home Pixel', ui-monospace, monospace; font-synthesis-weight: none; font-variation-settings: 'ELSH' 0; }

/* header: small label left, the intro (the section heading) in columns 7-10 */
.hsv__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 8px; row-gap: 12px; }
.hsv__label { grid-column: 1 / 7; margin: 0; color: var(--hsv-muted); font-size: 16px; line-height: 1; font-weight: 400; letter-spacing: 0; }
.hsv__intro { grid-column: 7 / 11; }
.hsv__title { margin: 0; color: var(--hsv-ink); font-size: 24px; line-height: 1.12; font-weight: 400; letter-spacing: -.01em; text-wrap: pretty; }
/* v2-mega.css sets every h2 in "LER Approach" with !important; this section's heading is pixel type */
.hsv .hsv__title { font-family: 'LER Home Pixel', ui-monospace, monospace !important; }
/* v2-home.css strokes every svg (1.6 units), which fills a 16-pixel icon solid: the pixel icons are fill only */
.hsv :is(.hsv__name svg, .hsv__fallback), .hsv :is(.hsv__name svg, .hsv__fallback) path { stroke: none !important; }
.hsv__all { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 10px; color: var(--hsv-ink); font-size: 14px; line-height: 1.3; text-decoration: none; }
.hsv__all svg { width: 14px; height: 14px; transition: transform .25s ease; }
.hsv__all:hover { color: var(--hsv-orange); }
.hsv__all:hover svg { transform: translateX(4px); }

/* rows */
.hsv__body { position: relative; margin-top: 80px; }
.hsv__listwrap { position: relative; }
.hsv__list { margin: 0; padding: 0; list-style: none; }
.hsv__list > li { margin: 0; padding: 0; }
.hsv__row {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 8px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-radius: 8px;
  background: none;
  color: rgba(10, 10, 10, .85);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color .3s cubic-bezier(.4, 0, .2, 1);
  -webkit-tap-highlight-color: transparent;
}
.hsv__row[aria-current="true"] { color: var(--hsv-ink); }
.hsv__row:focus { outline: none; }
.hsv__row:focus-visible { outline: 2px solid var(--hsv-orange); outline-offset: 2px; }
.hsv__num { grid-column: 1 / 3; padding-left: 8px; color: var(--hsv-ink); font-size: 14px; line-height: 1.4; font-weight: 400; font-variant-numeric: tabular-nums; }
.hsv__name { grid-column: 7 / 13; display: flex; align-items: center; gap: 12px; min-width: 0; font-size: clamp(26px, 2.78vw, 40px); line-height: 1.15; font-weight: 400; letter-spacing: -.02em; }
.hsv__name svg { flex: none; width: 32px; height: 32px; fill: currentColor; shape-rendering: crispEdges; }
.hsv__pill {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  right: 0;
  height: 58px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--hsv-pill);
  opacity: 0;
  pointer-events: none;
  transform: translateY(0);
  transition: transform .55s cubic-bezier(.16, 1, .3, 1), height .55s cubic-bezier(.16, 1, .3, 1), opacity .5s ease;
}
.hsv.is-pill .hsv__pill { opacity: 1; }
.hsv__fire { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.hsv.is-pill .hsv__fire { opacity: .6; transition-duration: .4s; }

/* the group's services, under the list (an LER addition: keeps the links the old cards had) */
.hsv__detail { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 8px; margin-top: 28px; }
.hsv__sub { grid-column: 7 / 13; }
/* with script, all four groups share one cell so the area keeps the tallest group's height and
   nothing below moves when the selection changes; the others are hidden from view and from tab order */
.hsv.is-js .hsv__sub { grid-row: 1; }
.hsv.is-js .hsv__sub[hidden] { display: block; visibility: hidden; }
.hsv.is-js .hsv__sub:not([hidden]) { animation: hsv-in .35s ease both; }
.hsv__subs { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; }
.hsv__subs a, .hsv__group { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; color: #4b4b4b; font-size: 15px; line-height: 1.3; text-decoration: none; }
.hsv__subs a svg, .hsv__group svg { width: 11px; height: 11px; color: #9a9a96; transition: transform .2s ease, color .2s ease; }
.hsv__subs a:hover, .hsv__group:hover { color: var(--hsv-orange); }
.hsv__subs a:hover svg, .hsv__group:hover svg { color: inherit; transform: translate(2px, -2px); }
.hsv__group { margin-top: 6px; color: var(--hsv-ink); }
.hsv :is(.hsv__subs a, .hsv__group, .hsv__all):focus-visible { outline: 2px solid var(--hsv-orange); outline-offset: 3px; border-radius: 3px; }
@keyframes hsv-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* the 3D stage: 4:3, 14% from the left, centred on the list; the canvas is 2.2 times the stage so the
   scattering cubes are not cut off at its edge mid-morph */
.hsv__stage { position: absolute; z-index: 3; left: 14%; top: 50%; width: min(34vw, 560px); aspect-ratio: 4 / 3; transform: translateY(-50%); pointer-events: none; }
.hsv__canvas { position: absolute; left: -60%; top: -60%; width: 220%; height: 220%; opacity: 0; transition: opacity .7s ease; }
.hsv.is-3d .hsv__canvas { opacity: 1; }
.hsv__fallback { position: absolute; left: 50%; top: 50%; width: 42%; height: auto; max-height: 56%; transform: translate(-50%, -50%) rotate(-6deg); fill: #d6d3cb; shape-rendering: crispEdges; transition: opacity .5s ease; }
.hsv.is-3d .hsv__fallback { opacity: 0; }

/* phones: the stage sits in the flow above the list; numbers take two columns, names ten */
@media (max-width: 767px) {
  .hsv__head { grid-template-columns: minmax(0, 1fr); }
  .hsv__label, .hsv__intro { grid-column: 1; }
  .hsv__title { font-size: 22px; }
  .hsv__body { display: flex; flex-direction: column; margin-top: 32px; }
  .hsv__stage { position: relative; left: auto; top: auto; width: min(100%, 420px); margin: 0 auto 24px; transform: none; order: -1; }
  .hsv__listwrap { order: 0; }
  .hsv__num { grid-column: 1 / 3; padding-left: 8px; font-size: 13px; }
  .hsv__name { grid-column: 3 / 13; gap: 10px; font-size: clamp(18px, 5.6vw, 28px); }
  .hsv__name svg { width: 24px; height: 24px; }
  .hsv__pill { height: 33px; }
  .hsv__detail { grid-template-columns: minmax(0, 1fr); margin-top: 20px; min-height: 0; }
  .hsv__sub { grid-column: 1; }
  .hsv__subs a, .hsv__group { min-height: 40px; font-size: 14px; }
}
@media (min-width: 768px) and (max-width: 1099px) {
  .hsv__intro { grid-column: 7 / 13; }
  .hsv__name { grid-column: 6 / 13; }
  .hsv__sub { grid-column: 6 / 13; }
  /* names start a column earlier here (longer Spanish names), so the stage sits between the numbers and the names */
  .hsv__stage { left: 60px; width: min(29vw, 300px); }
}
@media (prefers-reduced-motion: reduce) {
  .hsv__row, .hsv__pill, .hsv__fire, .hsv__canvas, .hsv__fallback, .hsv__all svg, .hsv__subs a svg { transition: none !important; }
  .hsv.is-js .hsv__sub:not([hidden]) { animation: none; }
}
@media (forced-colors: active) {
  .hsv__pill { background: Highlight; opacity: .25 !important; }
  .hsv__fire { display: none; }
}
