/* ==========================================================================
   ASTRALX SHARED DESIGN LAYER  ·  astralx.css  ·  v1.0
   --------------------------------------------------------------------------
   Host this ONCE (e.g. https://astralxsolutions.com/astralx.css) and link it
   from all five properties BEFORE each site's own <style> block:

     <link rel="stylesheet" href="https://astralxsolutions.com/astralx.css">

   Every existing variable name in your five files is preserved below as an
   alias, so nothing breaks. Change a brand value here once and all five
   properties move together.

   Surfaces are declared per-site with a body attribute:
     <body data-surface="marketing">   main site, feedback, portfolios
     <body data-surface="app">         client portal, employee portal
   ========================================================================== */

/* ---------- 1. BRAND CONSTANTS (identical everywhere) -------------------- */
:root {
  /* AstralX core palette — sampled from the logo mark */
  --ax-blue:        #4F7CFF;   /* Astral — primary action + brand */
  --ax-blue-deep:   #3A5FD9;   /* pressed / hover */
  --ax-blue-soft:   #7B9CFF;   /* on dark surfaces */
  --ax-purple:      #8B5CF6;   /* Nebula — secondary accent */
  --ax-cyan:        #06D6D6;   /* Ion — tertiary accent, data viz */
  --ax-void:        #0A0A0F;   /* deepest ink, hero backdrops */

  /* Semantic — one set for all five properties */
  --ax-green:       #10B981;
  --ax-red:         #EF4444;
  --ax-amber:       #F59E0B;

  /* Tinted backgrounds for status chips */
  --ax-green-bg:    rgba(16, 185, 129, 0.10);
  --ax-red-bg:      rgba(239, 68, 68, 0.10);
  --ax-amber-bg:    rgba(245, 158, 11, 0.10);
  --ax-blue-bg:     rgba(79, 124, 255, 0.08);
  --ax-purple-bg:   rgba(139, 92, 246, 0.08);

  /* Signature gradient — the one visual constant across the ecosystem */
  --ax-aurora: linear-gradient(135deg, #4F7CFF 0%, #8B5CF6 50%, #06D6D6 100%);
  --ax-aurora-soft: linear-gradient(135deg,
      rgba(79,124,255,0.08) 0%, rgba(139,92,246,0.08) 50%, rgba(6,214,214,0.08) 100%);

  /* Type — the trio already used by 4 of 5 sites; portfolio adopts it */
  --ax-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --ax-body:    'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ax-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Type scale — 1.25 minor third, fluid */
  --ax-text-xs:   clamp(0.72rem, 0.70rem + 0.10vw, 0.78rem);
  --ax-text-sm:   clamp(0.84rem, 0.81rem + 0.14vw, 0.92rem);
  --ax-text-base: clamp(0.98rem, 0.95rem + 0.16vw, 1.06rem);
  --ax-text-lg:   clamp(1.18rem, 1.10rem + 0.36vw, 1.38rem);
  --ax-text-xl:   clamp(1.48rem, 1.32rem + 0.72vw, 1.94rem);
  --ax-text-2xl:  clamp(2.00rem, 1.68rem + 1.50vw, 3.10rem);
  --ax-text-3xl:  clamp(2.60rem, 1.98rem + 2.90vw, 4.60rem);

  /* Space — 8px base */
  --ax-1: 4px;   --ax-2: 8px;   --ax-3: 12px;  --ax-4: 16px;
  --ax-5: 24px;  --ax-6: 32px;  --ax-7: 48px;  --ax-8: 64px;
  --ax-9: 96px;  --ax-10: 128px;

  /* Radius */
  --ax-r-sm: 10px; --ax-r-md: 16px; --ax-r-lg: 24px; --ax-r-xl: 32px;
  --ax-r-pill: 999px;

  /* Motion — one easing vocabulary ecosystem-wide */
  --ax-ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ax-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ax-fast: 160ms; --ax-base: 280ms; --ax-slow: 560ms;

  /* Layout */
  --ax-container: 1200px;
  --ax-container-narrow: 760px;
}

/* ---------- 2. SURFACE MODES -------------------------------------------- */
/* Marketing surfaces run warm paper (editorial, inviting).
   App surfaces run cool paper (neutral, long-session legibility).
   Same brand, different rooms. */

[data-surface="marketing"], :root {
  --ax-paper:       #FAFAF7;
  --ax-paper-warm:  #F4F2EC;
  --ax-paper-card:  #FFFFFF;
  --ax-paper-hover: #F4F2EC;
  --ax-text:        #14141C;
  --ax-text-soft:   #5A5A6E;
  --ax-text-muted:  #8A8A9A;
  --ax-text-inverse:#F5F5F7;
  --ax-line:        rgba(10, 10, 15, 0.08);
  --ax-line-strong: rgba(10, 10, 15, 0.14);
}

[data-surface="app"] {
  --ax-paper:       #FBFBFD;
  --ax-paper-warm:  #F5F5F7;
  --ax-paper-card:  #FFFFFF;
  --ax-paper-hover: #F9F9FB;
  --ax-text:        #1D1D1F;
  --ax-text-soft:   #424245;
  --ax-text-muted:  #86868B;
  --ax-text-inverse:#F5F5F7;
  --ax-line:        rgba(0, 0, 0, 0.06);
  --ax-line-strong: rgba(0, 0, 0, 0.10);
}

/* Dark mode — the Client Portal already toggles [data-theme="dark"] */
[data-theme="dark"] {
  --ax-paper:       #0E0E14;
  --ax-paper-warm:  #14141C;
  --ax-paper-card:  #17171F;
  --ax-paper-hover: #1E1E28;
  --ax-text:        #F5F5F7;
  --ax-text-soft:   #C4C4CE;
  --ax-text-muted:  #8A8A9A;
  --ax-text-inverse:#14141C;
  --ax-line:        rgba(255, 255, 255, 0.08);
  --ax-line-strong: rgba(255, 255, 255, 0.14);
  --ax-blue:        #7B9CFF;
}

/* Elevation */
:root {
  --ax-shadow-sm: 0 1px 2px rgba(10,10,15,0.04), 0 1px 3px rgba(10,10,15,0.06);
  --ax-shadow-md: 0 4px 16px rgba(10,10,15,0.06), 0 2px 4px rgba(10,10,15,0.04);
  --ax-shadow-lg: 0 24px 48px -12px rgba(10,10,15,0.18), 0 8px 16px -8px rgba(10,10,15,0.08);
  --ax-shadow-glow: 0 20px 60px -20px rgba(79,124,255,0.40);
}

/* ---------- 3. BACK-COMPAT ALIASES -------------------------------------- */
/* Your five files already reference these names. Mapping them here means you
   can adopt astralx.css today WITHOUT editing any existing CSS rules. */
:root {
  /* shared by all */
  --ink: var(--ax-void);
  --ink-soft: var(--ax-paper-warm);
  --ink-line: var(--ax-line);
  --ink-line-strong: var(--ax-line-strong);
  --paper: var(--ax-paper);
  --paper-warm: var(--ax-paper-warm);
  --paper-card: var(--ax-paper-card);
  --paper-hover: var(--ax-paper-hover);

  --blue: var(--ax-blue);
  --blue-soft: var(--ax-blue-soft);
  --purple: var(--ax-purple);
  --cyan: var(--ax-cyan);
  --green: var(--ax-green);
  --red: var(--ax-red);
  --amber: var(--ax-amber);

  --green-bg: var(--ax-green-bg);
  --red-bg: var(--ax-red-bg);
  --amber-bg: var(--ax-amber-bg);
  --blue-bg: var(--ax-blue-bg);
  --purple-bg: var(--ax-purple-bg);

  --text: var(--ax-text);
  --text-strong: var(--ax-text);
  --text-soft: var(--ax-text-soft);
  --text-muted: var(--ax-text-muted);
  --text-faint: var(--ax-text-muted);
  --text-inverse: var(--ax-text-inverse);

  --gradient-aurora: var(--ax-aurora);
  --gradient-soft: var(--ax-aurora-soft);

  --font-display: var(--ax-display);
  --font-body: var(--ax-body);
  --font-mono: var(--ax-mono);

  --radius-sm: var(--ax-r-sm);
  --radius-md: var(--ax-r-md);
  --radius-lg: var(--ax-r-lg);
  --radius-xl: var(--ax-r-xl);

  --ease: var(--ax-ease);
  --ease-bounce: var(--ax-ease-bounce);
  --shadow: var(--ax-shadow-sm);
  --shadow-sm: var(--ax-shadow-sm);
  --shadow-md: var(--ax-shadow-md);
  --shadow-lg: var(--ax-shadow-lg);
  --shadow-glow: var(--ax-shadow-glow);

  /* Sample_Portfolio.html names */
  --bg-dark: var(--ax-void);
  --bg-dark-card: #12121A;
  --bg-light: var(--ax-paper-card);
  --bg-light-secondary: var(--ax-paper-warm);
  --bg-light-card: var(--ax-paper-card);
  --text-light: var(--ax-text-inverse);
  --text-light-secondary: rgba(255,255,255,0.70);
  --text-dark: var(--ax-text);
  --text-dark-secondary: var(--ax-text-muted);
  --accent-blue: var(--ax-blue);
  --accent-purple: var(--ax-purple);
  --accent-cyan: var(--ax-cyan);
  --gradient-1: var(--ax-aurora);
  --border-dark: rgba(255,255,255,0.10);
  --border-light: var(--ax-line);
  --space-xs: var(--ax-2);  --space-sm: var(--ax-4);  --space-md: var(--ax-5);
  --space-lg: var(--ax-7);  --space-xl: var(--ax-8);  --space-2xl: var(--ax-9);
  --space-3xl: var(--ax-10);
}

/* ==========================================================================
   4. SHARED COMPONENTS
   Prefix `ax-` so these can never collide with existing site CSS.
   ========================================================================== */

/* ---- 4.1 Ecosystem bar ---------------------------------------------------
   A thin strip that sits above every site's own nav. This is what makes five
   domains read as one platform. Drop the same markup on all five. */
.ax-bar {
  display: flex; align-items: center; gap: var(--ax-4);
  height: 40px; padding: 0 var(--ax-5);
  background: var(--ax-void); color: rgba(255,255,255,0.72);
  font-family: var(--ax-body); font-size: var(--ax-text-xs);
  letter-spacing: 0.04em; position: relative; z-index: 900;
}
.ax-bar__brand {
  display: flex; align-items: center; gap: var(--ax-2);
  color: #fff; font-weight: 600; text-decoration: none;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.ax-bar__brand img { width: 20px; height: 20px; border-radius: 50%; }
.ax-bar__links { display: flex; gap: var(--ax-4); margin-left: auto; }
.ax-bar__links a {
  color: inherit; text-decoration: none;
  transition: color var(--ax-fast) var(--ax-ease);
}
.ax-bar__links a:hover { color: #fff; }
.ax-bar__links a[aria-current="true"] { color: var(--ax-cyan); }
@media (max-width: 640px) {
  .ax-bar__links a[data-optional] { display: none; }
}

/* ---- 4.2 Buttons --------------------------------------------------------- */
.ax-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--ax-2); padding: 12px 22px;
  font-family: var(--ax-body); font-size: var(--ax-text-sm); font-weight: 600;
  border: 1px solid transparent; border-radius: var(--ax-r-pill);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--ax-fast) var(--ax-ease),
              box-shadow var(--ax-base) var(--ax-ease),
              background var(--ax-fast) var(--ax-ease);
}
.ax-btn:active { transform: translateY(1px); }
.ax-btn--primary { background: var(--ax-blue); color: #fff; }
.ax-btn--primary:hover { background: var(--ax-blue-deep); box-shadow: var(--ax-shadow-glow); }
.ax-btn--ghost {
  background: transparent; color: var(--ax-text); border-color: var(--ax-line-strong);
}
.ax-btn--ghost:hover { background: var(--ax-paper-hover); }

/* ---- 4.3 Rail ticket ------------------------------------------------------
   The signature object of the AstralX journey: an Edmondson-style rigid card
   ticket issued by an interstellar railway. The route line is both the train
   metaphor and a real progress indicator. Reused at small size as the talent
   card frame and the inquiry receipt.
   Full implementation with the star-chart engraving lives in the main site;
   these are the primitives shared across properties. */
.ax-ticket {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(158deg, #1C1C38 0%, #131324 52%, #1F1F3C 100%);
  color: #EFEDE6;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.85),
              0 1px 0 rgba(255,255,255,.09) inset;
  font-family: var(--ax-mono);
}
.ax-ticket::before {           /* foil edge */
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--ax-aurora); z-index: 3;
}
.ax-ticket__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--ax-3); padding: var(--ax-4) var(--ax-5) var(--ax-3);
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.ax-ticket__mark {
  font-size: 10px; letter-spacing: .30em; text-transform: uppercase; font-weight: 500;
}
.ax-ticket__mark span { color: var(--ax-cyan); }
.ax-ticket__serial { font-size: 10px; letter-spacing: .14em; color: rgba(239,237,230,.42); }

