/* Shared chrome, controls, and pointer effects. Page composition remains local. */
:root {
  --site-frame-pad: clamp(20px, 3.6vh, 42px);
}

/* The list form is the same control everywhere. Keeping the width transition
   here prevents one page from snapping while another page eases into place. */
.signup { display: flex; align-items: baseline; gap: .9em; white-space: nowrap; }
.signup label { flex: 0 0 auto; }
.signup-open {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: .45em;
  text-decoration: none;
}
a.signup-open:hover { text-decoration: none; }
.signup-open:hover .signup-arrow { transform: translateX(.25em); }
.signup-title,
.signup-close { display: none; }
.signup-close {
  position: absolute;
  top: .4em;
  right: .5em;
  font: inherit;
  font-size: 1.6em;
  line-height: 1;
  color: inherit;
  background: none;
  border: 0;
  padding: .25em .35em;
  cursor: pointer;
}
.signup-arrow { display: inline-block; transition: transform .18s ease; }
.signup:not(.is-open) input,
.signup:not(.is-open) button[type="submit"] { display: none; }
.signup.is-open .signup-open { display: none; }
.signup input {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--ink);
  width: clamp(150px, 15vw, 240px);
  padding: 0 .15em .18em;
  border-radius: 0;
  outline: none;
  transition: border-color .2s;
}
.signup input::placeholder { color: currentColor; opacity: .4; }
.signup input:focus { border-bottom-width: 1px; }
.signup input:disabled { opacity: .45; }
.signup button[type="submit"] {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: .28em;
  opacity: 0;
  transform: translateX(-.4em);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.signup.is-ready button[type="submit"] {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.signup-msg { white-space: nowrap; }
.signup-msg[data-state="error"] { opacity: .6; }

@media (min-width: 861px) {
  .signup button[type="submit"] {
    width: 0;
    margin-left: -.9em;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity .22s ease, transform .22s ease,
                width .22s ease, margin-left .22s ease;
  }
  .signup.is-ready button[type="submit"] { width: 4ch; margin-left: 0; }
}

@media (max-width: 860px) {
  .signup.is-open {
    position: fixed;
    inset: 0;
    z-index: 130;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4em;
    background: rgb(245 245 245 / .97);
    backdrop-filter: blur(8px);
    color: var(--ink);
    font-size: var(--fs);
    letter-spacing: 0;
    padding: var(--pad);
  }
  .signup.is-open .signup-title { display: block; font-weight: 700; font-size: 1.3em; }
  .signup.is-open .signup-close { display: block; }
  .signup.is-open input { width: min(74vw, 320px); text-align: center; }
}

.trail-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  overflow: hidden;
}
.trail {
  position: absolute;
  left: 0;
  top: 0;
  width: 13px;
  opacity: 0;
  will-change: transform, opacity;
}
.trail svg { display: block; width: 100%; height: auto; overflow: visible; }
.trail path { fill: #fff; stroke: var(--ink); stroke-width: 1.35; paint-order: stroke; }
@media (prefers-reduced-motion: reduce) { .trail-layer { display: none; } }

/* CSS objects remain transform clocks and automatic WebGL fallbacks. */
[data-render-box].is-pbr-ready .pbox,
[data-render-cube].is-pbr-ready .cube,
[data-render-cube].is-pbr-ready .sc-face { opacity: 0; }
