/* Homepage "LER in numbers", modeled on odama.io's About section (Ed, 2026-12-02). Odama's measured
   pattern in the homepage's own rhythm (same padding, gutters and background as the Services section
   that follows): the label in columns 1-2, the statement in 7-12 with a 100px first-line indent; a row
   of stats (number on top, dot and caption at the bottom, 206px tall, ruled) under a progress line;
   a drifting row of square cards with a marker strip. Type is the homepage's Geist Pixel. */
.hab {
  --hab-ink: #0a0a0a;
  --hab-muted: #6b6b6b;
  --hab-rule: #e6e4e0;
  --hab-surface: #efede8;
  --hab-dark: #141a1c;
  --hab-orange: #dd3d06;
  --hab-gutter: clamp(20px, 2.222vw, 44px);
  position: relative;
  z-index: 1;
  overflow: clip;
  padding: clamp(72px, 7vw, 110px) var(--hab-gutter) clamp(40px, 4vw, 64px);
  background: #f8f7f4;
  color: var(--hab-ink);
  scroll-margin-top: 110px;
}
.hab__inner { position: relative; max-width: 1900px; margin: 0 auto; }
.hab :is(h2, p, ul, li, button, span, strong, b, q, small) { font-family: 'LER Home Pixel', ui-monospace, monospace; font-synthesis-weight: none; font-variation-settings: 'ELSH' 0; }
/* v2-mega.css sets h2 and its spans in "LER Approach" with !important; this heading is pixel type */
.hab .hab__title, .hab .hab__title span { font-family: 'LER Home Pixel', ui-monospace, monospace !important; letter-spacing: -.025em !important; }
.hab .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* label and statement */
.hab__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 8px; row-gap: 12px; }
.hab__label { grid-column: 1 / 3; margin: 0; color: var(--hab-muted); font-size: 16px; line-height: 24px; font-weight: 400; }
.hab__title { grid-column: 7 / 13; margin: 0; color: var(--hab-muted); font-size: 36px; line-height: 1; font-weight: 400; text-indent: 100px; text-wrap: pretty; }
.hab__lead { color: var(--hab-ink); }
.hab.is-scrub .hab__lead { color: var(--hab-muted); }
.hab.is-scrub .hab__w { color: color-mix(in srgb, var(--hab-ink) calc(var(--w, 0) * 100%), var(--hab-muted)); }

