/**
 * ═══════════════════════════════════════════════════════
 * SOVEREIGN SIGNAL — Shared Styles (shared.css)
 * Cross-page CSS extracted from company-index.html.
 * Requires ss-core.css loaded first (design tokens).
 * ═══════════════════════════════════════════════════════
 */

/* ═══ CURSOR GLOW ═══ */
.cursor-glow {
  position: fixed; width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(108,60,224,0.06) 0%, rgba(14,245,194,0.02) 40%, transparent 70%);
  pointer-events: none; z-index: 1; transform: translate(-50%,-50%);
  transition: opacity 0.8s; opacity: 0;
}
body:hover .cursor-glow { opacity: 1; }

/* ═══ PROGRESS BAR ═══ */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 10000;
  background: var(--ss-gradient);
  width: 0%; transition: width 0.1s linear;
}

/* ═══ PAGE TRANSITION ═══ */
.page-cover {
  position: fixed; inset: 0; background: var(--ss-void); z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  animation: page-reveal 1s var(--ss-ease) 0.4s forwards;
}
@keyframes page-reveal {
  0% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 100% 0); }
}
.page-cover-text {
  font-family: var(--ss-display); font-size: 17px; font-weight: 800; letter-spacing: 0.4em;
  background: var(--ss-gradient-text); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  animation: cover-fade 0.8s ease forwards;
}
@keyframes cover-fade { 0%{opacity:0;transform:translateY(8px)} 30%{opacity:1;transform:translateY(0)} 80%{opacity:1} 100%{opacity:0} }

/* Exit transition (SPA link interception) */
.page-cover-exit {
  animation: page-exit 0.4s var(--ss-ease, cubic-bezier(0.22, 1, 0.36, 1)) forwards;
}
@keyframes page-exit {
  0% { clip-path: inset(100% 0 0 0); }
  100% { clip-path: inset(0 0 0 0); }
}

/* ═══ LAYOUT ═══ */
.container { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 768px) { .container { padding: 0 24px; } }

/* ═══ STRUCTURAL LINES ═══ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(14,165,233,0.12) 20%, rgba(14,165,233,0.2) 50%, rgba(14,165,233,0.12) 80%, transparent 95%);
  margin: 32px auto;
  max-width: 1440px;
}

/* ═══ SHARED KEYFRAMES ═══ */
@keyframes fade-in-bottom {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes fade-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes panel-materialize {
  0% { transform: translateY(-50%) translateZ(-600px); opacity: 0; }
  100% { transform: translateY(-50%) translateZ(0); opacity: 1; }
}

/* ═══ AUTH PANEL ═══ */
.hero-auth-panel {
  position: fixed;
  top: 50%;
  right: 5vw;
  transform: translateY(-50%) scale(0.96);
  z-index: 1000;
  width: 380px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
              transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
              visibility 0.35s;
}
.hero-auth-panel.auth-panel-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}
.hero-auth-card {
  background: rgba(12,16,24,0.7);
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 20px;
  padding: 32px 28px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}
.hero-auth-close {
  position: absolute; top: 12px; right: 14px; z-index: 5;
  background: none; border: none; color: rgba(255,255,255,0.35);
  font-size: 22px; line-height: 1; cursor: pointer; padding: 4px 8px;
  transition: color 0.2s, transform 0.2s;
}
.hero-auth-close:hover { color: var(--ss-teal); transform: scale(1.15); }
.hero-auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, rgba(167,139,250,0.4) 30%, rgba(14,245,194,0.35) 60%, transparent 95%);
}
.hero-auth-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(ellipse at 30% 0%, rgba(167,139,250,0.05) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 100%, rgba(14,245,194,0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Header */
.hero-auth-header { margin-bottom: 20px; }
.hero-auth-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--ss-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.hero-auth-label svg { opacity: 0.5; }

/* Google OAuth button */
.hero-auth-google {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 12px 24px;
  font-family: var(--ss-statement); font-size: 14px; font-weight: 500;
  letter-spacing: 0.01em;
  color: #f0ede8;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  cursor: pointer; transition: all 0.2s;
}
.hero-auth-google:hover {
  background: rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* Divider */
.hero-auth-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 16px 0;
}
.hero-auth-divider::before,
.hero-auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.06);
}
.hero-auth-divider span {
  font-family: var(--ss-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.2);
}

