/* Robosim: The Menu Screen. The site is a screen from the game, in the game's own colours. */

@font-face { font-family: "Big Shoulders Display"; src: url("assets/fonts/bigshoulders.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("assets/fonts/archivo.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --navy: #0a2442;          /* the game's UI background */
  --navy-deep: #081829;
  --panel: #0858a8;         /* the game's panel blue */
  --btn: #3070c0;           /* the game's button blue */
  --cyan: #08a0b8;          /* the game's Job Complete banner */
  --text: #f4f7fb;
  --soft: #b9c6da;
  --edge: rgba(244,247,251,.85);
  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
#cards, #trailer { scroll-margin-top: 72px; }
body { margin: 0; overflow-x: clip; color: var(--text); font: 400 1.0625rem/1.6 var(--body); background: var(--navy); }
::selection { background: var(--cyan); color: var(--navy); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; box-shadow: 0 0 0 6px var(--cyan); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--cyan); color: var(--navy); padding: 12px 16px; z-index: 20; font-weight: 700; }
.skip:focus { top: 12px; }
h1, h2, h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: 0.92; margin: 0; text-wrap: balance; }

/* ---------- hero: full-bleed live scene, the download cards dealt under it ---------- */
.hero { --overlap: 28px; --bar-h: 116px; background: var(--navy); }
.stage { position: relative; height: max(520px, calc(100svh - var(--bar-h))); overflow: hidden; background: var(--navy-deep); }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; transform: scale(var(--hs, 1.04)); transform-origin: center; will-change: transform; }
.stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse at 50% 40%, rgba(8,24,41,0) 0%, rgba(8,24,41,.5) 78%),
  linear-gradient(to bottom, rgba(8,24,41,.65) 0%, rgba(8,24,41,0) 24%, rgba(8,24,41,0) 48%, rgba(10,36,66,1) 100%); }
