/* index.css
 * Page-unique styling for the portal-selection landing page. Shared tokens,
 * the loading overlay, and base reset live in design-system.css — this file
 * overrides brand-mark sizing for this page's centered layout and defines
 * the portal cards (kept as `.card` — index.js selects by this class name).
 */

/* ── Body ── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* The same red margin rule as the login/register panel */
body::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 28px;
  width: 1px;
  background: rgba(210, 35, 42, 0.45);
  pointer-events: none;
}

/* ── Container ── */
.container {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ── Brand (centered, larger than the auth-shell brand mark) ── */
.brand-mark {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-bottom: var(--space-1);
  justify-content: center;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--accent);
  border-radius: 22%; /* same corner as the logo tile */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 0.7rem;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

/* ── Portal Heading ── */
.portal-heading {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  font-family: var(--font-mono);
}

/* ── Portal Cards (class kept as `.card` — index.js queries this) ── */
.portals {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-4);
}

.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-2);
  width: 148px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-light);
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: inherit;
}

.card:hover {
  border-color: var(--border-hi);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  opacity: 1;
}

.card-icon-wrap {
  width: 52px;
  height: 52px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  position: relative;
  z-index: 1;
}

.card:hover .card-icon-wrap {
  border-color: var(--border-hi);
  background: var(--surface);
  color: var(--accent);
}

.card-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.2px;
  position: relative;
  z-index: 1;
}

.card-sub {
  font-size: 0.62rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* ── Hint ── */
.hint {
  font-size: 0.7rem;
  color: var(--muted-2);
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .portals {
    flex-direction: column;
    align-items: center;
  }
  .card {
    width: 100%;
    max-width: 280px;
    flex-direction: row;
    padding: var(--space-2);
    gap: var(--space-2);
    justify-content: flex-start;
  }
}
