/* ==========================================================================
   Homepage hero - the desk photo zoom (assets/js/hero-zoom.js)
   On each page load a short scroll zooms the desk photo into the laptop, the photo
   dissolves, the app floats free and glides right on its own, and the page lands on
   the features panel below. After that the hero is a still until the next load.
   Night colours come from the design system's dark set (--d-*) in foundre.css.
   ========================================================================== */

/* keep the scrollbar's space reserved, so locking the scroll during the glide never changes the page width */
html{scrollbar-gutter:stable}
html.hz-locked{overflow:hidden}

/* ---------- header: dark glass while it sits over the night hero and the features panel ---------- */
.site-header .wrap{transition:background-color .25s ease,border-color .25s ease,box-shadow .25s ease}
.site-header.hz-dark .wrap{
  background:rgba(18,15,34,.62);border-color:rgba(255,255,255,.13);box-shadow:0 10px 34px rgba(10,10,14,.30)
}
.site-header.hz-dark .nav-toggle{color:var(--d-text)}
.site-header.hz-dark .nav-toggle:hover{background:rgba(255,255,255,.09)}
/* desktop links sit on the bar itself; on phones they open in the white menu panel, which keeps its colours */
@media (min-width:901px){
  .site-header.hz-dark .nav a{color:rgba(237,235,247,.82)}
  .site-header.hz-dark .nav a:hover,.site-header.hz-dark .nav a[aria-current="page"]{color:var(--d-text)}
  .site-header.hz-dark .nav a:hover{background:rgba(255,255,255,.09)}
  .site-header.hz-dark .nav a[aria-current="page"]{background:rgba(255,255,255,.12)}
  .site-header.hz-dark .nav a.btn-app,.site-header.hz-dark .nav a.btn-app:hover{color:var(--on-action);background:var(--action)}
  .site-header.hz-dark .nav a.btn-app:hover{background:var(--action-hover)}
}

/* ---------- hero ---------- */
.hz-hero{position:relative;height:100vh;padding:0;background:var(--d-base);color:var(--d-text)}
.hz-hero.hz-intro{height:200vh}
.hz-stage{position:sticky;top:0;height:100vh;overflow:hidden;background:var(--d-base)}
/* the photo is laid out at its own pixel size and placed with one transform, so the zoom is exact */
.hz-photo{position:absolute;left:0;top:0;width:2000px;height:1131px;max-width:none;transform-origin:0 0;will-change:transform,opacity,filter}
.hz-shade{position:absolute;inset:0 0 45% 0;pointer-events:none;
  background:linear-gradient(to bottom,rgba(18,15,34,.72) 0%,rgba(18,15,34,.38) 45%,rgba(18,15,34,0) 100%)}

