/* ==========================================================================
   CAGEHAUL: the official teaser page (/cagehaul)
   A loading bay at night: near-black concrete, bone-white stencil, one sodium work lamp.
   Dark, industrial and simple. The page sells curiosity, not details.
   The header and footer stay Cup Code; everything between belongs to the game.
   ========================================================================== */
.page-game {
  --ch-bg: #0B0B0A;
  --ch-bg-2: #0F0F0D;
  --ch-surface: #141412;
  --ch-surface-2: #1A1A17;
  --ch-bone: #E6E0D2;
  --ch-text-2: #ABA699;
  --ch-text-3: #858072;
  --ch-amber: #E2A23B;
  --ch-amber-2: #F0B656;
  --ch-line: rgba(230, 224, 210, .08);
  --ch-line-strong: rgba(230, 224, 210, .16);
  --ch-mono: "JetBrains Mono", var(--font);
  --ch-radius: 4px;
  background: var(--ch-bg);
}
/* The header keeps the studio's own green; only its surface turns to the page's night. */
.page-game .site-header, .page-game .mobile-menu {
  --bg: #0B0B0A; --surface: #141412; --text: #E6E0D2; --text-2: #ABA699; --text-3: #858072;
  --line: rgba(230, 224, 210, .08); --line-strong: rgba(230, 224, 210, .16); --header-bg: rgba(11, 11, 10, .86);
  --accent-text: #7DBF4F; --logo-ink: #F2F2EC; color-scheme: dark;
}
.page-game main {
  --bg: var(--ch-bg); --bg-2: var(--ch-bg-2); --surface: var(--ch-surface); --surface-2: var(--ch-surface-2);
  --text: var(--ch-bone); --text-2: var(--ch-text-2); --text-3: var(--ch-text-3);
  --line: var(--ch-line); --line-strong: var(--ch-line-strong);
  --green: var(--ch-amber); --green-hover: var(--ch-amber-2); --green-ink: #0B0B0A;
  --accent-text: var(--ch-amber); --warm: var(--ch-amber); --cardamom: var(--ch-amber); --sadu: var(--ch-text-3);
  --focus: var(--ch-amber); --glow: rgba(226, 162, 59, .14);
  color: var(--text); color-scheme: dark;
}
.page-game .site-header { color: var(--text); }
.page-game .site-header:not(.is-scrolled) { background: transparent !important; border-bottom-color: transparent !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.page-game::after { opacity: .06; mix-blend-mode: overlay; }
.page-game main ::selection { background: var(--ch-amber); color: #0B0B0A; }
.page-game main :focus-visible { outline-color: var(--ch-amber); }

/* ---- Buttons: squared, like stencilled plates ---------------------------------------------- */
.ch-btn, .ch-btn--ghost { border-radius: var(--ch-radius); letter-spacing: .02em; }
.ch-btn { background: var(--ch-amber); color: #0B0B0A; border-color: var(--ch-amber); }
.ch-btn:hover { background: var(--ch-amber-2); color: #0B0B0A; box-shadow: 0 0 0 4px rgba(226, 162, 59, .18); }
.ch-btn--ghost { color: var(--ch-bone); border-color: var(--ch-line-strong); background: rgba(11, 11, 10, .35); }
.ch-btn--ghost:hover { color: var(--ch-bone); border-color: var(--ch-amber); background: rgba(226, 162, 59, .06); }
[dir="rtl"] .ch-hero__actions .btn__icon { transform: none; } /* a play mark keeps pointing forward in Arabic too */

/* The WORK IN PROGRESS badge itself lives in site.css: it also marks the game's images on the home, games and devlog pages. */

/* ---- Hero ---------------------------------------------------------------------------------- */
.ch-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: flex-end; min-height: 100vh; min-height: 100svh;
  padding: 150px 0 clamp(72px, 12vh, 132px); background: var(--ch-bg); color: var(--ch-bone); }
.ch-hero__bg { position: absolute; inset: 0; z-index: -1; }
.ch-hero__bg picture { position: absolute; inset: 0; }
.ch-hero__bg picture img { width: 100%; height: 100%; object-fit: cover; }
/* With no key art the hero is the bay itself: faint cage bars under one lamp. */
.ch-hero__bg::before { content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(clamp(44px, 6vw, 76px) - 2px), rgba(230, 224, 210, .045) calc(clamp(44px, 6vw, 76px) - 2px) clamp(44px, 6vw, 76px));
  -webkit-mask: radial-gradient(70% 80% at 50% 10%, #000 20%, transparent 75%); mask: radial-gradient(70% 80% at 50% 10%, #000 20%, transparent 75%); }
.ch-hero--art .ch-hero__bg::before { content: none; }
.ch-hero__lamp { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(38% 46% at 50% -6%, rgba(240, 182, 86, .30), rgba(226, 162, 59, .08) 55%, transparent 80%),
              radial-gradient(14% 7% at 50% 0%, rgba(255, 214, 140, .35), transparent 70%);
  animation: ch-flicker 11s steps(1, end) infinite; }
.ch-hero--art .ch-hero__lamp { opacity: .55; mix-blend-mode: screen; }
.ch-hero__shade { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11, 11, 10, .72) 0%, transparent 28%, transparent 46%, rgba(11, 11, 10, .82) 78%, var(--ch-bg) 100%),
              radial-gradient(120% 90% at 50% 40%, transparent 50%, rgba(0, 0, 0, .55) 100%); }
@keyframes ch-flicker {
  0%, 100% { opacity: 1; }
  61% { opacity: .55; } 61.6% { opacity: 1; } 62.3% { opacity: .35; } 63% { opacity: .9; } 64% { opacity: 1; }
  88% { opacity: .8; } 88.5% { opacity: 1; }
}
.ch-hero--art .ch-hero__lamp { animation: none; }
.ch-hero__inner { position: relative; display: grid; justify-items: start; gap: 0; }
.ch-state { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin: 0 0 clamp(20px, 3vw, 32px);
  font: 600 .72rem/1 var(--mono); letter-spacing: .22em; color: var(--ch-amber); }
.ch-state__lamp { width: 8px; height: 8px; border-radius: 50%; background: var(--ch-amber); box-shadow: 0 0 0 4px rgba(226, 162, 59, .14), 0 0 18px 2px rgba(226, 162, 59, .6); animation: ch-blink 2.4s ease-in-out infinite; }
.ch-state__ar { padding-inline-start: 12px; border-inline-start: 1px solid var(--ch-line-strong); font: 500 .85rem/1 var(--font); letter-spacing: 0; color: var(--ch-text-2); }
@keyframes ch-blink { 50% { opacity: .35; box-shadow: 0 0 0 4px rgba(226, 162, 59, .05), 0 0 6px 0 rgba(226, 162, 59, .3); } }
.ch-hero__logo { width: min(820px, 100%); margin: 0; }
.ch-hero__logo.ch-logo--image img { width: auto; max-width: 100%; max-height: 34vh; }
.ch-hero__line { margin: clamp(18px, 2.4vw, 28px) 0 0; font: 500 clamp(.8rem, 1.1vw, .92rem)/1.5 var(--ch-mono); color: var(--ch-text-2); }
[lang="en"] .ch-hero__line { letter-spacing: .16em; text-transform: uppercase; }
.ch-hook { display: grid; gap: .08em; margin: clamp(28px, 4vw, 44px) 0 0; font-size: clamp(1.45rem, 3.2vw, 2.5rem); font-weight: 600; line-height: 1.18; color: var(--ch-bone); text-wrap: balance; }
.ch-hook__l { display: block; }
.ch-hook__l:last-child { color: var(--ch-text-2); font-weight: 500; }
.ch-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 4vw, 40px); }
.ch-hero .ch-hero__wip { top: auto; bottom: 24px; inset-inline-start: auto; inset-inline-end: var(--gutter); }
.ch-hero__cue { position: absolute; bottom: 22px; left: 50%; translate: -50% 0; display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--ch-line-strong); border-radius: var(--ch-radius); color: var(--ch-text-2); transition: color .3s, border-color .3s; }
.ch-hero__cue:hover { color: var(--ch-amber); border-color: var(--ch-amber); }
.ch-hero__cue svg { width: 16px; height: 16px; animation: ch-cue 2.6s var(--ease) infinite; }
@keyframes ch-cue { 50% { transform: translateY(3px); } }
@media (max-width: 640px) {
  .ch-hero { padding-bottom: 128px; }
  .ch-hero__actions .btn { flex: 1 1 auto; }
  .ch-hero .ch-hero__wip { bottom: 84px; }
}

