/* The look of the pages of gosso.games and civilization.gosso.games.
   Each site has its own copy of this file, and web/site/check.py keeps
   the copies the same. Caddy's policy lets a page use no style written
   into it and nothing from another host: everything it looks like is
   here, in the visitor's own fonts. */

:root {
  color-scheme: light dark;
  --ground: #f4f6fa;
  --glow: rgba(61, 139, 230, 0.16);
  --card: #ffffff;
  --edge: rgba(20, 30, 50, 0.13);
  --edge-strong: rgba(31, 111, 209, 0.55);
  --text: #121826;
  --quiet: #566074;
  --accent: #1f6fd1;
  --accent-soft: rgba(31, 111, 209, 0.1);
  --sea: #2a5d92;
  --land: #5f9e4c;
  --rim: rgba(18, 24, 38, 0.2);
  --shadow: 0 1px 2px rgba(18, 24, 38, 0.06), 0 8px 24px rgba(18, 24, 38, 0.06);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Dark as the world viewer's page is: its sky, its text, its blue. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0b0e14;
    --glow: rgba(108, 182, 255, 0.13);
    --card: #131a27;
    --edge: rgba(255, 255, 255, 0.11);
    --edge-strong: rgba(108, 182, 255, 0.6);
    --text: #e6e9ef;
    --quiet: #9aa4b5;
    --accent: #6cb6ff;
    --accent-soft: rgba(108, 182, 255, 0.12);
    --sea: #28507a;
    --land: #68a854;
    --rim: rgba(230, 233, 239, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: radial-gradient(ellipse 90% 55% at 50% -12%, var(--glow), transparent 70%) no-repeat,
    var(--ground);
}

.page {
  flex: 1;
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 9vw, 5.5rem) 1.25rem 2rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.025em;
}

/* The planet, the project's mark, drawn as the viewer's icon is. */
.mark {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
}

.mark .sea {
  fill: var(--sea);
}

.mark .land {
  fill: var(--land);
}

.mark .rim {
  fill: none;
  stroke: var(--rim);
  stroke-width: 1.5;
}

/* --- The introductory page ------------------------------------------------ */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: clamp(2.25rem, 7vw, 3.75rem);
  text-align: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 0.9rem;
  height: 100%;
  min-height: 4.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
}

.card .icon {
  grid-row: 1 / span 2;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.55rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card .name {
  grid-column: 2;
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
}

.card .what {
  grid-column: 2;
  color: var(--quiet);
  font-size: 0.95rem;
  line-height: 1.35;
}

.card .go,
.card .badge {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.card .go {
  color: var(--accent);
  font-size: 1.3rem;
  transition: transform 0.15s ease;
}

a.card:hover {
  border-color: var(--edge-strong);
}

a.card:hover .go {
  transform: translateX(3px);
}

a.card:focus-visible,
.back a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* What is not there yet: no link, said so. */
.card.later {
  border-style: dashed;
  background: transparent;
  box-shadow: none;
}

.card.later .icon {
  background: transparent;
  color: var(--quiet);
}

.card.later .name {
  color: var(--quiet);
}

.badge {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--edge);
  border-radius: 999px;
  color: var(--quiet);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- The information page ------------------------------------------------- */

.back {
  margin-bottom: clamp(2rem, 7vw, 3.5rem);
}

.back a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  color: var(--quiet);
  font-weight: 600;
  text-decoration: none;
}

.back a:hover {
  color: var(--text);
}

.back .mark {
  width: 1.9rem;
  height: 1.9rem;
}

/* --- Both ----------------------------------------------------------------- */

.foot {
  padding: 1.5rem 1.25rem 2rem;
  color: var(--quiet);
  font-size: 0.875rem;
  text-align: center;
}

.foot p {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  .card .go {
    transition: none;
  }
}
