
/* Hesaplasan V2.0 — Premium Header */
.hp-header{
  position:sticky;
  top:0;
  z-index:110;
  border-bottom:1px solid color-mix(in srgb,var(--line) 72%,transparent);
  background:color-mix(in srgb,var(--bg) 88%,transparent);
  -webkit-backdrop-filter:blur(20px) saturate(145%);
  backdrop-filter:blur(20px) saturate(145%);
  transition:box-shadow .22s ease, background .22s ease, border-color .22s ease;
}
.hp-header.is-scrolled{
  box-shadow:0 10px 35px rgba(15,23,42,.08);
  border-bottom-color:color-mix(in srgb,var(--line) 92%,transparent);
}
.hp-nav{
  min-height:78px;
  display:grid;
  grid-template-columns:minmax(210px,1fr) auto minmax(210px,1fr);
  align-items:center;
  gap:22px;
}
.hp-brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  width:max-content;
  text-decoration:none;
  color:var(--text);
}
.hp-brand-mark{
  position:relative;
  width:44px;height:44px;
  display:grid;place-items:center;
  flex:0 0 44px;
  border-radius:14px;
  background:
    radial-gradient(circle at 72% 22%,rgba(255,255,255,.36),transparent 25%),
    linear-gradient(145deg,#8b5cf6 0%,#6d4aff 48%,#4f46e5 100%);
  box-shadow:
    0 10px 28px rgba(91,76,240,.26),
    inset 0 1px 0 rgba(255,255,255,.28);
  transform:translateZ(0);
}
.hp-brand-glyph{
  color:#fff;
  font-size:22px;
  font-weight:950;
  line-height:1;
  letter-spacing:-.05em;
}
.hp-brand-dot{
  position:absolute;
  right:6px;bottom:6px;
  width:6px;height:6px;border-radius:999px;
  background:#fff;
  box-shadow:0 0 0 3px rgba(255,255,255,.14);
}
.hp-brand-copy{display:flex;flex-direction:column;line-height:1.08}
.hp-brand-copy strong{
  font-size:20px;
  font-weight:900;
  letter-spacing:-.035em;
}
.hp-brand-copy small{
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.hp-main-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.hp-nav-link{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:42px;
  padding:0 14px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:var(--muted);
  font:inherit;
  font-size:14px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  transition:color .18s ease,background .18s ease,transform .18s ease;
}
.hp-nav-link:hover{
  color:var(--text);
  background:var(--surface);
}
.hp-nav-link.is-active{
  color:var(--text);
  background:color-mix(in srgb,var(--brand) 10%,var(--surface));
}
.hp-nav-link.is-active:after{
  content:"";
  position:absolute;
  left:14px;right:14px;bottom:-18px;
  height:2px;border-radius:2px;
  background:linear-gradient(90deg,#7c3aed,#5b5cf0);
}
.hp-nav-button{appearance:none}
.hp-chevron{
  display:inline-block;
  font-size:13px;
  transition:transform .18s ease;
}
.hp-nav-button[aria-expanded="true"] .hp-chevron{transform:rotate(180deg)}
.hp-nav-actions{
  justify-self:end;
  display:flex;
  align-items:center;
  gap:10px;
}
.hp-tools-cta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:42px;
  padding:0 14px;
  border-radius:12px;
  background:linear-gradient(135deg,#6d4aff,#5b5cf0);
  color:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:850;
  box-shadow:0 9px 24px rgba(91,76,240,.2);
  transition:transform .18s ease,box-shadow .18s ease;
}
.hp-tools-cta:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(91,76,240,.28);
}
.hp-tools-cta-icon{font-size:14px;opacity:.9}
.hp-theme-btn,.hp-mobile-btn{
  width:42px;height:42px;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--surface);
  color:var(--text);
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow:0 5px 18px rgba(15,23,42,.04);
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}
.hp-theme-btn:hover,.hp-mobile-btn:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--brand) 34%,var(--line));
}
.hp-theme-btn{position:relative;overflow:hidden}
.hp-theme-btn span{position:absolute;transition:opacity .18s ease,transform .18s ease}
[data-theme="dark"] .hp-theme-sun{opacity:1;transform:scale(1)}
[data-theme="dark"] .hp-theme-moon{opacity:0;transform:scale(.65)}
[data-theme="light"] .hp-theme-sun{opacity:0;transform:scale(.65)}
[data-theme="light"] .hp-theme-moon{opacity:1;transform:scale(1)}
[data-theme="system"] .hp-theme-sun{opacity:.45;transform:translateX(-4px) scale(.75)}
[data-theme="system"] .hp-theme-moon{opacity:.9;transform:translateX(4px) scale(.82)}