/* ---- Sections --------------------------------------------------------------------------------- */
.ch-body { position: relative; background: var(--ch-bg); }
.ch-sec { position: relative; padding-block: clamp(64px, 8vw, 112px); border-top: 1px solid var(--ch-line); }
.ch-sec__grid { display: grid; gap: 22px clamp(32px, 6vw, 96px); }
@media (min-width: 900px) { .ch-sec__grid { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); align-items: start; } }
.ch-head { margin-bottom: clamp(18px, 2.6vw, 30px); }
.ch-sec__grid > .ch-head { margin-bottom: 0; }
.ch-label { display: inline-flex; align-items: center; margin: 0; font: 600 .7rem/1.4 var(--mono); letter-spacing: .2em; color: var(--ch-amber); }
.ch-label__n { display: inline-flex; align-items: center; gap: 12px; margin-inline-end: 12px; color: var(--ch-text-3); }
.ch-label__n::after { content: ""; width: 28px; height: 1px; background: var(--ch-line-strong); }
.ch-title { margin: 14px 0 0; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.2; font-weight: 600; text-wrap: balance; }
.ch-sec__lead { max-width: 62ch; margin: 0 0 clamp(26px, 3.4vw, 40px); color: var(--ch-text-2); }

/* About */
.ch-about__text { max-width: 44rem; }
.ch-about__text p { margin: 0 0 .9em; color: var(--ch-text-2); font-size: clamp(1.02rem, 1.3vw, 1.15rem); }
.ch-about__text .ch-about__lead { color: var(--ch-bone); font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 500; line-height: 1.4; }
.ch-about__text .ch-about__note { display: inline-flex; align-items: center; gap: 10px; margin: .4em 0 0; color: var(--ch-text-3); font-size: .95rem; }
.ch-about__note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ch-amber); box-shadow: 0 0 10px rgba(226, 162, 59, .7); }

