/* ═══════════════════════════════════════════════
   PILOT DESIGN SYSTEM — Partner Portal
   ═══════════════════════════════════════════════ */

:root {
  /* Named Brand Colors */
  --color-profit:    #281350;
  --color-pilot:     #5931DC;
  --color-brilliant: #825BEB;
  --color-highlight: #DECEFF;
  --color-margin:    #F6F3FF;
  --color-access:    #FCF3D6;
  --color-clarity:   #FBEDFF;
  --color-trust:     #E7F9FF;
  --color-access-plus: #FFD967;
  --color-clarity-plus: #F891FF;
  --color-trust-plus:   #8EECFF;

  /* Functional */
  --pilot-black:       #3f3c3d;
  --pilot-dark-purple: #281350;
  --white:             #ffffff;
  --purple-primary:    #5f2ee5;
  --purple-medium:     #825beb;
  --purple-light:      #c8b6fc;
  --purple-deep:       #3c2d89;
  --purple-tint:       #f0ecfd;
  --light-bg:          #f3f5fa;
  --pale-periwinkle:   #f6f3ff;
  --gray-light:        #e0e0e0;
  --gray-dark:         #656363;
  --gray-999:          #999;

  /* Layout */
  --sidebar-w: 260px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--pilot-black);
  -webkit-font-smoothing: antialiased;
  background: var(--light-bg);
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ─── Typography ─── */
h1 { font-size: 2rem;   font-weight: 600; line-height: 1.2; }
h2 { font-size: 1.5rem; font-weight: 600; line-height: 1.25; }
h3 { font-size: 1rem;   font-weight: 600; line-height: 1.3; }

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--purple-primary);
  display: block;
  margin-bottom: 0.375rem;
}
.eyebrow--light { color: var(--purple-light); }

.cursive-accent {
  font-family: 'La Belle Aurore', cursive;
  font-weight: 400;
  color: var(--color-pilot);
  letter-spacing: -0.03em;
}
.cursive-accent--light { color: var(--color-highlight); }

/* ═══════════════════
   SIDEBAR
   ═══════════════════ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--gray-light);
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding: 1.5rem 1rem;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 1.5rem;
}

.sidebar-logo { width: 90px; display: block; }

.sidebar-label {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--purple-primary);
  background: var(--pale-periwinkle);
  padding: 3px 8px;
  border-radius: 4px;
}

.sidebar-section-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--gray-999);
  display: block;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--gray-dark);
  transition: all 0.15s;
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity 0.15s;
}

.sidebar-link:hover {
  background: var(--pale-periwinkle);
  color: var(--purple-primary);
}

.sidebar-link:hover svg { opacity: 1; }

.sidebar-link.active {
  background: var(--pale-periwinkle);
  color: var(--purple-primary);
  font-weight: 500;
}

.sidebar-link.active svg {
  opacity: 1;
  color: var(--purple-primary);
}

.sidebar-bottom {
  padding-top: 1rem;
  border-top: 1px solid var(--gray-light);
}

.sidebar-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--gray-dark);
  transition: all 0.15s;
}

.sidebar-contact:hover {
  background: var(--pale-periwinkle);
  color: var(--purple-primary);
}

/* ═══════════════════
   MOBILE HEADER
   ═══════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-light);
  padding: 0 1rem;
  align-items: center;
  gap: 0.75rem;
}

.mobile-menu-btn {
  margin-left: auto;
  color: var(--pilot-black);
  padding: 4px;
}

/* ═══════════════════
   MAIN CONTENT
   ═══════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 1.5rem 2rem 2rem;
}

/* ─── Welcome Banner ─── */
.welcome-banner {
  position: relative;
  background: linear-gradient(135deg, var(--pilot-dark-purple) 0%, var(--purple-deep) 100%);
  border-radius: 16px;
  padding: 2.5rem 2.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

.welcome-banner-bg {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1.5px, transparent 1.5px);
  background-size: 20px 20px;
  pointer-events: none;
}

.welcome-inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.welcome-heading {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.625rem;
}

.welcome-heading .cursive-accent--light {
  font-size: 1.75rem;
}

.welcome-subtitle {
  color: var(--purple-light);
  font-size: 0.9375rem;
  max-width: 480px;
  line-height: 1.6;
}

