/* ============ Brand + Color ============ */
:root{
  /* Uses existing variables already defined in pages */
  /* --primary is the brand gold (e.g. #f3d36a / #f4d03f) */
  /* Alias variable (no functional change) */
  --brand-primary: var(--primary);
}

/* Headings: brand gold + subtle glow */
.h1, h1.h1, .hero-title {
  color: var(--primary);
}

/* Optional sheen across headings (apply via class .heading-sheen) */
.heading-sheen {
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--primary) 75%, #fff 0%),
      #fff 35%,
      color-mix(in srgb, var(--primary) 85%, #fff 0%)
    );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
@keyframes sheen-slide {
  0%   { background-position: -150% 0; }
  100% { background-position: 150% 0; }
}
.prefers-motion .heading-sheen {
  background-size: 200% 100%;
  animation: sheen-slide 6s linear infinite;
}

/* Tiny gold underline that animates in on load/hover */
.underline-brand {
  position: relative;
}
.underline-brand::after {
  content: "";
  position: absolute; left: 50%; bottom: -6px;
  width: 0; height: 3px; transform: translateX(-50%);
  background: var(--primary);
  border-radius: 999px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.prefers-motion .underline-brand.is-mounted::after,
.underline-brand:hover::after { width: 56%; }

/* Cards: gentle lift + outline on hover */
.card, .panel, .table-container {
  transition: transform .25s ease, box-shadow .25s ease, outline-color .25s ease;
}
.prefers-motion .card:hover,
.prefers-motion .panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0,0,0,.28);
  outline: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

/* Buttons: tactile press */
button, .btn {
  transition: transform .1s ease, filter .2s ease, box-shadow .2s ease;
}
.prefers-motion button:active,
.prefers-motion .btn:active { transform: translateY(1px); }
.btn-primary:hover { filter: brightness(1.05); }

/* Inputs: animated focus ring in brand color */
input, select, textarea {
  transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 35%, transparent);
}

/* Dropzone: glow when dragging files */
[data-dropzone].is-dragover {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent) inset;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Footer & Layout helpers */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-footer { margin-top: auto; text-align: center; padding: 16px 12px; color: var(--muted); border-top: 1px solid var(--border); }
.site-footer a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .prefers-motion * { animation: none !important; transition: none !important; }
}

/* ---- Ambient hero glow (behind big headings) ---- */
.hero-ambient {
  position: relative;
  isolation: isolate;
}
.hero-ambient::before {
  content:"";
  position:absolute; inset:auto 50% -16px 50%;
  translate:-50% 0;
  width:min(72vw, 880px); height:140px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--primary) 22%, transparent) 0%, transparent 70%);
  filter: blur(20px);
  z-index:-1; pointer-events:none;
}

/* ---- Brand gradient border utilities (for key panels) ---- */
.brand-border {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(var(--card, rgba(255,255,255,.04)), var(--card, rgba(255,255,255,.04))) padding-box,
              conic-gradient(from 180deg, color-mix(in srgb, var(--primary) 38%, transparent), transparent 45%, color-mix(in srgb, var(--primary) 22%, transparent)) border-box;
  border: 1px solid transparent;
}

/* ---- CTA micro-motion (subtle pulse on hover, 1-time mount sheen) ---- */
@keyframes btnPulse { 0%,100%{ box-shadow:0 0 0 0 rgba(243,211,106,.0);} 50%{ box-shadow:0 8px 28px rgba(243,211,106,.25);} }
.btn-primary:hover { animation: btnPulse 1.4s ease-in-out; }
.btn-primary.mount-pop { transform: translateY(-1px); filter: brightness(1.05); transition: transform .2s ease, filter .4s ease; }

/* ---- Section dividers (gold hairline) ---- */
.hr-brand {
  height:1px; border:0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--primary) 50%, #000 0%), transparent);
  opacity:.5; margin: 1.25rem 0;
}

/* ---- Table polish ---- */
.table-striped tr:nth-child(even) td { background: rgba(255,255,255,.025); }
.table-hover tbody tr:hover td { background: rgba(255,255,255,.045); }

/* ---- Skeletons (loading) ---- */
.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,.06); border-radius: 8px; }
.skeleton::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
  transform: translateX(-100%); animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%);} }

/* ---- Toasts ---- */
.toast-wrap { position: fixed; right: 16px; top: 16px; display: grid; gap: 10px; z-index: 9999; }
.toast {
  display:flex; align-items:center; gap:.6rem;
  padding:.65rem .8rem; border-radius: 12px;
  background: rgba(18,22,30,.9); color: #E8EAF2;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
  transform: translateY(-6px); opacity:0;
  transition: transform .25s ease, opacity .25s ease;
}
.toast.in { transform:none; opacity:1; }
.toast--success { border-color: color-mix(in srgb, var(--primary) 50%, transparent); }
.toast--error { border-color: rgba(255,86,86,.45); }

/* ---- Stepper (for AACSB upload) ---- */
.stepper { display:flex; align-items:center; gap:.75rem; justify-content:center; margin:.5rem 0 1rem; }
.stepper .dot { width:9px; height:9px; border-radius:999px; background: rgba(255,255,255,.22); }
.stepper .dot.is-active { background: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }

/* ---- Search focus shortcut cue ---- */
kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:.72rem; padding:.2rem .35rem; border-radius:6px; background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); }

