/* =========================
   ProofX — Premium UI System (v2.1)
   Completes styles used by the new index.html
   - Tokens + base
   - Navigation (desktop + mobile)
   - Hero, cards, sections
   - Tabs, badges, tags, chips
   - Visual/author helpers (avatar, quote, toc)
   - A11y: :focus-visible, skip link
   - Light print rules
   ========================= */

/* ---- Design tokens (lean, modern) ---- */
:root{
  /* Palette */
  --bg:#070a10;
  --bg-2:#0b1016;
  --card:#0e1520;
  --card-2:#0b121c;
  --stroke:#1b2739;
  --stroke-2:#22324b;
  --text:#edf3ff;
  --muted:#a6b2c6;

  /* Brand */
  --brand:#57c8ff;
  --brand-2:#3aa7e6;
  --accent:#9bffd1;

  /* Effects */
  --shadow-sm:0 6px 16px rgba(0,0,0,.24);
  --shadow-md:0 10px 30px rgba(0,0,0,.28);
  --shadow-lg:0 16px 50px rgba(0,0,0,.32);
  --radius:14px;

  /* Spacing */
  --s-1:8px; --s-2:12px; --s-3:16px; --s-4:24px; --s-5:32px; --s-6:48px; --s-7:64px;

  /* Focus ring */
  --ring:0 0 0 2px rgba(58,167,230,.6);

  /* Type scale */
  --fs-h1:clamp(36px,5.4vw,58px);
  --fs-h2:28px;
  --fs-body:17px;
}

/* ---- Base / reset-ish ---- */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans";
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  letter-spacing:.1px;
  font-size:var(--fs-body);
}
a{color:inherit; text-underline-offset:2px}
img{max-width:100%; height:auto; display:block}
ul{padding-left:1.2rem}
ul.bullets{padding-left:1.2rem; margin:0}
hr{border:0; height:1px; background:var(--stroke)}
.muted{color:var(--muted)}

/* Keyboard focus (a11y) */
:focus{outline:none}
:focus-visible{box-shadow:var(--ring); border-radius:10px}

