/* Homepage. Everything is scoped to .hp or hp- so shared site styles stay untouched. */
.hp {
  --ground: #030205;
  --surface: #0E0D12;
  --raised: #17151C;
  --ink: #F6F4F9;
  --soft: #D8D3E0;
  --yellow: #FFD60A;
  --gutter: max(24px, calc((100vw - 1200px) / 2 + 24px));
  --rail: 132px;
  background: var(--ground);
  color: var(--ink);
}
.hp #world { position: fixed; inset: 0; z-index: 0; }
.hp #world canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .5s; }
.hp #world.ready canvas { opacity: 1; }
.hp-3d .hp #world { background: var(--ground) url(/images/home/request.jpg) center / cover no-repeat; }
.hp-3d .hp #world.ready { background: var(--ground); }
.hp #siteFooter { position: relative; z-index: 3; background: var(--ground); }
.hp-main { position: relative; z-index: 2; pointer-events: none; font-family: 'Manrope', 'Segoe UI', sans-serif; font-size: 18px; line-height: 1.55; color: var(--ink); }
.hp-main a, .hp-main button { pointer-events: auto; }
.hp-main h1, .hp-main h2 { color: var(--ink); font-weight: 700; letter-spacing: -.035em; }
.hp-main h1 { font-size: clamp(40px, 6.4vw, 104px); line-height: .98; width: max-content; max-width: 100%; }
.hp-main h2 { font-size: clamp(38px, 4.3vw, 66px); line-height: 1.02; }
.hp-main .btn { font-family: 'Manrope', 'Segoe UI', sans-serif; font-weight: 700; }
.hp-main .btn-secondary { background: var(--raised); color: var(--ink); }
.hp-main .btn:focus-visible, .hp-goals button:focus-visible, .hp-video:focus-visible, .hp-kinds a:focus-visible, .hp-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hp-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.hp-beat { min-height: 125vh; display: flex; align-items: center; padding: 100px var(--gutter); }
.hp-beat.right { justify-content: flex-end; padding-right: max(var(--gutter), var(--rail)); }
.hp-copy { pointer-events: auto; width: min(540px, 100%); text-shadow: 0 0 26px #030205, 0 0 8px #030205; } /* taste-skill-ignore: keeps text readable over the 3D world */
.hp-copy .btn, .hp-copy .hp-goals button { text-shadow: none; } /* taste-skill-ignore */
.hp-hero .hp-copy { width: min(780px, 100%); }
.hp-hero .hp-lead { max-width: 520px; }
.hp-lead { margin: 22px 0 26px; font-size: clamp(18px, 1.5vw, 21px); }
.hp-note { font-size: 15px; color: var(--soft); }
.hp-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hp-goals { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.hp-goals button { border: 0; padding: 9px 14px; border-radius: 8px; background: var(--raised); color: var(--ink); font: 600 14px 'Manrope', sans-serif; cursor: pointer; }
.hp-goals button[aria-pressed="true"] { background: var(--yellow); color: var(--ground); }
.hp-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.hp-tags li { background: var(--raised); padding: 6px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; }
.hp-panel { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 40px; padding: 120px max(var(--gutter), var(--rail)) 120px var(--gutter); background: rgba(3, 2, 5, .8); scroll-margin-top: 64px; }
.hp-beat.long { min-height: 440vh; align-items: flex-start; }
.hp-beat.long .hp-copy { position: sticky; top: 20vh; }
.hp-step { margin-bottom: 18px; font-size: clamp(20px, 1.8vw, 26px); font-weight: 700; letter-spacing: -.015em; color: var(--yellow); min-height: 2.5em; }
.hp-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hp-kinds a { display: block; padding: 26px 22px; min-height: 170px; background: var(--surface); border-radius: 12px; color: var(--ink); transition: background .2s, color .2s; }
.hp-kinds a:hover { background: var(--yellow); color: var(--ground); }
.hp-kinds b { display: block; font-size: 26px; letter-spacing: -.02em; margin-bottom: 10px; }
.hp-kinds a:first-child { grid-column: span 2; }
.hp-video { position: relative; display: block; width: 100%; max-width: 1040px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--surface); cursor: pointer; }
.hp-video img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .35s; }
.hp-video:hover img { transform: scale(1.02); }
.hp-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hp-play { position: absolute; left: 50%; top: 50%; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; background: var(--yellow); }
.hp-play::after { content: ''; position: absolute; left: 41px; top: 31px; border-style: solid; border-width: 21px 0 21px 32px; border-color: transparent transparent transparent var(--ground); }
.hp-close { justify-content: flex-end; padding-right: max(var(--gutter), var(--rail)); }
.hp-3d .hp-close { min-height: 260vh; align-items: flex-start; }
.hp-3d .hp-close .hp-copy { position: sticky; top: 34vh; }
.hp-account { margin-top: 16px; }
.hp-soon { margin-top: 14px; }

