/* Dice, marquee, cards, infographics, products, games reel, contact, footer */
/* Dice */
.roller { display: grid; justify-items: center; gap: 1.4rem; perspective: 800px; width: 17rem; }
.die-wrap { position: relative; animation: bob 5s ease-in-out infinite; }
.die-wrap::before { content: ""; position: absolute; inset: -25%; border-radius: 50%; background: radial-gradient(circle, rgba(240,56,75,.45), transparent 65%); }
@keyframes bob { 50% { transform: translateY(-14px); } }
.die {
  --s: clamp(8.5rem, 16vw, 11.5rem); position: relative;
  width: var(--s); height: var(--s); border: 0; cursor: pointer;
  border-radius: calc(var(--s) * 0.24); padding: calc(var(--s) * 0.15);
  display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); place-items: center;
  background: linear-gradient(145deg, #FAFBFF, #DADEF0);
  box-shadow: inset 0 -8px 18px rgba(60,60,90,.22), inset 0 2px 0 #fff, 0 25px 50px -12px rgba(0,0,0,.6);
  transform-style: preserve-3d; transition: transform .25s;
}
.die:hover { transform: rotateX(8deg) rotateY(-10deg) scale(1.03); }
.die i { width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #2E2F45, #0E0F1C); visibility: hidden; box-shadow: inset 0 2px 3px rgba(0,0,0,.5); }
.die i.on { visibility: visible; }
.die[data-face="1"] i.on { width: 95%; background: radial-gradient(circle at 35% 30%, #FF5A68, #C8102E); box-shadow: inset 0 2px 3px rgba(0,0,0,.35), 0 0 16px rgba(240,56,75,.55); }
.die.rolling { animation: roll3d .75s cubic-bezier(.25,.8,.3,1); }
@keyframes roll3d { 0% { transform: rotateX(0) rotateY(0); } 50% { transform: rotateX(320deg) rotateY(200deg) scale(.85); } 100% { transform: rotateX(720deg) rotateY(360deg) scale(1); } }
.result { min-height: 4.8em; width: 100%; text-align: center; font-size: 0.92rem; color: var(--muted); margin: 0; position: relative; }
.result a { color: var(--ink); font-weight: 600; text-decoration-color: var(--accent); text-underline-offset: .2em; }

/* Marquee */
.marquee { position: relative; z-index: 1; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); background: rgba(255,255,255,.015); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.track span { display: inline-flex; align-items: center; gap: 2.2rem; padding: 1.1rem 1.1rem; font: 600 1.05rem/1 var(--display); color: var(--dim); white-space: nowrap; letter-spacing: -0.01em; }
.track span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dim); }
@keyframes marquee { to { transform: translateX(-50%); } }


/* Glass cards with spotlight + gradient edge */
.card { position: relative; border-radius: 1.25rem; background: rgba(255,255,255,.035); border: 1px solid var(--edge); overflow: hidden; isolation: isolate; transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s; }
.card::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(240,56,75,.14), transparent 60%); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(255,140,151,.7), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card:hover::before, .card:hover::after { opacity: 1; }

.areas { display: grid; gap: 1.25rem; }
.area { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.5rem, 3.5vw, 2.5rem); }
.area .num { display: block; font: 600 0.9rem/1 "JetBrains Mono", ui-monospace, monospace; color: var(--accent); margin-bottom: 1rem; letter-spacing: .05em; }
.area h3 { font: 800 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--display); margin: 0 0 0.8rem; letter-spacing: -0.03em; }
.area .lead { margin: 0 0 1.4rem; color: var(--muted); font-size: 1.05rem; max-width: 40ch; }
.offer { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.offer li { font-size: 0.88rem; font-weight: 500; padding: 0.4rem 0.8rem; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--edge); color: var(--ink); }
.related { margin: 1.4rem 0 0; font-size: 0.9rem; color: var(--dim); display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: baseline; }
.related span { margin-right: 0.25rem; }
.related a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }
.area .fig { margin: 0; }

