@font-face {
  font-family: CityRP;
  src: url("../fonts/circular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --background: #0d0e12;
  --panel: #14161c;
  --card: #181c24;
  --control: #282e3a;
  --accent: #4678ff;
  --action: #56de8c;
  --muted: #8a919e;
  --white: #fff;
  font-family: CityRP, Arial, sans-serif;
  color: var(--white);
  background: var(--background);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; margin: 0; }
body { overflow: hidden; }
h1, h2, h3, p, dl, dd { margin: 0; }

.loading-screen, .slideshow, .atmosphere { position: fixed; inset: 0; }
.loading-screen { isolation: isolate; }
.slideshow { z-index: -2; background: var(--background); overflow: hidden; }
.slide {
  position: absolute;
  inset: -2%;
  width: 104%;
  height: 104%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  filter: saturate(.75);
  transition: opacity 1.4s ease, transform 8s linear;
}
.slide.is-active { opacity: 1; transform: scale(1); }
.atmosphere {
  z-index: -1;
  background: linear-gradient(90deg, rgba(10, 12, 16, .85), rgba(10, 12, 16, .35) 46%, rgba(10, 12, 16, .12) 100%),
    linear-gradient(0deg, rgba(10, 12, 16, .62), transparent 45%);
}

/* The F1 DrawCityRPBox cuts the top-left and bottom-right corners only. */
.menu-header, .content-panel, .intro-card, .character-row, .header-status {
  clip-path: polygon(var(--cut, 12px) 0, 100% 0, 100% calc(100% - var(--cut, 12px)),
    calc(100% - var(--cut, 12px)) 100%, 0 100%, 0 var(--cut, 12px));
}
.menu-shell {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: clamp(18px, 4vh, 42px) clamp(20px, 5vw, 88px) clamp(20px, 4vh, 42px);
}
.menu-header, .content-panel, .intro-card, .character-row, .header-status {
  background: var(--panel);
}
.menu-header {
  --cut: 12px;
  width: min(560px, 46vw);
  min-height: 84px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(255, 255, 255, .07);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 52px; height: 52px; object-fit: contain; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 21px; line-height: 1.15; }
.brand span, .header-status, .eyebrow, .section-heading__status {
  font-size: 12px;
  letter-spacing: .08em;
  font-weight: 700;
}
.brand span { color: var(--muted); margin-top: 5px; }
.header-status {
  --cut: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px;
  color: var(--muted);
  background: #1c202a;
  white-space: nowrap;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--action);
  box-shadow: 0 0 0 4px rgba(86, 222, 140, .1);
}
.menu-body {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 0;
}
.content-panel {
  --cut: 12px;
  width: min(560px, 46vw);
  max-height: 100%;
  min-width: 0;
  padding: clamp(16px, 2.5vw, 30px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(13, 14, 18, .94);
}
.intro-card {
  --cut: 12px;
  padding: clamp(16px, 2vw, 24px);
  background: var(--card);
  border-top: 3px solid var(--accent);
}
.intro-card h1 { margin-top: 6px; font-size: clamp(23px, 2.5vw, 30px); line-height: 1.2; }
.intro-card p { margin-top: 7px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: clamp(22px, 3vh, 34px) 0 14px; }
.section-heading h3 { margin-top: 5px; font-size: 21px; }
.section-heading__status { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); white-space: nowrap; }
.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.character-row { --cut: 8px; min-width: 0; padding: 16px; background: var(--card); }
.character-row--wide { grid-column: 1 / -1; }
.character-row dt { color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.character-row dd { margin-top: 9px; overflow: hidden; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.loading-status { flex: 0 0 auto; width: min(900px, 100%); margin: 0 auto; padding: 12px 18px 14px; background: rgba(13, 14, 18, .8); }
.loading-status__copy { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.loading-status__copy p { margin-top: 6px; max-width: 75vw; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
#loading-percentage { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.progress { height: 6px; margin-top: 12px; overflow: hidden; background: var(--control); }
#progress-fill {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--accent);
  transition: width .55s ease;
  animation: idle-progress 14s ease-out forwards;
}
.slide-indicators { display: flex; justify-content: flex-end; gap: 6px; margin-top: 11px; }
.slide-indicators span { width: 18px; height: 3px; background: var(--control); transition: width .35s ease, background .35s ease; }
.slide-indicators span.is-active { width: 34px; background: var(--accent); }
@keyframes idle-progress { from { width: 8%; } to { width: 82%; } }

@media (max-width: 780px) {
  .menu-shell { padding: 14px; }
  .menu-header, .content-panel { width: min(560px, 100%); }
  .menu-body { overflow: hidden; }
  .loading-status { padding: 10px 12px; }
}
@media (max-width: 480px) {
  .menu-shell { gap: 7px; padding: 8px; }
  .menu-header { min-height: 60px; padding: 8px 10px; }
  .brand__logo { width: 38px; height: 38px; }
  .brand strong { font-size: 17px; }
  .brand span { font-size: 10px; }
  .header-status { padding: 9px; font-size: 0; }
  .header-status .status-dot { font-size: initial; }
  .content-panel { padding: 13px; }
  .intro-card { padding: 12px; }
  .intro-card h1 { font-size: 20px; }
  .intro-card p { font-size: 12px; }
  .section-heading { margin: 17px 0 10px; }
  .section-heading__status { display: none; }
  .character-grid { gap: 6px; }
  .character-row { padding: 10px; }
  .character-row dd { margin-top: 5px; font-size: 16px; }
  .loading-status { padding: 4px 3px 0; }
  .loading-status__copy p { font-size: 12px; }
  .slide-indicators { display: none; }
}
@media (max-height: 660px) and (min-width: 781px) {
  .menu-shell { gap: 6px; padding-block: 10px; }
  .menu-header { min-height: 64px; padding-block: 7px; }
  .brand__logo { width: 42px; height: 42px; }
  .content-panel { padding: 16px; }
  .intro-card { padding: 12px; }
  .section-heading { margin-top: 14px; }
  .character-row { padding: 9px 12px; }
  .character-row dd { margin-top: 4px; font-size: 17px; }
  .slide-indicators { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
