/* Home page. One rule runs through every picture: everything grey, one thing orange, the one that is live.
   Colours, type and easing come from tokens.css; buttons, links, header and footer from site.css. Sections: home-demos.css. */

/* ───────── 1. Page grammar ───────── */
/* the header stands on the hall's floor until the page moves */
body.site:has(.hall) .s-head:not([data-scrolled]) { background: var(--hall); }

.hm-h1, .hm-h2 { font-family: var(--font-sans); font-weight: 500; letter-spacing: -.03em; color: var(--text); text-wrap: balance; }
.hm-h1 { font-size: clamp(2.5rem, 1.1rem + 3.7vw, 4.75rem); line-height: 1.08; }
.hm-h2 { font-size: clamp(1.875rem, 1.15rem + 1.9vw, 3rem); line-height: 1.12; }
.hm-h3 { font: 500 1.25rem/1.3 var(--font-sans); letter-spacing: -.015em; color: var(--text); }
.hm-lede { font-size: clamp(1.0625rem, .95rem + .35vw, 1.25rem); line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.hm-sec { position: relative; padding-block: 96px 0; }
.hm-sec:last-child { padding-bottom: 96px; }
.hm-head { display: grid; gap: 16px; }
.hm-head .hm-lede { max-width: 38rem; }
.hm-head > div:not(.segmented, .s-cta-row) { display: grid; gap: 16px; align-content: start; }
.hm-head .s-link { justify-self: start; }
.hm-a { color: var(--text); text-decoration: underline; text-decoration-color: var(--link-line); text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-color 160ms var(--ease); }
@media (hover: hover) and (pointer: fine) { .hm-a:hover { text-decoration-color: currentColor; } }
/* head row: the heading on five columns, the words on six */
@media (min-width: 960px) {
  .hm-sec { padding-block: 128px 64px; }
  .hm-head--row { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 24px 64px; align-items: start; }
  .hm-head--row > :last-child { justify-self: end; }
  .hm-head--row > a:last-child, .hm-head--row > .segmented:last-child, .hm-head--row > .s-cta-row:last-child { align-self: end; }
  .hm-head--row > div:last-child:not(.segmented, .s-cta-row) { justify-self: stretch; }
}
/* one section per screen: the main visual takes what the heading leaves */
@media (min-width: 1200px) and (min-height: 780px) {
  .hm-sec { min-height: min(100svh, 1080px); }
  .hm-sec--fit { height: min(100svh, 1080px); display: grid; }
  .hm-sec--fit > .s-wrap { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
}
.hm-body { margin-top: 48px; min-width: 0; }
@media (max-width: 959px) { .hm-body { margin-top: 32px; } }

.hm-pause { position: relative; flex: none; display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--sheet); color: var(--sheet-text); cursor: pointer; transition: transform 120ms var(--ease); }
.hm-pause::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.hm-pause:active { transform: scale(.94); }
.hm-pause span { grid-area: 1 / 1; display: grid; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
.hm-pause .icon { width: 14px; height: 14px; fill: currentColor; stroke-width: 0; }
.hm-pause .is-play, .hm-pause[aria-pressed='true'] .is-pause { opacity: 0; transform: scale(.7); }
.hm-pause[aria-pressed='true'] .is-play { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .hm-pause { display: none; } }

/* ───────── 2. Hero: the hall ───────── */
.hall { position: relative; isolation: isolate; overflow: clip; background: var(--hall); min-height: calc(100svh - var(--head-h)); display: grid; }
.hall-in { display: grid; grid-template-rows: 1fr auto; gap: 32px; padding-block: clamp(40px, 6.6svh, 64px) clamp(24px, 4svh, 40px); pointer-events: none; }
.hall-in > * > * { pointer-events: auto; }
.hall-copy { align-self: start; max-width: 45rem; }
.hall-copy .hm-h1 { max-width: 9.6em; }
.hall-copy .hm-lede { max-width: 27.5rem; margin-top: clamp(16px, 2.6svh, 24px); }
.hall-copy .s-cta-row { margin-top: clamp(20px, 3.4svh, 32px); }
.hall-fact { max-width: 19rem; margin-top: clamp(14px, 2.2svh, 20px); color: var(--text-2); font-size: .9375rem; line-height: 1.5; text-wrap: balance; }
body.site .hall .btn-ghost { color: var(--text); }

.hall-scene { position: absolute; inset: 0; z-index: -1; }
/* the card of the response being read: an orange tab on the object, the wording under it, the stars given */
.hall-card { position: absolute; left: 0; top: 0; width: 272px; color: var(--sheet-text); pointer-events: none; transform: translate(var(--tx, 0), var(--ty, 0)); transition: transform 300ms var(--ease), opacity 160ms var(--ease); }
.hall:not([data-ready]) .hall-card { opacity: 0; }
.hall-tab { display: flex; justify-content: space-between; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 10px 10px 0 0; background: var(--accent); color: var(--accent-ink); font: 500 .8125rem/1 var(--font-mono); letter-spacing: -.01em; }
.hall-tab b { font-weight: 500; }
.hall-q { display: block; padding: 12px 12px 8px; background: var(--sheet); font: 500 1.0625rem/1.3 var(--font-sans); letter-spacing: -.01em; text-wrap: balance; }
.hall-stars { display: flex; gap: 4px; padding: 0 12px 14px; border-radius: 0 0 10px 10px; background: var(--sheet); color: var(--sheet-line); }
.hall-stars .icon { width: 18px; height: 18px; fill: currentColor; stroke-width: 0; transition: color 120ms linear; }
.hall-stars[data-h-s='1'] .icon:nth-child(-n+1), .hall-stars[data-h-s='2'] .icon:nth-child(-n+2), .hall-stars[data-h-s='3'] .icon:nth-child(-n+3), .hall-stars[data-h-s='4'] .icon:nth-child(-n+4), .hall-stars[data-h-s='5'] .icon { color: var(--sheet-text); }
.hall-card::after { content: ''; position: absolute; background: var(--accent); }
.hall-card[data-at='up']::after { left: 24px; top: 100%; width: 2px; height: 24px; }
.hall-card[data-at='end']::after { right: 24px; top: 100%; width: 2px; height: 24px; }
.hall-card[data-at='right']::after { right: 100%; top: 15px; width: 24px; height: 2px; }
.hall-card[data-at='left']::after { left: 100%; top: 15px; width: 24px; height: 2px; }
.hall-card[data-at='down']::after { left: 24px; bottom: 100%; width: 2px; height: 24px; }

.hall-read { --knob-ring: var(--hall); --track: transparent; display: flex; align-items: flex-start; gap: 16px; width: 280px; max-width: 100%; }
.hall-read[hidden] { display: none; }
.hall-track { position: relative; flex: 1; min-width: 0; }
.hall-track .hm-range { position: relative; z-index: 1; }
.hall-vs { display: flex; gap: 6px; margin-top: -17px; padding-inline: 10px; color: var(--text-2); font: 500 .8125rem/1.2 var(--font-mono); }
.hall-vs span { min-width: 0; padding-top: 18px; border-top: 2px solid color-mix(in oklab, var(--hall-ink) 70%, var(--text-2)); }
.hall-vs .is-live { color: var(--text); }

/* narrower than the render was framed for: the hall slides right, off the words */
@media (max-width: 1279px) { .hall-stage { right: min(0px, (100vw - 1280px) * .48); } }
@media (max-width: 959px) {
  .hall { display: flex; flex-direction: column; }
  .hall-in { order: -1; display: block; padding-bottom: 0; }
  .hall-scene { position: relative; inset: auto; z-index: 0; flex: 1 1 auto; min-height: 74vw; margin-top: -8px; overflow: clip; }
  .hall-stage { right: auto; left: 0; translate: -18% 0; }
  .hall-read { position: absolute; left: var(--pad); bottom: 24px; z-index: 2; }
}
@media (max-width: 640px) {
  .hall-in { padding-top: 16px; }
  .hall .hm-lede { max-width: none; font-size: 1rem; }
  .hall .s-cta-row .btn { width: 100%; justify-content: center; }
  .hall .s-cta-row .s-cta-2 { display: none; }
  .hall-fact { max-width: none; font-size: .875rem; }
  .hall-scene { min-height: 0; padding-bottom: 72px; }
  .hall-stage { position: relative; width: max-content; height: clamp(250px, 36svh, 400px); translate: -22% 0; }
  .hall-card, .hall[data-ready] .hall-card { position: relative; z-index: 2; width: auto; margin: -72px var(--pad) 0; transform: none; }
  .hall-card::after { display: none; }
  .hall-read { left: var(--pad); right: var(--pad); width: auto; bottom: 16px; }
}
