/* ============================================================
   edgePRIME — Operational Intelligence
   Design system extracted from the reference layout
   (edgePRIME Home (Standalone).html).

   A warm, document-grade design language for dense operational
   dashboards: an "engineering report" type pairing (condensed
   display / serif body / mono data) on flat, paper-like surfaces.
   ============================================================ */

:root {
  /* ---- Brand & structure ---- */
  --navy:     #005E82;   /* primary — sidebar, status bar, headings, KPI values   */
  --navy2:    #00709C;   /* secondary — navy hover / interactive navy surfaces     */
  --navy-deep:#00293A;   /* near-black teal — modal backdrops, full-bleed bands    */
  --banner:   #1B3A5C;   /* top banner bar fill                                    */
  --hero-bg:  #03070E;   /* near-black hero base under the shipyard scene          */

  --brand-red:#ED3324;   /* edgePRIME wordmark red                                 */

  --amber:    #D17C0A;   /* the single accent — primary action, selection, focus   */
  --amber2:   #F0991C;   /* amber hover, wordmark, status-bar highlights           */
  --amber-dk: #9A5E08;   /* amber text on light surfaces (contrast-safe)           */

  /* ---- Surfaces & lines ---- */
  --cream:    #F7F5F0;   /* app background, input fields, table header fills        */
  --cream2:   #EFECE4;   /* sunken — explainer panels, row hover, dividers          */
  --white:    #FFFFFF;   /* raised — cards, top bar, side panels, charts, logo plate*/
  --border:   #D4CEBC;   /* default 1px hairline on every card / table / divider    */
  --border2:  #BFB8A5;   /* stronger border — secondary button outline              */

  /* ---- Text ---- */
  --text:     #1A1A18;   /* primary reading text, table cell values                 */
  --text2:    #4A4840;   /* explainer copy, field labels, supporting prose          */
  --text3:    #7A7568;   /* eyebrow labels, units, chart sub-titles, axis text      */

  /* ---- Status (meaning only, never decoration) ---- */
  --green:    #2D6A4F;
  --green2:   #1B6B40;
  --red:      #9B2226;

  /* ============================================================
     SPACING SCALE  (4px base)
     ============================================================ */
  --ds-space-1:  4px;
  --ds-space-2:  8px;
  --ds-space-3:  12px;
  --ds-space-4:  16px;
  --ds-space-5:  20px;
  --ds-space-6:  24px;
  --ds-space-7:  32px;
  --ds-space-8:  40px;
  --ds-space-9:  48px;
  --ds-space-10: 64px;

  /* ---- Type families ---- */
  --font-head: 'Barlow Condensed', sans-serif;            /* headings, nav, labels, KPI, buttons */
  --font-body: 'Source Serif 4', Georgia, serif;          /* body copy & explanatory prose       */
  --font-mono: 'JetBrains Mono', ui-monospace, monospace; /* all numerics, data, status          */

  /* ---- Radii (inputs · pills/notes · cards) ---- */
  --r-input: 3px;
  --r-pill:  4px;
  --r-card:  5px;
  --r-photo: 2px;

  /* ---- Layout shell dimensions ---- */
  --topbar-h:     52px;
}

/* ============================================================
   SEMANTIC TYPE ROLES
   ============================================================ */
.prime-section-title {            /* 30px section headers */
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
}
.prime-page-title {               /* 18px topbar / card title */
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--navy);
}
.prime-eyebrow {                  /* 10–11px tracked uppercase accent label */
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--amber);
}
.prime-label {                    /* 10–11px section / field label */
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text3);
}
.prime-body {                     /* serif explanatory prose */
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text2);
}
.prime-data {                     /* monospace numerics */
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   APP SHELL  (full-bleed landing screen)
   ============================================================ */
.prime-app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--hero-bg);
}

/* ---- Banner (top bar) ---- */
.prime-banner {
  background: var(--banner);
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 20px;
  padding-right: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.prime-banner__logo {
  background: var(--white);
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.prime-banner__logo img { height: 24px; width: auto; display: block; }
.prime-banner__center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 1px;
}
.prime-banner__wordmark-edge {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: lowercase;
  color: #fff;
}
.prime-banner__wordmark-prime {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brand-red);
}
.prime-banner__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.prime-banner__sub {
  font-family: var(--font-head);
  font-size: 10px;
  letter-spacing: 2px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}
.prime-banner__status {
  display: flex;
  align-items: center;
  gap: 7px;
}
.prime-banner__status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3DBE7A;
  box-shadow: 0 0 0 3px rgba(61, 190, 122, 0.18);
  display: inline-block;
  flex-shrink: 0;
}
.prime-banner__status-text {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.prime-banner__version {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.3);
}
.prime-banner__divider {
  width: 1px;
  height: 22px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 2px;
}

