/* ==========================================================
   PUBLIC SITE HEADER
   Glass bar on the page rails: logo · nav with a sliding pill,
   a Platform mega-menu (six tools + a live 3D card), a Resources
   menu · theme toggle, Log in, Get started · scroll progress line ·
   a full-height sheet on phones. Wired by assets/site-header.js.
   ========================================================== */
:root{ --sh-h:66px; }
section[id], [id].page-hero{ scroll-margin-top:calc(var(--sh-h) + 14px); }

header.sh{
  position:fixed; top:0; left:0; right:0; z-index:200; padding:0 !important;
  background:color-mix(in srgb, var(--paper) 74%, transparent);
  backdrop-filter:blur(16px) saturate(180%); -webkit-backdrop-filter:blur(16px) saturate(180%);
  border-bottom:1px solid var(--hair);
  transition:background-color .25s ease, box-shadow .25s ease;
}
header.sh.is-scrolled, header.sh.menu-open, header.sh.sheet-open{
  background:color-mix(in srgb, var(--paper) 93%, transparent);
  box-shadow:0 16px 36px -26px rgba(16,40,80,.5);
}
.sh-bar{
  position:relative; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:16px; height:var(--sh-h);
  max-width:var(--rail-w, 1240px); margin:0 max(12px, calc(50% - var(--rail-w, 1240px) / 2));
  padding:0 clamp(14px, 2.2vw, 24px); border-left:1px solid var(--hair); border-right:1px solid var(--hair);
}
.sh-progress{
  position:absolute; left:0; right:0; bottom:-1px; height:2px; pointer-events:none; transform:scaleX(0); transform-origin:0 50%;
  background:linear-gradient(90deg, #9fd3ff, #2d9ffe 55%, #0b7ee6); box-shadow:0 0 10px rgba(45,159,254,.65);
}

/* logo */
.sh-logo{
  justify-self:start; display:inline-flex; align-items:center; gap:9px; color:var(--ink); text-decoration:none; white-space:nowrap;
  font:650 16px/1 var(--font-ui); letter-spacing:-.04em; border-radius:10px;
}
.sh-logo img{ width:28px; height:28px; object-fit:contain; transform:scale(1.25); transition:transform .45s cubic-bezier(.2,.8,.2,1); }
.sh-logo:hover img{ transform:scale(1.25) rotate(-10deg); }

/* nav + sliding pill */
.sh-nav{ position:relative; display:flex; align-items:center; gap:2px; }
.sh-item{ display:flex; }
.sh-item.small{ position:relative; }
.sh-link{
  position:relative; z-index:1; display:inline-flex; align-items:center; gap:5px; height:38px; padding:0 14px;
  border:0; border-radius:11px; background:none; color:var(--ink-soft); cursor:pointer; text-decoration:none; white-space:nowrap;
  font:500 14px/1 var(--font-ui); letter-spacing:-.015em; transition:color .18s ease;
}
.sh-link:hover, .sh-link:focus-visible, .sh-item.open > .sh-link{ color:var(--ink); }
.sh-link.active{ color:var(--sky-deep); font-weight:600; }
.sh-link.active::after{
  content:""; position:absolute; left:50%; bottom:2px; width:4px; height:4px; margin-left:-2px; border-radius:50%;
  background:var(--sky); box-shadow:0 0 8px rgba(45,159,254,.9);
}
.sh-chev{ width:14px; height:14px; opacity:.7; transition:transform .25s ease; }
.sh-item.open .sh-chev{ transform:rotate(180deg); }
.sh-pill{
  position:absolute; z-index:0; top:50%; left:0; width:0; height:38px; margin-top:-19px; border-radius:11px; opacity:0; pointer-events:none;
  background:var(--sky-tint); box-shadow:inset 0 0 0 1px var(--sky-tint-2);
  transition:transform .36s cubic-bezier(.2,.8,.2,1), width .36s cubic-bezier(.2,.8,.2,1), opacity .2s ease;
}
.sh-pill.no-anim{ transition:none; }

/* dropdown panels */
.sh-panel{
  position:absolute; z-index:5; translate:-50% 0; left:50%;
  opacity:0; visibility:hidden; transform:translateY(-8px); pointer-events:none;
  border-radius:20px; border:1px solid var(--hair); background:var(--canvas);
  box-shadow:0 44px 90px -40px rgba(6,18,42,.5), 0 2px 6px rgba(16,40,80,.05);
  transition:opacity .2s ease, transform .22s cubic-bezier(.2,.8,.2,1), visibility .2s;
}
.sh-panel::before{ content:""; position:absolute; left:0; right:0; top:-16px; height:16px; }
.sh-item.open > .sh-panel{ opacity:1; visibility:visible; transform:none; pointer-events:auto; }
.sh-mega{ top:calc(100% - 2px); display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:8px; width:min(860px, calc(100vw - 32px)); padding:8px; }
.sh-drop{ top:calc(100% + 13px); width:320px; padding:8px; }
.sh-mega-head{ grid-column:1/-1; padding:10px 10px 6px; font:600 10.5px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--graphite); }
.sh-mega-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); grid-template-rows:auto auto auto auto 1fr; gap:2px; padding:4px; }
.sh-mega-foot{
  grid-column:1/-1; align-self:end; display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:8px 6px 2px; padding:12px 14px; border-radius:13px; background:var(--paper-2); border:1px solid var(--hair);
  font-size:12.5px; color:var(--graphite);
}
.sh-mega-foot b{ color:var(--ink); font-weight:600; }
.sh-mega-foot a{ display:inline-flex; align-items:center; gap:5px; color:var(--sky-deep); font-weight:600; text-decoration:none; white-space:nowrap; }
.sh-mega-foot svg{ width:14px; height:14px; transition:transform .2s ease; }
.sh-mega-foot a:hover svg{ transform:translateX(3px); }
.sh-tile, .sh-row{
  display:flex; align-items:flex-start; gap:12px; padding:12px; border-radius:14px; color:var(--ink); text-decoration:none;
  transition:background-color .15s ease;
}
.sh-row{ align-items:center; padding:10px; border-radius:12px; }
.sh-tile:hover, .sh-tile:focus-visible, .sh-row:hover, .sh-row:focus-visible{ background:var(--paper-2); }
.sh-tile.current, .sh-row.current{ background:var(--sky-tint); }
.sh-tile-icon, .sh-row-icon{
  display:grid; place-items:center; flex:none; width:38px; height:38px; border-radius:11px;
  color:var(--sky-deep); background:var(--sky-tint); border:1px solid var(--sky-tint-2);
  transition:transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.sh-row-icon{ width:34px; height:34px; border-radius:10px; }
.sh-tile:hover .sh-tile-icon, .sh-row:hover .sh-row-icon{ transform:translateY(-2px); color:#fff; border-color:transparent; background:var(--btn-blue), var(--sky); }
.sh-tile-icon svg{ width:18px; height:18px; }
.sh-row-icon svg{ width:16px; height:16px; }
.sh-tile b, .sh-row b{ display:block; font-size:14px; font-weight:600; letter-spacing:-.02em; }
.sh-row b{ font-size:13.5px; }
.sh-tile small, .sh-row small{ display:block; margin-top:3px; font-size:12.5px; line-height:1.4; color:var(--graphite); }
.sh-row small{ font-size:12px; }

.sh-feature{
  position:relative; display:flex; flex-direction:column; overflow:hidden; border-radius:15px; color:#fff; text-decoration:none;
  background:radial-gradient(90% 70% at 70% 30%, rgba(45,159,254,.35), rgba(45,159,254,0) 65%), linear-gradient(165deg, #0b1f45, #06122a);
  box-shadow:inset 0 0 0 1px rgba(140,190,255,.16);
}
.sh-feature-art{ display:block; padding:16px 14px 0; }
.sh-feature-art .iso{ max-width:250px; margin:0 auto; }
.sh-feature-copy{ display:block; padding:4px 18px 18px; }
.sh-feature-copy small{ display:inline-flex; align-items:center; gap:6px; font:600 10px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:#9fd3ff; }
.sh-feature-copy small::before{ content:""; width:6px; height:6px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.2); }
.sh-feature-copy b{ display:block; margin-top:9px; font-size:16.5px; font-weight:600; letter-spacing:-.03em; }
.sh-feature-copy > span{ display:block; margin-top:5px; font-size:12.5px; line-height:1.5; color:rgba(214,230,255,.74); }
.sh-feature-copy em{ display:inline-flex; align-items:center; gap:6px; margin-top:12px; font-style:normal; font-size:13px; font-weight:600; color:#fff; }
.sh-feature-copy em svg{ width:14px; height:14px; transition:transform .2s ease; }
.sh-feature:hover .sh-feature-copy em svg{ transform:translateX(3px); }
.sh-drop-foot{ display:flex; align-items:center; justify-content:space-between; margin:6px 2px 0; padding:10px 10px 4px; border-top:1px solid var(--hair); font-size:12px; color:var(--graphite); }
.sh-drop-foot a{ display:inline-flex; align-items:center; gap:4px; color:var(--sky-deep); font-weight:600; text-decoration:none; }
.sh-drop-foot svg{ width:13px; height:13px; }

/* right cluster */
.sh-right{ justify-self:end; display:flex; align-items:center; gap:8px; }
.sh-theme{ display:flex; }
.sh-theme:empty{ display:none; }
header.sh .theme-toggle-btn{
  position:relative; inset:auto; display:grid; place-items:center; width:38px; height:38px; padding:0;
  border-radius:11px; border:1px solid var(--hair-2); background:var(--canvas); color:var(--ink-soft);
  box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; transform:none; cursor:pointer;
  transition:border-color .18s ease, color .18s ease, background-color .18s ease;
}
header.sh .theme-toggle-btn:hover{ color:var(--sky-deep); border-color:var(--sky-line); background:var(--sky-tint); transform:none; box-shadow:none; }
header.sh .theme-toggle-btn:active{ transform:scale(.94); }
header.sh .theme-toggle-btn svg{ width:17px; height:17px; }
.sh-cta{ display:flex; align-items:center; gap:6px; }
.sh-login{
  display:inline-flex; align-items:center; gap:6px; height:38px; padding:0 14px; border-radius:11px; color:var(--ink); text-decoration:none;
  font:500 14px/1 var(--font-ui); letter-spacing:-.015em; white-space:nowrap; transition:background-color .18s ease, color .18s ease;
}
.sh-login:hover{ background:var(--sky-tint); color:var(--sky-deep); }
.sh-login svg{ width:15px; height:15px; }
:root .btn.sh-start{ min-height:38px; padding:0 15px 0 17px; gap:7px; font-size:14px; border-radius:11px !important; white-space:nowrap; }
.sh-start svg{ width:15px; height:15px; }
.sh-start .sh-arrow{ transition:transform .2s ease; }
.sh-start:hover .sh-arrow{ transform:translateX(3px); }
.sh-burger{ display:none; }

/* mobile sheet */
.sh-sheet{ display:none; }
html.sh-lock, html.sh-lock body{ overflow:hidden; }

html[data-theme="dark"] .sh-panel{ box-shadow:0 44px 90px -40px rgba(0,0,0,.85); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .sh-panel{ box-shadow:0 44px 90px -40px rgba(0,0,0,.85); } }

@media (max-width:1080px){
  .sh-link{ padding:0 11px; }
  .sh-login{ padding:0 10px; }
}
@media (max-width:960px){
  .sh-bar{ grid-template-columns:1fr auto; }
  .sh-nav{ display:none; }
  .sh-burger{
    position:relative; display:block; width:40px; height:40px; flex:none; padding:0; cursor:pointer;
    border-radius:12px; border:1px solid var(--hair-2); background:var(--canvas);
  }
  .sh-burger span{
    position:absolute; left:11px; right:11px; height:1.8px; border-radius:2px; background:var(--ink);
    transition:transform .32s cubic-bezier(.2,.8,.2,1), top .32s cubic-bezier(.2,.8,.2,1);
  }
  .sh-burger span:nth-child(1){ top:15px; }
  .sh-burger span:nth-child(2){ top:23px; }
  header.sh.sheet-open .sh-burger span:nth-child(1){ top:19px; transform:rotate(45deg); }
  header.sh.sheet-open .sh-burger span:nth-child(2){ top:19px; transform:rotate(-45deg); }

  .sh-sheet{
    position:fixed; inset:var(--sh-h) 0 0 0; z-index:199; display:block; overflow-y:auto; overscroll-behavior:contain;
    padding:14px 18px calc(28px + env(safe-area-inset-bottom));
    background:color-mix(in srgb, var(--paper) 97%, transparent); backdrop-filter:blur(18px); -webkit-backdrop-filter:blur(18px);
    opacity:0; visibility:hidden; transform:translateY(-8px);
    transition:opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility .25s;
  }
  .sh-sheet.open{ opacity:1; visibility:visible; transform:none; }
  .sh-sheet-inner{ max-width:620px; margin:0 auto; }
  .sh-sheet.open .sh-sheet-inner > *{ animation:sh-in .45s cubic-bezier(.2,.8,.2,1) both; }
  .sh-sheet.open .sh-sheet-inner > :nth-child(2){ animation-delay:.03s; }
  .sh-sheet.open .sh-sheet-inner > :nth-child(3){ animation-delay:.06s; }
  .sh-sheet.open .sh-sheet-inner > :nth-child(4){ animation-delay:.09s; }
  .sh-sheet.open .sh-sheet-inner > :nth-child(5){ animation-delay:.12s; }
  .sh-sheet.open .sh-sheet-inner > :nth-child(6){ animation-delay:.15s; }
  .sh-sheet.open .sh-sheet-inner > :nth-child(n+7){ animation-delay:.18s; }
  .sh-sheet-label{ margin:18px 4px 10px; font:600 10.5px/1 var(--font-mono); letter-spacing:.12em; text-transform:uppercase; color:var(--graphite); }
  .sh-sheet-label:first-child{ margin-top:6px; }
  .sh-sheet-grid{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:8px; }
  .sh-sheet-tile{
    display:flex; flex-direction:column; gap:10px; padding:13px; border-radius:15px; border:1px solid var(--hair);
    background:var(--canvas); color:var(--ink); text-decoration:none;
  }
  .sh-sheet-tile .sh-tile-icon{ width:34px; height:34px; border-radius:10px; }
  .sh-sheet-tile b{ font-size:14px; font-weight:600; letter-spacing:-.02em; }
  .sh-sheet-tile small{ display:block; margin-top:2px; font-size:12px; line-height:1.35; color:var(--graphite); }
  .sh-sheet-tile.current{ border-color:var(--sky-line); background:var(--sky-tint); }
  .sh-sheet-links{ display:flex; flex-direction:column; }
  .sh-sheet-link{
    display:flex; align-items:center; justify-content:space-between; padding:15px 4px; border-bottom:1px solid var(--hair);
    color:var(--ink); text-decoration:none; font-size:17px; font-weight:500; letter-spacing:-.025em;
  }
  .sh-sheet-link svg{ width:18px; height:18px; color:var(--graphite); }
  .sh-sheet-link.current{ color:var(--sky-deep); }
  .sh-sheet-link.current svg{ color:var(--sky-deep); }
  .sh-sheet-cta{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:24px; }
  .sh-sheet-cta .btn{ justify-content:center; }
}
@media (max-width:560px){
  .sh-login{ display:none; }
}
@media (max-width:400px){
  .sh-cta{ display:none; }
}
@keyframes sh-in{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){
  header.sh *, .sh-sheet, .sh-sheet *{ transition:none !important; animation:none !important; }
}
