/* First screen of the Commercial Stone Top landing page: a drawn hero that plays once.
   Ground #141414, white words, grays, red #C62A2F for dimension lines only. */
:root{
  --g0:#141414; --w:#fff; --w2:#d6d6d6; --w3:#9a9a9a;
  --red:#C62A2F; --red-t:#F0686C;
  --out:cubic-bezier(.22,.9,.3,1);            /* exponential-style ease-out, no overshoot */
  --gut:clamp(20px,4vw,56px);
  --slant:14%; --sk:-14deg;
}
html{scrollbar-color:#3a3a3a var(--g0);scroll-behavior:smooth}
body{background:var(--g0);color:var(--w);caret-color:#fff}
::selection{background:#fff;color:var(--g0)}
::-webkit-scrollbar-track{background:var(--g0);border-left:0}
::-webkit-scrollbar-thumb{background:#4a4a4a;border:3px solid var(--g0)}
:focus-visible{outline:2px solid #fff;outline-offset:3px}
a{text-decoration-thickness:1px}
.skip{position:fixed;left:12px;top:-80px;z-index:100;background:#fff;color:var(--g0);padding:12px 16px;font-weight:600;text-decoration:none}
.skip:focus{top:12px;outline-color:var(--g0)}
.skip:focus-visible{outline:2px solid var(--g0)}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* hero */
.hero{--H:clamp(600px,100svh,62vw);position:relative;margin:0;background:var(--g0);color:var(--w);overflow:hidden;
  height:var(--H)}

/* header: fixed over the hero, nothing behind it until the hero is scrolled past */
.top{position:fixed;inset:0 0 auto 0;z-index:60;display:flex;align-items:center;justify-content:space-between;
  padding:clamp(14px,2vw,26px) var(--gut);background:rgba(20,20,20,0);transition:background-color .2s ease}
.top.solid{background:rgba(20,20,20,1)}
.top a{color:var(--w);text-decoration:none}
.logo{display:block;flex:none;line-height:0}
.logo img{width:300px;height:auto;display:block}
.menu{display:flex;align-items:center;gap:clamp(4px,1.6vw,22px)}
.menu>a{display:inline-flex;align-items:center;min-height:44px;padding:0 6px;font-size:17px;font-weight:500;line-height:1.2;
  text-underline-offset:.3em}
.menu>a:hover{text-decoration:underline}
.lang{display:inline-flex;border:0}
.lang button{border:0;background:transparent;color:var(--w);font-family:inherit;font-stretch:100%;text-transform:none;letter-spacing:0;
  font-size:17px;font-weight:500;min-height:44px;min-width:44px;padding:0 6px;text-underline-offset:.3em}
.lang button+button{border-left:0}
.lang button:hover{background:transparent;color:var(--w);text-decoration:underline}
.lang--other{margin-left:6px}
html[data-lang="en"] .lang--other [data-set="en"],html[data-lang="es"] .lang--other [data-set="es"]{display:none}
.menu-btn{display:none}
.logo .on-stone{display:none}

/* art: stacked layers in one box */
.art{position:relative;width:100%;aspect-ratio:1600/900;top:0}
/* laptop: the whole object always shows; when the window is short the art scales down to fit the hero and sits right */
.art--wide{width:min(100%,calc((var(--H) - 56px) * 16 / 9));margin-left:auto}
.art--tall{display:none;aspect-ratio:780/900}
.art picture{position:absolute;inset:0;display:block}
.art picture img{width:100%;height:100%;object-fit:cover;object-position:50% 50%}
.art .glint{position:absolute;inset:0;overflow:hidden;pointer-events:none;
  -webkit-mask-image:var(--mask);mask-image:var(--mask);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.art .band{position:absolute;left:0;top:-6%;height:112%;width:22%;transform:skewX(var(--sk));translate:-132% 0;opacity:0;
  background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.5) 78%,rgba(255,255,255,0))}
.art--tall{--sk:-7deg}
.art svg.lines{position:absolute;inset:0;width:100%;height:100%;fill:none;stroke:#fff;stroke-width:1.5;display:block}

/* line groups: white o k b e, red only for d */
.lines .o{--g:0s}.lines .k{--g:.12s}.lines .b{--g:.55s}.lines .d{--g:.5s}.lines .e{--g:.7s}
.lines :is(.o,.k,.b,.d,.e) :is(path,line,polyline,polygon,circle,ellipse,rect){
  stroke-dasharray:1;stroke-dashoffset:1;
  animation:draw 1.1s var(--out) both;animation-delay:calc(var(--g) + min(var(--i,0) * 38ms, 700ms))}
.lines :is(.o,.k,.b,.e){stroke:#fff}
.lines .d{stroke:var(--red)}
.lines .b{opacity:.22}
.lines .e{opacity:.8}
.lines .ef{fill:#141414;stroke:none;opacity:0;animation:fade-in .4s ease-out 1s both}
.lines :is(.o,.k){animation:settle .7s ease-out 3.3s both}
.lines .h{opacity:0;animation:fade-in .5s ease-out 1.3s both,fade-out .5s ease-out 3.3s forwards}
.lines .dt{opacity:0;fill:var(--red-t);stroke:none;animation:fade-in .6s ease-out 1.3s both}
.lines .et{opacity:0;fill:#fff;stroke:none;animation:fade-80 .6s ease-out 1.3s both}
@keyframes draw{to{stroke-dashoffset:0}}
@keyframes settle{to{opacity:.35}}
@keyframes fade-in{to{opacity:1}}
@keyframes fade-80{to{opacity:.8}}
@keyframes fade-out{from{opacity:1}to{opacity:0}}

/* picture wipes: a slanted edge moving left to right */
.p-honed{animation:wipe 1.5s var(--out) 1.8s both}
.p-polished{animation:wipe 1.7s var(--out) 3.2s both}
@keyframes wipe{
  from{clip-path:polygon(-20% 0,0% 0,calc(0% - var(--slant)) 100%,-20% 100%)}
  to{clip-path:polygon(-20% 0,calc(100% + var(--slant)) 0,100% 100%,-20% 100%)}
}
.art--wide .band{animation:glint 1.7s var(--out) 3.2s both}
.art--tall .band{animation:glint 1.7s var(--out) 3.2s both}
@keyframes glint{
  0%{opacity:1;translate:-132% 0}
  85%{opacity:1}
  100%{opacity:0;translate:386% 0}
}

/* words: never on the stone */
.words{position:absolute;left:0;right:0;bottom:clamp(8px,2vh,24px);z-index:2;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;
  gap:20px 40px;padding:0 var(--gut)}
.words h1{margin:0;font-weight:700;font-stretch:92%;letter-spacing:-.02em;line-height:1;font-size:clamp(40px,5.2vw,76px);max-width:5.8em;text-wrap:balance}
.side{max-width:34ch;flex:0 1 34ch}
.side p{margin:0 0 2px;font-size:16px;line-height:1.45;color:var(--w2);text-wrap:balance}
.go{display:inline-flex;align-items:center;gap:10px;min-height:44px;color:var(--w);font-weight:600;font-size:17px;text-decoration:underline;text-underline-offset:.3em}
.go .ar{transition:transform .25s var(--out)}
.go:hover .ar{transform:translateX(4px)}

.after{position:relative;height:60vh;background:#fff}
.after i{position:absolute;left:0;top:0;width:1px;height:1px;scroll-margin-top:0}

/* phone */
.drawer,.gap{display:none}
@media (max-width:640px){
  .hero{height:auto;min-height:clamp(640px,100svh,1000px);display:flex;flex-direction:column}
  .logo{position:relative}
  .logo img{width:240px}
  .logo .on-stone{display:none}
  .menu,.edge-menu{display:none}
  .menu-btn{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;width:48px;height:48px;margin:-6px -8px -6px 0;padding:0;border:0;background:transparent}
  .ml{display:block;width:26px;height:2px;background:#fff;transition:transform .25s var(--out),background-color .2s}
  .menu-btn[aria-expanded="true"] .ml{background:#141414}
  .menu-btn[aria-expanded="true"] .ml:nth-child(1){transform:translateY(5.5px) rotate(45deg)}
  .menu-btn[aria-expanded="true"] .ml:nth-child(2){transform:translateY(-5.5px) rotate(-45deg)}
  .drawer-open .top,.drawer-open .top.solid{background:rgba(20,20,20,0)}
  .drawer-open .logo .on-dark{display:none}
  .drawer-open .logo .on-stone{display:block}
  .drawer-open .top :focus-visible{outline-color:#141414}
  /* the menu is a slab of the same stone, wiped in with the slanted edge */
  .drawer{display:block;position:fixed;left:0;right:0;top:0;z-index:55;color:#141414;
    background:#c9ccce url(img/slab-menu.svg) center/cover no-repeat;padding:108px var(--gut) 24px;
    visibility:hidden;clip-path:polygon(-20% 0,0% 0,calc(0% - var(--slant)) 100%,-20% 100%);
    transition:clip-path .22s var(--out),visibility 0s .22s}
  .drawer-open .drawer{visibility:visible;clip-path:polygon(-20% 0,calc(100% + var(--slant)) 0,100% 100%,-20% 100%);
    transition:clip-path .45s var(--out),visibility 0s}
  .drawer :focus-visible{outline-color:#141414}
  .drawer nav a{display:flex;align-items:center;min-height:56px;font-size:28px;font-weight:600;color:#141414;text-decoration:none}
  .lang--pair{margin-top:10px;gap:8px}
  .lang--pair button{font-size:17px;color:#141414;opacity:.62;padding:0 12px 0 0}
  .lang--pair button:hover{color:#141414}
  .lang--pair button,.lang--pair button[aria-pressed="true"],.lang--pair button:hover{background:transparent !important;border:0 !important;box-shadow:none}
  .lang--pair button[aria-pressed="true"]{color:#141414 !important;opacity:1;text-decoration:underline;text-underline-offset:.3em}
  .art--wide{display:none}
  .art--tall{display:block;aspect-ratio:780/900;flex:none;margin-top:auto}
  .gap{display:block;flex:1 1 0;min-height:20px;max-height:76px}
  .words{position:relative;left:auto;right:auto;bottom:auto;margin:0;padding:0 20px 24px;display:block;flex:none}
  .words h1{font-size:40px;max-width:11ch;margin:0 0 8px;line-height:.98}
  .side{max-width:none;flex:none}
  .side p{font-size:16px;line-height:1.35;text-wrap:pretty;margin:0 0 2px;max-width:36ch}
}
@media (max-width:640px){.art--wide .band{display:none}}

@media (prefers-reduced-motion:reduce){
  .lines :is(.o,.k,.b,.d,.e) :is(path,line,polyline,polygon,circle,ellipse,rect){animation:none;stroke-dashoffset:0}
  .lines :is(.o,.k){animation:none;opacity:.35}
  .lines .h{animation:none;opacity:0}
  .lines .ef{animation:none;opacity:1}
  .lines .dt{animation:none;opacity:1}
  .lines .et{animation:none;opacity:.8}
  .p-honed,.p-polished{animation:none;clip-path:none}
  .art .glint{display:none}
  .em-light{display:none}.em-dark{animation:none;clip-path:none}
  .drawer{transition:none}
}

/* laptop menu cut into the front apron (data-menu="edge"); "corner" is the plain top right menu */
.art--wide{container-type:inline-size}
.edge-menu{display:none;position:absolute;inset:0;pointer-events:none}
.em-set{position:absolute;inset:0}
.em-light,.em-dark{position:absolute;inset:0}
.edge-menu :is(a,span){position:absolute;display:block;white-space:nowrap;line-height:1;font-weight:600;font-stretch:100%;letter-spacing:0;
  transform-origin:0 .834em;text-decoration:none}
.em-light span{color:rgba(255,255,255,.7)}
.em-dark a{color:#141414;text-shadow:0 1px 0 rgba(255,255,255,.75);pointer-events:auto;text-underline-offset:.22em;text-decoration-thickness:2px}
.em-dark a::after{content:"";position:absolute;inset:-14px -10px}
.em-dark a:hover,.em-dark a:focus-visible{text-decoration-line:underline;text-decoration-color:#141414}
.em-dark a:focus-visible{outline:2px solid #fff;outline-offset:4px}
.em-light{animation:unwipe 1.5s var(--out) 1.8s both}
.em-dark{animation:wipe 1.5s var(--out) 1.8s both}
@keyframes unwipe{
  from{clip-path:polygon(0% 0,120% 0,120% 100%,calc(0% - var(--slant)) 100%)}
  to{clip-path:polygon(calc(100% + var(--slant)) 0,120% 0,120% 100%,100% 100%)}
}
@media (min-width:1101px){
  .hero[data-menu="edge"] .edge-menu{display:block}
  .hero[data-menu="edge"]:not(.past) .menu>a{display:none}
  .hero.past .edge-menu{visibility:hidden}
}
