/* ═══════════════════════════════════════════════
   PrimeOps — AI Operating System for Manufacturing
   Powered by GoldenOS
   Palette from the PrimeOps identity sheet.
   ═══════════════════════════════════════════════ */

:root {
  --navy:        #0d1b2a;
  --navy-deep:   #1e3a8a;
  --blue:        #2563eb;
  --blue-dark:   #1d4ed8;
  --teal:        #14b8a6;
  --indigo:      #6366f1;
  --amber:       #f5a623;

  --bg:          #ffffff;
  --surface:     #f5f7fb;
  --surface-2:   #eef2f9;
  --line:        #dde5f0;
  --ink:         #0d1b2a;
  --muted:       #52627a;

  --gold:        #d4af37;   /* GoldenOS endorsement only */

  --maxw:        1180px;
  --radius:      16px;
  --radius-sm:   10px;

  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);

  --font:        'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-os:     'Sora', var(--font);

  --space-section: clamp(4.5rem, 3.4rem + 5.5vw, 8.5rem);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.25rem, 0.9rem + 2vw, 2.5rem); }

.scroll-progress {
  position: fixed; top: 0; left: 0; z-index: 100;
  height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--blue), var(--indigo));
}

/* ---------- Brand lockup ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.32rem; font-weight: 600; letter-spacing: -0.02em; }
.bn-prime { color: var(--navy); }
.bn-ops   { color: var(--blue); }
.brand-by {
  font-size: 0.6rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-top: 0.18rem;
}
/* GoldenOS endorsement — matches the GoldenOS identity sheet */
.gos-g { font-family: var(--font-serif); font-weight: 600; color: var(--gold); letter-spacing: 0; text-transform: none; font-size: 1.06em; }
.gos-os { font-family: var(--font-os); font-weight: 800; color: var(--navy); letter-spacing: -0.02em; text-transform: none; font-size: 1.06em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
.site-header[data-scrolled] { border-bottom-color: var(--line); box-shadow: 0 4px 24px -18px rgba(13,27,42,.4); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 2rem; height: 78px; }
.nav-links { display: flex; gap: clamp(1.1rem, 0.7rem + 1.3vw, 2rem); }
.nav-links a { font-size: 0.92rem; font-weight: 500; color: var(--muted); transition: color 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .nav-links a:hover { color: var(--blue); } }

.nav-toggle { display: none; width: 40px; height: 40px; place-items: center; }
.nav-toggle svg { width: 24px; height: 24px; }
.mobile-menu {
  display: none; flex-direction: column;
  position: sticky; top: 78px; z-index: 95;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 0.5rem clamp(1.25rem, 0.9rem + 2vw, 2.5rem) 1.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.mobile-menu .btn { margin-top: 1.15rem; border-bottom: none; justify-content: center; }
@media (max-width: 900px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: grid; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.6rem; border-radius: 999px;
  font-size: 0.94rem; font-weight: 600; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background 200ms var(--ease-out),
              box-shadow 240ms var(--ease-out), border-color 200ms var(--ease-out);
}
.btn--sm { padding: 0.6rem 1.2rem; font-size: 0.86rem; }
.btn--lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn--primary {
  background: var(--blue); color: #fff;
  box-shadow: 0 8px 24px -12px rgba(37, 99, 235, 0.8);
}
.btn--outline { border: 1px solid var(--line); color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--blue-dark); box-shadow: 0 12px 32px -12px rgba(37,99,235,.9); }
  .btn--outline:hover { border-color: var(--blue); color: var(--blue); }
  .btn:hover .arrow { transform: translateX(4px); }
}
.btn:active { transform: scale(0.97); transition-duration: 100ms; }
.arrow { transition: transform 200ms var(--ease-out); }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-section); }
.center-col { max-width: 760px; margin-inline: auto; text-align: center; }
.section-title {
  font-size: clamp(1.9rem, 1.4rem + 2.3vw, 3.1rem);
  font-weight: 600; line-height: 1.14; letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead { color: var(--muted); font-size: clamp(1rem, 0.96rem + 0.28vw, 1.14rem); margin-top: 1.2rem; }
.center-col .lead { margin-inline: auto; max-width: 56ch; }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(3.5rem, 2.5rem + 5vw, 6rem); padding-bottom: clamp(3rem, 2rem + 4vw, 5rem); overflow: hidden; }
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: min(1100px, 130%); height: 620px; pointer-events: none; z-index: 0;
  background:
    radial-gradient(600px 380px at 30% 40%, rgba(20, 184, 166, 0.16), transparent 65%),
    radial-gradient(620px 400px at 70% 30%, rgba(37, 99, 235, 0.18), transparent 65%),
    radial-gradient(500px 340px at 55% 70%, rgba(99, 102, 241, 0.14), transparent 65%);
  filter: blur(20px);
}
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 860px; margin-inline: auto; }
.badge {
  display: inline-block; padding: 0.45rem 1.1rem;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em;
  color: var(--blue); text-transform: uppercase;
}
.hero-title {
  margin-top: 1.6rem;
  font-size: clamp(2.3rem, 1.5rem + 3.8vw, 4.4rem);
  font-weight: 700; line-height: 1.06; letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-sub { margin-top: 1.5rem; color: var(--muted); font-size: clamp(1.02rem, 0.98rem + 0.4vw, 1.22rem); max-width: 58ch; margin-inline: auto; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; margin-top: 2.25rem; }
.hero-note { margin-top: 1.5rem; font-size: 0.86rem; color: var(--muted); }

/* ---------- Dashboard mock ---------- */
.dash {
  margin-top: clamp(3rem, 2.2rem + 3.5vw, 5rem);
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden;
  box-shadow: 0 40px 90px -50px rgba(13, 27, 42, 0.45);
}
.dash-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.8rem 1.1rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.dash-bar .dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.dash-title { margin-left: 0.7rem; font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.dash-body { display: grid; grid-template-columns: 190px 1fr; min-height: 340px; }
.dash-side { border-right: 1px solid var(--line); padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; background: #fcfdff; }
.ds { padding: 0.55rem 0.85rem; border-radius: 8px; font-size: 0.84rem; font-weight: 500; color: var(--muted); }
.ds.active { background: rgba(37, 99, 235, 0.09); color: var(--blue); font-weight: 600; }
.dash-main { padding: 1.35rem; display: flex; flex-direction: column; gap: 1.1rem; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.85rem; }
.dstat { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.dl { font-size: 0.75rem; color: var(--muted); font-weight: 500; }
.dv { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.dd { font-size: 0.7rem; font-weight: 600; }
.dd.up { color: #16a34a; }
.dash-lower { display: grid; grid-template-columns: 1.6fr 1fr; gap: 0.85rem; }
.dcard { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.spark { width: 100%; height: 90px; }
.alert { display: flex; align-items: center; gap: 0.5rem; font-size: 0.79rem; color: var(--muted); }
.ai { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ai.warn { background: var(--amber); } .ai.info { background: var(--blue); } .ai.ok { background: var(--teal); }
@media (max-width: 780px) {
  .dash-body { grid-template-columns: 1fr; }
  .dash-side { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .dash-lower { grid-template-columns: 1fr; }
}

/* ---------- Pain grid ---------- */
.pain-grid {
  margin-top: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem;
}
.pain { padding: 1.65rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pain h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -0.01em; }
.pain p { margin-top: 0.6rem; color: var(--muted); font-size: 0.94rem; }

/* ---------- Platform flow ---------- */
.platform { background: var(--navy); color: #fff; }
.platform .section-title { color: #fff; }
.platform .lead { color: rgba(255, 255, 255, 0.72); }
.flow {
  margin-top: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.5rem;
}
.flow-step { padding-top: 1.25rem; border-top: 2px solid rgba(255,255,255,.14); position: relative; }
.flow-step::before { content: ""; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--teal); }
.fs-n { font-size: 0.8rem; font-weight: 700; color: var(--teal); letter-spacing: 0.06em; }
.flow-step h3 { margin-top: 0.55rem; font-size: 1.12rem; font-weight: 600; }
.flow-step p { margin-top: 0.45rem; color: rgba(255,255,255,.68); font-size: 0.92rem; }

/* ---------- Capabilities ---------- */
.cap-grid {
  margin-top: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.15rem;
}
.cap {
  padding: 1.9rem; border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 260ms var(--ease-out), transform 260ms var(--ease-out), box-shadow 260ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .cap:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 18px 40px -28px rgba(37,99,235,.6); }
}
.cap-icon {
  display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: 11px; background: rgba(37, 99, 235, 0.09); color: var(--blue);
}
.cap-icon svg { width: 22px; height: 22px; }
.cap h3 { margin-top: 1.1rem; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; }
.cap p { margin-top: 0.55rem; color: var(--muted); font-size: 0.94rem; }

/* ---------- Steps ---------- */
.how { background: var(--surface); }
.steps { margin-top: clamp(2.5rem, 2rem + 2.5vw, 4rem); display: flex; flex-direction: column; gap: 1rem; max-width: 780px; margin-inline: auto; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; padding: 1.65rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step-n {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.step h3 { font-size: 1.08rem; font-weight: 600; }
.step p { margin-top: 0.45rem; color: var(--muted); font-size: 0.94rem; }

/* ---------- CTA ---------- */
.cta-panel {
  text-align: center; border-radius: clamp(18px, 2vw, 26px);
  padding: clamp(2.75rem, 2rem + 4vw, 5rem) clamp(1.5rem, 1rem + 3vw, 4rem);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 55%, var(--blue) 130%);
  color: #fff;
}
.cta-panel h2 { font-size: clamp(1.8rem, 1.35rem + 2.2vw, 2.9rem); font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.cta-panel p { margin-top: 1.1rem; color: rgba(255,255,255,.76); max-width: 50ch; margin-inline: auto; }
.cta-actions { margin-top: 2rem; display: flex; justify-content: center; }
.cta-panel .btn--primary { background: #fff; color: var(--navy); box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .cta-panel .btn--primary:hover { background: #eef2f9; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.small { font-size: 0.84rem; color: var(--muted); }
.small a { color: var(--blue); font-weight: 500; }

/* ---------- Reveals ---------- */
.js-motion .reveal, .js-motion .reveal-scale, .js-motion [data-stagger] > * {
  opacity: 0;
  transition: opacity 720ms var(--ease-out), transform 720ms var(--ease-out);
}
.js-motion .reveal            { transform: translateY(24px); }
.js-motion .reveal-scale      { transform: scale(0.975); }
.js-motion [data-stagger] > * { transform: translateY(20px); }
.js-motion .reveal.in, .js-motion .reveal-scale.in, .js-motion [data-stagger].in > * {
  opacity: 1; transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js-motion .reveal, .js-motion .reveal-scale, .js-motion [data-stagger] > * {
    opacity: 1 !important; transform: none !important;
  }
}