/* Route line: --travelled sets how far along the journey is */
.ax-ticket__rail { position: relative; height: 22px; display: flex; align-items: center; }
.ax-ticket__rail::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: repeating-linear-gradient(90deg,
    rgba(239,237,230,.26) 0 3px, transparent 3px 6px);
}
.ax-ticket__rail::after {
  content: ''; position: absolute; left: 0; top: 50%; height: 2px;
  width: var(--travelled, 0%);
  background: var(--ax-aurora); border-radius: 2px; transform: translateY(-.5px);
  box-shadow: 0 0 10px rgba(79,124,255,.55);
  transition: width 700ms var(--ax-ease);
}

/* Counterfoil, torn along the perforation */
.ax-ticket__stub {
  position: relative;
  padding: var(--ax-4) var(--ax-5) var(--ax-5);
  border-top: 1px dashed rgba(239,237,230,.22);
  display: flex; align-items: center; justify-content: space-between; gap: var(--ax-4);
}
.ax-ticket__stub::before, .ax-ticket__stub::after {
  content: ''; position: absolute; top: 0; width: 15px; height: 15px;
  border-radius: 50%; background: #08080E; transform: translateY(-50%);
  box-shadow: inset 0 2px 3px rgba(0,0,0,.95), 0 1px 0 rgba(255,255,255,.10);
}
.ax-ticket__stub::before { left: -8px; }
.ax-ticket__stub::after  { right: -8px; }

