/* ==========================================================================
   GeoHub - Portal
   Builds on css/atlas.css (tokens and base styles).
   ========================================================================== */

.portal {
  max-width: 880px;
}

/* ---------- Header ---------- */

.portal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 16px;
  border-bottom: 1px solid var(--rule);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-decoration: none;
}

.portal-coords {
  margin-left: auto;
  font-size: 12px;
  color: var(--ink-muted);
}

.portal-creator {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.portal-creator:hover {
  color: var(--ink);
}

/* ---------- Install app ---------- */

.portal-install {
  flex-shrink: 0;
}

.install-sheet-title {
  font-size: 28px;
}

.install-sheet-lead {
  margin-top: 8px;
  color: var(--ink-soft);
}

.install-steps {
  list-style: none;
  margin: 20px 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.install-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}

.install-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  background: var(--paper-raised);
  font-size: 14px;
}

.install-step-hint {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-muted);
}

.install-share-icon {
  margin-left: 4px;
  color: #0A7AFF; /* iOS system blue, so it matches the button people look for */
}

.install-sheet-close {
  width: 100%;
}

/* ---------- Hero ---------- */

.portal-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(40px, 8vw, 72px) 0 clamp(28px, 5vw, 40px);
}

.portal-title {
  font-size: clamp(40px, 7vw, 68px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.portal-lead {
  font-size: 18px;
  color: var(--ink-soft);
}

/* ---------- Game list (atlas legend) ---------- */

.game-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--rule-strong);
}

.game-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 24px;
  align-items: center;
  gap: 18px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background-color 0.15s var(--ease);
}

.game-row:hover {
  background: var(--row-soft);
}

.game-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--row-soft);
  color: var(--row-accent);
  font-size: 22px;
}

.game-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.game-name {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--row-accent);
}

.game-desc {
  font-size: 15px;
  color: var(--ink-soft);
}

.game-meta {
  font-size: 12px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.game-arrow {
  font-size: 20px;
  color: var(--ink-muted);
  transition: transform 0.15s var(--ease), color 0.15s var(--ease);
}

.game-row:hover .game-arrow {
  color: var(--row-accent);
  transform: translateX(3px);
}

/* ---------- Footer ---------- */

.portal-footer {
  padding-top: 40px;
  font-size: 14px;
  color: var(--ink-muted);
}

.portal-footer a {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .portal-coords {
    display: none;
  }

  /* Brand, link and button don't all fit on a phone; the footer still links cemeren.dev */
  .portal-header:has(#install-btn:not([hidden])) .portal-creator {
    display: none;
  }

  .portal-header:has(#install-btn:not([hidden])) .portal-install {
    margin-left: auto;
  }

  .portal-creator {
    margin-left: auto;
  }

  .game-row {
    grid-template-columns: 44px minmax(0, 1fr) 20px;
    gap: 14px;
    padding: 16px 4px;
  }

  .game-meta {
    grid-column: 2;
    grid-row: 2;
    margin-top: -8px;
  }

  .game-arrow {
    grid-column: 3;
    grid-row: 1;
  }

  .game-name {
    font-size: 22px;
  }
}
