/* Sticky floating header — ported from the figmentor SVG reference.
   Namespaced `rfh-` so it can't collide with the site's RTL styles. */

/* Anchor targets clear the sticky bar when scrolled to. */
#demo,#how-it-works,#features,#why-reframe,#pricing{scroll-margin-top:86px}
html{scroll-behavior:smooth}

.rfh-wrap{
  position:sticky;top:0;z-index:300;
  padding:14px 16px 0;
  transition:padding-top .28s ease,margin-bottom .28s ease;
  /* Float OVER the dark hero (not on the light body strip above it) so the
     glassy bar always sits on a dark backdrop. -80px == padding-top(14) + bar(66)
     so the hero reaches all the way up to the announce — no white gap. */
  margin-bottom:-80px;
  pointer-events:none; /* transparent gutter shouldn't eat clicks */
}
/* The desktop hero logo sits at 158px so it clears the bar; the reflowed mobile
   hero starts at the top edge, so give it room to clear the floating header. */
@media (max-width:780px){
  .rf-stage{padding-top:104px!important}
}

.rfh{
  pointer-events:auto;
  max-width:1016px;margin:0 auto;
  height:66px;display:flex;align-items:center;gap:20px;
  padding:0 12px 0 18px;
  background:rgba(13,11,18,.55);
  -webkit-backdrop-filter:blur(18px) saturate(1.3);
  backdrop-filter:blur(18px) saturate(1.3);
  border:1px solid rgba(255,255,255,.09);border-radius:16px;
  box-shadow:0 10px 34px rgba(0,0,0,.4),0 1px 0 rgba(255,255,255,.06) inset;
  font-family:"Plus Jakarta Sans","Inter",system-ui,sans-serif;
  transition:height .28s ease,background .28s ease,box-shadow .28s ease,border-radius .28s ease;
}

/* ---- logo ---- */
.rfh-logo{display:flex;align-items:center;text-decoration:none;flex:none}
.rfh-logo-img{height:24px;width:auto;display:block;transition:height .28s ease}

/* ---- scroll-shrink: full ("regular") at the top, condensed once scrolled ---- */
/* Keep margin == wrap height in both states so the wrap nets to 0 in flow —
   the hero top stays put and shrinking never jumps the page content. */
.rfh-wrap.rfh-scrolled{padding-top:8px;margin-bottom:-58px}
.rfh-scrolled .rfh{
  height:50px;
  background:rgba(13,11,18,.74);
  box-shadow:0 8px 30px rgba(0,0,0,.5),0 1px 0 rgba(255,255,255,.06) inset;
}
.rfh-scrolled .rfh-logo-img{height:20px}

/* The header now carries the ReFrame logo, so hide the hero's own logo. */
.rf-logo{display:none!important}
.rfh-scrolled .rfh-btn{height:36px}
.rfh-scrolled .rfh-burger{width:38px;height:38px}

/* ---- nav ---- */
.rfh-nav{flex:1;display:flex;justify-content:center;align-items:center;gap:26px}
.rfh-nav a{
  font-weight:500;font-size:14.5px;color:#B8B5C0;text-decoration:none;
  white-space:nowrap;transition:color .15s ease;
}
.rfh-nav a:hover{color:#F2F0EE}

/* ---- actions ---- */
.rfh-actions{display:flex;align-items:center;gap:10px;flex:none}
.rfh-btn{
  display:inline-flex;align-items:center;gap:7px;
  height:40px;padding:0 16px;border-radius:9px;
  font-weight:600;font-size:14px;text-decoration:none;white-space:nowrap;
  transition:background .15s ease,transform .15s ease,box-shadow .15s ease,border-color .15s ease,height .28s ease;
}
.rfh-btn-ghost{background:rgba(255,255,255,.03);border:1px solid rgba(228,226,223,.28);color:#F2F0EE}
.rfh-btn-ghost:hover{background:rgba(255,255,255,.08);border-color:rgba(228,226,223,.55)}
.rfh-btn-primary{
  background:linear-gradient(135deg,#EF0385 0%,#6E24B2 100%);
  border:1px solid transparent;color:#fff;
  box-shadow:0 6px 20px rgba(146,0,59,.4),0 0 0 1px rgba(255,255,255,.08) inset;
}
.rfh-btn-primary:hover{
  transform:translateY(-1px);
  background:linear-gradient(135deg,#ff2a9d 0%,#7d2ec8 100%);
  box-shadow:0 12px 30px rgba(214,19,122,.5),0 0 0 1px rgba(255,255,255,.12) inset;
}
.rfh-btn-primary svg{display:block}

/* ---- mobile burger + menu ---- */
.rfh-burger{
  display:none;margin-left:auto;flex:none;
  width:42px;height:42px;border-radius:10px;
  align-items:center;justify-content:center;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.12);cursor:pointer;
  transition:width .28s ease,height .28s ease;
}
.rfh-burger span{display:block;width:18px;height:2px;border-radius:2px;background:#F2F0EE;position:relative}
.rfh-burger span::before,.rfh-burger span::after{
  content:"";position:absolute;left:0;width:18px;height:2px;border-radius:2px;background:#F2F0EE;
  transition:transform .2s ease,top .2s ease}
.rfh-burger span::before{top:-6px}
.rfh-burger span::after{top:6px}
.rfh-burger.is-open span{background:transparent}
.rfh-burger.is-open span::before{top:0;transform:rotate(45deg)}
.rfh-burger.is-open span::after{top:0;transform:rotate(-45deg)}

.rfh-mobile{
  pointer-events:auto;
  max-width:1016px;margin:8px auto 0;padding:8px;
  background:rgba(13,11,18,.9);
  -webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);
  border:1px solid rgba(255,255,255,.1);border-radius:16px;
  box-shadow:0 16px 40px rgba(0,0,0,.5);
  display:flex;flex-direction:column;gap:2px;
  font-family:"Plus Jakarta Sans","Inter",system-ui,sans-serif;
}
.rfh-mobile a{
  padding:13px 14px;border-radius:10px;
  font-weight:500;font-size:16px;color:#B8B5C0;text-decoration:none;
}
.rfh-mobile a:hover{background:rgba(255,255,255,.06);color:#F2F0EE}
.rfh-mobile .rfh-btn-primary{justify-content:center;height:48px;font-size:15px;margin-top:6px;color:#fff}

@media (max-width:900px){
  .rfh-nav{display:none}
  .rfh-actions{display:none}
  .rfh-burger{display:inline-flex}
  /* On mobile the hero is only pulled up ~80px under the bar, so a tall open
     menu would overflow onto the light body strip and read as a white block.
     Paint the whole header zone in the hero's dark tone so the bar and the
     open menu always sit on dark. */
  .rfh-wrap{background:#050007}
}
@media (min-width:901px){
  .rfh-mobile{display:none!important}
}
