/* Title screen, iteration 96: the CITY OF HUSTLE / Season 1: Accra logo (the owner's brand art, the loading screen's
   web copy, already preloaded) over a flyover of the city; the menu gains Settings and Credits; the flyover's cuts go
   through black (.title-fade, between the title's shading and its content) and name their place (.title-cap).
   Fit rules stay those of fix-title-fit (style.css): one column on desktops, two columns on a short landscape screen. */
#title .title-fade { position: absolute; inset: 0; z-index: -1; background: #000; opacity: 0; pointer-events: none; }
#title .title-cap { position: absolute; left: calc(26px + var(--sa-l, 0px)); top: calc(22px + var(--sa-t, 0px)); max-width: 34vw;
  padding: 2px 0 3px 12px; border-left: 4px solid var(--gold); text-align: left; pointer-events: none; opacity: 0; text-shadow: 0 2px 0 #000; }
#title .title-cap b { display: block; font-family: var(--display); font-size: calc(15px * var(--tz, 1)); letter-spacing: 2px; text-transform: uppercase; color: var(--cloth); }
#title .title-cap span { display: block; margin-top: 2px; font-size: calc(11px * var(--tz, 1)); letter-spacing: 3px; text-transform: uppercase; color: var(--gold-hi); }
#title.intro-done .title-cap.on { animation: tcapIn 7s ease-out both; }
@keyframes tcapIn { 0%, 6% { opacity: 0; transform: translateY(6px); } 16%, 78% { opacity: .92; transform: none; } 100% { opacity: 0; } }
body.a11y-rm #title.intro-done .title-cap.on { animation: none; opacity: .92; }
@media (max-height: 600px), (max-width: 760px) { #title .title-cap { display: none; } }

/* the logo: the brand image, as tall as the screen allows; its name for screen readers */
#title .logo-art { line-height: 0; text-shadow: none; }
#title .logo-art img { display: block; margin: 0 auto -1.5%; height: clamp(150px, 36vh, 380px); width: auto; max-width: 100%; aspect-ratio: 16 / 9;
  object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)); }
#title .logo-art .sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#title.intro-play .logo-art img { animation: logoSlam .7s cubic-bezier(.2,.9,.2,1.15) 2.2s both; }
#title .kente { margin-top: 6px; }

/* the menu's last row: the opening's replay, Settings, Credits */
#title .title-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 6px; }
#title .title-more button.ghost { margin-top: 6px; min-height: 44px; min-width: 44px; }
#title .title-ui button.sel { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
#title .title-ui button:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }

/* desktops: the symbols over the logo only when there's height to spare; under 760 px the key list goes (it's in the
   pause menu and the first hour's tips) so the menu keeps clear of the footer */
@media (max-height: 820px) { #title .adinkra-row { display: none; } #title .logo-art img { height: clamp(150px, 25vh, 300px); } }
@media (max-height: 760px) { #title .controls { display: none; } #title .logo-art img { height: clamp(140px, 33vh, 300px); } }
@media (max-height: 700px) { #title .logo-art img { height: clamp(130px, 30vh, 220px); } #title .tag { margin-bottom: 10px; } }

/* short landscape screens (phones on their side): the logo fills its column's width (capped by the height) */
@media (max-height: 600px) and (min-aspect-ratio: 4/3) {
  #title .logo-art img { height: auto; width: min(100%, 103vh); width: min(100%, 103dvh); margin-bottom: 0; } /* 16:9 box: 58 % of the height at most */
  #title .kente { margin: clamp(4px, 1.6vh, 10px) auto; }
  #title .title-more { gap: 0 8px; margin-top: 0; }
  #title .title-more button.ghost { margin-top: clamp(4px, 1.6vh, 10px); padding: 6px 12px; }
}
@media (max-height: 460px) and (min-aspect-ratio: 4/3) { #title .logo-art img { width: min(100%, 96vh); width: min(100%, 96dvh); } }

/* reduce motion (Settings → Accessibility): the intro is skipped like the system setting does */
body.a11y-rm #title.intro-play *, body.a11y-rm #title.intro-play { animation-duration: .01s !important; animation-delay: 0s !important; }

/* ------------------------------------------------------------------ credits (iteration 96) */
#credits { position: fixed; inset: 0; z-index: 42; display: flex; flex-direction: column; background: radial-gradient(ellipse at 50% 45%, rgba(12,7,3,.8), rgba(5,4,3,.93) 70%);
  color: var(--cloth, #fff6e4); --sa-b: var(--tc-sab, env(safe-area-inset-bottom, 0px)); --sa-t: var(--tc-sat, env(safe-area-inset-top, 0px)); }
#credits.hidden { display: none; }
#credits .cr-roll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; outline: none; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(242,176,30,.5) transparent; padding-top: var(--sa-t); }
#credits .cr-body { max-width: calc(620px * var(--tz, 1)); margin: 0 auto; padding: 42vh 20px 0; text-align: center; }
#credits.calm .cr-body { padding-top: 6vh; }
#credits .cr-logo { display: block; width: min(480px, 86vw); height: auto; aspect-ratio: 16 / 9; margin: 0 auto 10px; }
#credits .cr-sec { margin: 0 0 calc(44px * var(--tz, 1)); }
#credits .cr-top p:first-child { font-family: var(--display); font-size: calc(26px * var(--tz, 1)); letter-spacing: 4px; color: var(--gold); margin: 0; }
#credits h3 { margin: 0 0 12px; font-size: calc(12px * var(--tz, 1)); letter-spacing: 4px; text-transform: uppercase; color: var(--gold); font-weight: 800; }
#credits .cr-row { display: flex; justify-content: center; align-items: baseline; gap: 12px; margin: 5px 0; line-height: 1.35; }
#credits .cr-role { flex: 1 1 0; text-align: right; font-size: calc(13px * var(--tz, 1)); color: #cfc4b0; font-style: italic; }
#credits .cr-name { flex: 1 1 0; text-align: left; font-size: calc(17px * var(--tz, 1)); font-weight: 700; }
#credits .cr-row:not(:has(.cr-role)) .cr-name { flex: none; text-align: center; }
#credits p { margin: 5px 0; font-size: calc(16px * var(--tz, 1)); line-height: 1.45; }
#credits .cr-legal { font-size: calc(11px * var(--tz, 1)); line-height: 1.5; color: #b7ab96; text-align: justify; hyphens: auto; }
#credits .cr-end { padding: 6vh 0 46vh; }
#credits .cr-end p { font-family: var(--display); font-size: calc(20px * var(--tz, 1)); letter-spacing: 2px; color: var(--gold-hi); }
#credits .cr-end .kente { width: 220px; margin: 0 auto 18px; }
#credits .cr-bar { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 8px calc(16px + var(--tc-sar, 0px)) calc(10px + var(--sa-b)) calc(16px + var(--tc-sal, 0px));
  background: linear-gradient(rgba(5,4,3,0), rgba(5,4,3,.85) 40%); }
#credits .cr-hint { flex: 1; text-align: left; font-size: calc(12px * var(--tz, 1)); opacity: .8; }
#credits .cr-hint b { color: var(--gold); }
#credits .cr-bar button.ghost { margin: 0; min-height: 44px; min-width: 44px; }
#credits .cr-bar button.hidden { display: none; }

/* once the intro is done the shading opens up a little so the flyover reads (the text keeps its shadows) */
#title.intro-done { background: radial-gradient(ellipse at 50% 42%, rgba(30,14,5,.26), rgba(8,5,3,.74) 78%); }
body.credits-open #title > :not(.title-fade) { visibility: hidden; }
