/* Tigress portal — destination picker at tigress.ryansite.org */

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

:root {
  --bg: #0b0f19;
  --bg-2: #111827;
  --ink: #e5e9f0;
  --muted: #8b93a7;
  --line: #232b3d;
  --accent: #4a90d9;
  --accent-2: #7c6fd9;
}

html,
body {
  min-height: 100%;
}

@supports (min-height: 100dvh) {
  html,
  body {
    min-height: 100dvh;
  }
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 111, 217, 0.14), transparent 60%),
    radial-gradient(1000px 500px at 10% 110%, rgba(74, 144, 217, 0.12), transparent 60%),
    var(--bg);
  color: var(--ink);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.portal {
  width: min(880px, 100%);
  margin: auto 0;
}

/* ── Header ─────────────────────────────── */

.portal-head {
  text-align: center;
  margin-bottom: 3rem;
}

.portal-head h1 {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: 0.32em;
  text-indent: 0.32em; /* balance the tracking */
  font-weight: 700;
  background: linear-gradient(100deg, var(--ink) 30%, var(--accent) 75%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.04em;
}

/* ── Tiles ──────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.tile {
  --tile-accent: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tile:nth-child(2n) {
  --tile-accent: var(--accent-2);
}

.tile:hover,
.tile:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--tile-accent) 55%, var(--line));
  box-shadow: 0 12px 40px -12px color-mix(in srgb, var(--tile-accent) 45%, transparent);
  outline: none;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--tile-accent);
  background: color-mix(in srgb, var(--tile-accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tile-accent) 35%, transparent);
}

.icon svg {
  width: 24px;
  height: 24px;
}

.tile h2 {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin-top: 0.25rem;
}

.tile p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

/* ── Footer ─────────────────────────────── */

.portal-foot {
  text-align: center;
  margin-top: 3rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

/* ── Mobile: compact rows, reachable top ── */

@media (max-width: 600px) {
  body {
    padding: 1.25rem 0.875rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .portal-head {
    margin-bottom: 1.25rem;
  }

  .portal-head h1 {
    font-size: 2rem;
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .tile {
    display: grid;
    grid-template-columns: 46px 1fr;
    grid-template-rows: auto auto;
    column-gap: 0.9rem;
    row-gap: 0.1rem;
    align-items: center;
    padding: 1.05rem 1.1rem;
    border-radius: 14px;
  }

  .tile:hover,
  .tile:focus-visible {
    transform: none;
  }

  .icon {
    grid-row: 1 / span 2;
    width: 46px;
    height: 46px;
    border-radius: 12px;
  }

  .icon svg {
    width: 25px;
    height: 25px;
  }

  .tile h2 {
    grid-column: 2;
    font-size: 1.2rem;
    margin-top: 0;
  }

  .tile p {
    grid-column: 2;
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .portal-foot {
    margin-top: 1.5rem;
  }
}
