/* StudioN — client presentation: white intro, then black intro, each opening onto a mid-grey
   "In Development" page. data-theme on <html> sets the intro colours: "light" or "dark".
   The grey is temporary so the N reads against both intros; the final build goes white. */
:root{
  --intro-bg:#F3F2EE; --intro-fg:#1B1A18; --intro-muted:#7A766E; --intro-dim:#C9C5BD;
  --page-bg:#8E8C87;  --page-fg:#1B1A18;
  --font:Helvetica,"Helvetica Neue","TeX Gyre Heros",Arial,sans-serif;
  --gutter:clamp(20px,4vw,56px);
  --ease:cubic-bezier(.65,0,.2,1);
}
html[data-theme="dark"]{
  --intro-bg:#0D0D0C; --intro-fg:#ECEAE5; --intro-muted:#8C8880; --intro-dim:#3A3835;
  color-scheme:dark;
}

*{box-sizing:border-box}
html,body{margin:0;height:100%}
body{background:var(--page-bg);font-family:var(--font);font-weight:400;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;overflow:hidden}
.label{font-size:11px;letter-spacing:.24em;text-transform:uppercase}

/* Wordmark: "Studio" regular + bold N drawn as a shape, so the same shape can open into the page */
.mark{display:inline-flex;align-items:baseline;letter-spacing:-.02em;line-height:1;white-space:nowrap}
.mark .n{display:inline-block;width:.6em;height:.72em;margin-left:.035em;fill:currentColor;overflow:visible}

/* ---------- Intro ---------- */
.intro{position:fixed;inset:0;z-index:1;background:var(--intro-bg);color:var(--intro-fg);display:grid;place-items:center}
.intro[hidden]{display:none}
.intro-inner{display:grid;justify-items:center;gap:22px;padding-inline:var(--gutter);text-align:center}
.intro .mark{font-size:clamp(48px,9vw,120px);opacity:0;animation:in .8s var(--ease) forwards}
.intro .studio{transition:color .9s ease-out}
.intro .n{transition:opacity .6s ease-out}
.intro .tag{color:var(--intro-muted);opacity:0;animation:in .8s var(--ease) .2s forwards;transition:opacity .5s ease-out}
.intro.dim .studio{color:var(--intro-dim)}
.intro.dim .tag{opacity:0 !important;animation:none}
.intro.fill .n{opacity:0}
/* Second intro: its background fades in over the grey page before the wordmark appears */
.intro.over{z-index:3;opacity:0;transition:opacity .8s ease}
.intro.over.show{opacity:1}
.intro.over .mark,.intro.over .tag{animation:none;opacity:0}
@keyframes in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- Holding page, opened through the N ---------- */
.page{position:fixed;inset:0;z-index:2;background:var(--page-bg);color:var(--page-fg);display:grid;justify-items:center;align-content:start;padding:calc(clamp(28px,7vh,72px) + env(safe-area-inset-top,0px)) var(--gutter) 0}
.page.masked{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 72'%3E%3Cpath d='M0 0H15.5L44.5 49V0H60V72H44.5L15.5 23V72H0Z'/%3E%3C/svg%3E");
          mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 72'%3E%3Cpath d='M0 0H15.5L44.5 49V0H60V72H44.5L15.5 23V72H0Z'/%3E%3C/svg%3E");
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  -webkit-mask-size:0 0; mask-size:0 0;
}
.page h1{margin:0;font-weight:400;font-size:clamp(34px,9.2vw,190px);line-height:1;letter-spacing:-.02em;text-transform:uppercase;white-space:nowrap;opacity:0;transform:translateY(8px);transition:opacity .7s ease-out,transform .9s var(--ease)}
.page.open h1{opacity:1;transform:none}

@media (max-width:520px){
  .page h1{font-size:10.4vw}
  .intro .tag{font-size:10px;letter-spacing:.2em}
}