/* app screenshots: one set of rules for the box on the laptop and for the panel in the features section */
.hz-shots{position:relative;overflow:hidden;background:#fff}
.hz-shot{position:absolute;inset:0;width:100%;height:100%;max-width:none;display:block;opacity:0;transition:opacity .45s ease}
.hz-shot.is-on{opacity:1}
.hz-shot.cover{object-fit:cover;object-position:left top}
.hz-shot.contain{object-fit:contain;background:#fff}
.hz-shot.doc{object-fit:contain;background:var(--surface-muted);padding:3.46% 0}

/* the sharp app over the laptop's screen in the photo: a 1617x986 box placed onto the screen's corners,
   which later floats free as the panel */
.hz-screen{position:absolute;left:0;top:0;width:1617px;height:986px;transform-origin:0 0;pointer-events:none;will-change:transform;z-index:3}

/* where the floating panel sits mid-way, and where it lands; .hz-panel-pos is shared with the features panel */
.hz-slot{position:absolute;aspect-ratio:1617/986;max-width:100%;pointer-events:none;visibility:hidden}
.hz-slot-center{left:50%;top:50%;width:min(84vw,1120px,calc((100vh - 170px) * 1.64));transform:translate(-50%,-44%)}
.hz-panel-pos{position:absolute;left:47%;top:50%;width:min(66vw,1120px);aspect-ratio:1617/986;transform:translateY(-46%)}

.hz-copy{position:absolute;inset:0;display:flex;justify-content:center;z-index:4;padding:calc(var(--header-h) + 36px) var(--s6) 0}
.hz-copy-in{max-width:760px;text-align:center;display:flex;flex-direction:column;align-items:center;will-change:opacity,filter}
.hz-copy-in h1{color:var(--d-text);max-width:19ch;margin:0;text-wrap:balance}
.hz-copy-in .lead{color:var(--d-text-secondary);max-width:56ch;margin:20px auto 0;text-wrap:balance}
.hz-copy-in .hero-actions{justify-content:center;width:100%;max-width:640px;margin-top:var(--s8)}
.hz-copy-in .search-note{margin:var(--s3) auto 0;color:var(--d-text-muted)}

.hz-cue{position:absolute;left:50%;bottom:calc(28px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:4;
  font-family:var(--font-mono);font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:var(--d-text-muted);
  display:none;flex-direction:column;align-items:center;gap:8px}
.hz-hero.hz-intro .hz-cue{display:flex}
.hz-cue i{width:1px;height:28px;background:linear-gradient(var(--d-text-muted),transparent);animation:hz-drip 1.8s ease-in-out infinite}
@keyframes hz-drip{0%{transform:scaleY(0);transform-origin:top}50%{transform:scaleY(1);transform-origin:top}51%{transform-origin:bottom}100%{transform:scaleY(0);transform-origin:bottom}}

/* ---------- features panel ---------- */
/* padding:0 - the site pads sections, which would push the pinned frame off the glide's landing spot */
.hz-features{position:relative;height:100vh;padding:0;background:var(--d-base);color:var(--d-text)}
/* first pass: taller, so scrolling steps through the four features while the frame stays pinned */
.hz-features.hz-steps{height:calc(100vh + 4 * 30vh)}
.hz-features-pin{position:sticky;top:0;height:100vh;overflow:hidden}
.hz-panel{border-radius:14px;box-shadow:0 0 0 1px rgba(255,255,255,.14),0 30px 80px rgba(0,0,0,.5)}
/* tells the visitor a screenshot shows an invented example property, not real data */
.hz-example-tag{position:absolute;left:14px;bottom:14px;z-index:2;padding:7px 11px;border-radius:var(--r-pill);
  font-size:12px;font-weight:500;line-height:1;color:var(--d-text);background:rgba(18,15,34,.8);
  border:1px solid rgba(255,255,255,.16);opacity:0;transition:opacity .3s ease;pointer-events:none}
.hz-panel.is-example .hz-example-tag{opacity:1}
.hz-feats{position:absolute;z-index:4;top:50%;transform:translateY(-50%);
  left:max(var(--s6),calc(50% - 590px + var(--s6)));width:min(38%,440px);
  display:flex;flex-direction:column;gap:28px}
.hz-feats h2{margin:0;color:var(--d-text);font-size:clamp(26px,2.6vw,34px);line-height:1.12;letter-spacing:-.03em;text-wrap:balance}
.hz-feats .hz-sub{margin:8px 0 0;color:var(--d-text-secondary);font-size:16px}
.hz-feat-list{list-style:none;margin:0;padding:0;border-top:1px solid var(--d-border)}
.hz-feat{border-bottom:1px solid var(--d-border)}
.hz-feat button{all:unset;box-sizing:border-box;cursor:pointer;display:block;width:100%;padding:14px 0 14px 18px;position:relative}
.hz-feat button:focus-visible{outline:2px solid var(--d-primary);outline-offset:2px}
.hz-feat button::before{content:"";position:absolute;left:0;top:23px;width:6px;height:6px;border-radius:50%;background:var(--d-primary);opacity:0;transition:opacity .25s}
.hz-feat .t{display:block;color:var(--d-text-muted);font-size:16px;font-weight:500;transition:color .25s}
.hz-feat .d{display:grid;grid-template-rows:0fr;transition:grid-template-rows .35s ease,opacity .35s;opacity:0}
.hz-feat .d > span{overflow:hidden;color:var(--d-text-secondary);font-size:15px;line-height:1.55}
.hz-feat.is-on button::before{opacity:1}
.hz-feat.is-on .t{color:var(--d-text)}
.hz-feat.is-on .d{grid-template-rows:1fr;opacity:1}
.hz-feat.is-on .d > span{padding-top:6px}
.hz-feat-more{margin:0}
.hz-feat-more .btn:focus-visible{outline:2px solid var(--d-primary);outline-offset:2px}
/* the copy of the features text that arrives inside the hero stage during the glide */
.hz-stage .hz-feats{opacity:0;pointer-events:none;will-change:opacity}

@media (max-width:900px){
  .hz-panel-pos{left:var(--s6);right:var(--s6);width:auto;top:var(--header-h);transform:none}
  .hz-feats{top:calc(var(--header-h) + (100vw - 2 * var(--s6)) / 1.64 + 24px);transform:none;width:auto;right:var(--s6);gap:16px}
  .hz-feats .hz-sub{display:none}
  .hz-feats h2{font-size:24px}
  .hz-feat button{padding-block:10px}
  .hz-feat button::before{top:19px}
}
@media (max-width:560px){
  /* phones crop the photo close around the laptop: lift the copy, and drop the note that would sit on the screen */
  .hz-copy{padding-top:calc(var(--header-h) + 16px)}
  .hz-copy-in .search-note{display:none}
}
/* phones: the features neither pin nor step (hero-zoom.js), so the section is ordinary flow -
   the screenshot, then the list and the button - and grows to fit rather than clipping at one screen */
@media (max-width:600px){
  .hz-features{height:auto}
  .hz-features-pin{position:relative;height:auto;overflow:visible;display:flex;flex-direction:column;gap:28px;
    padding:48px var(--s6) 64px}
  .hz-features-pin .hz-panel-pos{position:relative;left:auto;right:auto;top:auto;width:100%;transform:none}
  .hz-features-pin .hz-feats{position:relative;top:auto;left:auto;right:auto;width:auto;transform:none}
}
/* a phone photo moved down below the buttons: its top edge fades into the dark ground */
.hz-hero.hz-intro.hz-short .hz-cue{display:none}
.hz-photo.is-dropped{-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 22%);mask-image:linear-gradient(to bottom,transparent 0,#000 22%)}
@media (prefers-reduced-motion:reduce){
  .hz-cue{display:none}
  .hz-cue i{animation:none}
  .hz-shot,.hz-feat .d{transition:none}
}

/* ---------- Type any address (assets/js/hero-search.js) ----------
   The site's own .search pill (foundre.css), the hero's first action. The list of
   suggestions drops over the photo below it, solid Night surface so nothing reads through it. */
/* z-index: the pill's blur makes it its own layer, so the list inside it is drawn only as high as the pill is */
.hz-copy-in .hero-search{position:relative;z-index:5;width:100%;max-width:640px;margin-top:var(--s8);text-align:left}
.hz-copy-in .hero-search + .hero-actions{margin-top:var(--s4)}
.hero-search input[type=search]{-webkit-appearance:none;appearance:none;min-width:0}
.hero-search input::-webkit-search-cancel-button{filter:grayscale(1) brightness(2.2);opacity:.6;cursor:pointer}
.hero-suggestions{
  position:absolute;left:0;right:0;top:calc(100% + 8px);z-index:6;margin:0;padding:6px;list-style:none;
  max-height:min(360px,48vh);overflow:auto;border-radius:16px;
  background:var(--d-surface);
  border:1px solid rgba(255,255,255,.14);box-shadow:0 22px 50px rgba(10,10,14,.5)
}
.hero-suggestions li{display:flex;flex-direction:column;gap:2px;padding:10px 14px;border-radius:10px;cursor:pointer;color:var(--d-text)}
.hero-suggestions li:hover,.hero-suggestions li[aria-selected=true]{background:rgba(255,255,255,.10)}
.hero-suggestions .hs-name{font-size:15px;font-weight:500;line-height:1.3}
.hero-suggestions .hs-where{font-size:12.5px;color:var(--d-text-muted);line-height:1.3}
.hz-copy-in .hero-search-notice{max-width:560px;margin:var(--s3) auto 0;font-size:13px;line-height:1.4;color:var(--d-text-secondary);text-align:center}
.hero-search-notice[hidden]{display:none}
@media (max-width:560px){
  .hz-copy-in .hero-search{margin-top:var(--s6)}
  .hz-copy-in .hero-search input{font-size:16px}
}
