/* Company-select homepage. Complements /style.css and /brand-shell.css.
   Do not put page-specific rules in style.css (owned by the core theme). */

.home-body { background: var(--bg); }

.home-status {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 16px;
  text-align: center;
  color: var(--mut);
}

.home-status p { margin: 0; }

.home-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: home-spin 0.7s linear infinite;
}

.home-status-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}

.home-status-card h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.home-status-card p { margin: 0 0 16px; }

@keyframes home-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .home-spinner { animation: none; border-top-color: var(--red); }
  .home-tile { transition: none; }
}

/* ----- signed-out ----- */
.home-auth {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px 24px;
}

.home-auth-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 36px 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}

.home-auth-card .shell-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 24px;
  margin: 0 auto 16px;
}

.home-auth-card h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.home-auth-lead { margin: 0 0 22px; }

.home-ms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #1b1b1b;
  border: 1px solid #8c8c8c;
  border-radius: 4px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  line-height: 1.2;
}

.home-ms:hover { background: #f3f3f3; color: #1b1b1b; }

.home-ms:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.home-ms svg { display: block; flex: 0 0 auto; }

.home-auth-note { margin: 14px 0 0; }

.home-auth-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0 16px;
}

.home-dev { text-align: left; }

.home-dev h2 {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--mut);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-dev label { margin-top: 0; }

.home-dev input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-l);
}

.home-dev-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.home-dev-actions button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

/* ----- signed-in picker ----- */
.home-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.home-lead { margin: 0 0 24px; }

.home-lead h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.home-lead p { margin: 0; }

.home-empty {
  margin-bottom: 20px;
}

.home-empty h2 {
  font-size: 18px;
  margin: 0 0 6px;
}

.home-empty p { margin: 0; }

.home-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}

.home-tiles > li {
  display: flex;
  min-width: 0;
}

.home-tile {
  flex: 1 1 auto;
  width: 100%;
  --tile-accent: var(--red);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 176px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-top: 4px solid var(--tile-accent);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 1px 2px rgba(20, 22, 26, 0.04);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

a.home-tile:hover {
  color: var(--ink);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

a.home-tile:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.home-tile.is-pending {
  background: #fafbfc;
  border-top-color: #c5cad1;
  color: var(--mut);
  box-shadow: none;
  cursor: default;
}

.home-tile-logo,
.home-tile-mark {
  height: 40px;
  max-width: 160px;
  object-fit: contain;
  display: block;
}

.home-tile-mark {
  width: 40px;
  height: 40px;
  max-width: none;
  border-radius: 10px;
  background: var(--tile-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.home-tile.is-pending .home-tile-mark { background: #8b929a; }

.home-tile h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 4px 0 0;
  line-height: 1.25;
}

.home-tile-tag {
  margin: 0;
  color: var(--mut);
  font-size: 13px;
  line-height: 1.4;
}

.home-tile-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--mut);
}

.home-role,
.home-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
}

.home-role {
  background: var(--red-l);
  color: var(--red-d);
  text-transform: capitalize;
}

.home-soon {
  background: #e8ebef;
  color: #3d434b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shell-header .ghost:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

@media (max-width: 720px) {
  .home-main { padding: 22px 14px 36px; }
  .home-lead h1 { font-size: 24px; }
  .home-auth-card { padding: 28px 20px 22px; }
  .home-tiles { grid-template-columns: 1fr; }
  .home-tile { min-height: 0; }
}