/* Infographics */
.fig { border-radius: 0.9rem; margin: 0 0 1.4rem; padding: 0.6rem; background: rgba(5,6,15,.55); border: 1px solid var(--edge); }
.fig svg { display: block; width: 100%; height: auto; }
.fig .grid { stroke: rgba(255,255,255,.05); }
.fig .room { fill: rgba(255,255,255,.04); stroke: rgba(238,240,250,.7); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; }
.fig .room.start { fill: rgba(240,56,75,.2); stroke: var(--accent-soft); }
.fig .hall { stroke: rgba(255,255,255,.14); stroke-width: 6; fill: none; stroke-linecap: square; }
.fig .player { fill: #fff; filter: drop-shadow(0 0 6px rgba(255,255,255,.8)); }
.fig .enemy { fill: rgba(240,56,75,.15); stroke: var(--accent); stroke-width: 1.5; }
.fig .shot { fill: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.fig .aura { fill: none; stroke: rgba(255,255,255,.14); stroke-dasharray: 3 5; }
.fig .lbl.gen { fill: var(--accent-soft); }
.fig .edge { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 1.5; }
.fig .branch rect { fill: #0B0D1F; stroke: rgba(238,240,250,.6); stroke-width: 1.3; }
.fig .branch .ln { fill: rgba(238,240,250,.35); stroke: none; }
.fig .branch.hot rect:first-child { fill: rgba(240,56,75,.18); stroke: var(--accent-soft); }
.fig .branch { opacity: 0; transform-box: fill-box; transform-origin: left center; }
.in .fig .branch { animation: pop .5s cubic-bezier(.2,1.4,.4,1) forwards; animation-delay: calc(var(--d) * 0.22s + .2s); }
.fig .reader { fill: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.fig .hero-dot { fill: #fff; filter: drop-shadow(0 0 6px #fff); }
.fig .node { fill: #0B0D1F; stroke: rgba(255,255,255,.35); stroke-width: 1.5; }
.fig .node.hot { fill: var(--accent); stroke: none; filter: drop-shadow(0 0 8px rgba(240,56,75,.7)); }
.fig .ico { stroke: var(--ink); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fig .flow { stroke: rgba(255,255,255,.18); stroke-width: 2; fill: none; }
.fig .pkt { fill: var(--accent); filter: drop-shadow(0 0 4px var(--accent)); }
.fig .lbl { fill: var(--muted); font: 600 11px var(--body); text-anchor: middle; }
.fig .doc { fill: #0B0D1F; stroke: rgba(255,255,255,.3); stroke-width: 1.2; }
.fig .naive { stroke: rgba(255,255,255,.28); stroke-width: 1.3; stroke-dasharray: 3 4; fill: none; }
.fig .best { stroke: var(--accent-soft); stroke-width: 3; fill: none; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; filter: drop-shadow(0 0 5px rgba(240,56,75,.6)); }
.in .fig .best { animation: draw 3.2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.fig .stop { fill: #0B0D1F; stroke: var(--ink); stroke-width: 1.5; }
.fig .num { fill: var(--ink); font: 700 10px var(--body); text-anchor: middle; dominant-baseline: central; }
.fig .depot { fill: var(--accent); }
.fig .room { opacity: 0; }
.in .fig .room { animation: pop .5s cubic-bezier(.2,1.4,.4,1) forwards; animation-delay: calc(var(--d) * 0.18s + .2s); }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.fig .node.hot { animation: glowp 2.4s ease-in-out infinite; }
@keyframes glowp { 50% { filter: drop-shadow(0 0 16px rgba(240,56,75,.95)); } }

/* Products */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; perspective: 1200px; }
.products > .product:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; }   /* odd count: last card spans the row instead of sitting alone */
.product { min-height: 15rem; }
.product { padding: 1.75rem; display: flex; flex-direction: column; min-height: 17rem; transform-style: preserve-3d; }
.product .meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.chip { font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px; background: rgba(240,56,75,.14); color: #FFB3BB; border: 1px solid rgba(240,56,75,.32); }
    .live { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--muted); }
.live .dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; border: 1.5px solid var(--muted); }
.product h3 { font: 700 1.6rem/1.15 var(--display); letter-spacing: -0.025em; margin: 0 0 0.6rem; }
.product p { color: var(--muted); margin: 0 0 1.75rem; }
.product .go { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 600; text-decoration: none; padding: 0.6rem 1rem; border-radius: 0.65rem; background: var(--glass2); border: 1px solid var(--edge); transition: background .2s; }
.product .go:hover { background: rgba(240,56,75,.25); }
.product .go svg { width: 0.95em; height: 0.95em; }

/* Games reel */
.reel { max-width: 54rem; position: relative; }
.reel-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.reel-list li { border-bottom: 1px solid var(--edge); }
.reel-list a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; text-decoration: none; padding: 1.6rem 0; color: var(--dim); transition: color .3s, padding-left .35s cubic-bezier(.2,.8,.2,1); }
.reel-list .t { display: block; font: 800 clamp(1.8rem, 5vw, 3.4rem)/1.05 var(--display); letter-spacing: -0.035em; }
.reel-list .d { display: block; font-size: 0.98rem; margin-top: 0.4rem; max-width: 46ch; color: var(--muted); }
.reel-list .play { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--edge); transition: background .3s, border-color .3s, transform .3s; }
.reel-list .play svg { width: 1rem; height: 1rem; fill: currentColor; margin-left: 2px; }
.reel-list a:hover, .reel-list a:focus-visible, .reel-list a.active { color: var(--ink); padding-left: 1rem; }
.reel-list a:hover .t, .reel-list a.active .t { color: var(--ink); }
.reel-list a:hover .play, .reel-list a.active .play { background: var(--accent); border-color: transparent; transform: scale(1.08); color: #fff; }
.inline-vid { display: none; }
.cursor-card {
  position: fixed; left: 0; top: 0; z-index: 15; pointer-events: none;
  width: clamp(260px, 30vw, 420px); aspect-ratio: 16 / 9; border-radius: 1rem; overflow: hidden; background: #000;
  box-shadow: 0 30px 80px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.15), 0 0 50px -12px rgba(240,56,75,.6);
  opacity: 0; scale: .85; rotate: -3deg; transform: translate3d(-9999px, 0, 0); transition: opacity .25s, scale .3s cubic-bezier(.2,1.3,.4,1), rotate .3s;
}
.cursor-card.show { opacity: 1; scale: 1; rotate: 0deg; }
.cursor-card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.cursor-card video.on { opacity: 1; }
@media (hover: none) {
  .cursor-card { display: none; }
  .inline-vid { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0.9rem; margin: 0 0 1.4rem; background: #000; border: 1px solid var(--edge); }
  .inline-vid.broken { display: none; }
}

/* Video lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1.25rem; background: rgba(5,6,15,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .25s; }
.lightbox[hidden] { display: none; }
.lightbox.open { opacity: 1; }
.lb-inner { width: min(1000px, 100%); transform: translateY(12px) scale(.97); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.lightbox.open .lb-inner { transform: none; }
.lb-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 0.8rem; }
.lb-head h3 { margin: 0; font: 700 clamp(1.1rem, 2.5vw, 1.5rem)/1.2 var(--display); letter-spacing: -0.02em; }
.lb-close { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid var(--edge); background: var(--glass2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.lb-close:hover { background: var(--accent); border-color: transparent; }
.lb-close svg { width: 1rem; height: 1rem; }
#lbVideo { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 0.9rem; box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), 0 0 0 1px var(--edge); }
.lb-fail { margin: 1rem 0 0; color: var(--muted); }
.lb-fail a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: .2em; }

/* FAQ */
.faq-list { max-width: 52rem; border-top: 1px solid var(--edge); }
.faq-list details { border-bottom: 1px solid var(--edge); }
.faq-list summary { cursor: pointer; list-style: none; padding: 1.3rem 2.5rem 1.3rem 0; position: relative; font: 700 clamp(1.05rem, 2vw, 1.25rem)/1.35 var(--display); letter-spacing: -0.01em; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; position: absolute; right: 0.4rem; top: 50%; width: 0.6rem; height: 0.6rem; margin-top: -0.4rem; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s; }
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -0.1rem; border-color: var(--accent); }
.faq-list p { margin: 0 0 1.4rem; color: var(--muted); max-width: 62ch; }

/* Contact */
.cta-box { position: relative; border-radius: 1.75rem; padding: clamp(2.5rem, 7vw, 5rem); text-align: center; overflow: hidden; background: #0B0C1E; border: 1px solid var(--edge); }
.cta-box h2 { font-size: clamp(2.4rem, 7vw, 4.6rem); margin-bottom: 1rem; }
.cta-box p { color: var(--muted); max-width: 46ch; margin: 0 auto 2rem; }
.cta-box .mail { display: block; margin-top: 1.5rem; font: 600 1.05rem/1.2 var(--display); color: var(--muted); text-decoration: none; }
.cta-box .mail:hover { color: var(--ink); }

footer { border-top: 1px solid var(--edge); padding: 2.5rem 0 3rem; color: var(--dim); font-size: 0.9rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
footer .brand { font-size: 1.1rem; color: var(--ink); margin-bottom: 0.75rem; }
footer p { margin: 0; }
footer address { font-style: normal; text-align: right; }
footer a { color: var(--muted); }

/* Notice shown after an email link copies the address */
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 24px); z-index: 60; max-width: calc(100vw - 32px); padding: .75rem 1.1rem; border: 1px solid var(--edge); border-radius: 999px; background: rgba(10,12,28,.94); color: var(--ink); font: 500 .95rem/1.4 var(--body); box-shadow: 0 12px 32px -12px rgba(0,0,0,.8); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* Small label after a showreel title, e.g. "Prototype" */
.reel-list .t-tag { display: inline-block; vertical-align: middle; margin-left: .5em; padding: .3em .75em; border: 1px solid var(--edge); border-radius: 999px; font: 600 clamp(.75rem, 1.2vw, .9rem)/1 var(--body); letter-spacing: 0; color: var(--muted); }