.hp-mega-wrap{position:relative}
.hp-mega-menu{
  top:calc(100% + 18px)!important;
  border-radius:22px!important;
  border:1px solid color-mix(in srgb,var(--line) 85%,transparent)!important;
  box-shadow:0 24px 70px rgba(15,23,42,.16)!important;
  overflow:hidden;
}
.hp-mega-top{
  background:linear-gradient(180deg,color-mix(in srgb,var(--surface2) 86%,transparent),var(--surface));
}
.hp-mega-menu .mega-col{
  border-radius:16px!important;
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}
.hp-mega-menu .mega-col:hover{
  transform:translateY(-2px);
  border-color:color-mix(in srgb,var(--brand) 25%,var(--line));
}

.hp-mobile-btn{display:none;position:relative;padding:0}
.hp-mobile-btn span{
  position:absolute;
  width:17px;height:2px;border-radius:2px;
  background:currentColor;
  transition:transform .18s ease,opacity .18s ease;
}
.hp-mobile-btn span:nth-child(1){transform:translateY(-5px)}
.hp-mobile-btn span:nth-child(3){transform:translateY(5px)}
.hp-mobile-btn[aria-expanded="true"] span:nth-child(1){transform:rotate(45deg)}
.hp-mobile-btn[aria-expanded="true"] span:nth-child(2){opacity:0}
.hp-mobile-btn[aria-expanded="true"] span:nth-child(3){transform:rotate(-45deg)}

.hp-mobile-panel{display:none}

@media(max-width:1120px){
  .hp-nav{grid-template-columns:1fr auto}
  .hp-main-nav{display:none}
  .hp-tools-cta{display:none}
  .hp-mobile-btn{display:grid}
  .hp-brand-copy small{display:none}
  .hp-mobile-panel{
    position:fixed;
    top:78px;
    left:14px;right:14px;
    display:block;
    padding:10px;
    border-radius:18px;
    border:1px solid var(--line);
    background:var(--surface);
    box-shadow:0 22px 55px rgba(15,23,42,.16);
    opacity:0;
    visibility:hidden;
    transform:translateY(-8px) scale(.985);
    transform-origin:top;
    transition:opacity .18s ease,transform .18s ease,visibility .18s;
  }
  .hp-mobile-panel.is-open{
    opacity:1;
    visibility:visible;
    transform:translateY(0) scale(1);
  }
  .hp-mobile-panel-inner{display:grid;gap:4px}
  .hp-mobile-panel a{
    display:flex;
    align-items:center;
    min-height:48px;
    padding:0 14px;
    border-radius:12px;
    color:var(--text);
    text-decoration:none;
    font-weight:800;
  }
  .hp-mobile-panel a:hover{background:var(--surface2)}
}
@media(max-width:640px){
  .hp-nav{min-height:70px}
  .hp-brand-mark{width:40px;height:40px;flex-basis:40px;border-radius:13px}
  .hp-brand-copy strong{font-size:18px}
  .hp-theme-btn,.hp-mobile-btn{width:40px;height:40px}
  .hp-mobile-panel{top:70px}
}
