/* ECW home — technical sheet + shaft deck.
   Single stylesheet. Replaces home.css / home-polish.css /
   home-redesign.css / home-single-screen.css. */

:root{
  --sheet:#e9edf1;
  --sheet-face:#f6f8fa;
  --ink:#0d1726;
  --ink-soft:#33485e;
  --ink-mute:#64798c;
  --rule:#c3d0dc;
  --rule-strong:#9db0c2;
  --accent:var(--home-accent,#18b3bf);
  --mark:#e2a94b;
  --r:4px;
  --r-btn:12px;
  --pad:clamp(18px,3vw,46px);
  --rail:132px;
  --top:66px;
}

*,*::before,*::after{box-sizing:border-box}
/* This page is a single fixed screen — panels scroll internally
   (.hv-panel{overflow:auto}), the page itself never should. height:100%
   (not 100dvh) pins .hv to the same stable box every browser already gives
   html/body; dvh is *designed* to track the visible viewport live as mobile
   chrome shows/hides while scrolling, so using it for a box meant to stay
   put made that box visibly resize/jump mid-scroll. overflow:hidden here is
   the backstop: nothing outside a panel gets a second scroll container. */
html,body{height:100%;overflow:hidden}
body{
  /* Declared on body, not :root — the app sets --ecw-ui-font in body's inline
     style, so a :root declaration would resolve before it exists and silently
     fall back to Tahoma. */
  --ui:var(--ecw-ui-font,"Vazirmatn",Tahoma,Arial,sans-serif);
  --mono:"Martian Mono",var(--ecw-ui-font,"Vazirmatn",Tahoma),monospace;
  margin:0;background:var(--sheet);color:var(--ink);
  font-family:var(--ui);font-size:16px;line-height:1.9;
  -webkit-font-smoothing:antialiased;
  background-image:
    linear-gradient(var(--rule) 1px,transparent 1px),
    linear-gradient(90deg,var(--rule) 1px,transparent 1px),
    linear-gradient(rgba(157,176,194,.5) 1px,transparent 1px),
    linear-gradient(90deg,rgba(157,176,194,.5) 1px,transparent 1px);
  background-size:64px 64px,64px 64px,8px 8px,8px 8px;
  background-position:-1px -1px;
}
body::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:0;
  background:radial-gradient(120% 90% at 50% 45%,rgba(233,237,241,.94) 30%,rgba(233,237,241,.55) 70%,transparent 100%);
}
img,video{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:2px}

/* ── shell ─────────────────────────────────────────────── */
.hv{position:relative;z-index:1;height:100%;display:grid;grid-template-rows:var(--top) 1fr auto}

