/* tevola by athreix · build.css
   THE BUILD (#build): a full-screen pinned 3D sequence. It comes straight in after the statement: a paper veil lifts
   off the live tower while the camera glides in (scrubbed, build.js), then eleven stages, one scroll gesture per stage (build.js): the warm scale-model look for the full-view moments, an x-ray look (paper ghost,
   ink hairlines, the stage's component solid) for the component stages. HUD: phase, title, caps subtitle,
   counter, progress line with ticks, a right-hand dot navigator.
   Default styles are the no-JS / reduced-motion / no-WebGL page: the eleven stages listed with their model stills. */

.build{position:relative;background:#2a2823;color:#f6f2e8;--hud:#f6f2e8;--hud-70:rgba(246,242,232,.72);--hud-60:rgba(246,242,232,.6);--hud-25:rgba(246,242,232,.25);--bx:24px}
@media (min-width:1024px){.build{--bx:40px}}

/* ---------- fallback: the eleven stages as a list of the model stills (assets/stages) ---------- */
html:not(.has-tower) .build{overflow:hidden}
html:not(.has-tower) .build__pin{position:absolute;inset:0}
html:not(.has-tower) .build__pin>:not(.sr){display:none}
.stages__img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border-radius:10px;margin-bottom:10px;background:#eee9da}
.has-tower .stages__img{display:none}
.stages{position:relative;z-index:1;padding-top:clamp(110px,16vh,190px);padding-bottom:clamp(90px,12vh,150px)}
.stages__head{display:grid;gap:22px;margin-bottom:clamp(44px,7vh,80px);max-width:900px}
.stages__k{color:var(--hud-70)}
.stages__title{font:600 clamp(50px,7.2vw,132px)/.92 var(--serif);letter-spacing:-.025em}
.stages__title em{font-style:normal}
.stages__note{font-size:clamp(16px,1.2vw,19px);color:var(--hud-70);max-width:40ch}
.stages__list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(300px,100%),1fr));column-gap:24px;border-top:1px solid var(--hud-25)}
.stages__list li{padding:26px 24px 30px 0;border-bottom:1px solid var(--hud-25);display:grid;gap:8px;align-content:start}
.stages__n{font:400 64px/.9 var(--sans);letter-spacing:-.05em;font-variant-numeric:tabular-nums}
.stages__ph,.stages__m{font:500 12.5px/1.4 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:var(--hud-60)}
.stages__m{color:var(--hud);margin-top:6px}
.stages__list h3{font:500 26px/1.08 var(--sans);letter-spacing:-.035em}
.stages__list p:not([class]){font-size:16px;color:var(--hud-70);max-width:30ch}
@media (max-width:640px){.stages__list{grid-template-columns:1fr}}

/* ---------- the pinned stage ---------- */
.has-tower .stages{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);padding:0}
.has-tower .build__pin{position:relative;height:100vh;height:100lvh;overflow:hidden;touch-action:pan-y;background:var(--paper);isolation:isolate}
/* the model's studio: a warm paper wall with soft window light and dappled leaf shade from the upper left,
   sweeping down into the paper table the plinth stands on (tower.js fogs the table into the same paper) */
