/* ================================================================
   shared.css — StarFyre Software Design System Foundation
   Imported by every page on starfyresoftware.com
   Last updated: 2026-08-13  (AAA Audit Sprint 1)
   ================================================================ */

/* ---- Reset & Antialiasing ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---- AAA StarFyre Global Design Tokens ---- */
:root {
  /* Core Brand Palette (StarFyre Neurodivergent Identity) */
  --brand-purple: #7000FF;
  --brand-pink: #FF00FF;
  --brand-magenta: #C00FD1;
  --brand-teal: #00D2FF;
  
  /* Deep Space Contrast (Deep Blue/Black) */
  --brand-dark-base: #0a0214;
  --brand-dark-surface: #140d20;
  --brand-dark-elevated: #1e1630;
  
  /* Text */
  --text-white: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.65);
  
  /* Portal UI */
  --portal-glass: rgba(30, 22, 48, 0.6);
  --portal-border: rgba(255, 255, 255, 0.1);
  --portal-danger: #ff4d4d;
  --portal-success: #00e676;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }

/* ---- Skip Navigation (Accessibility) ---- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: #fff;
  color: #0a0214;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: top 0.2s ease;
}
.skip-nav:focus {
  top: 0;
  outline: 3px solid #00d2ff;
  outline-offset: 2px;
}

/* ---- Focus-Visible (Global) ---- */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}
/* Themed focus rings — pages override via :root --focus-ring */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: var(--focus-ring, #00d2ff);
  outline-width: 2px;
  outline-style: solid;
  outline-offset: 3px;
}
/* Remove default outline for non-keyboard interaction */
:focus:not(:focus-visible) {
  outline: none;
}

/* ---- Shared Layout ---- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---- Typography Scale (Shared Structure) ---- */
/* Pages override via :root custom properties or page-specific <style> */
h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  line-height: 1.12;
}
h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  padding: 14px 32px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  /* Default: solid style using page accent */
  background: var(--btn-bg, linear-gradient(135deg, #C00FD1, #FF00FF));
  color: var(--btn-text, #fff);
  box-shadow: 0 6px 24px var(--btn-glow, rgba(192, 15, 209, 0.35));
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px var(--btn-glow-hover, rgba(255, 0, 255, 0.5));
  filter: brightness(1.12);
}
.btn:active {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* Ghost / Outline variant */
.btn.ghost,
.btn-ghost {
  background: transparent;
  border: 1px solid var(--btn-ghost-border, rgba(255, 255, 255, 0.25));
  color: var(--btn-ghost-text, rgba(255, 255, 255, 0.9));
  box-shadow: none;
}
.btn.ghost:hover,
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--btn-ghost-border-hover, rgba(255, 255, 255, 0.5));
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  filter: none;
}

/* Small variant (nav-sized) */
.btn.small,
.btn-small {
  padding: 8px 20px;
  font-size: 0.85rem;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

/* ---- Premium Buy Button ---- */
.btn-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  color: #fff;
  padding: 18px 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  /* Gradient set per page via --premium-from / --premium-to */
  background: linear-gradient(135deg, var(--premium-from, #C00FD1), var(--premium-to, #FF00FF));
  box-shadow: 0 10px 30px var(--premium-glow, rgba(192, 15, 209, 0.4)),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-premium::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
}
.btn-premium:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 40px var(--premium-glow-hover, rgba(255, 0, 255, 0.6)),
              inset 0 1px 0 rgba(255, 255, 255, 0.4);
  filter: brightness(1.1);
}
.btn-premium:hover::after { left: 200%; }
.btn-premium .price {
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 400;
  font-size: 0.9rem;
}

/* ---- Reveal Animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.show,
.reveal.in { /* Fyndovn uses .in */
  opacity: 1;
  transform: none;
}

/* ---- Mono Utility ---- */
.mono { font-family: 'Nova Mono', monospace; }

/* ================================================================
   Customer Portal AAA-UI Components
   ================================================================ */

/* Glassmorphic Panel */
.portal-panel {
  background: var(--portal-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Form Inputs */
.portal-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--portal-border);
  color: var(--text-white);
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}
.portal-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 210, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
}
.portal-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Spinner (AAA Standard Smooth CSS) */
.portal-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toasts (Semantic Feedback) */
.portal-toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-dark-elevated);
  border: 1px solid var(--portal-border);
  color: var(--text-white);
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  opacity: 0;
  z-index: 9999;
}
.portal-toast.show {
  bottom: 40px;
  opacity: 1;
}
.portal-toast.error { border-left: 4px solid var(--portal-danger); }
.portal-toast.success { border-left: 4px solid var(--portal-success); }