/* scanlines and corner brackets: you are looking through a camera feed */
.scan { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.hud { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.hud i { position: absolute; width: 38px; height: 38px; border: 3px solid var(--edge); }
.hud i:nth-child(1) { left: var(--gutter); top: 92px; border-right: 0; border-bottom: 0; }
.hud i:nth-child(2) { right: var(--gutter); top: 92px; border-left: 0; border-bottom: 0; }
.hud i:nth-child(3) { left: var(--gutter); bottom: calc(var(--overlap) + 28px); border-right: 0; border-top: 0; }
.hud i:nth-child(4) { right: var(--gutter); bottom: calc(var(--overlap) + 28px); border-left: 0; border-top: 0; }
.rec { position: absolute; left: calc(var(--gutter) + 52px); top: 96px; display: flex; align-items: center; gap: 8px; font: 800 0.85rem/1 var(--display); letter-spacing: 0.2em; text-transform: uppercase; }
.rec::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #ff4b5c; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-copy { position: absolute; z-index: 3; left: 0; right: 0; bottom: calc(var(--overlap) + clamp(36px, 9vh, 100px)); text-align: center; padding: 0 var(--gutter); transform: translateY(var(--hy, 0)); opacity: var(--ho, 1); }
.hero-copy h1 { font-size: clamp(3rem, 8.6vw, 8rem); letter-spacing: 0.01em; text-shadow: 0 6px 30px rgba(0,0,0,.5); }
.hero-copy h1 span { display: inline-block; opacity: 0; transform: translateY(60%) rotate(3deg); animation: rise .9s var(--ease) forwards; }
.hero-copy h1 span:nth-child(2) { animation-delay: .12s; color: var(--cyan); }
.hero-copy h1 span:nth-child(3) { animation-delay: .24s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero-copy .lede { margin: 14px auto 0; max-width: 46ch; font-size: clamp(1rem, 1.35vw, 1.18rem); color: #e4eaf3; opacity: 0; animation: fade 1s .5s var(--ease) forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* the scrolling words */

.ticker-wrap { position: relative; z-index: 4; overflow: hidden; height: var(--bar-h); display: flex; align-items: center; background: var(--navy); pointer-events: none; }
.ticker-wrap .ticker { width: 100%; }
.ticker { position: relative; z-index: 2; overflow: hidden; background: var(--cyan); color: var(--navy); transform: rotate(-1.5deg); margin: 0 -20px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.6); }
.ticker-track { display: flex; width: max-content; animation: tick 28s linear infinite; }
.ticker span { font: 900 clamp(1.4rem, 2.6vw, 2.2rem)/1 var(--display); text-transform: uppercase; letter-spacing: 0.06em; padding: 14px 0; white-space: nowrap; }
.ticker span::after { content: ""; display: inline-block; width: 0.34em; height: 0.34em; margin: 0 28px; background: var(--navy); transform: rotate(45deg); vertical-align: middle; }
@keyframes tick { to { transform: translateX(-50%); } }

.top { position: fixed; z-index: 50; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px var(--gutter); background: linear-gradient(to bottom, rgba(8,24,41,.8), rgba(8,24,41,0)); transition: background .4s var(--ease), box-shadow .4s; }
.top.docked { background: rgba(8,24,41,.94); box-shadow: 0 2px 0 var(--cyan); }
.mark { display: flex; align-items: center; width: clamp(150px, 16vw, 210px); min-height: 44px; transform-origin: left center; transition: transform .4s var(--ease); }
.top.docked .mark { transform: scale(.78); }
.mark img { width: 100%; height: auto; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2vw, 24px); }
.by { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 0.92rem; text-decoration: none; border-bottom: 2px solid var(--cyan); }
.by:hover { background: var(--cyan); color: var(--navy); }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font: 800 0.95rem/1 var(--display); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--navy); background: var(--cyan); border: 2px solid var(--cyan); border-radius: 999px; transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.pill.ghost { background: rgba(8,24,41,.55); border-color: var(--edge); color: var(--text); }
.pill.ghost:hover { background: var(--text); color: var(--navy); border-color: var(--text); }
.pill:hover { background: var(--text); border-color: var(--text); transform: translateY(-2px); }


/* the deal: three platform cards overlapping the scene */
.dl { position: relative; z-index: 3; background: var(--navy); padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(40px, 6vw, 80px); }
.cards { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.card { position: relative; min-height: 176px; border: 2px solid var(--edge); border-radius: 10px; overflow: hidden; background: linear-gradient(115deg, var(--panel) 0%, #0b4286 55%, #0a3166 100%); box-shadow: 0 16px 24px -14px rgba(0,0,0,.7); animation: deal .8s var(--ease) both; animation-delay: calc(var(--i, 0) * .14s + .25s); transition: translate .45s var(--ease), border-color .3s, box-shadow .45s var(--ease); }
.card:nth-child(1) { --i: 0; } .card:nth-child(2) { --i: 1; } .card:nth-child(3) { --i: 2; }
.card:hover { translate: 0 -8px; border-color: var(--cyan); box-shadow: 0 26px 34px -14px rgba(0,0,0,.8); }
.card-body { position: relative; z-index: 2; width: 58%; padding: 16px 18px 18px; display: flex; flex-direction: column; height: 100%; min-height: 172px; }
.card h3 { font-size: clamp(2.2rem, 3.2vw, 2.9rem); }
.card-note { margin: 2px 0 12px; font-size: 0.9rem; color: var(--soft); }
.card .btn { margin-top: auto; }
.card.is-yours .card-body { padding-top: 36px; }
.card.is-yours { translate: 0 -12px; border-color: var(--cyan); box-shadow: 0 24px 30px -14px rgba(0,0,0,.75); }
.card.is-yours:hover { translate: 0 -18px; }
.card-tag { position: absolute; z-index: 3; left: 14px; top: 0; background: var(--cyan); color: var(--navy); font: 800 0.8rem/1 var(--display); letter-spacing: 0.14em; text-transform: uppercase; padding: 7px 12px 6px; border-radius: 0 0 4px 4px; }
@keyframes deal { from { opacity: 0; transform: translateY(34px) rotate(1.4deg); } to { opacity: 1; transform: none; } }

/* the bolt cut that splits text from picture, as on the game's Career Board cards */
.bolt { position: relative; }
.bolt::before { content: ""; position: absolute; inset: 0; background: var(--edge); clip-path: polygon(14% 0, 100% 0, 100% 100%, 2% 100%, 10% 56%, 5% 56%); }
.bolt img { position: relative; width: 100%; height: 100%; object-fit: cover; clip-path: polygon(17% 0, 100% 0, 100% 100%, 5% 100%, 13% 56%, 8% 56%); }
.bolt.flip::before { clip-path: polygon(0 0, 86% 0, 95% 56%, 90% 56%, 98% 100%, 0 100%); }
.bolt.flip img { clip-path: polygon(0 0, 83% 0, 92% 56%, 87% 56%, 95% 100%, 0 100%); }
.card .bolt { position: absolute; right: 0; top: 0; bottom: 0; width: 56%; z-index: 1; }
.card .bolt::before { clip-path: polygon(30% 0, 100% 0, 100% 100%, 8% 100%, 26% 54%, 16% 54%); }
.card .bolt img { clip-path: polygon(34% 0, 100% 0, 100% 100%, 12% 100%, 30% 54%, 20% 54%); }

.btn { display: block; text-align: center; text-decoration: none; font: 700 1rem/1 var(--body); letter-spacing: 0.02em; padding: 14px 16px; min-height: 48px; background: rgba(8,24,41,.35); color: var(--text); border: 2px solid var(--edge); border-radius: 6px; transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease); }
.btn:hover { background: var(--text); color: var(--navy); }
.btn:active { transform: translateY(1px); }
.card.is-yours .btn { background: var(--btn); border-color: var(--btn); color: #fff; }
.card.is-yours .btn:hover { background: var(--text); border-color: var(--text); color: var(--navy); }

.status { max-width: 1360px; margin: 18px auto 0; font-weight: 600; }
.status:empty { display: none; }

/* ---------- the rest: notched sections, full-bleed steps, reveals ---------- */
.rest { --notch: 28px; background: var(--navy); overflow-x: clip; }
.wrap { max-width: 1360px; margin: 0 auto; }
.sec { position: relative; margin-top: calc(-1 * var(--notch)); padding: calc(var(--notch) + clamp(56px, 8vw, 104px)) var(--gutter) clamp(56px, 8vw, 104px);
  clip-path: polygon(0 0, calc(50% - var(--notch)) 0, 50% var(--notch), calc(50% + var(--notch)) 0, 100% 0, 100% 100%, 0 100%); }
.sec.navy { background: var(--navy); }
.sec.deep { background: var(--navy-deep); }
.sec h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 18ch; margin-bottom: 32px; }
.sec h2::after { content: ""; display: block; width: 56px; height: 5px; margin-top: 16px; background: var(--cyan); }
.js .sec h2::after { transform-origin: left; transform: scaleX(0); transition: transform .8s .3s var(--ease); }
.js .sec h2.in::after { transform: scaleX(1); }

/* scroll reveals; content stays visible without scripts or with reduced motion */
.js [data-r] { opacity: 0; transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-r="up"] { transform: translateY(48px); }
.js [data-r="left"] { transform: translateX(-60px); }
.js [data-r="right"] { transform: translateX(60px); }
.js [data-r="zoom"] { transform: scale(.94); }
.js [data-r].in { opacity: 1; transform: none; }

/* trailer: poster and a big play button */
.trailer { position: relative; aspect-ratio: 16 / 9; border: 2px solid var(--edge); border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 30px 50px -20px rgba(0,0,0,.8); }
.trailer video { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; padding: 0; background: rgba(8,24,41,.35); border: 0; cursor: pointer; color: var(--text); transition: background .3s, opacity .3s; }
.play:hover { background: rgba(8,24,41,.15); }
.play span { width: clamp(84px, 10vw, 130px); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--cyan); animation: pulse 2.4s infinite; transition: transform .35s var(--ease); }
.play:hover span { transform: scale(1.08); }
.play svg { width: 38%; margin-left: 8%; fill: var(--navy); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(8,160,184,.6); } 70% { box-shadow: 0 0 0 30px rgba(8,160,184,0); } 100% { box-shadow: 0 0 0 0 rgba(8,160,184,0); } }
.trailer.playing .play { opacity: 0; pointer-events: none; }

/* full-bleed steps with a gentle parallax */
.feature { position: relative; min-height: clamp(520px, 82svh, 840px); display: flex; align-items: center; overflow: hidden; background: var(--navy-deep); }
.feature .bg { position: absolute; inset: -12% 0; z-index: 0; }
.feature .bg img { width: 100%; height: 100%; object-fit: cover; transform: translateY(var(--py, 0%)); will-change: transform; }
.feature::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(10,36,66,.96) 0%, rgba(10,36,66,.78) 38%, rgba(10,36,66,0) 72%); }
.feature.right::before { background: linear-gradient(270deg, rgba(10,36,66,.96) 0%, rgba(10,36,66,.78) 38%, rgba(10,36,66,0) 72%); }
.feature .wrap { position: relative; z-index: 2; width: 100%; padding: 0 var(--gutter); }
.feature .panel { max-width: 520px; }
.feature.right .panel { margin-left: auto; }
.feature h3 { font-size: clamp(2.6rem, 5.5vw, 4.6rem); margin-bottom: 18px; }
.feature p { margin: 0; max-width: 34ch; color: #e4eaf3; font-size: clamp(1.02rem, 1.3vw, 1.18rem); }

/* steps that show an interface screenshot: blurred backdrop, the picture in the bolt cut */
.feature.inset .bg img { filter: blur(18px) brightness(.42) saturate(1.1); transform: translateY(var(--py, 0%)) scale(1.12); }
.feature.inset::before { display: none; }
.inset-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px clamp(24px, 5vw, 80px); align-items: center; }
.inset-grid .panel { max-width: none; }
.inset-grid .bolt { aspect-ratio: 16 / 9; }
.feature.rev .inset-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.inset-grid .bolt::before { display: none; }
.inset-grid .bolt img { clip-path: none; border: 2px solid var(--edge); border-radius: 10px; box-shadow: 0 24px 36px -16px rgba(0,0,0,.7); }

