/* Home intro + hero (Nov 2026): the robot intro plays over everything, then the hero with the closed laptop.
   Flat colours only. Script: assets/js/robot.js; who gets the intro is decided at the top of src/pages/home.html. */

/* ---------- the intro layer ---------- */
html.rb-playing { overflow: hidden; }
/* keep the scrollbar's space while the intro hides it, so the page doesn't jump sideways when it ends */
html { scrollbar-gutter: stable; }
#rbIntro, #rbShards { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 300; }
#rbShards { z-index: 301; pointer-events: none; }
.rb-label { position: fixed; z-index: 302; left: 50%; top: calc(20px + env(safe-area-inset-top, 0px)); translate: -50% 0; margin: 0; font: 500 13px "Geist Mono", ui-monospace, monospace; color: #A6B4B6; pointer-events: none; white-space: nowrap; }
.rb-skip { position: fixed; z-index: 303; right: max(16px, 3vw); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid #33464B; background: #121D20; color: #ECF0F0; font: 500 15px "Bricolage Grotesque", "Geist", system-ui, sans-serif; cursor: pointer; }
.rb-skip:focus-visible { outline: 2px solid #B8432F; outline-offset: 2px; }
/* hold to skip: a ring fills around the finger or pointer */
html.rb-playing, html.rb-playing body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
html.rb-playing #rbIntro, html.rb-playing #rbShards { touch-action: none; }
.rb-hold { position: fixed; z-index: 304; left: 0; top: 0; width: 76px; height: 76px; margin: -38px 0 0 -38px; pointer-events: none; opacity: 0; transition: opacity .15s; }
.rb-hold.on { opacity: 1; }
.rb-hold svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rb-hold circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.rb-hold__track { stroke: rgba(236, 240, 240, .25); }
.rb-hold__fill { stroke: #B8432F; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .2s ease-out; }
.rb-hold.on .rb-hold__fill { stroke-dashoffset: 0; transition: stroke-dashoffset .9s linear; }
.rb-hold span { position: absolute; left: 50%; top: 100%; translate: -50% 4px; white-space: nowrap; font: 500 12px "Geist Mono", ui-monospace, monospace; color: #ECF0F0; background: #121D20; padding: 3px 7px; border-radius: 6px; }
.gone { opacity: 0 !important; pointer-events: none !important; visibility: hidden; }
/* while the 3D loads (at most 2.5 s): a dark screen with a small boot line */
.rb-boot { display: none; position: fixed; inset: 0; z-index: 299; place-items: center; margin: 0; background: #0B1315; font: 500 14px "Geist Mono", ui-monospace, monospace; color: #A6B4B6; }
.intro-wait .rb-boot { display: grid; }
.intro-wait { overflow: hidden; }
.rb-boot i { display: inline-block; width: .6em; height: 2px; background: #B8432F; margin-left: 4px; vertical-align: 2px; animation: rb-blink 1s steps(1) infinite; }
@keyframes rb-blink { 50% { opacity: 0; } }

/* ---------- the hero ---------- */
.rbh { position: relative; background: #0B1315; color: #ECF0F0; padding: clamp(96px, 13vh, 130px) var(--g) clamp(40px, 6vh, 70px); }
.rbh__in { max-width: 1500px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(20px, 3vw, 56px); align-items: center; min-height: calc(100svh - 200px); }
.rbh__k { margin: 0 0 16px; font: 500 13px "Geist Mono", ui-monospace, monospace; color: #E0705C; }
.rbh__t { margin: 0; font: 600 clamp(2.4rem, 4.3vw, 4.2rem)/1 "Bricolage Grotesque", "Geist", system-ui, sans-serif; letter-spacing: -.05em; max-width: 19ch; text-wrap: balance; }
.rbh__b { margin: 20px 0 0; font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.5; color: #A6B4B6; max-width: 36ch; }
.rbh__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.rbh__copy > * { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.rbh.on .rbh__copy > * { opacity: 1; transform: none; }
.rbh.on .rbh__copy > :nth-child(2) { transition-delay: .08s; } .rbh.on .rbh__copy > :nth-child(3) { transition-delay: .16s; } .rbh.on .rbh__copy > :nth-child(4) { transition-delay: .24s; }
.rbh__stage { position: relative; min-width: 0; }
/* the detailed laptop (laptop.js "hero" mode): a fixed-height stage, the page scrolls normally */
.rbh .lp.lp--auto { height: auto; background: transparent; }
/* the laptop is built after the intro and fades in once its first frame is drawn */
.rbh .lp--auto .lp-pin { opacity: 0; transition: opacity .6s ease; }
.rbh .lp--auto.lp-in .lp-pin { opacity: 1; }
.rbh .lp--auto .lp-pin { position: relative; height: min(70svh, 720px); min-height: 300px; overflow: hidden; }
.rbh .lp--auto .lp-status { top: 12px; }
.rbh .lp--auto .lp-hint { bottom: 8px; color: #889A9C; }
.rbh__pic { display: block; width: 100%; height: auto; border-radius: 12px; }
.rbh__ask { text-align: center; margin-top: 6px; }
.rbh__ask p { margin: 0 0 10px; font-weight: 500; }
.rbh__open[hidden], .rbh__ask[hidden] { display: none; }
/* caption + site tabs under the open laptop (same look as before) */
.rbh .hx__cap { display: grid; gap: 6px; padding: 10px 0 0; }
.rbh .hx__where { margin: 0; font: 500 13px "Geist Mono", ui-monospace, monospace; color: #889A9C; }
.rbh .hx__res { margin: 0; font-size: clamp(1.05rem, 1.3vw, 1.2rem); line-height: 1.4; font-weight: 500; color: #ECF0F0; max-width: 52ch; }
.rbh .hx__res:empty { display: none; }
.rbh .hx__idea { margin: 0; font-size: 15px; line-height: 1.5; color: #A6B4B6; max-width: 56ch; }
.rbh .rbh__close { background: none; border: 0; padding: 0; color: #889A9C; font: 500 14px "Bricolage Grotesque", "Geist", system-ui, sans-serif; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.rbh .rbh__close:hover { color: #ECF0F0; }
.rbh .hx__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 8px; }
.rbh .hx__acts .btn { height: 40px; padding: 0 16px; font-size: 14.5px; }
.rbh .hx__case { color: #ECF0F0; font-size: 14.5px; text-decoration: none; }
.rbh .hx__case:hover { text-decoration: underline; text-underline-offset: 4px; }
.rbh .hx-tabs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); border-top: 1px solid #1D2B2F; }
.rbh .hx-tabs button { width: 100%; display: block; text-align: left; padding: 12px 8px 4px 0; background: none; border: 0; border-top: 2px solid transparent; margin-top: -1px; font: 500 14px "Bricolage Grotesque", "Geist", system-ui, sans-serif; color: #889A9C; cursor: pointer; }
.rbh .hx-tabs button span { display: block; font: 500 12px "Geist Mono", ui-monospace, monospace; margin-bottom: 4px; }
.rbh .hx-tabs button:hover { color: #ECF0F0; }
.rbh .hx-tabs button[aria-current="true"] { color: #ECF0F0; border-top-color: #B8432F; }
.rbh .hx-tabs button[aria-current="true"] span { color: #E0705C; }
.rbh .hx-tabs button:focus-visible { outline: 2px solid #B8432F; outline-offset: 2px; }
/* ---------- open layout: someone is using the laptop ----------
   the headline fades out (.is-leaving), then the laptop glides to the centre and grows (.is-open, FLIP move in home.html);
   under it: the short note (left) and the site caption (right), then the site tabs */
@keyframes rbh-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rbh__note { display: none; }
.rbh__nh { margin: 0; font: 600 clamp(1.15rem, 1.6vw, 1.4rem)/1.2 "Bricolage Grotesque", "Geist", system-ui, sans-serif; letter-spacing: -.02em; color: #ECF0F0; }
.rbh__note p { margin: 8px 0 0; font-size: 15.5px; line-height: 1.55; color: #A6B4B6; max-width: 56ch; }
.rbh.is-leaving .rbh__copy > * { opacity: 0; transform: translateY(-8px); transition-duration: .25s, .3s; transition-delay: 0s !important; }
.rbh.is-back .rbh__copy > * { animation: rbh-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.rbh { --pinh: clamp(360px, calc(100svh - 150px), 980px); }
.rbh.is-open { padding-top: clamp(78px, 10vh, 100px); }
.rbh.is-open .rbh__in { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-areas: "lap lap" "note cap" "tabs tabs"; column-gap: clamp(24px, 4vw, 64px); row-gap: 10px; align-items: start; min-height: 0; max-width: 1500px; }
.rbh.is-open .rbh__copy { display: none; }
.rbh.is-open .rbh__stage, .rbh.is-open .rbh__open { display: contents; }
.rbh.is-open .lp--auto { grid-area: lap; justify-self: center; width: min(100%, calc(var(--pinh) * 1.5 + 150px)); }
.rbh.is-open .lp--auto .lp-pin { height: var(--pinh); }
/* swipe between sites: sideways moves belong to the laptop, up and down still scroll the page */
.rbh.is-open .lp--auto { touch-action: pan-y; }
.rbh.is-open .rbh__note { display: block; grid-area: note; padding-top: 12px; animation: rbh-in .5s .25s cubic-bezier(.2, .8, .2, 1) both; }
.rbh.is-open .hx__cap { grid-area: cap; animation: rbh-in .5s .32s cubic-bezier(.2, .8, .2, 1) both; }
.rbh.is-open .hx-tabs { grid-area: tabs; margin-top: 8px; animation: rbh-in .5s .4s cubic-bezier(.2, .8, .2, 1) both; }
/* previous / next: round buttons on either side of the laptop */
.rbh .lp--auto { position: relative; }
.rbh__arrow { position: absolute; z-index: 6; top: 50%; width: 52px; height: 52px; margin-top: -26px; padding: 0; display: grid; place-items: center; border-radius: 50%; border: 1px solid #3A4E53; background: #121D20; color: #ECF0F0; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .4s, border-color .2s, background-color .2s; }
.rbh__arrow--prev { left: 0; } .rbh__arrow--next { right: 0; }
.rbh__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rbh__arrow:hover { border-color: #ECF0F0; background: #19272A; }
.rbh__arrow:focus-visible { outline: 2px solid #D2553D; outline-offset: 3px; }
.rbh.is-open .rbh__arrow { opacity: 1; pointer-events: auto; transition-delay: .5s, 0s, 0s; }
/* touch screens on the hero: the swipeable copy of the site sits exactly on the laptop screen */
.rbh .lp-touch.is-fit { border-radius: 2px; box-shadow: none; }
.rbh .lp-touch.is-fit iframe { max-width: none; }
@media (max-width: 820px) {
  .rbh { padding-top: 92px; }
  .rbh__in { grid-template-columns: 1fr; min-height: 0; gap: 8px; }
  .rbh__t { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .rbh__btns .btn { flex: 1 1 auto; justify-content: center; }
  .rbh .lp--auto .lp-pin { height: min(46svh, 420px); min-height: 260px; }
  .rbh .hx-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rbh .hx-tabs button { font-size: 12px; padding-right: 4px; }
  .rbh { --pinh: min(60svh, calc(100vw * .6 + 72px)); }   /* the open laptop is ~0.58 as tall as wide, plus room for the live bar */   /* phones: the laptop is width-bound, the stage follows its shape */
  .rbh.is-open .rbh__in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "note" "lap" "cap" "tabs"; row-gap: 8px; }
  .rbh.is-open .rbh__note { padding-top: 0; }
  .rbh.is-open .lp--auto { width: calc(100% + 2 * var(--g)); margin-inline: calc(-1 * var(--g)); }
  .rbh .lp--auto .lp-pin { height: min(56svh, calc(100vw * .8 + 40px)); }
  .rbh__arrow--prev { left: 6px; } .rbh__arrow--next { right: 6px; }
  .rbh__arrow { width: 42px; height: 42px; margin-top: -21px; }
  .rbh__arrow svg { width: 18px; height: 18px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .rbh { padding: 72px 20px 20px; }
  .rbh__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 0; }
  .rbh__t { font-size: 30px; } .rbh__b { font-size: 14px; margin-top: 10px; } .rbh__btns { margin-top: 14px; gap: 8px; }
  .rbh .lp--auto .lp-pin { height: 70svh; min-height: 0; } .rbh__ask p { display: none; }
  .rbh { --pinh: 70svh; }
}
@media (prefers-reduced-motion: reduce) { .rbh__copy > *, .rbh .lp--auto .lp-pin, .rbh__arrow { transition: none; } .rbh.is-open .rbh__note, .rbh.is-open .hx__cap, .rbh.is-open .hx-tabs, .rbh.is-back .rbh__copy > * { animation: none; } }

/* Skip hint (19 Nov 2026): shows the moment the intro starts, fades after ~3 s. Flat, no glow. */
.rb-hint { position: fixed; z-index: 303; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; margin: 0; padding: 9px 16px; border-radius: 10px; background: #121D20; border: 1px solid #33464B; color: #ECF0F0; font: 500 14px "Bricolage Grotesque", "Geist", system-ui, sans-serif; white-space: nowrap; pointer-events: none; animation: rb-hint-in .35s ease-out both; transition: opacity .6s, translate .6s; }
.rb-hint.out { opacity: 0; translate: -50% 8px; }
.rb-hint__t { display: none; }
@media (hover: none), (pointer: coarse) { .rb-hint__k { display: none; } .rb-hint__t { display: inline; } }
@keyframes rb-hint-in { from { opacity: 0; translate: -50% 8px; } }
@media (max-width: 560px) { .rb-hint { left: 16px; translate: none; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); font-size: 13px; } .rb-hint.out { translate: 0 8px; } @keyframes rb-hint-in { from { opacity: 0; translate: 0 8px; } } }
@media (prefers-reduced-motion: reduce) { .rb-hint { animation: none; transition: opacity .3s; } }