/* Development status: a riveted plate on the bay wall */
.ch-plate { position: relative; max-width: 44rem; padding: clamp(24px, 3.4vw, 40px); border: 1px solid var(--ch-line-strong); border-radius: var(--ch-radius);
  background:
    radial-gradient(circle at 14px 14px, var(--ch-line-strong) 2px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 14px) 14px, var(--ch-line-strong) 2px, transparent 2.5px),
    radial-gradient(circle at 14px calc(100% - 14px), var(--ch-line-strong) 2px, transparent 2.5px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), var(--ch-line-strong) 2px, transparent 2.5px),
    linear-gradient(180deg, var(--ch-surface), var(--ch-bg-2)); }
.ch-plate p { margin: 0; }
.ch-plate__k { font: 600 .68rem/1 var(--mono); letter-spacing: .22em; color: var(--ch-text-3); }
.ch-plate__v { display: flex; align-items: center; gap: 14px; margin-top: 16px !important; font-size: clamp(1.35rem, 2.6vw, 2rem); font-weight: 600; line-height: 1.2; color: var(--ch-bone); }
.ch-plate__lamp { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ch-amber); box-shadow: 0 0 0 5px rgba(226, 162, 59, .12), 0 0 22px 3px rgba(226, 162, 59, .55); animation: ch-blink 2.4s ease-in-out infinite; }
.ch-plate__ar { margin-top: 6px !important; color: var(--ch-text-2); padding-inline-start: 24px; }
[dir="rtl"] .ch-plate__v > span[dir="ltr"] { text-align: right; }
.ch-plate__text { color: var(--ch-text-2); }
.ch-plate__v + .ch-plate__text, .ch-plate__ar + .ch-plate__text { margin-top: 22px !important; padding-top: 20px; border-top: 1px dashed var(--ch-line-strong); }
.ch-plate__text + .ch-plate__text { margin-top: .5em !important; }