/* stats */
.hab__stats { --p: 0; --out: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 8vh, 96px); }
.hab__line { position: absolute; z-index: 2; top: 0; left: 0; right: 0; height: 1px; pointer-events: none; opacity: calc(1 - var(--out)); }
.hab__line-fill { position: absolute; inset: 0; background: var(--hab-orange); transform-origin: left center; transform: scaleX(var(--p)); }
.hab__plume { position: absolute; left: 0; bottom: 1px; width: 100%; height: 20px; -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%); mask-image: linear-gradient(to bottom, transparent 0%, #000 45%); }
.hab__stat {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 206px;
  margin: 0;
  padding: 26px 26px 24px;
  border: 0;
  border-top: 1px solid var(--hab-rule);
  border-radius: 0;
  background: none;
  color: var(--hab-ink);
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.hab__stat + .hab__stat { border-left: 1px solid var(--hab-rule); }
.hab__stat:focus { outline: none; }
.hab__stat:focus-visible { outline: 2px solid var(--hab-orange); outline-offset: 2px; z-index: 3; }
.hab__num { display: block; font-size: clamp(42px, 4.4vw, 72px); line-height: .95; font-weight: 400; letter-spacing: -.04em; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .25s ease-out; }
.hab__stats.is-hovering .hab__stat:not(.is-hover) .hab__num { color: rgba(10, 10, 10, .25); }
.hab__cap { display: flex; align-items: baseline; gap: 10px; margin-top: 40px; font-size: 16px; line-height: 24px; font-weight: 400; }
.hab__dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: rgba(107, 107, 107, .6); transform: translateY(-2px); transition: background-color .3s ease; }
.hab__stat[aria-pressed="true"] .hab__dot { background: var(--hab-orange); }
.hab__fire { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity 1.2s ease; }
.hab__stat.is-fire .hab__fire { opacity: .6; transition-duration: .4s; }

/* card row: full bleed, square cards, a marker strip under them */
.hab__reel { --cw: 110px; --crest: 50px; position: relative; margin: clamp(48px, 8vh, 80px) calc(-1 * var(--hab-gutter)) 0; }
.hab__track { position: relative; height: calc(var(--cw) + var(--crest)); overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.hab__track.is-dragging { cursor: grabbing; }
.hab__card { position: absolute; top: var(--crest); left: 0; width: var(--cw); height: var(--cw); will-change: transform; }
.hab__face { position: absolute; inset: 0; overflow: hidden; border-radius: 8px; background: var(--hab-surface); }
.hab__card.is-dark .hab__face { background: var(--hab-dark); }
.hab__img { display: block; width: 100%; height: 100%; pointer-events: none; }
.hab__img--image { object-fit: cover; transform: scale(1.05); transition: transform .7s cubic-bezier(.16, 1, .3, 1); }
.hab__card.is-near .hab__img--image { transform: scale(1.1); }
/* Motion tiles: the video lies over its WebP poster and fades in on its first played frame (the poster shows until then). */
.hab__video { position: absolute; inset: 0; object-fit: cover; opacity: 0; transition: opacity .35s ease, transform .7s cubic-bezier(.16, 1, .3, 1); }
.hab__video.is-ready { opacity: 1; }
.hab__img--logo, .hab__img--mark { object-fit: contain; padding: 17%; box-sizing: border-box; }
/* Logo cards on a photo background (the background uses the image-card rules above; the logo sits centred on it). */
.hab__logo { position: absolute; left: 50%; top: 50%; width: var(--lw, 70%); height: var(--lh, 45%); transform: translate(-50%, -50%); object-fit: contain; pointer-events: none; }
.hab__img--logo.is-ink { filter: brightness(0); opacity: .82; }
.hab__img--mark { filter: brightness(0); opacity: .78; padding: 30%; }
.hab__review { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.hab__stars { display: flex; gap: 2px; color: var(--hab-orange); }
.hab__stars svg { width: 10px; height: 10px; fill: currentColor; stroke: none !important; }
.hab__review q { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; color: var(--hab-ink); font-size: clamp(11px, .85vw, 14px); line-height: 1.3; quotes: "\201C" "\201D"; }
.hab__review small { margin-top: auto; color: var(--hab-muted); font-size: 11px; line-height: 1.2; }
.hab__strip { position: relative; height: 60px; margin-top: 16px; border-top: 1px solid var(--hab-rule); margin-inline: var(--hab-gutter); }
.hab__marker { position: absolute; top: -4px; left: calc(-1 * var(--hab-gutter)); display: flex; flex-direction: column; align-items: center; gap: 22px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.hab__marker.is-on { opacity: 1; transition-duration: .35s; }
.hab__marker i { display: block; width: 7px; height: 7px; border-radius: 50%; background: var(--hab-orange); }
.hab__marker b { position: absolute; top: 30px; white-space: nowrap; transform: translateX(-50%); left: 50%; color: var(--hab-ink); font-size: 14px; line-height: 1; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; }
.hab__marker b { left: 3.5px; }

/* tablets: two by two */
@media (max-width: 1099px) and (min-width: 768px) {
  .hab__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hab__stat:nth-of-type(3) { border-left: 0; }
}
@media (max-width: 1023px) { .hab__reel { --crest: 32px; } .hab__review q { -webkit-line-clamp: 3; font-size: 10px; } .hab__review { padding: 9px; gap: 5px; } }

/* phones: the label above the statement, stats stacked against a left rule with a vertical progress line */
@media (max-width: 767px) {
  .hab__head { grid-template-columns: minmax(0, 1fr); }
  .hab__label, .hab__title { grid-column: 1; }
  .hab__title { font-size: 28px; line-height: 1.05; text-indent: 0; }
  .hab__stats { grid-template-columns: minmax(0, 1fr); margin-top: 34px; border-left: 1px solid var(--hab-rule); }
  .hab__stat, .hab__stat + .hab__stat { min-height: 172px; padding: 28px 20px 22px 24px; border-left: 0; }
  .hab__line { top: 0; bottom: 0; left: -1px; right: auto; width: 1px; height: auto; }
  .hab__line-fill { transform-origin: center top; transform: scaleY(var(--p)); }
  .hab__plume { display: none; }
  .hab__num { font-size: clamp(44px, 13vw, 60px); }
  .hab__cap { margin-top: 28px; }
  .hab__reel { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .hab__num, .hab__dot, .hab__fire, .hab__marker, .hab__img--image { transition: none !important; }
}
@media (forced-colors: active) { .hab__fire, .hab__plume { display: none; } }