/* ── topbar ────────────────────────────────────────────── */
.hv-top{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding-inline:var(--pad);border-bottom:1px solid var(--rule);
  background:rgba(246,248,250,.82);backdrop-filter:blur(8px);
}
.hv-brand{display:flex;align-items:center;gap:12px;min-width:0}
.hv-brand img{height:30px;width:auto;object-fit:contain}
.hv-brand-mark{
  display:grid;place-items:center;width:34px;height:34px;border-radius:var(--r);
  background:var(--ink);color:#fff;font-family:var(--mono);font-size:11px;letter-spacing:.04em;
}
.hv-brand div{display:flex;flex-direction:column;line-height:1.35;min-width:0}
.hv-brand strong{font-size:14px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hv-brand small{font-family:var(--mono);font-size:8.5px;letter-spacing:.2em;color:var(--ink-mute);text-transform:uppercase}
.hv-nav{display:flex;align-items:center;gap:8px}
.hv-nav a{
  font-size:13.5px;padding:8px 14px;border-radius:var(--r);color:var(--ink-soft);
  transition:background-color .2s,color .2s;
}
.hv-nav a:not(.hv-cta):hover{background-color:rgba(13,23,38,.06);color:var(--ink)}
/* background-color only — the sweep sets background-image, and a shorthand
   here (or on :hover) would reset it to none. */
.hv-nav a.hv-cta{
  background-color:var(--ink);font-weight:600;border-radius:var(--r-btn);
  display:inline-flex;align-items:center;gap:8px;
}
.hv-user{display:flex;flex-direction:column;line-height:1.3;text-align:start}
.hv-user b{font-size:13px;font-weight:600}
.hv-user small{font-family:var(--mono);font-size:8.5px;letter-spacing:.14em;color:var(--ink-mute)}

/* ── stage ─────────────────────────────────────────────── */
.hv-stage{position:relative;padding:var(--pad);padding-inline-start:calc(var(--rail) + var(--pad));min-height:0}
.hv-panels{position:relative;height:100%;min-height:0}

.hv-panel{
  position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;
  border:1px solid var(--rule-strong);border-radius:var(--r);
  background:var(--sheet-face);
  /* Descends into place, in step with the car: the car climbs the shaft from
     the pit toward overhead, and the slide that goes with each stop settles
     downward the same way, instead of rising to meet it. */
  opacity:0;visibility:hidden;transform:translate3d(0,-14px,0);
  transition:opacity .5s ease,transform .5s cubic-bezier(.22,.9,.3,1),visibility 0s .5s;
}
.hv-panel.is-active{
  opacity:1;visibility:visible;transform:none;
  transition:opacity .5s ease,transform .55s cubic-bezier(.22,.9,.3,1),visibility 0s;
}

/* drafting registration ticks */
.hv-panel::before,.hv-panel::after{content:"";position:absolute;width:13px;height:13px;pointer-events:none;opacity:.55}
.hv-panel::before{top:9px;inset-inline-start:9px;border-top:1px solid currentColor;border-inline-start:1px solid currentColor}
.hv-panel::after{bottom:9px;inset-inline-end:9px;border-bottom:1px solid currentColor;border-inline-end:1px solid currentColor}

/* themes from the block's theme field */
.hv-panel.t-light,.hv-panel.t-soft{color:var(--ink)}
.hv-panel.t-soft{background:linear-gradient(180deg,#eef2f6,#f6f8fa)}
.hv-panel.t-dark,.hv-panel.t-accent{
  background-color:var(--ink);color:#e6eef5;border-color:#1d3348;
  background-image:linear-gradient(rgba(120,180,210,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(120,180,210,.07) 1px,transparent 1px);
  background-size:32px 32px,32px 32px;
}
.hv-panel.t-accent{border-color:var(--accent);box-shadow:inset 0 0 0 1px rgba(24,179,191,.25)}

.hv-inner{padding:clamp(22px,3.6vw,54px);min-height:100%;display:grid;align-content:center;gap:clamp(18px,2.4vw,30px)}

/* ── type ──────────────────────────────────────────────── */
.hv-eyebrow{
  display:inline-flex;align-items:center;gap:11px;
  font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.24em;
  text-transform:uppercase;color:var(--accent);
}
.hv-eyebrow::before{content:"";width:38px;height:1px;background:currentColor;flex:none}

.hv-panel h1,.hv-panel h2{
  margin:0;font-weight:800;line-height:1.24;letter-spacing:-.012em;
  font-size:clamp(25px,3.5vw,50px);max-width:19ch;
}
.hv-panel h2{font-size:clamp(22px,2.7vw,38px);max-width:22ch}
.hv-lede{margin:0;font-weight:300;font-size:clamp(14.5px,1.15vw,17px);line-height:2.05;color:var(--ink-soft);max-width:58ch}
.t-dark .hv-lede,.t-accent .hv-lede{color:#9fb6c8}

/* ── buttons ───────────────────────────────────────────── */
.hv-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.hv-btn{
  display:inline-flex;align-items:center;gap:10px;padding:13px 24px;border-radius:var(--r-btn);
  font-size:14.5px;font-weight:600;border:1px solid transparent;cursor:pointer;
  transition:transform .18s,background-color .2s,border-color .2s,color .2s,box-shadow .2s;
}
.hv-btn i{font-style:normal;transition:transform .22s}
.hv-btn:hover i{transform:translateX(-4px)}

/* The order button is the page's one conversion point: a slow teal sweep.
   background-size 220% + alternate keeps the loop seamless — no jump-cut
   back to the start the way a 0%→100% linear loop would give. */
.hv-btn-primary,.hv-nav a.hv-cta{
  color:#04222a;border-color:transparent;
  /* Every stop clears 4.5:1 against #04222a, so the label stays AA-legible
     at any point in the sweep (darkest #0f99b0 = 4.89). */
  background-image:linear-gradient(100deg,#0f99b0,var(--accent) 30%,#2ae0d0 50%,var(--accent) 70%,#0f99b0);
  background-size:220% 100%;
  background-position:0% 50%;
  animation:hv-sweep 6.5s ease-in-out infinite alternate;
}
.hv-btn-primary:hover,.hv-nav a.hv-cta:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 18px rgba(24,179,191,.32);
  color:#04222a;
}
@keyframes hv-sweep{from{background-position:0% 50%}to{background-position:100% 50%}}

/* On light sheets the same button runs an ink→teal sweep so it keeps its
   weight against the pale ground. */
.t-light .hv-btn-primary,.t-soft .hv-btn-primary{
  color:#fff;
  /* lightest stop #0b6d80 = 5.98:1 against white */
  background-image:linear-gradient(100deg,var(--ink),#0c4a58 45%,#0b6d80 60%,#0c4a58 80%,var(--ink));
}
.t-light .hv-btn-primary:hover,.t-soft .hv-btn-primary:hover{color:#fff}
.hv-btn-ghost{border-color:var(--rule-strong);color:var(--ink-soft)}
.hv-btn-ghost:hover{border-color:var(--ink);color:var(--ink)}
.t-dark .hv-btn-ghost,.t-accent .hv-btn-ghost{border-color:#33506b;color:#adc2d3}
.t-dark .hv-btn-ghost:hover,.t-accent .hv-btn-ghost:hover{border-color:var(--accent);color:#fff}
.hv-link{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;color:var(--accent);border-bottom:1px solid currentColor;padding-bottom:2px;justify-self:start}

/* ── hero ──────────────────────────────────────────────── */
.hv-hero .hv-inner{grid-template-columns:1.05fr .95fr;align-items:center;gap:clamp(24px,3vw,56px)}
.hv-hero-copy{display:grid;gap:clamp(16px,2vw,26px);align-content:center}
.hv-hero-visual{position:relative;justify-self:center;width:100%;max-width:440px}
.hv-hero-visual img,.hv-hero-visual video{
  width:100%;height:auto;max-height:min(56dvh,520px);object-fit:contain;
  filter:drop-shadow(0 26px 46px rgba(4,16,28,.45));
}
.hv-hero-visual::before{
  content:"";position:absolute;inset:-14px -22px;pointer-events:none;
  border:1px dashed rgba(120,180,210,.32);border-radius:2px;
}
.hv-trust{display:flex;flex-wrap:wrap;gap:8px 20px;padding-top:4px}
.hv-trust span{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;color:#8fa8bd}
.hv-trust b{color:var(--accent);font-size:11px}
.t-light .hv-trust span,.t-soft .hv-trust span{color:var(--ink-mute)}

/* blueprint stand-in when no media is uploaded */
.hv-blueprint{
  position:relative;aspect-ratio:3/4;width:100%;max-width:330px;margin-inline:auto;
  border:1px solid rgba(120,180,210,.45);border-radius:2px;
  background:repeating-linear-gradient(0deg,transparent 0 15px,rgba(120,180,210,.09) 15px 16px);
  display:grid;place-items:center;
}
.hv-blueprint::before{content:"";position:absolute;inset:16%;border:1px solid rgba(120,180,210,.55)}
.hv-blueprint::after{content:"";position:absolute;left:50%;top:8%;bottom:8%;width:1px;background:repeating-linear-gradient(180deg,rgba(231,133,205,.6) 0 7px,transparent 7px 14px)}
.hv-blueprint i{position:relative;font-family:var(--mono);font-size:9.5px;letter-spacing:.2em;color:rgba(160,200,225,.75);font-style:normal;text-align:center;line-height:2}

/* ── split (content / media blocks) ────────────────────── */
.hv-split .hv-inner{grid-template-columns:1fr .85fr;align-items:center;gap:clamp(24px,3.4vw,56px)}
.hv-split.rev .hv-inner{grid-template-columns:.85fr 1fr}
.hv-split.rev .hv-copy{order:2}
.hv-copy{display:grid;gap:clamp(14px,1.8vw,22px);align-content:center}
.hv-media{position:relative}
.hv-media img,.hv-media video{width:100%;border-radius:2px;border:1px solid var(--rule-strong);max-height:min(58dvh,540px);object-fit:cover}
.hv-placeholder{
  aspect-ratio:4/3;border:1px dashed var(--rule-strong);border-radius:2px;
  display:grid;place-content:center;justify-items:center;gap:8px;color:var(--ink-mute);
  background:repeating-linear-gradient(135deg,transparent 0 9px,rgba(157,176,194,.13) 9px 10px);
}
.hv-placeholder span{font-family:var(--mono);font-size:15px;font-weight:600;letter-spacing:.1em}
.hv-placeholder b{font-family:var(--mono);font-size:9px;letter-spacing:.22em;font-weight:400}
.t-dark .hv-placeholder,.t-accent .hv-placeholder{border-color:#2c4a66;color:#7f9ab0}

/* ── steps ─────────────────────────────────────────────── */
.hv-steps-list{display:grid;gap:0;border-top:1px solid var(--rule)}
.hv-steps-list article{
  display:grid;grid-template-columns:auto 1fr;gap:18px;align-items:start;
  padding:clamp(13px,1.6vw,21px) 4px;border-bottom:1px solid var(--rule);
}
.hv-steps-list article>span{
  font-family:var(--mono);font-size:11px;font-weight:600;color:var(--accent);
  padding-top:5px;letter-spacing:.06em;
}
.hv-steps-list h3{margin:0 0 4px;font-size:16px;font-weight:700;line-height:1.6}
.hv-steps-list p{margin:0;font-size:13.5px;line-height:1.95;color:var(--ink-soft);font-weight:300;max-width:62ch}
.t-dark .hv-steps-list,.t-accent .hv-steps-list,
.t-dark .hv-steps-list article,.t-accent .hv-steps-list article{border-color:#22384d}
.t-dark .hv-steps-list p,.t-accent .hv-steps-list p{color:#9fb6c8}

/* ── cta ───────────────────────────────────────────────── */
.hv-cta-panel .hv-inner{justify-items:center;text-align:center;max-width:760px;margin-inline:auto}
.hv-cta-panel h2{max-width:17ch}
.hv-cta-panel .hv-lede{margin-inline:auto}

/* ── shaft rail ────────────────────────────────────────── */
.hv-shaft{
  position:absolute;inset-block:var(--pad);inset-inline-start:0;width:var(--rail);
  padding-inline-start:var(--pad);
  display:flex;flex-direction:column;justify-content:space-between;
}
.hv-shaft-cap,.hv-shaft-foot{
  font-family:var(--mono);font-size:8.5px;letter-spacing:.2em;
  color:var(--ink-mute);text-transform:uppercase;white-space:nowrap;
}
/* column-reverse: stop 01 (the hero) sits at the pit end and later stops stack
   upward toward overhead, so the car reads as departing from the ground floor
   and climbing — not descending from the roof — while stop order in the
   markup (and so tab order) stays 01, 02, 03… top-down in the source. */
.hv-levels{position:relative;flex:1;display:flex;flex-direction:column-reverse;justify-content:space-between;padding-block:14px;margin-inline-start:6px}
.hv-levels::before{
  content:"";position:absolute;inset-block:0;inset-inline-start:13px;width:2px;
  background:linear-gradient(180deg,transparent,var(--rule-strong) 12px,var(--rule-strong) calc(100% - 12px),transparent);
}
.hv-level{
  position:relative;display:flex;align-items:center;gap:10px;
  background:none;border:0;padding:3px 0;cursor:pointer;text-align:start;z-index:1;
}
.hv-level em{position:relative;flex:none;width:28px;height:1px;background:var(--rule-strong);transition:background .3s}
.hv-level b{font-family:var(--mono);font-size:9.5px;font-weight:600;letter-spacing:.08em;color:var(--ink-mute);transition:color .3s;flex:none}
.hv-level span{font-size:11.5px;color:var(--ink-mute);white-space:nowrap;opacity:0;transform:translateX(6px);transition:opacity .3s,transform .3s}
.hv-level:hover span,.hv-level.is-active span{opacity:1;transform:none}
.hv-level:hover em,.hv-level.is-active em{background:var(--accent)}
.hv-level:hover b{color:var(--ink)}
.hv-level.is-active b{color:var(--mark)}

/* the car — the single bold element */
.hv-car{
  position:absolute;inset-inline-start:6px;top:0;width:16px;height:26px;border-radius:2px;
  background:var(--ink);border:1px solid var(--accent);
  box-shadow:0 0 0 3px rgba(24,179,191,.14),0 6px 14px rgba(4,16,28,.28);
  transition:transform .62s cubic-bezier(.5,.05,.2,1);
  pointer-events:none;z-index:2;display:grid;place-items:center;
}
.hv-car::before{content:"";width:8px;height:14px;border-inline:1px solid rgba(24,179,191,.8)}
.hv-travel{
  position:absolute;inset-inline-start:13px;top:0;width:2px;height:0;
  background:var(--accent);z-index:1;opacity:.6;
}

/* ── footer ────────────────────────────────────────────── */
.hv-foot{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:12px var(--pad);border-top:1px solid var(--rule);
  font-family:var(--mono);font-size:9px;letter-spacing:.16em;color:var(--ink-mute);text-transform:uppercase;
}
.hv-foot span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ── entrance stagger (CSS only) ───────────────────────── */
.hv-panel.is-active .hv-anim{animation:hv-descend .58s cubic-bezier(.22,.9,.3,1) backwards}
.hv-panel.is-active .hv-anim:nth-child(1){animation-delay:.06s}
.hv-panel.is-active .hv-anim:nth-child(2){animation-delay:.13s}
.hv-panel.is-active .hv-anim:nth-child(3){animation-delay:.2s}
.hv-panel.is-active .hv-anim:nth-child(4){animation-delay:.27s}
.hv-panel.is-active .hv-anim:nth-child(5){animation-delay:.34s}
@keyframes hv-descend{from{opacity:0;transform:translate3d(0,-16px,0)}to{opacity:1;transform:none}}

/* ── responsive ────────────────────────────────────────── */
@media (max-width:1080px){
  .hv-hero .hv-inner,.hv-split .hv-inner,.hv-split.rev .hv-inner{grid-template-columns:1fr}
  .hv-split.rev .hv-copy{order:0}
  .hv-panel h1{max-width:none}

  /* Stacked layout: the copy takes what it needs, the visual absorbs exactly
     what is left. minmax(0,1fr) lets that row shrink below the image's
     intrinsic height, so the panel never has to scroll. */
  /* height, not min-height: 1fr only bounds the visual if the grid itself has
     a definite height, otherwise the row grows to the image and overflows. */
  .hv-hero .hv-inner{height:100%;grid-template-rows:auto minmax(0,1fr);align-content:stretch}
  /* width:auto so the box hugs the (now height-driven) image and the dashed
     drawing frame stays tight around it instead of the whole column */
  .hv-hero-visual{width:auto;max-width:100%;min-height:0;align-self:stretch;display:flex;align-items:center;justify-content:center}
  .hv-hero-visual img,.hv-hero-visual video{height:100%;max-height:none;width:auto;max-width:100%;object-fit:contain}
  .hv-blueprint{height:100%;width:auto;max-height:100%;aspect-ratio:3/4}

  .hv-split .hv-inner{height:100%;grid-template-rows:auto minmax(0,1fr);align-content:stretch}
  .hv-media{min-height:0;align-self:stretch;display:flex;align-items:center;justify-content:center}
  .hv-media img,.hv-media video{height:100%;max-height:none;width:auto;max-width:100%;object-fit:contain}
  .hv-placeholder{height:100%;max-height:100%;width:auto;aspect-ratio:4/3}
}
@media (max-width:860px){
  /* The shaft stays vertical on the leading edge at every size — only its
     width and labels shrink. Rail centre stays at x=14 so the car, the tick
     line and the travel fill keep sharing one axis. */
  :root{--rail:62px;--top:58px}
  .hv-shaft{padding-inline-start:10px}
  .hv-shaft-cap,.hv-shaft-foot{font-size:7px;letter-spacing:.1em}
  /* the car is wider than the tick, so the gap must clear the car, not the tick */
  .hv-level{gap:12px}
  .hv-level em{width:12px}
  .hv-level span{display:none}
  .hv-car{inset-inline-start:7px;width:14px;height:22px}
  .hv-car::before{width:7px;height:12px}
  .hv-nav{flex:none}
  .hv-nav a{padding:7px 10px;font-size:12.5px;white-space:nowrap}
  .hv-brand{flex:1 1 auto;overflow:hidden}
  .hv-brand small{display:none}
  .hv-foot{font-size:8px;letter-spacing:.1em}
}
@media (max-width:520px){
  .hv-brand img{height:24px}
  .hv-brand strong{font-size:12.5px}
  .hv-nav a{padding:7px 9px;font-size:12px}
  .hv-nav a.hv-cta{padding:9px 13px}
  .hv-panel h1{font-size:clamp(21px,6.4vw,28px)}
  .hv-trust{gap:6px 14px}
  .hv-trust span{font-size:11.5px}
  .hv-btn{padding:11px 18px;font-size:13.5px;flex:1 1 auto;justify-content:center}
  .hv-foot span:last-child{display:none}
}

/* Short viewports: the copy column, not the image, is what overflows here,
   so tighten the type scale and rhythm rather than shrinking the visual. */
@media (max-height:760px){
  .hv-panel h1{font-size:clamp(23px,2.6vw,34px)}
  .hv-panel h2{font-size:clamp(20px,2.1vw,28px)}
  .hv-lede{font-size:14.5px;line-height:1.85}
  .hv-inner{gap:14px;padding:clamp(18px,2.4vw,34px)}
  .hv-hero-copy,.hv-copy{gap:13px}
  .hv-btn{padding:11px 20px;font-size:14px}
  .hv-trust{gap:6px 16px}
  .hv-trust span{font-size:12px}
  .hv-steps-list article{padding-block:11px}
  .hv-steps-list p{font-size:13px;line-height:1.8}
}
@media (max-height:600px){
  .hv-panel h1{font-size:clamp(21px,2.2vw,28px)}
  .hv-inner{gap:11px;padding:clamp(16px,2vw,26px)}
  .hv-trust{display:none}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;transition-duration:.001ms!important}
}