/* Early visuals */
.ch-shots { display: grid; gap: clamp(12px, 1.6vw, 20px); align-items: start; }
@media (min-width: 760px) { .ch-shots { grid-template-columns: 1fr 1fr; } .ch-shot--wide { grid-column: 1 / -1; } }
.ch-shot { position: relative; margin: 0; border: 1px solid var(--ch-line); border-radius: var(--ch-radius); overflow: hidden; background: var(--ch-surface); }
.ch-shot a { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.ch-shot--wide a { aspect-ratio: 21 / 9; }
.ch-shot picture, .ch-shot img { width: 100%; height: 100%; object-fit: cover; }
.ch-shot img { transition: transform 1.4s var(--ease-out), filter .6s; filter: saturate(.9); }
.ch-shot a:hover img { transform: scale(1.025); filter: none; }
.ch-shot figcaption { padding: 12px 14px; font: 500 .78rem/1.5 var(--ch-mono); color: var(--ch-text-3); border-top: 1px solid var(--ch-line); }
@media (max-width: 759px) { .ch-shot--wide a { aspect-ratio: 16 / 9; } }

/* Devlogs */
.ch-logs__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ch-line); }
.ch-log { border-bottom: 1px solid var(--ch-line); }
.ch-log__link { display: grid; gap: 14px 28px; padding: clamp(20px, 2.4vw, 28px) clamp(0px, 1vw, 14px); color: inherit; text-decoration: none; transition: background .35s var(--ease); }
.ch-log__link:hover { background: linear-gradient(90deg, rgba(226, 162, 59, .05), transparent 70%); color: inherit; }
[dir="rtl"] .ch-log__link:hover { background: linear-gradient(270deg, rgba(226, 162, 59, .05), transparent 70%); }
.ch-log__n { justify-self: start; font: 600 .72rem/1.6 var(--mono); letter-spacing: .16em; color: var(--ch-text-3); transition: color .3s; }
.ch-log__link:hover .ch-log__n { color: var(--ch-amber); }
.ch-log__img { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--ch-radius); overflow: hidden; border: 1px solid var(--ch-line); background: var(--ch-surface); }
.ch-log__img picture, .ch-log__img img { width: 100%; height: 100%; object-fit: cover; }
.ch-log__img .ch-wip { top: 8px; inset-inline-start: 8px; font-size: .52rem; line-height: 18px; }
.ch-log__img .ch-wip::before { width: 12px; }
.ch-log__body { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ch-log__title { font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 600; line-height: 1.35; color: var(--ch-bone); }
.ch-log__date { font: 500 .76rem/1.4 var(--ch-mono); color: var(--ch-text-3); }
.ch-log__text { color: var(--ch-text-2); font-size: .97rem; line-height: 1.7; max-width: 62ch; }
.ch-log__go { width: 18px; height: 18px; color: var(--ch-text-3); align-self: center; transition: transform .35s var(--ease), color .3s; }
.ch-log__link:hover .ch-log__go { color: var(--ch-amber); transform: translateX(4px); }
[dir="rtl"] .ch-log__go { transform: scaleX(-1); }
[dir="rtl"] .ch-log__link:hover .ch-log__go { transform: scaleX(-1) translateX(4px); }
@media (min-width: 860px) {
  .ch-log__link { grid-template-columns: 9.5rem minmax(0, 1fr) auto; align-items: start; }
  .ch-log__link:has(.ch-log__img) { grid-template-columns: 9.5rem 14rem minmax(0, 1fr) auto; }
  .ch-log__n { padding-top: .3em; }
}
@media (max-width: 859px) { .ch-log__go { display: none; } .ch-log__img { max-width: 520px; } }
.ch-more { margin-top: clamp(22px, 3vw, 32px); }
.ch-empty { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 0; padding: clamp(20px, 3vw, 30px); border: 1px dashed var(--ch-line-strong); border-radius: var(--ch-radius); color: var(--ch-text-2); }
.ch-empty__n { font: 600 .74rem/1 var(--mono); letter-spacing: .16em; color: var(--ch-amber); }
.ch-empty__n::after { content: "_"; margin-inline-start: 2px; animation: ch-caret 1.1s steps(1, end) infinite; }
@keyframes ch-caret { 50% { opacity: 0; } }

/* Planned platform: a line on a shipping label */
.ch-spec { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ch-line-strong); max-width: 44rem; }
.ch-spec li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 10px 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--ch-line); }
.ch-spec__k, .ch-spec__v { justify-self: start; } /* dir="ltr" labels still sit on the reading side in Arabic */
.ch-spec__k { font: 600 .68rem/1 var(--mono); letter-spacing: .22em; color: var(--ch-text-3); }
.ch-spec__v { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 600; letter-spacing: .02em; color: var(--ch-bone); }
.ch-spec li > .btn, .ch-spec__note { grid-column: 2; justify-self: start; }
.ch-spec__note { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px dashed var(--ch-line-strong); border-radius: var(--ch-radius); color: var(--ch-text-2); font-size: .92rem; }
.ch-spec__note::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ch-text-3); }
@media (min-width: 640px) {
  .ch-spec li { grid-template-columns: 7.5rem minmax(0, 1fr) auto; }
  .ch-spec li > .btn, .ch-spec__note { grid-column: 3; justify-self: end; }
}