/* ---- Split page background (subtle two-tone with gold hairline) ---- */
.page-split-bg {
  /* Subtle vertical wash + 1px gold hairline at mid */
  background:
    linear-gradient(180deg,
      var(--bg) 0%,
      color-mix(in srgb, var(--primary) 10%, var(--bg)) 100%
    ),
    linear-gradient(180deg,
      transparent calc(50% - 0.5px),
      color-mix(in srgb, var(--primary) 45%, transparent) 50%,
      transparent calc(50% + 0.5px)
    );
  background-attachment: scroll;
}

/* ===== Executive sheen – subtle brand gradient bands at the very top ===== */
.site-ribbon {
  position: sticky; top: 0; z-index: 60; height: 4px;
  background: linear-gradient(90deg,
    transparent, color-mix(in srgb, var(--primary) 65%, #000 0%) 25%,
    color-mix(in srgb, var(--primary) 45%, #000 0%) 75%, transparent);
  filter: blur(.2px);
}

/* ===== Hero “crest” frame for the main title ===== */
.hero-frame {
  position: relative; padding-top: .5rem; margin-bottom: .5rem;
}
.hero-frame::after {
  content:""; position:absolute; left:50%; bottom:-12px; translate:-50% 0;
  width:min(52ch, 90vw); height:2px; border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity:.45;
}

/* ===== Executive KPI cards (reports) ===== */
.kpi-grid { display:grid; gap: .75rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
@media (min-width: 640px) { .kpi-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
.kpi {
  border-radius: 14px; padding: .9rem .95rem;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform .2s ease, box-shadow .25s ease;
}
.prefers-motion .kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.kpi .label { font-size: .72rem; letter-spacing: .02em; color: #AEB5C3; }
.kpi .value { font-feature-settings: "tnum" 1,"lnum" 1; font-size: clamp(1.25rem, 2.4vw, 1.65rem); font-weight: 800; color: var(--text); }
.kpi .spark { height: 34px; opacity:.8; }
/* Make sure canvases have an actual box for Chart.js to render into */
.kpi .spark { display:block; width:100%; height:34px; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { display:flex; gap:.5rem; align-items:center; color:#AEB5C3; font-size:.8rem; }
.breadcrumbs a { color:#C8CFDA; text-decoration:none; }
.breadcrumbs a:hover { color:#fff; }
.breadcrumbs .sep { opacity:.35; }

/* ===== Trust strip (security/compliance cues) ===== */
.trust-strip {
  display:flex; gap:1rem; flex-wrap:wrap; align-items:center; justify-content:center;
  font-size:.8rem; color:#AEB5C3; padding:.5rem 0;
}
.trust-chip {
  display:inline-flex; align-items:center; gap:.45rem;
  padding:.35rem .6rem; border-radius:999px;
  border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.04);
}

/* ===== Footer (subtle) ===== */
.site-footer {
  margin-top: 2rem; padding: 1.2rem 0; border-top:1px solid rgba(255,255,255,.08);
  color:#AEB5C3; font-size:.82rem;
}

/* ===== Print mode for AACSB exports ===== */
@media print {
  html, body { background:#fff; color:#000 !important; }
  .site-ribbon, nav, .site-footer, .trust-strip { display:none !important; }
  .card, .panel { box-shadow:none !important; border:1px solid #ddd !important; }
}

/* ===== Page transitions (fade) ===== */
.page-fade { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.page-fade.in { opacity: 1; transform: none; }

/* ===== Navbar standardization (scoped to injected header) ===== */
#site-header header { font: 14px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
#site-header .btn { 
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px; min-height: 40px; border-radius: 10px;
  border: 1px solid var(--border, var(--border-color, #444));
  background: var(--surface, var(--bg-secondary, #2a2a2a));
  color: var(--text, #e8e8e8); cursor: pointer; transition: .16s ease;
  text-decoration: none;
}
#site-header .btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--primary, #f4d03f) 60%, var(--border, #444)); }
#site-header .btn-primary { 
  background: var(--primary, #f4d03f); color: var(--bg, #1a1a1a);
  border-color: color-mix(in srgb, var(--primary, #f4d03f) 40%, var(--border, #444));
}
#site-header .btn-primary:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary, #f4d03f) 25%, transparent); }

/* ===== Logo sheen (one-time gold sweep) ===== */
.sheen{position:relative;display:inline-block;overflow:hidden}
.sheen::after{content:"";position:absolute;inset:0;
background:linear-gradient(120deg,transparent 45%,var(--primary,#f3d36a) 50%,transparent 55%);
transform:translateX(-130%);mix-blend-mode:screen;opacity:.7}
.prefers-motion .sheen.mount::after{animation:logo-sheen 1.1s ease-out .15s 1 both}
@keyframes logo-sheen{
to{transform:translateX(130%)}
}
.sheen img{display:block}
/* use: <span class="sheen mount"><img src="/assets/brand/wordmark.png" alt=""></span> */

/* ===== Blurred brand logo background (decorative) ===== */
.bg-brand-blur { position: relative; }
.bg-brand-blur::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  /* Soft vignette to keep edges readable */
  background:
    radial-gradient(120% 80% at 50% 15%, rgba(0,0,0,.14), transparent 60%) ,
    url('/assets/brand/app-icon-512.png') no-repeat center 22% / min(80vmin, 720px);
  filter: blur(24px);
  opacity: .18;
}
/* Ensure stacking context for content above */
.bg-brand-blur > * { position: relative; z-index: 1; }