/* Still pictures for visitors without 3D: no script, reduced motion, data saver, no WebGL. */
html:not(.hp-3d) .hp #world, html:not(.hp-3d) .hp-needs-3d { display: none; }
html:not(.hp-3d) .hp-beat { min-height: 100svh; background: var(--ground) var(--still) center / cover no-repeat; }
html:not(.hp-3d) .hp-copy { position: static; }
.hp-beat[data-chapter="Request"] { --still: url(/images/home/request.jpg); }
.hp-beat[data-chapter="Project"] { --still: url(/images/home/project.jpg); }
.hp-beat[data-chapter="Workflow"] { --still: url(/images/home/workflow.jpg); }
.hp-beat[data-chapter="Team"] { --still: url(/images/home/team.jpg); }
.hp-beat[data-chapter="On the go"] { --still: url(/images/home/go.jpg); }
.hp-beat[data-chapter="Models"] { --still: url(/images/home/models.jpg); }
.hp-beat[data-chapter="Approval"] { --still: url(/images/home/approval.jpg); }
.hp-beat[data-chapter="Memory"] { --still: url(/images/home/memory.jpg); }
.hp-beat[data-chapter="Tools"] { --still: url(/images/home/tools.jpg); }
.hp-beat[data-chapter="Office"] { --still: url(/images/home/office.jpg); }
.hp-beat[data-chapter="Download"] { --still: url(/images/home/download.jpg); }
.hp #burst { position: fixed; left: 50%; top: 50%; z-index: 5; width: min(52vw, 620px); transform: translate(-50%, -50%) scale(.2); opacity: 0; pointer-events: none; }
.hp #burst img { width: 100%; }

/* Story player */
.hp-player { position: fixed; right: 18px; top: 50%; z-index: 20; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; transform: translateY(-50%); font-family: 'Manrope', 'Segoe UI', sans-serif; transition: opacity .25s; }
.hp-player.away { opacity: 0; pointer-events: none; }
.hp-player button { display: block; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.hp-player button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.hp-player .ctl { width: 34px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; }
.hp-player .ctl:hover { background: var(--raised); }
.hp-player .ctl svg { width: 16px; height: 16px; fill: currentColor; }
.hp-player .ctl.main { width: 34px; height: 34px; margin-bottom: 6px; background: var(--yellow); color: var(--ground); }
.hp-player .ctl.main:hover { background: #fff; }
.hp-chapters { position: relative; list-style: none; }
.hp-chapters::before, .hp-fill { content: ''; position: absolute; right: 16px; top: 13px; bottom: 13px; width: 2px; background: rgba(246, 244, 249, .2); }
.hp-fill { background: var(--yellow); transform: scaleY(0); transform-origin: top; }
.hp-chapters button { position: relative; display: flex; align-items: center; justify-content: flex-end; height: 26px; width: 34px; padding: 0; }
.hp-chapters i { position: absolute; right: 12px; width: 10px; height: 10px; border-radius: 50%; background: #5B5664; transition: transform .2s, background .2s; }
.hp-chapters .done i { background: var(--yellow); }
.hp-chapters [aria-current] i { background: var(--yellow); transform: scale(1.5); }
.hp-chapters button:hover i { transform: scale(1.4); }
.hp-chapters span { position: absolute; right: 34px; padding: 2px 9px; border-radius: 6px; background: var(--raised); color: var(--ink); font-size: 13px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateX(6px); transition: opacity .15s, transform .15s; pointer-events: none; }
.hp-chapters [aria-current] span, .hp-chapters button:hover span, .hp-chapters button:focus-visible span { opacity: 1; transform: none; }
.hp-chapters [aria-current] span { background: var(--yellow); color: var(--ground); }
.hp-chapters span svg { display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hp-now { display: none; }

@media (max-width: 1024px) {
  .hp { --rail: 24px; }
  .hp-player { left: 12px; right: 12px; top: auto; bottom: 12px; flex-direction: row; align-items: center; gap: 2px; padding: 6px; border-radius: 12px; background: var(--surface); transform: none; }
  .hp-chapters { display: none; }
  .hp-now { display: block; flex: 1; text-align: center; font-size: 14px; font-weight: 600; color: var(--ink); }
  .hp-player .ctl, .hp-player .ctl.main { width: 40px; height: 40px; margin: 0; }
  .hp-player .ctl.main { order: 3; }
  .hp-player .ctl.prev { order: 1; }
  .hp-now { order: 2; }
  .hp-player .ctl.next { order: 4; }
  .hp-player .prev svg { transform: rotate(-90deg); }
  .hp-player .next svg { transform: rotate(-90deg); }
}
@media (max-width: 760px) {
  .hp-3d .hp-close .hp-copy { top: 84px; }
  .hp-beat, .hp-beat.right, .hp-close { min-height: 130vh; align-items: flex-end; justify-content: flex-start; padding: 100px 24px 16vh; }
  html:not(.hp-3d) .hp-beat { min-height: 100svh; align-items: flex-end; background-size: auto 62vh; background-position: 72% 64px; }
  .hp-hero { align-items: flex-start; padding-top: 104px; }
  .hp-beat.long { align-items: flex-start; }
  .hp-beat.long .hp-copy { top: calc(100svh - 270px); }
  .hp-beat.long .hp-lead { display: none; }
  .hp-beat.long h2 { font-size: 30px; }
  .hp-step { min-height: 0; margin-top: 10px; font-size: 19px; }
  .hp-panel { padding: 96px 24px 110px; }
  .hp-kinds { grid-template-columns: 1fr; }
  .hp-kinds a:first-child { grid-column: auto; }
  .hp-kinds a { min-height: 0; }
  .hp-play { transform: scale(.65); }
}
@media (prefers-reduced-motion: reduce) {
  .hp-video img, .hp-kinds a, .hp-chapters i, .hp-chapters span, .hp-player { transition: none; }
  .hp-player .ctl.main { display: none; }
  .hp-chapters span { display: none; opacity: 1; transform: none; }
  .hp-chapters [aria-current] span, .hp-chapters button:hover span, .hp-chapters button:focus-visible span { display: block; }
}
