/* =========================================================================
   Cipher Hyperscale Blocks — core stylesheet
   Faithful port of the original "Built for Hyperscale" layout.
   Every colour / size that the Customizer can change is expressed as a
   CSS custom property, defaulting to the original design values.
   ========================================================================= */

.cipherhs-root{
  --clr-bg:#0d0e10;
  --clr-neutral-100:#141618;
  --clr-neutral-90:#202427;
  --clr-neutral-40:#939ca2;
  --clr-neutral-30:#c4ccd1;
  --clr-neutral-20:#e4e9ed;
  --clr-white:#eff0f1;
  --clr-green:#abd233;
  --clr-line:rgba(255,255,255,.12);
  --clr-line-strong:rgba(255,255,255,.15);
  --clr-line-soft:rgba(255,255,255,.08);
  --font-sans: articulat-cf, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --container-max:1400px;
  --container-pad:40px;
}

.cipherhs-root *,
.cipherhs-root *::before,
.cipherhs-root *::after{ box-sizing:border-box; margin:0; padding:0; }

.cipherhs-root{
  position:relative;
  color:#fff;
  font-family:var(--font-sans);
  font-size:16px;
  line-height:1.5;
  letter-spacing:.01em;
}
.cipherhs-root a{ color:inherit; text-decoration:none; }
.cipherhs-root img,
.cipherhs-root video{ max-width:100%; display:block; }

.cipherhs-container{
  max-width:var(--container-max);
  margin:0 auto;
  padding:0 var(--container-pad);
}

/* ---------- Decorative grid lines ---------- */
.cipherhs-section-lines{
  position:absolute; inset:0;
  pointer-events:none; z-index:1;
}
.cipherhs-section-lines::before,
.cipherhs-section-lines::after{
  content:""; position:absolute; top:0; bottom:0;
  width:1px; background:var(--clr-line);
}
.cipherhs-section-lines::before{ left:var(--container-pad); }
.cipherhs-section-lines::after{ right:var(--container-pad); }
.cipherhs-section-lines .corner-dot{
  position:absolute; width:6px; height:6px; border-radius:50%;
  background:rgba(171,210,51,.6);
}
.cipherhs-section-lines .corner-dot.-tl{ top:-3px; left:calc(var(--container-pad) - 3px); }
.cipherhs-section-lines .corner-dot.-tr{ top:-3px; right:calc(var(--container-pad) - 3px); }
.cipherhs-section-lines .corner-dot.-bl{ bottom:-3px; left:calc(var(--container-pad) - 3px); }
.cipherhs-section-lines .corner-dot.-br{ bottom:-3px; right:calc(var(--container-pad) - 3px); }

.cipherhs-diagonal{
  position:absolute; inset:0; opacity:.35;
  pointer-events:none; z-index:0;
}
.cipherhs-diagonal svg{ width:100%; height:100%; display:block; }

/* =========================================================================
   HEADER
   ========================================================================= */
