/* shell.css - auth modal, platform navigation, and logo treatment. */

/* ══ Auth modal ═══════════════════════════════════════════════════════════ */
.fz-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.fz-modal.open { display: block; }

.fz-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 2, 3, .72);
  backdrop-filter: blur(6px);
  animation: fzFade .18s ease;
}
@keyframes fzFade { from { opacity: 0 } to { opacity: 1 } }

.fz-modal-box {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  margin: 12vh auto 0;
  padding: 28px 26px 22px;
  background: linear-gradient(170deg, var(--bg-elevated), var(--bg-base));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
  animation: fzRise .22s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes fzRise { from { opacity: 0; transform: translateY(14px) scale(.98) } to { opacity: 1 } }

.fz-modal-box h3 { font-size: 1.2rem; margin-bottom: 16px; }

.fz-modal-x {
  position: absolute; top: 12px; left: 14px;
  width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-muted);
  font-size: 1.5rem; line-height: 1;
}
.fz-modal-x:hover { background: var(--bg-glass); color: var(--text-primary); }

.fz-tabs {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 18px;
  background: var(--bg-glass); border-radius: var(--radius-pill);
}
.fz-tab {
  flex: 1; padding: 9px 0; border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-secondary);
  font-family: inherit; font-size: .86rem; font-weight: 600;
  transition: var(--transition-fast);
}
.fz-tab.active { background: var(--accent); color: #04241b; }

.fz-field { margin-bottom: 14px; }
.fz-field label {
  display: block; margin-bottom: 6px;
  font-size: .8rem; color: var(--text-secondary);
}
.fz-field .inp { width: 100%; }

.fz-err {
  display: none; margin-bottom: 12px; padding: 9px 12px;
  border: 1px solid rgba(239, 68, 68, .3);
  background: rgba(239, 68, 68, .08);
  border-radius: var(--radius-sm);
  color: #fca5a5; font-size: .8rem; line-height: 1.8;
}
.fz-submit { width: 100%; justify-content: center; }
.fz-hint {
  margin-top: 12px; text-align: center;
  font-size: .72rem; color: var(--text-muted); line-height: 1.9;
}

/* ══ Platform navigation ══════════════════════════════════════════════════
   The nav carries 16 items. Left as plain inline links they wrapped onto two
   ragged lines and read as an undifferentiated wall of words. This groups them
   into a scrollable pill rail: one line, clear active state, and the overflow
   scrolls instead of wrapping. */
.plat-nav, nav.platform-nav, .navlinks {
  scrollbar-width: none;
}
.plat-nav::-webkit-scrollbar, .navlinks::-webkit-scrollbar { display: none; }

.navlinks {
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 4px;
  scroll-snap-type: x proximity;
}
.navlinks > a {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  font-size: .84rem; font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  scroll-snap-align: start;
  transition: color .18s ease, background .18s ease;
}
.navlinks > a:hover { color: var(--text-primary); background: var(--bg-glass); }
.navlinks > a.active {
  color: var(--accent);
  background: rgba(6, 214, 160, .1);
  box-shadow: inset 0 0 0 1px rgba(6, 214, 160, .22);
}

/* No edge fade here on purpose: an overlay pinned with inset-inline-start sits
   on the RIGHT in this RTL document, which is the start of the rail - it
   covered the first nav item instead of the overflowing end. A mask that hides
   a working link is worse than a hard edge, so the rail simply clips. */
.nav-rail { position: relative; min-width: 0; }

/* ══ Logo ════════════════════════════════════════════════════════════════
   Was a plain image box with a hard glow. Now the mark and wordmark sit on a
   shared baseline with a subtle gradient wordmark - reads as a brand rather
   than a favicon parked next to text. */
.brand, .logo-wrap, a.brand {
  display: inline-flex; align-items: center; gap: 10px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(6, 214, 160, .16), rgba(232, 169, 32, .10));
  border: 1px solid rgba(6, 214, 160, .28);
  box-shadow: 0 2px 14px rgba(6, 214, 160, .12);
  overflow: hidden;
  transition: var(--transition-fast);
}
.brand-mark img { width: 26px; height: 26px; object-fit: contain; }
.brand:hover .brand-mark {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(6, 214, 160, .22);
  border-color: rgba(6, 214, 160, .45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: 'Outfit', 'Vazirmatn', sans-serif;
  font-size: 1.2rem; font-weight: 800; letter-spacing: .3px;
  background: linear-gradient(100deg, var(--text-primary), var(--accent) 140%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-tag {
  font-size: .62rem; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--text-muted);
}

@media (max-width: 860px) {
  .brand-tag { display: none; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark img { width: 22px; height: 22px; }
  .brand-name { font-size: 1.05rem; }
}

/* ══ Whale visibility on the dashboard ═══════════════════════════════════
   The landing page shows the whale over an empty hero, so 0.30 reads well
   there. The platform is wall-to-wall cards at rgba(12,20,40,.65) - anything
   behind them survives at ~35% of its own alpha, so 0.30 became roughly 0.10
   and vanished. These values are what it takes to still be perceptible
   *through* the cards without competing with the numbers on top of them. */
.platform-page .whale {
  opacity: .62;
  top: 60%;
  filter: drop-shadow(0 0 34px rgba(74, 159, 216, .30));
}
.platform-page.light-theme .whale { opacity: .26; }

@media (max-width: 860px) {
  /* On a phone the dashboard is edge-to-edge data; the whale is just noise. */
  .platform-page .whale { opacity: .3; }
}