/* Form fields */
.hero-auth-field { margin-bottom: 14px; }
.hero-auth-field-label {
  display: block;
  font-family: var(--ss-statement); font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.6);
  margin-bottom: 6px;
}
.hero-auth-input {
  width: 100%; box-sizing: border-box;
  padding: 12px 16px;
  font-family: var(--ss-statement); font-size: 14px;
  color: #f0ede8;
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-auth-input::placeholder {
  color: rgba(255,255,255,0.2);
  font-family: var(--ss-statement);
}
.hero-auth-input:focus {
  border-color: rgba(14,245,194,0.35);
  box-shadow: 0 0 0 3px rgba(14,245,194,0.06);
}
.hero-auth-input.error {
  border-color: rgba(239,68,68,0.5);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.06);
}

/* Password wrap + eye toggle */
.hero-auth-password-wrap { position: relative; }
.hero-auth-password-wrap .hero-auth-input { padding-right: 44px; }
.hero-auth-eye {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,0.25); padding: 4px;
  transition: color 0.2s;
}
.hero-auth-eye:hover { color: rgba(255,255,255,0.5); }

/* Password strength checklist */
.hero-auth-strength {
  margin-top: 10px;
  display: none;
}
[data-mode="signup"] .hero-auth-strength { display: block; }
.strength-rule {
  font-family: var(--ss-mono); font-size: 10px;
  letter-spacing: 0.03em; line-height: 1.8;
  color: rgba(255,255,255,0.3);
  display: flex; align-items: center; gap: 6px;
  transition: color 0.2s;
}
.strength-rule .strength-icon {
  font-size: 10px; color: rgba(239,68,68,0.5);
  width: 12px; text-align: center;
  transition: color 0.2s;
}
.strength-rule.pass { color: rgba(14,245,194,0.6); }
.strength-rule.pass .strength-icon { color: rgba(14,245,194,0.8); }

/* Forgot password */
.hero-auth-field-footer {
  display: none;
  justify-content: flex-end; margin-top: 6px;
}
[data-mode="login"] .hero-auth-field-footer { display: flex; }
.hero-auth-forgot {
  font-family: var(--ss-mono); font-size: 10px;
  letter-spacing: 0.04em; color: rgba(14,245,194,0.45);
  text-decoration: none; transition: color 0.2s;
}
.hero-auth-forgot:hover { color: rgba(14,245,194,0.8); }

/* Error/Success messages */
.hero-auth-message {
  font-family: var(--ss-mono); font-size: 11px;
  letter-spacing: 0.03em; line-height: 1.4;
  padding: 0; margin: 0;
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.hero-auth-message.show {
  max-height: 80px; padding: 10px 14px; margin-bottom: 12px;
  border-radius: 8px;
}
.hero-auth-message.error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  color: #fca5a5;
}
.hero-auth-message.success {
  background: rgba(14,245,194,0.06);
  border: 1px solid rgba(14,245,194,0.15);
  color: rgba(14,245,194,0.8);
}