.cipherhs-header{
  position:fixed; top:0; left:0; right:0; z-index:100;
  background:rgba(13,14,16,.6);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--clr-line-soft);
}
.cipherhs-header.is-static{ position:absolute; }
.cipherhs-header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:18px var(--container-pad);
}
.cipherhs-logo{ display:flex; align-items:center; gap:8px; font-size:18px; letter-spacing:.02em; }
.cipherhs-logo svg{ height:22px; width:auto; }
.cipherhs-logo img{ height:26px; width:auto; }
.cipherhs-nav{ display:flex; gap:32px; font-size:14px; }
.cipherhs-nav a{ opacity:.85; transition:opacity .25s ease, color .25s ease; position:relative; }
.cipherhs-nav a:hover{ opacity:1; color:var(--clr-green); }
.cipherhs-header-cta{
  border:1px solid rgba(255,255,255,.3);
  padding:10px 22px; font-size:13px; border-radius:2px;
  transition:background .25s ease, color .25s ease, border-color .25s ease;
  white-space:nowrap;
}
.cipherhs-header-cta:hover{ background:var(--clr-green); color:#0d0e10; border-color:var(--clr-green); }
.cipherhs-menu-toggle{ display:none; background:none; border:0; color:#fff; font-size:22px; cursor:pointer; line-height:1; }

/* Mobile drawer */
.cipherhs-mobile-nav{
  display:none;
  position:fixed; top:0; right:0; bottom:0;
  width:min(320px,86vw);
  background:var(--clr-bg);
  border-left:1px solid var(--clr-line-strong);
  z-index:101;
  transform:translateX(100%);
  transition:transform .35s cubic-bezier(.16,1,.3,1);
  padding:88px 32px 32px;
  flex-direction:column; gap:22px;
}
.cipherhs-mobile-nav.is-open{ transform:translateX(0); }
.cipherhs-mobile-nav a{ font-size:18px; opacity:.9; }
.cipherhs-mobile-nav a:hover{ color:var(--clr-green); }
.cipherhs-mobile-close{
  position:absolute; top:24px; right:28px;
  background:none; border:0; color:#fff; font-size:26px; cursor:pointer; line-height:1;
}
.cipherhs-backdrop{
  display:none; position:fixed; inset:0; z-index:100;
  background:rgba(0,0,0,.5); opacity:0; transition:opacity .3s ease;
}
.cipherhs-backdrop.is-open{ opacity:1; }

@media (max-width:820px){
  .cipherhs-nav{ display:none; }
  .cipherhs-menu-toggle{ display:block; }
  .cipherhs-mobile-nav{ display:flex; }
  .cipherhs-backdrop{ display:block; }
}

/* =========================================================================
   HERO
   ========================================================================= */
.cipherhs-hero{
  position:relative;
  min-height:100vh;
  display:flex; flex-direction:column; justify-content:flex-end;
  overflow:hidden;
  border-bottom:1px solid var(--clr-line-soft);
}
.cipherhs-hero video,
.cipherhs-hero .cipherhs-hero-img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  filter:brightness(.65);
}
.cipherhs-hero-overlay{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(13,14,16,.15) 0%, rgba(13,14,16,.75) 100%);
}
.cipherhs-hero-content{
  position:relative; z-index:2;
  padding:0 var(--container-pad) 60px;
}
.cipherhs-hero-title{
  font-size:clamp(41px, 5.8vw, 90px);
  font-weight:400;
  letter-spacing:-0.01em;
  line-height:1;
  border-left:2px solid var(--clr-green);
  padding-left:24px;
  opacity:0;
  transform:translateY(40px);
}
.cipherhs-hero-logos{
  margin-top:60px;
  display:flex; align-items:center; gap:28px;
  border-top:1px solid var(--clr-line-strong);
  padding-top:22px;
  opacity:0;
}
.cipherhs-hero-logos-label{
  font-size:12px; text-transform:uppercase; letter-spacing:.15em;
  color:var(--clr-neutral-40); white-space:nowrap;
}
.cipherhs-hero-logos-viewport{
  flex:1 1 auto; overflow:hidden; min-width:0;
  -webkit-mask-image:linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image:linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.cipherhs-hero-logos-track{
  display:flex; gap:48px; align-items:center; width:max-content;
}
.cipherhs-hero-logos-track img{
  height:22px; width:auto; flex:0 0 auto;
  filter:grayscale(1) brightness(2.4); opacity:.75;
}

/* =========================================================================
   STORY (pinned horizontal narrative)
   ========================================================================= */
.cipherhs-story{
  position:relative;
  height:340vh;
}
.cipherhs-story-pin{
  position:sticky; top:0; height:100vh; overflow:hidden;
  display:flex; align-items:center;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.cipherhs-story-grid{
  position:relative; width:100%;
  max-width:var(--container-max); margin:0 auto; padding:0 var(--container-pad);
  height:56vh; min-height:380px;
}
.cipherhs-story-frame{
  position:absolute; top:50%; transform:translateY(-50%);
  aspect-ratio:4/3; overflow:hidden;
  border:1px solid rgba(255,255,255,.18);
  will-change:left,width,transform;
}
.cipherhs-story-frame::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(135deg, transparent 48%, rgba(171,210,51,.5) 49%, transparent 50%);
  pointer-events:none; z-index:2;
}
.cipherhs-story-figure-layer{
  position:absolute; inset:0; opacity:0; transition:opacity .6s ease;
}
.cipherhs-story-figure-layer img,
.cipherhs-story-figure-layer video{ width:100%; height:100%; object-fit:cover; }
.cipherhs-story-figure-layer.is-active{ opacity:1; }

.cipherhs-story-copy{
  position:absolute; top:50%; transform:translateY(-50%);
  min-height:220px; will-change:left,width;
}
.cipherhs-story-copy-panel{
  position:absolute; inset:0;
  display:flex; flex-direction:column; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .6s ease;
}
.cipherhs-story-copy-panel.is-active{ opacity:1; pointer-events:auto; }
.cipherhs-story-copy-panel p{
  font-size:clamp(19px,2vw,26px); line-height:1.4;
  color:var(--clr-neutral-20); max-width:520px;
}
.cipherhs-story-cta{
  display:inline-block; margin-top:28px;
  border:1px solid rgba(255,255,255,.3);
  padding:12px 26px; font-size:13px; border-radius:2px;
  transition:background .25s ease, color .25s ease, border-color .25s ease;
  width:fit-content;
}
.cipherhs-story-cta:hover{ background:var(--clr-green); color:#0d0e10; border-color:var(--clr-green); }

.cipherhs-story-progress{
  position:absolute; left:var(--container-pad); right:var(--container-pad); bottom:28px;
  height:1px; background:var(--clr-line-strong);
}
.cipherhs-story-progress-bar{ height:100%; width:0%; background:var(--clr-green); }

@media (max-width:900px){
  .cipherhs-story{ height:auto; }
  .cipherhs-story-pin{ position:relative; top:auto; height:auto; padding:80px 0; }
  .cipherhs-story-grid{ height:auto; min-height:0; }
  .cipherhs-story-frame,
  .cipherhs-story-copy{
    position:relative !important; top:auto !important; left:0 !important;
    width:100% !important; transform:none !important;
  }
  .cipherhs-story-copy{ min-height:auto; }
  .cipherhs-story-copy-panel{ position:relative; opacity:1; pointer-events:auto; margin-bottom:60px; }
  .cipherhs-story-frame{ margin-bottom:24px; }
}

/* =========================================================================
   METRICS
   ========================================================================= */
.cipherhs-metrics{
  position:relative; padding:120px 0; overflow:hidden;
}
.cipherhs-metrics-bg{
  position:absolute; inset:0; opacity:.18;
  background-size:cover; background-position:center;
}
.cipherhs-metrics-inner{ position:relative; z-index:2; }
.cipherhs-metrics-heading{
  font-size:clamp(26px,2.5vw,34px);
  max-width:700px; line-height:1.15; margin-bottom:70px;
  color:var(--clr-neutral-20);
  opacity:0; transform:translateY(20px);
}
.cipherhs-metrics-grid{
  display:grid; grid-template-columns:repeat(3,1fr);
  border-top:1px solid var(--clr-line-strong);
  border-left:1px solid var(--clr-line-strong);
}
.cipherhs-metric-item{
  border-right:1px solid var(--clr-line-strong);
  border-bottom:1px solid var(--clr-line-strong);
  padding:36px 30px;
}
.cipherhs-metric-value{
  display:flex; align-items:baseline; gap:6px;
  font-size:clamp(40px,4vw,58px); color:var(--clr-green);
}
.cipherhs-metric-suffix{ font-size:20px; color:var(--clr-neutral-40); }
.cipherhs-metric-label{ margin-top:8px; color:var(--clr-neutral-40); font-size:14px; }
.cipherhs-metrics-cta-wrap{ margin-top:60px; text-align:center; }

@media (max-width:820px){
  .cipherhs-metrics-grid{ grid-template-columns:1fr; }
}

/* =========================================================================
   INVESTOR / GENERIC CTA
   ========================================================================= */
.cipherhs-ctext{ position:relative; padding:140px 0; text-align:center; border-top:1px solid var(--clr-line-soft); }
.cipherhs-ctext-title{ font-size:clamp(28px,3vw,40px); margin-bottom:16px; opacity:0; transform:translateY(20px); }
.cipherhs-ctext-text{ color:var(--clr-neutral-40); max-width:520px; margin:0 auto 30px; opacity:0; transform:translateY(20px); }
.cipherhs-ctext-cta{
  display:inline-block; border:1px solid rgba(255,255,255,.3);
  padding:12px 26px; font-size:13px; border-radius:2px;
  transition:background .25s ease, color .25s ease, border-color .25s ease;
}
.cipherhs-ctext-cta:hover{ background:var(--clr-green); color:#0d0e10; border-color:var(--clr-green); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.cipherhs-footer{
  position:relative; padding:160px var(--container-pad) 40px; overflow:hidden;
}
.cipherhs-footer-bg-video,
.cipherhs-footer-bg-img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
  filter:brightness(.45);
}
.cipherhs-footer-bg-overlay{
  position:absolute; inset:0;
  background:linear-gradient(180deg, rgba(13,14,16,.2) 0%, rgba(13,14,16,.85) 100%);
}
.cipherhs-footer-inner{ position:relative; z-index:2; max-width:var(--container-max); margin:0 auto; }
.cipherhs-footer-heading{
  font-size:clamp(32px,5vw,58px); line-height:1.05;
  opacity:0; transform:translateY(20px);
}
.cipherhs-footer-main{
  display:grid; grid-template-columns:1.2fr 1fr; gap:40px; align-items:start;
}
.cipherhs-footer-aside{ display:flex; flex-direction:column; align-items:flex-start; gap:26px; }
.cipherhs-footer-nav{ display:flex; flex-direction:column; gap:14px; font-size:14px; }
.cipherhs-footer-nav a{ color:var(--clr-neutral-30); position:relative; padding-left:16px; }
.cipherhs-footer-nav a::before{
  content:""; position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:6px; height:6px; border-radius:50%; background:var(--clr-green); opacity:.7;
}
.cipherhs-footer-nav a:hover{ color:var(--clr-green); }
.cipherhs-footer-cta{
  border:1px solid rgba(255,255,255,.3);
  padding:12px 26px; font-size:13px; border-radius:2px;
  transition:background .25s ease, color .25s ease, border-color .25s ease;
}
.cipherhs-footer-cta:hover{ background:var(--clr-green); color:#0d0e10; border-color:var(--clr-green); }
.cipherhs-footer-socials{ display:flex; gap:14px; }
.cipherhs-footer-socials img{ height:18px; width:18px; filter:invert(1); }
.cipherhs-footer-bottom{
  display:flex; justify-content:space-between;
  border-top:1px solid var(--clr-line-strong);
  margin-top:80px; padding-top:20px;
  font-size:12px; color:var(--clr-neutral-40);
}
.cipherhs-footer-bottom a{ color:var(--clr-neutral-40); }
.cipherhs-footer-bottom a:hover{ color:var(--clr-green); }

@media (max-width:820px){
  .cipherhs-footer-main{ grid-template-columns:1fr; }
}

/* Reduced-motion: reveal everything, kill transforms */
@media (prefers-reduced-motion:reduce){
  .cipherhs-hero-title,
  .cipherhs-hero-logos,
  .cipherhs-metrics-heading,
  .cipherhs-ctext-title,
  .cipherhs-ctext-text,
  .cipherhs-footer-heading{ opacity:1 !important; transform:none !important; }
}