/* ---- User avatar + context menu ---- */
.prime-usermenu { position: relative; }
.prime-usermenu__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber2);
  color: var(--navy-deep);
  border: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.prime-usermenu.is-open .prime-usermenu__avatar {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(240, 153, 28, 0.4);
}
.prime-usermenu__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
}
.prime-usermenu__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 264px;
  z-index: 50;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 5px;
  box-shadow: 0 8px 28px rgba(0, 41, 58, 0.18);
  overflow: hidden;
  animation: fadeUp 0.16s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.prime-usermenu.is-open .prime-usermenu__backdrop,
.prime-usermenu.is-open .prime-usermenu__dropdown { display: block; }
.prime-usermenu__identity {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 16px 14px;
}
.prime-usermenu__identity-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--amber2);
  color: var(--navy-deep);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prime-usermenu__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  color: var(--navy);
  text-transform: uppercase;
  line-height: 1.2;
}
.prime-usermenu__email {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.prime-usermenu__identity-text { min-width: 0; }
.prime-usermenu__role-row { padding: 0 16px 14px; }
.prime-usermenu__role {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--amber-dk);
  background: rgba(209, 124, 10, 0.1);
  border: 1px solid rgba(209, 124, 10, 0.2);
  padding: 3px 9px;
  border-radius: 2px;
}
.prime-usermenu__signout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  background: var(--cream);
  border: none;
  border-top: 1px solid var(--border);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  text-align: left;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.prime-usermenu__signout:hover {
  background: var(--white);
  color: var(--amber-dk);
}

/* ---- Hero ---- */
.prime-hero {
  flex: 1;
  min-height: 200px;
  background: var(--hero-bg);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.prime-hero__scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url('../img/hull-bg.png');
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
}
.prime-hero__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, #03070e 0%, rgba(3, 7, 14, 0.92) 24%, rgba(3, 7, 14, 0.55) 44%, rgba(3, 7, 14, 0.12) 62%, transparent 76%);
}
.prime-hero__vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(3, 7, 14, 0.45) 0%, transparent 30%);
}
.prime-hero__rule {
  position: absolute;
  left: 68px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent 0%, var(--amber2) 12%, var(--amber2) 88%, transparent 100%);
  opacity: 0.5;
}
.prime-hero__content {
  padding-left: 92px;
  padding-right: 80px;
  position: relative;
}
@media (prefers-reduced-motion: no-preference) {
  .prime-hero__content { animation: heroIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
}
.prime-hero__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(56px, 8vw, 104px);
  letter-spacing: 1px;
  line-height: 0.9;
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
  gap: 0;
}
.prime-hero__title-edge { color: #fff; text-transform: lowercase; }
.prime-hero__title-prime {
  color: var(--brand-red);
  text-transform: uppercase;
  display: inline-flex;
  align-items: flex-start;
}
.prime-hero__title-tm {
  font-size: 0.16em;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.3em;
  margin-left: 0.15em;
  font-weight: 600;
}
.prime-hero__acronym {
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(14px, 1.4vw, 19px);
  letter-spacing: 3.5px;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  line-height: 1.7;
  margin-bottom: 18px;
}
.prime-hero__acronym b { color: var(--amber2); font-weight: 700; }
.prime-hero__acronym .sep { color: rgba(255, 255, 255, 0.35); }
.prime-hero__underline {
  width: 96px;
  height: 2px;
  background: var(--amber2);
  margin-bottom: 26px;
}
.prime-hero__values {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.32;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0 0 26px;
}
.prime-hero__values span { color: var(--amber2); }
.prime-hero__lede {
  font-family: var(--font-body);
  font-size: 16px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.9;
  max-width: 460px;
  margin: 0 0 30px;
  text-wrap: pretty;
}

/* ---- Primary launch button ---- */
.launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--amber2);
  color: var(--navy-deep);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  border-radius: var(--r-card);
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 0 0 1px rgba(240, 153, 28, 0.4);
}
.launch-btn:hover {
  background: #ffae3a;
  box-shadow: 0 4px 20px rgba(240, 153, 28, 0.28);
}
.launch-btn .arrow { transition: transform 0.15s; line-height: 0; }
.launch-btn:hover .arrow { transform: translateX(4px); }

/* V1 prototype link — pinned to the bottom-right corner of the page */
.prime-hero__v1 {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 5;
}

/* Row holding the hero actions */
.prime-hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---- Secondary (ghost) launch button ---- */
.launch-btn--ghost {
  background: transparent;
  color: var(--amber2);
  box-shadow: inset 0 0 0 1px rgba(240, 153, 28, 0.55);
}
.launch-btn--ghost:hover {
  background: rgba(240, 153, 28, 0.12);
  color: #ffae3a;
  box-shadow: inset 0 0 0 1px rgba(240, 153, 28, 0.9);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Responsive — tighten the hero inset on narrow viewports */
@media (max-width: 900px) {
  .prime-hero__content { padding-left: 48px; padding-right: 32px; }
}
@media (max-width: 560px) {
  .prime-banner__sub, .prime-banner__version { display: none; }
}
