/* Home page. Uses the tokens in style.css; scroll reveals come from motion.js, the rest from light.js. */

/* opening */
.hm-hero{padding-top:clamp(36px,4.5vw,64px)}
.hm-hero h1{font:300 clamp(44px,7.1vw,108px)/1.02 var(--serif);letter-spacing:-.025em;text-wrap:balance}
.hm-hero h1 em{font-style:italic;font-weight:300;color:var(--accent)}
.wsplit .w{display:inline-block;overflow:hidden;vertical-align:top;padding:0 .07em .16em;margin:0 -.07em -.16em}
.wsplit .w > span{display:inline-block}
.wsplit .w:has(em){padding-right:.24em;margin-right:-.24em}
.hm-sub{display:grid;gap:28px;margin-top:clamp(26px,3vw,44px)}
.hm-sub .lede{margin:0;max-width:44ch}
@media (min-width:961px){.hm-sub{grid-template-columns:7fr 5fr;column-gap:var(--col-gap);align-items:end}.hm-sub .cta{justify-content:flex-end}}

/* opening image */
.hm-stage{padding-top:clamp(40px,5vw,72px);padding-bottom:clamp(64px,8vw,120px);perspective:1500px}
.hm-stagew{overflow:clip}
.hm-stage figure{position:relative;margin:0}
.hm-b{transform-origin:50% 0}
.hm-b{border-radius:14px;overflow:hidden;border:1px solid var(--line);background:#0b0c0f}
.hm-b img{display:block;width:100%;height:auto}
.hm-stage figcaption{margin-top:18px;font-size:14px;color:var(--muted)}

/* statement: words light up as it scrolls */
.hm-say{border-top:0;padding:clamp(80px,11vw,170px) 0}
.hm-say p{font:300 clamp(30px,4.6vw,66px)/1.18 var(--serif);letter-spacing:-.015em;max-width:22ch}
.hm-say .eyebrow{font:500 12px/1.4 var(--sans);letter-spacing:.2em;max-width:none;margin-bottom:28px}

/* services: panels that open */
.hm-svc{background:var(--bg-2)}
.hm-panels{display:flex;gap:16px;height:clamp(460px,52vw,640px)}
.hm-panel{position:relative;flex:1 1 0;min-width:0;display:flex;align-items:flex-end;overflow:hidden;border-radius:12px;border:1px solid var(--line);color:#f1ede6;text-decoration:none;background:#0b0d10;transition:flex-grow .7s cubic-bezier(.2,.7,.2,1)}
.hm-panel img{position:absolute;inset:0 0 auto;width:100%;height:62%;object-fit:cover;object-position:left top;transform-origin:50% 0;transition:transform 1s cubic-bezier(.2,.7,.2,1)}
.hm-panel::before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(0deg,#0b0d10 38%,rgba(11,13,16,.55) 48%,rgba(11,13,16,0) 66%)}
.hm-panel::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;z-index:3;background:#f79e2a;transform:scaleX(0);transform-origin:left;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.hm-panel:hover::after,.hm-panel:focus-visible::after{transform:scaleX(1)}
.hm-panel:hover img,.hm-panel:focus-visible img{transform:scale(1.04)}
.hm-panel > div{position:relative;z-index:2;width:100%;padding:clamp(24px,3vw,44px)}
.hm-panel .n{font:400 14px var(--sans);color:#d9d5cd}
.hm-panel h3{font:300 clamp(40px,5vw,76px)/1 var(--serif);letter-spacing:-.02em;margin:10px 0 14px}
.hm-panel p{max-width:38ch;color:#d9d5cd}
.hm-go{display:inline-flex;align-items:center;gap:10px;margin-top:22px;font:600 15px var(--sans);color:#f79e2a}
.hm-go i{font-style:normal;transition:transform .3s}
.hm-panel:hover .hm-go i{transform:translateX(6px)}
.hm-panel:focus-visible{outline-offset:-4px}
@media (hover:hover) and (min-width:861px){.hm-panel:hover,.hm-panel:focus-visible{flex-grow:1.7}}
@media (max-width:860px){.hm-panels{flex-direction:column;height:auto}.hm-panel{flex:none;min-height:500px}.hm-panel img{height:52%}.hm-panel::before{background:linear-gradient(0deg,#0b0d10 48%,rgba(11,13,16,0) 68%)}}
.hm-more{display:grid;gap:28px;margin-top:clamp(40px,5vw,72px)}
.hm-more ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:10px}
.hm-more li a{display:inline-flex;gap:10px;padding:13px 20px;border:1px solid color-mix(in srgb,var(--text) 24%,transparent);border-radius:999px;text-decoration:none;font-size:16px;transition:background .25s,border-color .25s,color .25s}
.hm-more li a:hover,.hm-more li a:focus-visible{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
@media (min-width:961px){.hm-more{grid-template-columns:5fr 7fr;column-gap:var(--col-gap);align-items:start}}

/* doors to the other pages */
.hm-doors ul{list-style:none;margin:0;padding:0;display:grid;gap:clamp(40px,5vw,56px) 24px}
.hm-door{display:block;text-decoration:none}
.hm-door .clip-in{position:relative;border-radius:12px;overflow:hidden;border:1px solid var(--line);aspect-ratio:3/2;background:#0f1114}
.hm-door img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .9s cubic-bezier(.2,.7,.2,1)}
.hm-door:hover img{transform:scale(1.05)}
.hm-arrow{position:absolute;right:18px;bottom:18px;display:grid;place-items:center;width:58px;height:58px;border-radius:50%;background:#f79e2a;color:#1a1000;font-size:22px;font-style:normal;transform:scale(0);transition:transform .4s cubic-bezier(.2,.9,.3,1.2)}
.hm-door:hover .hm-arrow,.hm-door:focus-visible .hm-arrow{transform:none}
.hm-door .k{display:block;font:500 12px var(--sans);letter-spacing:.2em;text-transform:uppercase;color:var(--accent);margin:20px 0 8px}
.hm-door b{display:block;font:400 clamp(24px,2.5vw,36px)/1.18 var(--serif);max-width:20ch;transition:color .2s}
.hm-door:hover b{color:var(--accent)}
@media (hover:none){.hm-arrow{transform:none;width:46px;height:46px}}
@media (min-width:861px){
  .hm-doors ul{grid-template-columns:7fr 5fr;column-gap:var(--col-gap)}
  .hm-doors li:first-child{grid-row:span 2}
  .hm-doors li:first-child .hm-door{position:sticky;top:104px}
  .hm-doors li:first-child .clip-in{aspect-ratio:4/5;max-height:74vh;width:100%}
}

/* closing */
.hm-end{padding:clamp(90px,12vw,190px) 0}
.hm-end h2{font:300 clamp(46px,8.6vw,132px)/1 var(--serif);letter-spacing:-.025em;max-width:11ch;text-wrap:balance}
.hm-end h2 em{font-style:italic;font-weight:300;color:var(--accent)}
.hm-end .cta{margin-top:clamp(34px,4vw,56px)}
.hm-end .btn{padding:18px 32px;font-size:17px}

/* ---- motion ---- */
@media (prefers-reduced-motion:no-preference){
  .hm-hero .eyebrow{animation:hero-up .6s cubic-bezier(.2,.7,.2,1) both}
  .hm-hero h1 .w > span{animation:sv-word .9s cubic-bezier(.16,.8,.24,1) calc(.08s + var(--i,0)*.055s) both}
  .hm-sub .lede{animation:hero-up .7s cubic-bezier(.2,.7,.2,1) .6s both}
  .hm-sub .cta{animation:hero-up .7s cubic-bezier(.2,.7,.2,1) .7s both}
  .hm-stage figure{animation:hm-rise 1s cubic-bezier(.2,.7,.2,1) .55s both}
  .hm-end.a-wait{opacity:1}
  .hm-end.a-wait .w > span{transform:translateY(112%)}
  .hm-end.a-wait .eyebrow,.hm-end.a-wait .cta{opacity:0}
  .hm-end.a-in{animation:none}
  .hm-end.a-in .w > span{animation:sv-word .9s cubic-bezier(.16,.8,.24,1) calc(var(--i,0)*.07s) backwards}
  .hm-end.a-in .eyebrow{animation:hero-up .6s cubic-bezier(.2,.7,.2,1) backwards}
  .hm-end.a-in .cta{animation:hero-up .7s cubic-bezier(.2,.7,.2,1) .45s backwards}
  @supports (animation-timeline:view()){
    .hm-b{animation:hm-tilt linear both;animation-timeline:view();animation-range:entry 0% cover 42%}
    .hm-doors li:nth-child(n+2) img{animation:hm-settle linear both;animation-timeline:view();animation-range:entry 0% cover 45%}
  }
}
@keyframes hm-rise{from{opacity:0;transform:translateY(60px)}to{opacity:1;transform:none}}
@keyframes hm-tilt{from{transform:rotateX(16deg) scale(.93)}to{transform:none}}
@keyframes hm-settle{from{scale:1.1}to{scale:1}}
@media (prefers-reduced-motion:reduce){
  .hm-panel,.hm-panel img,.hm-door img,.hm-arrow,.hm-go i{transition:none}
  .hm-panel:hover img,.hm-door:hover img,.hm-panel:hover .hm-go i{transform:none}
}
@media print{.hm-end .w > span{transform:none!important}}