/* places: a mosaic of tiles, hover zoom */
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(70px, 8.6vw, 124px); gap: clamp(10px, 1.4vw, 18px); }
.tile { position: relative; margin: 0; overflow: hidden; border: 2px solid var(--edge); border-radius: 10px; box-shadow: 0 14px 22px -14px rgba(0,0,0,.7); background: var(--navy-deep); }
.m-hall { grid-column: 1 / 7; grid-row: 1 / 5; }
.m-lab { grid-column: 7 / 10; grid-row: 1 / 7; }
.m-grip { grid-column: 10 / 13; grid-row: 1 / 4; }
.m-arm { grid-column: 10 / 13; grid-row: 4 / 7; }
.m-kit { grid-column: 1 / 4; grid-row: 5 / 7; }
.m-crate { grid-column: 4 / 7; grid-row: 5 / 7; }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: var(--op, 50% 50%); transform: scale(var(--z, 1)); transition: transform 1.2s var(--ease); }
.tile:hover img { transform: scale(calc(var(--z, 1) * 1.07)); }
.tile figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 12px; font: 600 0.95rem/1.2 var(--body); background: linear-gradient(to top, rgba(8,24,41,.9), rgba(8,24,41,0)); }

/* media carousel: the arrows sit outside the pictures */
.carousel { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; column-gap: clamp(12px, 2vw, 24px); }
.slides { grid-column: 2; grid-row: 1; list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(12px, 2vw, 24px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; }
.slide img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 2px solid var(--edge); border-radius: 10px; background: var(--navy-deep); box-shadow: 0 14px 22px -14px rgba(0,0,0,.7); transition: transform .5s var(--ease), opacity .5s; }
.js .slide:not(.active) img { opacity: .55; transform: scale(.95); }
.car-btn { grid-row: 1; width: 52px; height: 52px; display: grid; place-items: center; padding: 0; color: var(--text); background: var(--navy); border: 2px solid var(--text); border-radius: 50%; cursor: pointer; transition: background .25s var(--ease), color .25s var(--ease), opacity .25s; }
.car-prev { grid-column: 1; }
.car-next { grid-column: 3; }
.car-btn:hover { background: var(--text); color: var(--navy); }
.car-btn[aria-disabled="true"] { opacity: .35; cursor: default; pointer-events: none; }
.car-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.car-count { grid-column: 2; grid-row: 2; margin: 14px 0 0; font: 800 1rem/1 var(--display); letter-spacing: 0.14em; color: var(--soft); font-variant-numeric: tabular-nums; text-align: center; }

