/* Hero, after Keyrate: one scene in Doorstock's own objects. A sectional garage door stands under the title and lifts
   as you scroll, the way a shop opens in the morning. Parts drift around it at three depths: torsion springs, rollers,
   hinges and boxes. The ones running low keep a blue ring, like the low-stock list. hero.js moves each layer at its
   own scroll speed and writes the shop's day into the readout under the buttons. */
.lp-hero { isolation: isolate; overflow: hidden; justify-content: flex-start; min-height: min(100svh, 980px);
           padding-top: clamp(96px, 16vh, 168px); padding-bottom: clamp(220px, 34vh, 360px);
           --p: clamp(46px, 8.4vw, 112px); }
.lp-hero .hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }

/* the ground: a sectional door, four rows of raised panels, tilted back and feathered at the edges */
.backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
            -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 84%, transparent); }
.backdrop::after { content: ""; position: absolute; inset: 0;
            background: radial-gradient(ellipse 44% 36% at 50% 34%, color-mix(in srgb, var(--bg) 92%, transparent),
                        color-mix(in srgb, var(--bg) 55%, transparent) 70%, color-mix(in srgb, var(--bg) 18%, transparent)); }
.ground { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; will-change: transform;
          -webkit-mask-image: radial-gradient(ellipse 62% 90% at 50% 60%, #000 58%, transparent 100%);
          mask-image: radial-gradient(ellipse 62% 90% at 50% 60%, #000 58%, transparent 100%); }
.door { display: flex; flex-direction: column; gap: calc(var(--p) * .06); padding: calc(var(--p) * .12);
        border: 1px solid var(--border); border-bottom: 0; border-radius: calc(var(--p) * .1) calc(var(--p) * .1) 0 0;
        background: color-mix(in srgb, var(--bg2) 70%, var(--bg));
        transform: perspective(1800px) rotateX(18deg); transform-origin: 50% 100%; }
.door-row { display: flex; gap: calc(var(--p) * .1); padding: calc(var(--p) * .1);
            border: 1px solid var(--border); border-radius: calc(var(--p) * .05); background: var(--bg2);
            box-shadow: 0 calc(var(--p) * .03) 0 var(--border); }
.door-row i { width: calc(var(--p) * 1.55); height: calc(var(--p) * .62); border-radius: calc(var(--p) * .05);
              border: 1px solid var(--border); background: var(--bg);
              box-shadow: inset 0 calc(var(--p) * .025) 0 var(--border); }
.door-row.windows i { background: color-mix(in srgb, var(--blue) 10%, var(--bg)); border-color: color-mix(in srgb, var(--blue) 24%, var(--border)); }
.door-row.handle { position: relative; }
.door-row.handle::after { content: ""; position: absolute; left: 50%; bottom: calc(var(--p) * .16); width: calc(var(--p) * .7);
                          height: calc(var(--p) * .09); translate: -50% 0; border-radius: 99px; background: var(--border2, var(--border)); }

/* the sky: loose parts at three depths */
.sky { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden;
       -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.sky .layer { position: absolute; inset: 0; will-change: transform; }
.part { position: absolute; width: var(--s); height: var(--s); color: var(--text3); animation: drift ease-in-out infinite alternate; }
.part svg { width: 100%; height: 100%; display: block; overflow: visible; }
.part.low { color: var(--blue); }
.part.low::after { content: ""; position: absolute; inset: -14%; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--blue) 55%, transparent); }
.sky .far .part { filter: blur(.8px); opacity: .7; }
.sky .near .part { filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .12)); }
@keyframes drift { from { transform: translateY(-10px) rotate(var(--r)); } to { transform: translateY(10px) rotate(calc(var(--r) + 10deg)); } }

@media (max-width: 560px) { .lp-hero { --p: 15vw; } .door { transform: perspective(900px) rotateX(16deg); } .door-row i:nth-child(n+4) { display: none; } }
@media (prefers-reduced-motion: reduce) { .part { animation: none; } }
#lp-bg { display: none; } /* the shared bars field; the door scene replaces it */

/* type rhythm, as on Keyrate */
.lp-hero h1 { font-size: clamp(2.75rem, 7.2vw, 5.25rem); letter-spacing: -.028em; line-height: 1.04; margin-top: 0; }
.lp-hero .lp-lede { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); margin-top: 16px; letter-spacing: -.005em; max-width: 40ch; }
.lp-hero .lp-cta { margin-top: 32px; }
.lp-hero .lp-btn { padding: 12px 22px; font-size: 1rem; }

/* top bar: the logo left, the store right; it sits over the hero and scrolls away with it */
.topbar { position: absolute; z-index: 10; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between;
          padding: 16px clamp(16px, 3vw, 32px); }
.topbar a:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.tb-brand { display: flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 650; font-size: 1.0625rem; letter-spacing: -.01em; }
.tb-brand img { border-radius: 8px; display: block; }
.tb-btn { display: inline-flex; align-items: center; min-height: 40px; font-size: .9375rem; font-weight: 600; padding: 0 16px; border-radius: 999px;
          line-height: 1; background: var(--text); color: var(--bg); }
.tb-btn:hover { opacity: .88; }
@media (max-width: 380px) { .tb-brand span { display: none; } }

/* the readout: parts on the shelf, and what just happened in the shop */
.lp-hero .demo { margin-top: 32px; display: flex; align-items: center; gap: 12px; max-width: min(92vw, 640px);
                 font-size: 1rem; color: var(--text2); white-space: nowrap; }
.demo-count { flex: none; font-variant-numeric: tabular-nums; padding: 4px 10px; border-radius: 999px; font-size: .8125rem;
              background: color-mix(in srgb, var(--blue) 12%, transparent); color: var(--blue-ink); font-weight: 600; }
.demo-count b { display: inline-block; min-width: 3ch; text-align: right; font-weight: 700; }
.demo-line { overflow: hidden; text-overflow: ellipsis; min-height: 1.6em; }
.demo-line::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 1px; vertical-align: -.18em; background: var(--blue); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 560px) { .lp-hero .demo { font-size: .875rem; } }
@media (prefers-reduced-motion: reduce) { .lp-hero .demo { display: none; } }
