:root {
  --blue: #1d3f9e;
  --blue-dark: #142c70;
  --yellow: #f7e600;
  --ink: #0f1b3d;
  --bg: #000;
}

* { box-sizing: border-box; margin: 0; }

html { width: 100%; height: 100%; background: var(--bg); }

/* Page: header 15%, footer 20%, body takes the rest */
body {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(15dvh, auto) minmax(0, 1fr) minmax(20dvh, auto);
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* Header: logo centered, more than two thirds of the page width */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border-bottom: 4px solid var(--yellow);
}
.logo-link { display: block; width: 50%; }
.logo-link img { display: block; width: 100%; height: auto; }
.title {
  margin-top: 0.4rem;
  color: var(--yellow);
  font-size: clamp(1.1rem, 3.2vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
}

/* Body: banner = top third, overview = bottom two thirds */
.site-main {
  display: grid;
  min-width: 0;
  grid-template-rows: minmax(9rem, 1fr) auto;
  min-height: 0;
  background: var(--bg);
}

/* Overview: branches left, image centre, roles right; stacked under the image on mobile */
.overview {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
  grid-template-areas: "branches image roles";
  gap: 1rem;
  padding: 0 1rem;
  background: var(--bg);
  color: #fff;
}
.overview-img {
  grid-area: image;
  display: block;
  width: 100%;
  height: auto;
}
.side { position: relative; align-self: start; padding-top: 0.75rem; z-index: 2; }
.branches { grid-area: branches; text-align: right; }
.roles { grid-area: roles; }
.side summary {
  cursor: pointer;
  color: var(--yellow);
  font-weight: 700;
  font-size: 1.1rem;
}
.side summary:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
/* Desktop: the open list is a dropdown over the page, showing every value with no scrollbar */
.side ul {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  list-style: none;
  line-height: 1.6;
  background: var(--bg);
  border: 1px solid var(--yellow);
  border-radius: 6px;
}

@media (max-width: 700px) {
  /* Mobile: lists sit under the image and push the page down (page scrolls, no inner scrollbar) */
  body { height: auto; min-height: 100dvh; grid-template-rows: minmax(15dvh, auto) 1fr minmax(20dvh, auto); }
  .site-main { display: flex; flex-direction: column; }
  .banner { flex: none; height: calc(65dvh / 3); }
  .overview {
    flex: 1;
    min-height: calc(65dvh * 2 / 3);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0 1rem 0.5rem;
    gap: 0.25rem;
  }
  .overview-img { height: auto; flex: none; }
  .side { align-self: auto; padding-top: 0.5rem; }
  .side ul { position: static; margin-top: 0.5rem; padding: 0; border: 0; }
  .branches { text-align: left; }
}

.banner {
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 4px solid var(--yellow);
}
.track {
  display: flex;
  flex-shrink: 0;
  min-width: 100%;
  align-items: center;
  justify-content: space-around;
  gap: 1.5rem;
  padding: 0 0.75rem;
  list-style: none;
  animation: scroll 35s linear infinite;
}
.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
  font-size: clamp(0.7rem, 1.4vw, 0.95rem);
  white-space: nowrap;
}
.logo img { height: clamp(48px, 9dvh, 96px); width: auto; border-radius: 8px; background: #fff; }

@keyframes scroll {
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .banner { overflow-x: auto; }
  .track { animation: none; }
  .track[aria-hidden="true"] { display: none; }
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--yellow);
}
.site-footer a {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: inherit;
  border-radius: 50%;
}
.site-footer a:hover, .site-footer a:focus-visible { background: rgba(255, 255, 255, 0.15); outline: none; }
.site-footer svg { width: 32px; height: 32px; }
