/* aristera.work — four apertures, one arrival of light. */
:root {
  color-scheme: dark;
  --brand-slate: #404e61;
  --brand-lime: #b4f500;
  --brand-green: #00e66f;
  --brand-window: #bac8d6;
  --ink: #b9c4d0;
  --ink-bright: #e0e7ed;
  --visitor-x: 0px;
  --visitor-y: 0px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--brand-slate);
  color: var(--ink);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-width: 280px; }
body { min-height: 100vh; min-height: 100svh; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button[hidden] { display: none !important; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
::selection { background: #bac8d6; color: #263649; }
:focus-visible { outline: 1px solid var(--brand-window); outline-offset: 5px; }

/* The room is decoration only; it never intercepts input or carries content. */
.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  background: var(--brand-slate);
}
.atmosphere__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 49% 27%, #51647a40 0%, #46586c14 38%, transparent 69%),
    linear-gradient(175deg, #404e61 18%, #3d4c5f 58%, #314255 100%);
}
.atmosphere__dark {
  position: absolute;
  inset: 0;
  background: #102338;
  opacity: var(--arrival-darkness, 0);
}
.atmosphere__halo {
  position: absolute;
  top: 2%;
  left: 8%;
  width: 84%;
  height: 83%;
  opacity: var(--arrival-halo, .22);
  background: radial-gradient(ellipse, #b4c9d30d, #a4bdc804 36%, transparent 67%);
  transform: translate(var(--visitor-x), var(--visitor-y));
}
.room {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  overflow: visible;
  transform: translate(var(--visitor-x), var(--visitor-y));
}
.room__mote { opacity: 0; }
.room__motes { opacity: .5; }
.atmosphere__grain {
  position: absolute;
  inset: 0;
  background: url("../img/grain.png") repeat;
  opacity: .02;
  mix-blend-mode: soft-light;
}
.atmosphere__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 42%, transparent 24%, #12203212 77%, #12203226 120%);
}
.site {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.main {
  flex: 1 0 auto;
  display: grid;
  place-items: center;
  padding: max(4.5rem, 12svh) 1.5rem max(3.5rem, 8svh);
}
.identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 780px;
  text-align: center;
}
.identity__mark-wrap {
  position: relative;
  width: clamp(145px, 13.1vw, 188px);
  isolation: isolate;
}
.identity__mark {
  position: relative;
  width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}
.identity__aura {
  position: absolute;
  width: 200%;
  height: 175%;
  top: -56%;
  left: -50%;
  z-index: -1;
  opacity: .32;
  background: radial-gradient(ellipse, #b4f50005 0%, #00e66f02 30%, transparent 62%);
}
.identity__name {
  width: clamp(254px, 25vw, 340px);
  max-width: 100%;
  margin: clamp(36px, 5.2svh, 54px) 0 0;
  font: inherit;
}
.identity__name img { width: 100%; }
.inscription-wrap {
  width: 100%;
  margin-top: clamp(56px, 8.7svh, 88px);
}
.inscription-rule {
  display: block;
  width: 34px;
  height: 1px;
  margin: 0 auto 21px;
  background: linear-gradient(90deg, transparent, #b9c4d02c, transparent);
}
.inscription {
  max-width: 730px;
  margin: 0 auto;
  color: #b9c4d06e;
  font-family: "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  font-weight: 400;
  font-size: 10px;
  line-height: 2.25;
  letter-spacing: .16em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  transition: color 600ms ease;
}
.inscription:hover { color: #b9c4d096; }

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding: 0 max(40px, env(safe-area-inset-right)) max(25px, env(safe-area-inset-bottom)) max(40px, env(safe-area-inset-left));
  min-height: 69px;
}
.footer__left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 44px;
}
.copyright, .credit {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .065em;
  line-height: 1.8;
}
.credit { display: flex; gap: 5px; align-items: center; }
.credit__link {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 44px;
  text-underline-offset: 4px;
  text-decoration: underline;
  text-decoration-color: #b9c4d066;
  text-decoration-thickness: 1px;
  transition: color 240ms ease, text-decoration-color 240ms ease;
}
.credit__link:hover { color: #fff; text-decoration-color: #e0e7ed; }
.credit__link svg { flex-shrink: 0; }
.motion-toggle, .replay-light {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 240ms ease, color 240ms ease;
}
.motion-toggle:hover, .replay-light:hover { background: #bac8d60d; color: #fff; }
.copyright { margin-right: 8px; }
.replay-light { opacity: .7; }
.replay-light:hover, .replay-light:focus-visible { opacity: 1; }
.motion-toggle__play { display: none; }
[data-motion="off"] .motion-toggle__pause { display: none; }
[data-motion="off"] .motion-toggle__play { display: block; }

@keyframes light-mote {
  0% { opacity: 0; transform: translate(0, 4px); }
  22% { opacity: .38; }
  67% { opacity: .24; }
  100% { opacity: 0; transform: translate(var(--mote-x), var(--mote-y)); }
}
@media (prefers-reduced-motion: no-preference) {
  .room__mote {
    animation: light-mote var(--mote-time, 26s) linear var(--mote-delay, 0s) infinite;
    animation-play-state: paused;
  }
  [data-motion="on"] .room__mote { animation-play-state: running; }
}

/* The controller reprojects the same model for portrait screens, without stretching panes. */
@media (max-width: 700px) {
  .main { padding: max(5rem, 15svh) 24px max(3.75rem, 9svh); }
  .identity__mark-wrap { width: clamp(134px, 34vw, 160px); }
  .identity__name { width: clamp(232px, 62vw, 288px); margin-top: 39px; }
  .inscription-wrap { margin-top: clamp(57px, 9svh, 78px); max-width: 352px; }
  .inscription { max-width: 330px; font-size: 10px; line-height: 2.25; letter-spacing: .12em; }
  .inscription-rule { margin-bottom: 20px; width: 28px; }
  .footer { padding-right: max(24px, env(safe-area-inset-right)); padding-left: max(24px, env(safe-area-inset-left)); padding-bottom: max(17px, env(safe-area-inset-bottom)); }
  .copyright, .credit { font-size: 9px; letter-spacing: .035em; }
  .footer__left { gap: 2px; }
  .credit { gap: 4px; }
  .credit__link { gap: 3px; }
}
@media (max-width: 560px) {
  .footer { flex-direction: column; gap: 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .footer__left { gap: 0; }
  .copyright { margin-right: 4px; }
  .credit { margin-top: -5px; }
}
@media (max-width: 390px) {
  .footer { flex-direction: column; gap: 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
  .footer__left { position: relative; padding-right: 0; gap: 0; }
  .copyright { margin-right: 4px; }
  .credit { margin-top: -5px; }
  .main { padding-top: max(4rem, 11svh); padding-bottom: 2.6rem; }
  .inscription { font-size: 9.5px; letter-spacing: .105em; }
}
@media (max-height: 580px) and (min-width: 701px) {
  .main { padding: 36px 24px 25px; }
  .identity__mark-wrap { width: 104px; }
  .identity__name { width: 225px; margin-top: 24px; }
  .inscription-wrap { margin-top: 28px; }
  .inscription-rule { margin-bottom: 13px; }
  .footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .room, .atmosphere__halo { transform: none; }
  .motion-toggle, .replay-light { display: none !important; }
  .room__motes { display: none; }
}
@media (prefers-contrast: more) {
  :root { --ink: #eef2f6; }
  .inscription { color: #eef2f6; }
  .atmosphere__grain, .room__motes { display: none; }
}
@media (forced-colors: active) {
  .atmosphere, .identity__aura { display: none; }
  .identity__mark-wrap, .identity__name { forced-color-adjust: none; background: #404e61; }
  .identity__name { padding: 8px; }
  .inscription { color: CanvasText; }
  .credit__link { color: LinkText; }
  .motion-toggle, .replay-light { display: none !important; }
}
@media print {
  :root { color-scheme: light; background: white; color: #333; }
  .atmosphere, .identity__aura, .motion-toggle, .replay-light { display: none !important; }
  .site { min-height: 90vh; }
  .identity__name { filter: brightness(.35); }
  .inscription { color: #333; }
  .footer { padding: 0; }
  .credit__link { text-decoration-color: #666; }
}