.welcome-link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: opacity 0.2s;
}
.welcome-link:hover { opacity: 0.85; }

.welcome-stats {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.stat-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--purple-light);
}

/* ═══════════════════
   PORTAL SECTIONS
   ═══════════════════ */
.portal-section {
  margin-bottom: 2rem;
}

.section-header {
  margin-bottom: 1rem;
}

.portal-heading {
  font-size: 1.375rem;
}

/* ─── Portal Grid ─── */
.portal-grid {
  display: grid;
  gap: 1rem;
}

.portal-grid--2 { grid-template-columns: 1fr 1fr; }
.portal-grid--1 { grid-template-columns: 1fr; }

/* ─── Portal Cards ─── */
.portal-card {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.2s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  position: relative;
  cursor: pointer;
}

.portal-card:hover {
  border-color: rgba(89, 49, 220, 0.25);
  box-shadow: 0 8px 32px rgba(89, 49, 220, 0.08);
  transform: translateY(-2px);
}

.portal-card:hover .card-arrow {
  transform: translateX(3px);
  color: var(--purple-primary);
}

.portal-card:hover .card-icon-wrap {
  transform: scale(1.05);
}

.portal-card--wide {
  align-items: center;
}

.portal-card--highlight {
  border-color: rgba(248, 145, 255, 0.2);
  background: linear-gradient(135deg, var(--white) 0%, var(--color-clarity) 100%);
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-arrow {
  font-size: 1.25rem;
  color: var(--gray-999);
  flex-shrink: 0;
  align-self: center;
  transition: all 0.2s;
  font-weight: 300;
}

/* Card Icons */
.card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.card-icon--purple { background: var(--pale-periwinkle); color: var(--purple-primary); }
.card-icon--cyan   { background: var(--color-trust);     color: var(--purple-deep); }
.card-icon--gold   { background: var(--color-access);    color: #967000; }
.card-icon--pink   { background: var(--color-clarity);   color: #9b3aa5; }

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--pilot-dark-purple);
  margin-bottom: 0.25rem;
}

.card-desc {
  color: var(--gray-dark);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ═══════════════════
   BRAND ASSETS
   ═══════════════════ */
.brand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

.brand-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-light);
  background: var(--white);
  transition: all 0.2s;
}

.brand-card:hover {
  box-shadow: 0 8px 32px rgba(89, 49, 220, 0.08);
  transform: translateY(-2px);
}

.brand-preview {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.brand-preview--light   { background: var(--light-bg); }
.brand-preview--dark    { background: var(--pilot-dark-purple); }
.brand-preview--gradient { background: linear-gradient(135deg, var(--color-pilot), var(--color-brilliant)); }

.brand-logo-img { width: 100px; }

.brand-card-info {
  padding: 1rem 1.25rem;
}

.brand-card-info .card-title {
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
}

.brand-card-info .card-desc {
  font-size: 0.75rem;
}

/* ═══════════════════
   FOOTER
   ═══════════════════ */
.portal-footer {
  margin-top: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--gray-light);
}

.portal-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-legal {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--gray-999);
}

.footer-pilot-link {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--purple-primary);
  transition: opacity 0.2s;
}
.footer-pilot-link:hover { opacity: 0.7; }

/* ═══════════════════
   REVEAL ANIMATIONS
   ═══════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger cards within grids */
.portal-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.brand-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.brand-grid .reveal:nth-child(3) { transition-delay: 0.12s; }

/* ═══════════════════
   RESPONSIVE
   ═══════════════════ */
@media (max-width: 1024px) {
  .portal-grid--2 { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: 1fr 1fr; }
  .welcome-inner { flex-direction: column; align-items: flex-start; }
  .welcome-stats { width: 100%; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
  }
  .mobile-header { display: flex; }
  .main-content {
    margin-left: 0;
    padding: 72px 1rem 1.5rem;
  }
  .welcome-banner { padding: 2rem 1.5rem; border-radius: 12px; }
  .welcome-heading { font-size: 1.5rem; }
  .welcome-heading .cursive-accent--light { font-size: 1.5rem; }
  .brand-grid { grid-template-columns: 1fr; }
  .stat-pill { padding: 0.75rem 1rem; }
}
