/* Canonical Oracryn public header. Loaded last so every public section
   uses the exact same header/menu regardless of page-specific legacy CSS. */

.hub-header{
  --hub-ink:var(--o4-ink,#f7f2f8);
  --hub-muted:var(--o4-muted,#a99eac);
  --hub-line:var(--o4-line,rgba(244,232,249,.10));
  --hub-line-strong:var(--o4-line-strong,rgba(244,232,249,.18));
  --hub-accent:var(--o4-accent,#b66bb0);
  --hub-surface:var(--o4-surface,#120b18);
  --hub-nav-active:var(--o4-nav-active,color-mix(in srgb,var(--hub-accent) 24%,var(--hub-surface)));
  --hub-nav-active-border:var(--o4-nav-active-border,color-mix(in srgb,var(--hub-accent) 46%,var(--hub-line)));

  position:sticky;
  top:0;
  z-index:80;
  min-height:72px;
  display:flex;
  align-items:center;
  background:var(--o4-header,rgba(9,6,13,.9));
  border-bottom:1px solid var(--hub-line);
  -webkit-backdrop-filter:blur(16px);
  backdrop-filter:blur(16px);
  color:var(--hub-ink);
  font-family:"Manrope",Inter,ui-sans-serif,system-ui,sans-serif;
}

.hub-header,
.hub-header *{box-sizing:border-box}

.hub-header a{
  color:inherit;
  text-decoration:none;
}

.hub-header-inner{
  position:relative;
  width:min(1220px,calc(100% - 54px));
  min-height:72px;
  margin:0 auto;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:20px;
  align-items:center;
}

.hub-brand{
  display:flex;
  align-items:center;
  gap:11px;
  color:var(--hub-ink);
  text-decoration:none;
  font-family:"Manrope",Inter,ui-sans-serif,system-ui,sans-serif;
  font-size:13px;
  font-weight:800;
  line-height:1;
  letter-spacing:.15em;
  white-space:nowrap;
}

.hub-brand-mark{
  width:13px;
  height:13px;
  flex:0 0 13px;
  border-radius:3px;
  transform:rotate(45deg);
  background:linear-gradient(135deg,var(--o4-accent-2,#dca5d2),#73509f);
  box-shadow:0 0 18px color-mix(in srgb,var(--hub-accent) 24%,transparent);
}

.hub-nav{
  justify-self:center;
  min-width:0;
  display:flex;
  align-items:center;
  gap:3px;
  padding:5px;
  border:1px solid color-mix(in srgb,var(--hub-line) 82%,var(--hub-accent));
  background:color-mix(in srgb,var(--hub-surface) 40%,transparent);
}

.hub-nav a{
  min-height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 13px;
  border:1px solid transparent;
  color:color-mix(in srgb,var(--hub-muted) 92%,var(--hub-ink));
  text-decoration:none;
  font-family:"Manrope",Inter,ui-sans-serif,system-ui,sans-serif;
  font-size:11px;
  font-weight:800;
  line-height:1;
  letter-spacing:.075em;
  text-transform:uppercase;
  white-space:nowrap;
  transition:color .16s ease,background .16s ease,border-color .16s ease,transform .16s ease;
}

.hub-nav a:hover{
  color:var(--hub-ink);
  border-color:color-mix(in srgb,var(--hub-accent) 18%,var(--hub-line));
  background:color-mix(in srgb,var(--hub-accent) 6%,transparent);
}

.hub-nav a[aria-current="page"]{
  color:var(--hub-ink);
  border-color:var(--hub-nav-active-border);
  background:var(--hub-nav-active);
  box-shadow:none;
  clip-path:polygon(0 0,calc(100% - 7px) 0,100% 7px,100% 100%,0 100%);
}

.hub-nav a[aria-current="page"]:hover{transform:translateY(-1px)}

.hub-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
}

.hub-header .oracryn-theme-toggle{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:grid;
  place-items:center;
  padding:0;
  border:1px solid var(--o4-line-strong);
  border-radius:0;
  background:rgba(255,255,255,.018);
  color:var(--o4-ink);
  cursor:pointer;
  font:800 15px/1 "Manrope",sans-serif;
}

html[data-theme="light"] .hub-header .oracryn-theme-toggle{
  background:rgba(255,255,255,.42);
}

.hub-header .mobile-section-menu-trigger{
  display:none;
  min-height:36px;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 11px;
  border:1px solid var(--o4-line-strong);
  border-radius:0;
  background:color-mix(in srgb,var(--o4-surface) 30%,transparent);
  color:var(--o4-ink);
  cursor:pointer;
  font:800 10px/1 "Manrope",sans-serif;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hub-header .mobile-section-menu-trigger .mobile-menu-icon{
  font-size:12px;
  line-height:1;
}

.hub-header .mobile-section-menu-trigger[aria-expanded="true"]{
  border-color:color-mix(in srgb,var(--o4-accent) 55%,var(--o4-line));
  background:color-mix(in srgb,var(--o4-accent) 9%,var(--o4-surface));
}

@media(min-width:821px) and (max-width:1180px){
  .hub-header-inner{gap:13px}
  .hub-nav{gap:1px;padding:4px}
  .hub-nav a{
    min-height:34px;
    padding:0 8px;
    font-size:10px;
    letter-spacing:.055em;
  }
}

@media(max-width:820px){
  .hub-header{
    min-height:72px!important;
  }

  .hub-header-inner{
    width:min(100% - 28px,1220px);
    min-height:72px!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    grid-template-areas:"brand spacer actions"!important;
    gap:10px!important;
    padding:0!important;
  }

  .hub-brand{grid-area:brand}

  .hub-header-actions{
    grid-area:actions;
    justify-self:end;
  }

  .hub-header .mobile-section-menu-trigger{
    display:inline-flex;
  }

  .hub-nav{
    position:absolute;
    top:calc(100% + 8px);
    right:0;
    z-index:95;
    width:min(290px,calc(100vw - 28px))!important;
    display:none!important;
    flex-direction:column;
    align-items:stretch;
    gap:0!important;
    overflow:visible;
    padding:5px!important;
    border:1px solid var(--hub-line-strong)!important;
    background:var(--o4-header,rgba(9,6,13,.96))!important;
    box-shadow:0 22px 55px rgba(0,0,0,.24)!important;
    -webkit-backdrop-filter:blur(18px)!important;
    backdrop-filter:blur(18px)!important;
  }

  .hub-nav.is-open{display:flex!important}

  .hub-nav a{
    width:100%!important;
    min-height:42px!important;
    flex:0 0 auto!important;
    justify-content:flex-start!important;
    padding:0 12px!important;
    border:1px solid transparent!important;
    border-bottom-color:var(--hub-line)!important;
    color:var(--hub-muted)!important;
    text-decoration:none!important;
    font-family:"Manrope",Inter,ui-sans-serif,system-ui,sans-serif!important;
    font-size:11px!important;
    font-weight:800!important;
    line-height:1!important;
    letter-spacing:.095em!important;
    text-transform:uppercase!important;
    box-shadow:none!important;
    clip-path:none!important;
  }

  .hub-nav a:last-child{
    border-bottom-color:transparent!important;
  }

  .hub-nav a:hover{
    color:var(--hub-ink)!important;
    border-color:color-mix(in srgb,var(--hub-accent) 18%,var(--hub-line))!important;
    background:color-mix(in srgb,var(--hub-accent) 6%,transparent)!important;
  }

  .hub-nav a[aria-current="page"]{
    color:var(--hub-ink)!important;
    border-color:var(--hub-nav-active-border)!important;
    background:var(--hub-nav-active)!important;
    box-shadow:none!important;
    clip-path:none!important;
  }
}

@media(max-width:430px){
  .hub-header .mobile-section-menu-trigger{
    width:34px;
    min-height:34px;
    padding:0;
  }

  .hub-header .mobile-section-menu-trigger .mobile-menu-label{
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip:rect(0 0 0 0);
    white-space:nowrap;
  }
}

@media(prefers-reduced-motion:reduce){
  .hub-nav a,
  .hub-header .oracryn-theme-toggle{transition:none}
}