.build__sky,.build__xsky{position:absolute;inset:0;pointer-events:none}
.build__sky{overflow:hidden;background:
  radial-gradient(70% 60% at 30% 22%,rgba(255,250,236,.75),rgba(255,250,236,0) 70%),
  radial-gradient(60% 50% at 82% 70%,rgba(214,200,172,.32),rgba(214,200,172,0) 70%),
  linear-gradient(180deg,#e9dfca 0%,#ece3d0 38%,#eee7d8 62%,#eee9da 100%)}
.build__sky::before{content:"";position:absolute;left:-10%;top:-12%;width:70%;height:90%;opacity:.55;filter:blur(18px);transform:rotate(-24deg);background:
  radial-gradient(18% 7% at 30% 20%,rgba(186,170,140,.45),rgba(186,170,140,0) 70%),
  radial-gradient(22% 6% at 48% 34%,rgba(186,170,140,.38),rgba(186,170,140,0) 70%),
  radial-gradient(16% 5% at 26% 46%,rgba(186,170,140,.4),rgba(186,170,140,0) 70%),
  radial-gradient(20% 6% at 56% 56%,rgba(186,170,140,.32),rgba(186,170,140,0) 70%),
  radial-gradient(14% 5% at 38% 66%,rgba(186,170,140,.3),rgba(186,170,140,0) 70%),
  radial-gradient(24% 7% at 64% 18%,rgba(186,170,140,.28),rgba(186,170,140,0) 70%)}
/* x-ray: paper above, olive in the middle, deep ink-olive below */
.build__xsky{opacity:0;transition:opacity .7s var(--ease-io);background:
  radial-gradient(60% 46% at 50% 44%,rgba(169,179,143,.28),rgba(169,179,143,0) 70%),
  linear-gradient(180deg,#eee9da 0%,#b9bea6 16%,#6f7a5c 42%,#3a4230 68%,#1f241b 100%)}
.build__pin.is-xray .build__xsky{opacity:1}
/* x-ray: the rail sits on the deep olive half, so it turns paper */
.has-tower #tower{position:absolute;inset:0;width:100%;height:100%;display:block;outline:none;z-index:1;opacity:0;transition:opacity .9s var(--ease-io)}
.has-tower #tower.is-on{opacity:1}
.has-tower .build__dip{position:absolute;inset:0;z-index:2;background:var(--paper);opacity:0;pointer-events:none}
/* the entry veil: the page paper, one and a half screens tall with a soft lower half-screen edge; build.js lifts it
   by its own height as the section arrives, so the edge rises through the frame and the tower appears base first */
.build__veil{display:none}
.has-tower .build__veil{display:block;position:absolute;left:0;right:0;top:0;height:150%;z-index:3;pointer-events:none;will-change:transform;
  background:linear-gradient(180deg,var(--paper) 0%,var(--paper) 66.6%,rgba(238,233,218,.94) 72%,rgba(238,233,218,.72) 80%,rgba(238,233,218,.36) 89%,rgba(238,233,218,.1) 95.5%,rgba(238,233,218,0) 100%)}
html:not(.has-tower) .build__dip,html:not(.has-tower) .build__sky,html:not(.has-tower) .build__xsky{display:none}


/* ---------- HUD ---------- */
.hud{position:absolute;left:0;right:0;bottom:0;z-index:6;padding:80px var(--bx) 24px;padding-bottom:calc(24px + 100lvh - 100svh);color:var(--hud);pointer-events:none;
  background:linear-gradient(to top,rgba(42,40,35,.7) 0%,rgba(42,40,35,.42) 40%,rgba(42,40,35,.14) 72%,rgba(42,40,35,0) 100%);text-shadow:0 1px 16px rgba(42,40,35,.28)}
@media (min-width:1024px){.hud{padding:112px var(--bx) 32px;padding-bottom:calc(32px + 100lvh - 100svh)}}
.hud__row{display:flex;flex-direction:column;gap:14px}
@media (min-width:640px){.hud__row{flex-direction:row;align-items:flex-end;justify-content:space-between;gap:32px}}
.hud__l{min-width:0;max-width:min(760px,100%)}
.hud__s,.hud__n{display:block;will-change:transform}
.hud__tw{overflow:hidden;padding-bottom:.15em;margin-bottom:-.15em}
.hud__t{font:500 30px/1 var(--sans);letter-spacing:-.04em;text-wrap:balance}
.hud__s{margin-top:12px;max-width:28rem;font:500 12.5px/1.5 var(--sans);letter-spacing:.14em;text-transform:uppercase;color:rgba(246,242,232,.8)}
.hud__r{flex:none;text-align:right;align-self:flex-end;position:relative}
.hud__cw{overflow:hidden;padding-bottom:.04em}
.hud__n{font:400 36px/1 var(--sans);letter-spacing:-.05em;font-variant-numeric:tabular-nums}
.hud__of{margin-top:8px;font:500 12.5px/1 var(--sans);letter-spacing:.2em;text-transform:uppercase;color:var(--hud-60)}
.hud__go{position:absolute;right:0;bottom:4px;white-space:nowrap;font:500 12.5px/1 var(--sans);letter-spacing:.2em;text-transform:uppercase;color:var(--hud-70);opacity:0;transition:opacity .5s}
.hud__go span{display:inline-block;padding-left:8px;animation:bnudge 1.8s var(--ease) infinite}
@keyframes bnudge{0%,100%{transform:none}50%{transform:translateY(4px)}}
.hud__cw,.hud__of{transition:opacity .5s}
.is-intro .hud__go{opacity:1}
.is-intro .hud__cw,.is-intro .hud__of{opacity:0}
.hud__bar{position:relative;margin-top:24px;height:2px;background:var(--hud-25)}
.hud__fill{position:absolute;inset:0;background:var(--hud);transform-origin:0 50%;transform:scaleX(0)}
.hud__tick{position:absolute;top:50%;width:1px;height:8px;background:rgba(246,242,232,.5);transform:translate(-50%,-50%)}
.hud__dot{position:absolute;top:50%;left:0;width:10px;height:10px;border-radius:50%;background:var(--hud);box-shadow:0 0 10px rgba(246,242,232,.6);transform:translate(-50%,-50%)}
@media (min-width:768px){
  .hud__t{font-size:36px}
  .hud__s{font-size:13px}
  .hud__n{font-size:48px}
}
@media (min-width:1024px){
  .hud__t{font-size:clamp(52px,4.2vw,84px)}
  .hud__s{font-size:14px;max-width:30rem}
  .hud__n{font-size:clamp(84px,6.7vw,136px)}
}
@media (min-width:2000px){.hud__s{max-width:36rem}.hud__of{font-size:14px}}
/* phones: counter and "of 11" on one line, under the title block, on the right */
@media (max-width:639px){
  .hud__r{display:flex;align-items:baseline;gap:10px;margin-top:-6px}
  .hud__of{margin:0}
  .hud__go{bottom:auto;top:50%;transform:translateY(-50%)}
  .hud__t{font-size:clamp(28px,8vw,34px)}
}

/* leaving the build: the overlay fades before it reaches the fixed header */
.build.is-leaving .hud,.build.is-leaving .hint{opacity:0!important;transition:opacity .35s}

/* ---------- one-time hints ---------- */
.hint{position:absolute;z-index:7;left:50%;top:auto;bottom:80px;display:flex;align-items:center;gap:10px;padding:11px 16px;border-radius:999px;background:rgba(42,40,35,.74);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:var(--hud);font:500 12.5px/1 var(--sans);letter-spacing:.16em;text-transform:uppercase;white-space:nowrap;opacity:0;visibility:hidden;pointer-events:none}
.hint>i{width:16px;height:16px;border-radius:50%;border:1.5px solid rgba(246,242,232,.35);border-top-color:var(--hud);display:block}

.tip{position:fixed;left:0;top:0;z-index:8;pointer-events:none;padding:7px 11px;background:var(--ink);color:var(--paper-2);font:500 13px/1 var(--sans);border-radius:999px;opacity:0;transition:opacity .2s}
.tip.is-on{opacity:1}

/* phones held sideways and other short screens */
@media (max-height:500px) and (orientation:landscape){
  .hud{padding-top:44px;padding-bottom:12px}
  .hud__s,  .hud__t{font-size:26px}
  .hud__n{font-size:34px}
  .hud__bar{margin-top:12px}
}
