/* === UPSHIFT Portal — Styles === */

/* ── Reset & variables ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #07060f;
  --surface:  #0f0d1f;
  --border:   rgba(255,255,255,0.08);
  --text:     #f0eeff;
  --muted:    rgba(240,238,255,0.5);
  --accent-w: #00A0DE;
  --accent-h: #E6002B;
}

html {
  min-height: 100%;
  background: linear-gradient(135deg, #000000 0%, #1a1445 50%, #211951 100%);
}

body {
  min-height: 100%;
  color: var(--text);
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
}

#app { min-height: 100vh; }

/* ── Header ── */
header {
  background: linear-gradient(135deg, #0a0a0a 0%, #12103a 40%, #1a1650 70%, #211951 100%);
  padding: 3.5rem 3rem 4.5rem;
  min-height: 180px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(74,144,226,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.header-title-block {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.header-logo {
  height: 48px;
  width: auto;
  opacity: 0.95;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  position: relative;
  z-index: 1;
}

.header-right > span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

/* ── Buttons ── */
.btn-signout {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 6px;
  color: #fff;
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-signout:hover { background: rgba(255,255,255,0.22); }

.btn-icon {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.btn-icon:hover { background: rgba(255,255,255,0.22); }

/* ── Main ── */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 3rem 5rem;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* ── App cards ── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}

.app-card.williams::before { background: var(--accent-w); }
.app-card.haas::before     { background: var(--accent-h); }

.app-card:hover {
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

.app-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-card-team {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.app-card.williams .app-card-team { color: var(--accent-w); }
.app-card.haas     .app-card-team { color: var(--accent-h); }

.app-card-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.app-card-logo {
  height: 32px;
  width: auto;
  max-width: 80px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.9;
}

.app-card-logos {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.app-card-desc {
  font-size: 0.825rem;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
}

.app-card-footer {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-card-cta {
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-card.williams .app-card-cta { color: var(--accent-w); }
.app-card.haas     .app-card-cta { color: var(--accent-h); }

.app-card-cta-arrow { transition: transform 0.15s; }
.app-card:hover .app-card-cta-arrow { transform: translateX(3px); }

/* ── Footer ── */
footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  padding: 0.875rem 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
}

.footer-logos {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logos img {
  height: 26px;
  width: auto;
  opacity: 0.9;
}

.footer-logo-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.2);
}

.footer-version {
  position: absolute;
  right: 20px;
  font-size: 0.7rem;
  color: #6B7280;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  main {
    padding: 2.5rem 2rem 5rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 2.5rem 1.5rem 3.5rem;
    min-height: 150px;
  }

  .header-logo {
    height: 40px;
  }

  main {
    padding: 2rem 1.25rem 5rem;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .header-right {
    gap: 10px;
  }

  footer {
    padding: 0.875rem 1.25rem;
  }

  .footer-version {
    right: 1.25rem;
  }
}

@media (max-width: 480px) {
  .header-logo {
    height: 34px;
  }

  .header-right > span {
    display: none;
  }

  main {
    padding: 1.5rem 1rem 5rem;
  }

  .footer-logos img {
    height: 22px;
  }
}