/* Skip link (a11y) */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{left:12px; top:12px; width:auto; height:auto; padding:8px 10px; background:#0c1624; border:1px solid var(--stroke); border-radius:10px; z-index:999}

/* ---- Background field (subtle, expensive) ---- */
.bg{
  position:fixed; inset:0; z-index:-1;
  background:
    radial-gradient(900px 520px at 80% -10%, rgba(58,167,230,.16), transparent 60%),
    radial-gradient(680px 420px at 0% 12%, rgba(86,199,255,.12), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  pointer-events:none;
}

/* ---- Layout ---- */
.container{width:min(1080px,92%); margin:0 auto}

/* simple helpers used in HTML */
.container--wide{width:min(1280px,94%); margin:0 auto}
.hr{height:1px; background:var(--stroke); margin:var(--s-3) 0}

/* ---- Top nav (glass, disciplined) ---- */
.nav{
  position:sticky; top:0; z-index:10;
  border-bottom:1px solid var(--stroke);
  background:rgba(8,12,18,.55);
  backdrop-filter:saturate(125%) blur(8px);
  box-shadow:0 1px 0 rgba(255,255,255,.02);
}
.nav-inner{display:flex; align-items:center; justify-content:space-between; padding:var(--s-2) 0}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none}
.brand-mark{
  display:grid; place-items:center; width:30px; height:30px; border-radius:10px;
  background:linear-gradient(180deg,var(--brand),var(--brand-2));
  color:#06131a; font-weight:800; box-shadow:var(--shadow-sm)
}
.brand-text{font-weight:800; letter-spacing:.2px}

.links{display:flex; align-items:center; gap:var(--s-3)}
.links a{
  color:var(--muted); text-decoration:none; padding:6px 8px; border-radius:8px;
  transition:background .12s ease, color .12s ease;
}
.links a:hover{color:var(--text); background:rgba(255,255,255,.03)}
.nav .btn.small{
  padding:8px 12px; font-size:.95rem; border-radius:999px; border:1px solid var(--stroke)
}

.nav-toggle{display:none; width:38px; height:38px; border:0; background:transparent; color:var(--text)}
.nav-toggle .bar{display:block; width:20px; height:2px; background:var(--text); margin:4px auto; border-radius:2px}

/* prevent body scroll when mobile menu open (toggled by script) */
body.nav-open{overflow:hidden}

/* ---- Hero (executive presence) ---- */
.hero{padding:var(--s-7) 0 var(--s-5)}
.hero-inner{display:grid; grid-template-columns:1.2fr .8fr; gap:var(--s-4); align-items:center}
.hero-copy h1{
  font-size:var(--fs-h1);
  line-height:1.06; margin:0 0 var(--s-2);
  letter-spacing:.1px;
}
.hero-copy .sub{color:var(--muted); max-width:760px}
.actions{margin-top:var(--s-3); display:flex; gap:var(--s-2); flex-wrap:wrap}

/* Pills used in hero */
.pill{
  display:inline-flex; align-items:center; gap:8px; padding:6px 10px;
  border:1px solid var(--stroke); border-radius:999px;
  background:rgba(255,255,255,.03); color:var(--text)
}

/* ---- Buttons (decisive) ---- */
.btn{
  display:inline-block; padding:12px 16px; border-radius:12px;
  text-decoration:none; border:1px solid var(--stroke);
  transition:transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
  will-change:transform;
}
.btn:hover{transform:translateY(-1px)}
.btn:focus-visible{box-shadow:var(--ring)}
.btn[aria-disabled="true"], .btn:disabled{opacity:.6; cursor:not-allowed}
.btn.primary{
  background:linear-gradient(180deg, var(--brand), var(--brand-2));
  color:#06121a; border:none; box-shadow:var(--shadow-md)
}
.btn.ghost{background:transparent; color:var(--text)}

/* ---- Trust chips ---- */
.trust{display:flex; gap:var(--s-2); align-items:center; margin-top:var(--s-3); color:var(--muted)}
.trust ul{display:flex; gap:var(--s-2); padding:0; margin:0; list-style:none}
.trust li{
  padding:6px 10px; border:1px solid var(--stroke); border-radius:999px;
  color:var(--text); background:rgba(255,255,255,.02)
}

/* ---- KPI side card (calm gravitas) ---- */
.hero-card{
  background:linear-gradient(180deg, rgba(15,22,34,.9), rgba(10,16,26,.9));
  border:1px solid var(--stroke); border-radius:var(--radius); padding:var(--s-3);
  box-shadow:var(--shadow-md);
  position:relative; overflow:hidden;
}
.hero-card::before{
  content:""; position:absolute; inset:-1px;
  background:conic-gradient(from 180deg at 50% 50%, rgba(87,200,255,.15), transparent 30%, transparent 70%, rgba(155,255,209,.15));
  filter:blur(18px); opacity:.6; pointer-events:none;
}
.stat{
  padding:14px; border-radius:12px; background:rgba(20,28,42,.5);
  border:1px solid var(--stroke); margin-bottom:10px
}
.kpi{display:block; font-weight:800; font-size:24px}
.label{color:var(--muted); font-size:.95rem}

/* metrics (used elsewhere too) */
.metric{display:flex; flex-direction:column; gap:4px; padding:12px; border:1px solid var(--stroke); border-radius:12px; background:rgba(18,26,40,.5)}
.metric .kpi{font-size:22px}
.metric .label{font-size:.9rem}

/* ---- Sections ---- */
.section{padding:var(--s-6) 0}
.section-alt{
  background:rgba(10,15,24,.45);
  border-top:1px solid var(--stroke); border-bottom:1px solid var(--stroke)
}
.section-head{display:flex; align-items:end; justify-content:space-between; gap:var(--s-2); margin-bottom:var(--s-3)}
.section h2{font-size:var(--fs-h2); margin:0}
.kicker{color:var(--muted)}

/* ---- Cards grid (auto-fit future-proof) ---- */
.cards{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:var(--s-3);
}
@media (max-width:1100px){
  .cards{grid-template-columns:repeat( auto-fit, minmax(260px,1fr) );}
}
.card{
  position:relative;
  background:linear-gradient(180deg, rgba(16,24,36,.72), rgba(10,14,22,.72));
  border:1px solid var(--stroke); border-radius:var(--radius); padding:var(--s-3);
  transition:transform .1s ease, border-color .1s ease, box-shadow .1s ease;
  box-shadow:var(--shadow-sm);
  overflow:hidden;
}
.card::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, transparent, rgba(87,200,255,.06));
  opacity:0; transition:opacity .15s ease;
}
.card:hover{
  transform:translateY(-1px);
  border-color:var(--stroke-2);
  box-shadow:var(--shadow-md);
}
.card:hover::after{opacity:1}
.card-top{display:flex; align-items:center; justify-content:space-between; margin-bottom:8px}
.badge{
  font-size:.74rem; color:#06121a;
  background:linear-gradient(180deg, var(--accent), #6cffc4);
  padding:6px 10px; border-radius:999px; border:1px solid #e6fff5
}
.card-cta{margin-top:12px; display:flex; gap:12px}
.card-cta a{color:var(--brand); text-decoration:none}
.card-cta a[aria-disabled="true"]{opacity:.6; cursor:not-allowed}

/* ---- Research layout ---- */
.research-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:var(--s-3)}
.panel{
  border:1px solid var(--stroke); border-radius:var(--radius); padding:var(--s-3);
  background:linear-gradient(180deg, rgba(18,24,36,.55), rgba(10,14,22,.55));
  box-shadow:var(--shadow-sm);
}
.panel h4{margin:0 0 8px}
.notes{list-style:none; padding:0; margin:0}
.notes li{display:flex; gap:10px; padding:10px 0; border-bottom:1px dashed #1e2a3f}
.notes li:last-child{border-bottom:0}
.notes span{color:var(--muted); width:70px; flex:0 0 auto}

/* ---- Timeline (Roadmap) ---- */
.timeline{display:grid; gap:var(--s-3)}
.timeline > div{
  position:relative; padding-left:28px;
  border:1px solid var(--stroke); border-radius:var(--radius); padding:var(--s-3);
  background:linear-gradient(180deg, rgba(18,24,36,.55), rgba(10,14,22,.55));
}
.timeline > div::before{
  content:""; position:absolute; left:12px; top:20px;
  width:6px; height:6px; border-radius:50%;
  background:var(--brand);
  box-shadow:0 0 0 4px rgba(87,200,255,.15);
}

/* ---- FAQ accordion (progressive enhancement) ---- */
.faq-grid{display:grid; gap:var(--s-3)}
.faq-grid article{border:1px solid var(--stroke); border-radius:var(--radius); padding:var(--s-3); background:linear-gradient(180deg, rgba(16,24,36,.6), rgba(10,14,22,.6))}
.faq-grid article summary{
  list-style:none; cursor:pointer; font-weight:600; outline:none;
}
.faq-grid article summary::-webkit-details-marker{display:none}
.faq-grid article[open]{border-color:var(--stroke-2)}
.faq-grid a{color:var(--brand)}

/* ---- Updates ---- */
.update-feed{display:grid; grid-template-columns:1fr; gap:12px}
.update{
  border:1px solid var(--stroke); border-radius:var(--radius); padding:var(--s-3);
  background:linear-gradient(180deg, rgba(18,24,36,.55), rgba(10,14,22,.55));
  box-shadow:var(--shadow-sm);
}

/* ---- Footer ---- */
.footer{
  border-top:1px solid var(--stroke); padding:18px 0;
  background:rgba(6,10,16,.55); backdrop-filter:saturate(130%) blur(8px)
}
.footer-inner{display:flex; align-items:center; justify-content:space-between; gap:12px}
.footer a{
  color:var(--muted); text-decoration:none; padding:6px 8px; border-radius:8px;
  transition:background .12s ease, color .12s ease
}
.footer a:hover{color:var(--text); background:rgba(255,255,255,.03)}

/* =========================
   Components the HTML uses
   ========================= */

/* Tags & chip rows */
.tag{
  display:inline-flex; align-items:center; gap:6px;
  border:1px solid var(--stroke); border-radius:999px;
  padding:4px 10px; font-size:.85rem;
  background:rgba(255,255,255,.03)
}
.chips{display:flex; flex-wrap:wrap; gap:8px}

/* Callout box */
.callout{
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  padding:var(--s-3);
  background:linear-gradient(180deg, rgba(18,24,36,.55), rgba(10,14,22,.55));
  box-shadow:var(--shadow-sm);
}

/* Logo shelf (placeholder partners) */
.logo-shelf{
  display:grid; gap:14px;
  grid-template-columns:repeat(6,1fr);
}
.logo{
  height:40px; display:flex; align-items:center; justify-content:center;
  border:1px dashed var(--stroke); border-radius:12px; color:var(--muted);
  background:rgba(255,255,255,.02)
}

/* Tabs (Overview section) */
.tabbar{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px}
.tab{
  border:1px solid var(--stroke); padding:8px 12px; border-radius:10px;
  background:rgba(255,255,255,.03); cursor:pointer; color:var(--text)
}
.tab:hover{background:rgba(255,255,255,.05)}
.tab[aria-selected="true"]{outline:2px solid var(--brand); background:rgba(87,200,255,.08)}
.tabpanes > div{display:none}
.tabpanes > div[aria-hidden="false"]{display:block}

/* Author bits */
.avatar{width:88px;height:88px;border-radius:50%;object-fit:cover;border:1px solid rgba(255,255,255,.2)}
.quote{font-size:1.05rem;line-height:1.6;border-left:3px solid var(--brand-2);padding-left:12px;color:var(--text);background:rgba(255,255,255,.02);border-radius:6px}
.toc{display:grid; gap:8px}
.toc a{
  display:flex; align-items:center; gap:8px; text-decoration:none; color:inherit;
  border:1px solid var(--stroke); background:rgba(255,255,255,.03);
  padding:8px 10px; border-radius:10px;
}
.toc a:hover{background:rgba(255,255,255,.05); border-color:var(--stroke-2)}

/* Media wrapper + captions */
.media{border:1px solid var(--stroke);border-radius:var(--radius);padding:var(--s-2);background:linear-gradient(180deg, rgba(16,24,36,.6), rgba(10,14,22,.6)); box-shadow:var(--shadow-sm)}
.caption{font-size:.9rem;color:var(--muted);margin-top:6px}

/* KBD badges (already used) */
.kbd{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  border:1px solid var(--stroke); padding:.15rem .35rem; border-radius:6px; background:rgba(255,255,255,.05)
}

/* =========================
   Responsive
   ========================= */
@media (max-width:1024px){
  .hero-inner{grid-template-columns:1fr}
  .cards{grid-template-columns:repeat( auto-fit, minmax(260px,1fr) );}
  .research-grid{grid-template-columns:1fr}
  .logo-shelf{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:720px){
  .links{display:none}
  .links.open{
    display:flex; position:absolute; right:4%; top:60px;
    background:rgba(6,10,16,.96); border:1px solid var(--stroke);
    border-radius:14px; padding:10px 12px; flex-direction:column; gap:10px;
    box-shadow:var(--shadow-lg)
  }
  .nav-toggle{display:block}
  .logo-shelf{grid-template-columns:repeat(2,1fr)}
}

/* ---- Motion accessibility ---- */
.prm *{transition:none !important; animation:none !important}

/* =========================
   Print (basic, quiet)
   ========================= */
@media print{
  body{background:#fff;color:#000}
  .bg,.nav,.footer{display:none}
  a{text-decoration:underline;color:#000}
  .section,.hero{padding:16px 0}
  .card,.panel,.callout,.media{border:1px solid #999; background:#fff; box-shadow:none}
}