/* FAQ */
.ch-faq .faq-list { border-top-color: var(--ch-line-strong); max-width: 48rem; }
.ch-faq .faq { border-bottom-color: var(--ch-line); }
.ch-faq .faq summary { font-weight: 500; }
.ch-faq .faq summary:hover { color: var(--ch-amber); }
.ch-faq .faq[open] .faq__icon { color: var(--ch-amber); }

/* Follow development */
.ch-follow { padding-bottom: clamp(72px, 9vw, 128px); }
.ch-follow__card { display: grid; gap: clamp(28px, 4vw, 56px); padding: clamp(26px, 4.4vw, 60px); border: 1px solid var(--ch-line-strong); border-radius: var(--ch-radius);
  background: radial-gradient(60% 90% at 20% 0%, rgba(226, 162, 59, .1), transparent 70%), var(--ch-surface); }
[dir="rtl"] .ch-follow__card { background: radial-gradient(60% 90% at 80% 0%, rgba(226, 162, 59, .1), transparent 70%), var(--ch-surface); }
@media (min-width: 900px) { .ch-follow__card { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.ch-follow__logo { width: min(440px, 100%); }
.ch-follow__by { margin: 18px 0 0; color: var(--ch-text-2); }
.ch-follow__by a { color: var(--ch-bone); text-decoration: underline; text-decoration-color: var(--ch-amber); text-underline-offset: 4px; }
.ch-follow__by a:hover { color: var(--ch-amber); }
.ch-social { list-style: none; margin: 14px 0 0; padding: 0; border-top: 1px solid var(--ch-line); }
.ch-social li { border-bottom: 1px solid var(--ch-line); }
.ch-social a, .ch-social__later { display: flex; align-items: center; gap: 14px; padding: 15px 2px; color: var(--ch-bone); text-decoration: none; }
.ch-social svg { width: 18px; height: 18px; flex: none; }
.ch-social a svg:first-child { color: var(--ch-text-2); transition: color .3s; }
.ch-social a:hover, .ch-social a:hover svg:first-child { color: var(--ch-amber); }
.ch-social__go { margin-inline-start: auto; width: 15px !important; height: 15px !important; color: var(--ch-text-3); }
.ch-social__later { color: var(--ch-text-3); }
.ch-social__later small { margin-inline-start: auto; padding: 4px 8px; border: 1px dashed var(--ch-line-strong); border-radius: 2px; font: 500 .7rem/1 var(--ch-mono); }
.ch-updates { margin-top: clamp(16px, 2vw, 24px); }
.ch-updates .newsletter { border-radius: var(--ch-radius); background: var(--ch-bg-2); border-color: var(--ch-line-strong); }
.ch-updates .inline-field { border-radius: var(--ch-radius); }
.ch-updates .inline-field .btn { border-radius: 2px; }
@media (min-width: 900px) { .ch-updates .newsletter { grid-template-columns: 1fr 1.1fr; align-items: center; gap: 40px; } }
.ch-ai { margin-top: 20px; }

/* ---- Motion: the lamp, the blinking lights and the caret stop for reduced motion and for the calm setting ---- */
[data-motion="calm"] .ch-hero__lamp, [data-motion="calm"] .ch-state__lamp, [data-motion="calm"] .ch-plate__lamp,
[data-motion="calm"] .ch-hero__cue svg, [data-motion="calm"] .ch-empty__n::after { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .ch-hero__lamp, .ch-state__lamp, .ch-plate__lamp, .ch-hero__cue svg, .ch-empty__n::after { animation: none !important; }
}
@media print {
  .page-game { --ch-bone: #000; --ch-text-2: #333; --ch-text-3: #555; }
  .page-game, .ch-hero, .ch-body { background: #fff; color: #000; }
  .ch-logo { color: #000; }
  .ch-hero { min-height: 0; padding: 20px 0; }
  .ch-hero__bg, .ch-hero__cue, .ch-wip { display: none; }
}