.foot-sec { padding-bottom: 40px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; }
.foot-logo { display: block; width: clamp(190px, 24vw, 280px); }
.foot-logo img { width: 100%; height: auto; }
.foot-line { margin: 0; font-weight: 600; }
.foot-line a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- small screens: the scene, then the panel, then the cards, stacked ---------- */
@media (max-width: 900px) {
  .hero { --overlap: 0px; }
  .stage { height: auto; overflow: visible; padding-top: 72px; background: var(--navy); }
  .stage::after, .scan, .hud { display: none; }
  .stage video { position: relative; inset: auto; height: auto; aspect-ratio: 16 / 9; transform: none; }
  .hero-copy { position: static; transform: none !important; opacity: 1 !important; text-align: left; padding: 22px var(--gutter) 8px; }
  .hero-copy h1 { font-size: clamp(2.6rem, 12vw, 4rem); }
  .hero-copy .lede { margin-left: 0; }
  .ticker-wrap { height: auto; padding: 22px 0 18px; }
  .card.is-yours .card-body { padding-top: 36px; }
  .cards { grid-template-columns: 1fr; }
  .card.is-yours { translate: none; }
  .nav .by { display: none; }
  .nav { gap: 8px; }
  .pill { padding: 0 14px; font-size: 0.82rem; letter-spacing: 0.08em; white-space: nowrap; }
  .mark { width: 104px; }
  .feature::before, .feature.right::before { background: linear-gradient(to top, rgba(10,36,66,.97) 0%, rgba(10,36,66,.8) 45%, rgba(10,36,66,.1) 100%); }
  .feature { align-items: flex-end; padding-bottom: 56px; }
  .inset-grid, .feature.rev .inset-grid { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 120px; }
  .m-hall { grid-column: 1 / 3; grid-row: auto / span 2; }
  .m-lab { grid-column: 1 / 2; grid-row: auto / span 3; }
  .m-grip, .m-arm, .m-kit, .m-crate { grid-column: auto; grid-row: auto / span 1; }
  .m-grip { grid-column: 2 / 3; grid-row: auto / span 1; }
  .carousel { grid-template-columns: 1fr 1fr; row-gap: 14px; }
  .slides { grid-column: 1 / 3; grid-row: 1; }
  .car-prev { grid-column: 1; grid-row: 2; justify-self: start; }
  .car-next { grid-column: 2; grid-row: 2; justify-self: end; }
  .car-count { grid-column: 1 / 3; grid-row: 2; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .play span, .rec::before, .ticker-track { animation: none; }
  .hero-copy h1 span, .hero-copy .lede { opacity: 1; transform: none; animation: none; }
  .card, .btn, .car-btn, .tile img, .top, .mark, .pill { transition: none; }
  .slides { scroll-behavior: auto; }
  .js [data-r], .js .sec h2::after { opacity: 1; transform: none; transition: none; }
  .js .slide:not(.active) img { opacity: 1; transform: none; }
}