/* Conductor's punch */
.ax-ticket__punch {
  width: 13px; height: 13px; border-radius: 50%; background: rgba(0,0,0,.55);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.07);
}

/* ---- 4.4 Journey progress rail ------------------------------------------
   Sits fixed on the main site. Each dot is a station; the filled length is
   real scroll progress, not decoration. */
.ax-rail {
  position: fixed; right: var(--ax-5); top: 50%;
  transform: translateY(-50%); z-index: 800;
  display: flex; flex-direction: column; gap: var(--ax-3);
}
.ax-rail__dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ax-line-strong); border: 0; padding: 0; cursor: pointer;
  transition: all var(--ax-base) var(--ax-ease);
}
.ax-rail__dot[aria-current="true"] {
  background: var(--ax-blue); transform: scale(1.5);
  box-shadow: 0 0 0 4px var(--ax-blue-bg);
}
@media (max-width: 900px) { .ax-rail { display: none; } }

/* ---- 4.5 Scroll reveal (already the pattern in your files) --------------- */
.ax-reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--ax-slow) var(--ax-ease),
              transform var(--ax-slow) var(--ax-ease);
}
.ax-reveal.is-visible { opacity: 1; transform: none; }

/* ---- 4.6 Talent card ----------------------------------------------------- */
.ax-talent {
  display: block; text-decoration: none; color: inherit;
  background: var(--ax-paper-card);
  border: 1px solid var(--ax-line);
  border-radius: var(--ax-r-md); padding: var(--ax-5);
  transition: transform var(--ax-base) var(--ax-ease),
              box-shadow var(--ax-base) var(--ax-ease),
              border-color var(--ax-base) var(--ax-ease);
}
.ax-talent:hover {
  transform: translateY(-4px);
  box-shadow: var(--ax-shadow-lg);
  border-color: transparent;
}
.ax-talent__avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  background: var(--ax-paper-warm);
}
.ax-talent__role {
  font-family: var(--ax-mono); font-size: var(--ax-text-xs);
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--ax-text-muted);
}
.ax-talent__name {
  font-family: var(--ax-display); font-size: var(--ax-text-lg); font-weight: 500;
}
.ax-chip {
  display: inline-block; padding: 4px 11px; border-radius: var(--ax-r-pill);
  background: var(--ax-blue-bg); color: var(--ax-blue);
  font-size: var(--ax-text-xs); font-weight: 500;
}
.ax-chip--available { background: var(--ax-green-bg); color: var(--ax-green); }
.ax-chip--booked    { background: var(--ax-amber-bg); color: var(--ax-amber); }

/* ---- 4.7 Quality floor --------------------------------------------------- */
.ax-container { width: min(100% - 2 * var(--ax-5), var(--ax-container)); margin-inline: auto; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--ax-blue);
  outline-offset: 3px;
  border-radius: var(--ax-r-sm);
}

.ax-skip {
  position: absolute; left: -9999px;
  background: var(--ax-void); color: #fff;
  padding: var(--ax-3) var(--ax-5); border-radius: 0 0 var(--ax-r-sm) 0;
  z-index: 1000;
}
.ax-skip:focus { left: 0; top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ax-reveal { opacity: 1; transform: none; }
}