/* Submit button */
.hero-auth-submit {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 13px 24px;
  font-family: var(--ss-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: #050505;
  background: linear-gradient(135deg, #0ef5c2 0%, #0ea5e9 50%, #a78bfa 100%);
  background-size: 200% 200%;
  border: none; border-radius: 10px;
  cursor: pointer; transition: all 0.3s;
  position: relative; margin-top: 4px;
  box-shadow: 0 4px 24px rgba(14,245,194,0.15), 0 1px 3px rgba(0,0,0,0.2);
}
.hero-auth-submit:hover {
  background-position: 100% 100%;
  box-shadow: 0 6px 32px rgba(14,245,194,0.25), 0 2px 6px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}
.hero-auth-submit:active { transform: translateY(0); }
.hero-auth-submit.loading { opacity: 0.7; pointer-events: none; }
.hero-auth-submit.loading .hero-auth-submit-text { opacity: 0; }
.hero-auth-submit-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(5,5,5,0.3);
  border-top-color: #050505; border-radius: 50%;
  animation: spin 0.6s linear infinite;
  position: absolute;
}
.hero-auth-submit.loading .hero-auth-submit-spinner { display: block; }

/* Mode toggle footer */
.hero-auth-toggle {
  text-align: center; margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
  font-family: var(--ss-statement); font-size: 13px;
  color: rgba(255,255,255,0.3);
}
.hero-auth-toggle a {
  color: #0ef5c2; text-decoration: none; font-weight: 600;
  transition: color 0.2s;
}
.hero-auth-toggle a:hover { color: #1cffd0; }
[data-mode="signup"] .auth-toggle-login { display: none; }
[data-mode="login"] .auth-toggle-signup { display: none; }

/* Institutional CTA */
.hero-auth-institutional {
  text-align: center; margin-top: 12px;
  font-family: var(--ss-mono); font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.2);
}
.hero-auth-institutional a {
  color: rgba(167,139,250,0.6);
  text-decoration: none; transition: color 0.2s;
}
.hero-auth-institutional a:hover { color: rgba(167,139,250,0.9); }

/* Legal line */
.hero-auth-legal {
  display: none;
  text-align: center; margin-top: 10px;
  font-family: var(--ss-mono); font-size: 9px;
  letter-spacing: 0.03em; line-height: 1.5;
  color: rgba(255,255,255,0.15);
}
[data-mode="signup"] .hero-auth-legal { display: block; }
.hero-auth-legal a {
  color: rgba(255,255,255,0.3);
  text-decoration: underline; text-underline-offset: 2px;
  transition: color 0.2s;
}
.hero-auth-legal a:hover { color: rgba(255,255,255,0.5); }

/* Tabbed auth */
.hero-auth-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.08); margin-bottom: 24px; }
.hero-auth-tab {
  flex: 1; padding: 12px 0; background: none; border: none; border-bottom: 2px solid transparent;
  font-family: var(--ss-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.3); cursor: pointer; transition: color 0.2s, border-color 0.2s;
}
.hero-auth-tab:hover { color: rgba(255,255,255,0.5); }
.hero-auth-tab.active { color: var(--ss-teal); border-bottom-color: var(--ss-teal); }
.hero-auth-view { display: none; opacity: 0; }
.hero-auth-view.active { display: block; opacity: 1; animation: authViewFade 0.3s ease both; }
@keyframes authViewFade { 0% { opacity: 0; transform: translateY(6px); } 100% { opacity: 1; transform: translateY(0); } }

/* Input with icon */
.hero-field-wrap { position: relative; }
.hero-field-wrap .hero-auth-input { padding-left: 42px; }
.hero-field-wrap .hero-auth-input.hero-input-password { padding-right: 44px; }
.hero-input-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.2); pointer-events: none; transition: color 0.2s;
}
.hero-field-wrap:focus-within .hero-input-icon { color: var(--ss-teal); }
.hero-eye-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.25); padding: 4px; transition: color 0.2s;
}
.hero-eye-toggle:hover { color: rgba(255,255,255,0.5); }

/* Username status */
.hero-username-status {
  font-family: var(--ss-mono); font-size: 10px; min-height: 16px; margin-top: 4px; transition: color 0.2s;
}
.hero-username-status.available { color: var(--ss-teal); }
.hero-username-status.taken { color: #ef4444; }
.hero-username-status.checking { color: rgba(255,255,255,0.25); }
.hero-username-status.invalid { color: #f59e0b; }

/* Password strength grid */
.hero-strength { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.hero-strength-rule {
  font-family: var(--ss-mono); font-size: 10px; color: rgba(255,255,255,0.3);
  display: flex; align-items: center; gap: 6px; transition: color 0.2s;
}
.hero-strength-rule .hero-strength-icon { font-size: 10px; color: rgba(239,68,68,0.5); width: 12px; text-align: center; transition: color 0.2s; }
.hero-strength-rule.pass { color: rgba(14,245,194,0.6); }
.hero-strength-rule.pass .hero-strength-icon { color: rgba(14,245,194,0.8); }

/* Auth panel mobile */
@media (max-width: 768px) {
  .hero-auth-panel { width: calc(100vw - 32px); right: 16px; }
}
