/* Intro screen: "made within Y-Cycle" with the project logos. Uses the game's own .panel and
   .button styles (assets/index-*.css) so it looks like part of Sky Road. */

.credits {
  position: fixed;
  inset: 0;
  z-index: 200; /* above every game layer, including the "turn your device" cover (100) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(12px, var(--safe-top, 0px)) max(16px, var(--safe-right, 0px))
    max(12px, var(--safe-bottom, 0px)) max(16px, var(--safe-left, 0px));
  background: linear-gradient(180deg, #8fb6c8 0%, var(--sky-wash, #b7d3dc) 55%, var(--cloud-white, #fdfbf6) 100%);
  font-family: var(--font-text, Georgia, serif);
  color: var(--deep-ink, #27304a);
}

.credits[hidden] {
  display: none;
}

.credits-card {
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.5rem, 2.2vh, 1rem);
  text-align: center;
}

.credits-logo-link {
  display: block;
  line-height: 0;
}

.credits-logo {
  height: clamp(54px, 17vh, 120px);
  width: auto;
  max-width: 100%;
}

.credits-text {
  margin: 0;
  font-size: clamp(0.95rem, 2.6vh, 1.12rem);
  line-height: 1.45;
  max-width: 34em;
}

.credits-text strong {
  font-family: var(--font-display, Georgia, serif);
  font-weight: 400;
  white-space: nowrap;
}

.credits-url {
  font-weight: 600;
  color: var(--aegean-blue, #2e6a94);
  text-underline-offset: 0.2em;
  word-break: break-word;
}

.credits-url:hover {
  color: var(--deep-ink, #27304a);
}

.credits-url:focus-visible,
.credits-logo-link:focus-visible {
  outline: 3px solid var(--sunflower-ochre, #d8a031);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The funder logos need a white background (both files are drawn on white). */
.credits-funders {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.5rem);
  width: 100%;
  padding: clamp(0.4rem, 1.5vh, 0.7rem) 0.75rem;
  background: #fff;
  border: 2px solid var(--deep-ink, #27304a);
  border-radius: 6px;
}

.credits-funders img {
  height: clamp(38px, 11vh, 64px);
  width: auto;
  max-width: 100%;
}

.credits-play {
  margin-top: 0.15rem;
}

/* Landscape phones are short: put the Y-Cycle logo beside the text. */
@media (max-height: 430px) and (min-width: 560px) {
  .credits-card {
    width: min(720px, 100%);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      'logo text'
      'logo url'
      'funders funders'
      'play play';
    column-gap: 1.25rem;
    text-align: left;
  }
  .credits-logo-link { grid-area: logo; align-self: center; }
  .credits-logo { height: auto; width: min(240px, 34vw); }
  .credits-text { grid-area: text; }
  .credits-url-line { grid-area: url; margin: 0; }
  .credits-funders { grid-area: funders; }
  .credits-play { grid-area: play; justify-self: center; }
}

.credits-url-line {
  margin: 0;
}
