@font-face {
  font-family:'Space Grotesk';
  src:url('/assets/fonts/space-grotesk-latin.woff2') format('woff2');
  font-weight:400 700;
  font-style:normal;
  font-display:swap;
}

@font-face {
  font-family:'IBM Plex Mono';
  src:url('/assets/fonts/ibm-plex-mono-latin.woff2') format('woff2');
  font-weight:400;
  font-style:normal;
  font-display:swap;
}

:root {
  --paper:#f4f1e9;
  --ink:#2e342e;
  --muted:#62675d;
  --accent:#ac4929;
  --line:#d7d7ca;
  --glass:#f4f1e9e6;
  --mono:'IBM Plex Mono',monospace;
  color-scheme:light;
}

/* Match the system before the JavaScript palette has loaded. */
@media(prefers-color-scheme:dark) {
  :root {
    --paper:#252920;--ink:#f1eddf;--muted:#b6bba8;
    --accent:#e6b37c;--line:#454b3c;--glass:#30352ae6;
    color-scheme:dark;
  }
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Space Grotesk',Arial,sans-serif;
  min-height:100svh;
  display:flex;
  flex-direction:column;
  transition:background-color .6s,color .4s;
  -webkit-font-smoothing:antialiased;
}

button,a {
  -webkit-tap-highlight-color:transparent;
}

button {
  font:inherit;
  color:inherit;
  cursor:pointer;
}

a {
  color:inherit;
  text-decoration:none;
}

button:disabled {
  cursor:default;
}

button:focus-visible,a:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:5px;
}

button {
  touch-action:manipulation;
}

::selection {
  background:var(--accent);
  color:var(--paper);
}

.site-header,footer {
  position:relative;
  z-index:3;
}

.site-header {
  margin:0 4%;
  border-bottom:1px solid var(--line);
}

nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:94px;
  gap:20px;
}

.logo {
  min-height:44px;
  display:flex;
  align-items:center;
  gap:11px;
  font-size:23px;
  font-weight:600;
  letter-spacing:-1.2px;
  white-space:nowrap;
}

.brand-mark {
  width:28px;
  height:28px;
}

.domain {
  font-weight:400;
}

.nav-right,.nav-links,.nav-actions {
  display:flex;
  align-items:center;
}

.nav-right {
  gap:40px;
}

.nav-links {
  gap:30px;
  font-size:13px;
}

.nav-links a {
  padding:15px 0;
}

.nav-links a:hover,.footer-links a:hover {
  color:var(--accent);
}

.nav-links span {
  margin-left:4px;
}

.nav-actions {
  gap:8px;
}

.icon-btn {
  height:44px;
  width:44px;
  padding:11px;
  border:1px solid transparent;
  border-radius:50%;
  background:transparent;
  display:grid;
  place-items:center;
  transition:background .2s,border-color .2s,transform .2s;
}

.icon-btn:hover {
  border-color:var(--line);
  background:var(--glass);
}

.icon-btn:active {
  transform:scale(.92);
}

.icon-btn svg {
  width:21px;
  height:21px;
}

#refreshBtn {
  border-color:var(--line);
}

#refreshBtn.generating svg {
  animation:regenerate .5s ease;
}

@keyframes regenerate {
  50% {
    transform:rotate(-25deg) scale(.8);
  }
  100% {
    transform:rotate(0deg);
  }
}

main {
  position:relative;
  flex:1;
  min-height:620px;
  display:flex;
  align-items:center;
  justify-content:center;
  isolation:isolate;
  overflow:hidden;
  outline:none;
}

.canvas-container {
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
}

#embeddingCanvas {
  display:block;
  width:100%;
  height:100%;
}

.stage-grid {
  position:absolute;
  inset:26px 4% 28px;
  z-index:-2;
  pointer-events:none;
  background-image:radial-gradient(var(--line) .65px,transparent .65px);
  background-size:24px 24px;
  opacity:.48;
  mask-image:linear-gradient(transparent,black 22%,black 78%,transparent);
}

.stage-meta {
  position:absolute;
  left:4%;
  right:4%;
  top:21px;
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:16px;
}

.eyebrow,.motion-btn,.footer-bottom {
  font-family:var(--mono);
  font-weight:400;
}

.eyebrow {
  font-size:10px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  display:flex;
  align-items:center;
  gap:9px;
}

.motion-btn {
  min-height:44px;
  display:flex;
  align-items:center;
  gap:9px;
  background:none;
  border:0;
  padding:8px 0 8px 14px;
  font-size:10px;
  color:var(--muted);
}

.motion-symbol {
  font-size:15px;
  color:var(--ink);
}

.axis {
  position:absolute;
  top:50%;
  color:var(--muted);
  font:20px var(--mono);
  font-weight:400;
}

.axis-left {
  left:4%;
}

.axis-right {
  right:4%;
}

.content-overlay {
  position:relative;
  text-align:center;
  max-width:94%;
  padding:80px 0;
  background:transparent;
}

.title-line {
  font-size:clamp(68px,11.7vw,186px);
  line-height:1;
  font-weight:500;
  letter-spacing:-.075em;
  margin:0 0 25px;
  display:flex;
  align-items:baseline;
  justify-content:center;
  color:var(--ink);
  text-shadow:0 1px 22px var(--paper);
}

.hero-description {
  font-size:16px;
  line-height:1.65;
  letter-spacing:-.2px;
  margin:0;
  color:var(--ink);
  text-shadow:0 0 15px var(--paper),0 0 15px var(--paper);
}

footer {
  margin:0 4%;
  border-top:1px solid var(--line);
  padding:22px 0 19px;
}

.footer-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:0;
  font-size:9px;
  color:var(--muted);
  gap:16px;
}

.footer-bottom p {
  margin:0;
}

.footer-links {
  display:none;
  gap:16px;
}

.footer-links a {
  padding:12px 0;
  display:flex;
  align-items:center;
  min-height:44px;
}

.sr-only,.skip-link:not(:focus) {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.skip-link:focus {
  position:absolute;
  top:12px;
  left:12px;
  z-index:10;
  padding:12px;
  background:var(--paper);
  border:1px solid var(--ink);
}

.noscript-note {
  text-align:center;
  padding:20px;
}

@media(min-height:950px) and (min-width:769px) {
  main {
    min-height:720px;
  }
}

@media(max-width:1000px) {
  .logo {
    font-size:21px;
  }
  .nav-right {
    gap:25px;
  }
  main {
    min-height:600px;
  }
  .title-line {
    font-size:12vw;
  }
  .content-overlay {
    padding-bottom:65px;
  }
}

@media(max-width:768px) {
  .site-header,footer {
    margin-left:6%;
    margin-right:6%;
  }
  nav {
    min-height:76px;
  }
  .logo {
    font-size:19px;
    gap:7px;
    letter-spacing:-.9px;
  }
  .brand-mark {
    width:23px;
    height:23px;
  }
  .nav-links {
    display:none;
  }
  .nav-right {
    gap:0;
  }
  .nav-actions {
    gap:2px;
  }
  .stage-meta {
    left:6%;
    right:6%;
    top:16px;
  }
  .eyebrow {
    font-size:8px;
    letter-spacing:1px;
  }
  .motion-btn {
    font-size:9px;
    gap:6px;
  }
  .content-overlay {
    padding:70px 0;
    max-width:94%;
  }
  .title-line {
    font-size:13.3vw;
    letter-spacing:-.07em;
    margin-bottom:22px;
  }
  .hero-description {
    font-size:14px;
  }
  .axis {
    display:none;
  }
  main {
    min-height:480px;
  }
  .footer-bottom {
    margin-top:0;
    flex-wrap:wrap;
    gap:0;
    font-size:8px;
  }
  .footer-links {
    display:flex;
  }
  .footer-note {
    display:none;
  }
  footer {
    padding:18px 0 10px;
  }
  .stage-grid {
    left:6%;
    right:6%;
    background-size:22px 22px;
  }
}

@media(max-width:380px) {
  .brand-mark {
    display:none;
  }
  .logo {
    font-size:18px;
  }
  .nav-actions {
    gap:0;
  }
  .footer-links {
    gap:12px;
  }
  .footer-bottom {
    font-size:7px;
  }
}

@media(max-height:500px) and (min-width:600px) {
  nav {
    min-height:66px;
  }
  main {
    min-height:400px;
  }
  .content-overlay {
    padding:68px 0;
  }
  .title-line {
    font-size:84px;
  }
  .hero-description {
    font-size:12px;
  }
  .stage-meta {
    top:10px;
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
    scroll-behavior:auto!important;
  }
}

/* Palette punctuation is decorative; shuffle owns color changes. */
.title {
  font:inherit;
  letter-spacing:inherit;
  margin:0;
}
.palette-orb {
  display:block;
  flex:none;
  width:.18em;
  height:.18em;
  margin-left:.04em;
  align-self:flex-end;
  margin-bottom:.16em;
  border-radius:50%;
  background:linear-gradient(90deg,#9a562d 50%,#b7843c 50%);
}

/* Each background study reveals only its own soft color fields. */
.atmosphere {
  position:absolute;
  inset:0;
  z-index:-3;
  pointer-events:none;
  opacity:.25;
  overflow:hidden;
}
.atmosphere :where(span) {
  position:absolute;
  display:none;
  aspect-ratio:1;
  border-radius:50%;
  filter:blur(42px);
}
.atmosphere-wash {
  width:clamp(340px,52vw,780px);
  left:-12%;top:-14%;
  background:var(--atmosphere-1,#9a562d);
  mask-image:radial-gradient(ellipse,black 5%,#0009 32%,transparent 70%);
  opacity:.85;
}
.atmosphere-spot {
  width:clamp(160px,23vw,340px);
  right:9%;top:46%;
  background:var(--atmosphere-2,#b7843c);
  mask-image:radial-gradient(ellipse,black 6%,#000a 30%,transparent 70%);
  filter:blur(24px);
  opacity:.9;
}
.atmosphere-orbit {
  width:clamp(380px,62vw,860px);
  left:50%;top:50%;
  color:var(--atmosphere-3,#566c56);
  background:radial-gradient(ellipse at 19% 50%,currentColor 0%,transparent 24%),
    radial-gradient(ellipse at 81% 50%,var(--atmosphere-2,#b7843c) 0%,transparent 31%);
  filter:blur(30px);
  opacity:.8;
}
.atmosphere-mist {
  width:clamp(280px,40vw,580px);
  right:-10%;top:-12%;
  background:var(--atmosphere-3,#566c56);
  mask-image:radial-gradient(ellipse,black,transparent 70%);
  opacity:.5;
}

.atmosphere[data-style="gaussian"] :is(.atmosphere-wash,.atmosphere-spot,.atmosphere-mist),
.atmosphere[data-style="planetary"] .atmosphere-orbit,
.atmosphere[data-style="spotlight"] .atmosphere-spot { display:block; }
.atmosphere[data-style="planetary"] .atmosphere-orbit { opacity:1; }
.atmosphere[data-style="spotlight"] .atmosphere-spot {
  width:clamp(280px,38vw,560px);
  left:25%;top:22%;right:auto;
  background:var(--atmosphere-1,#9a562d);
  filter:blur(32px);
  opacity:1;
}
[data-theme="dark"] .atmosphere { opacity:.23; }
@media(max-width:768px) {
  .atmosphere-orbit { width:420px; }
}

@font-face {
  font-family:'Noto Serif JP Poster';
  src:url('/assets/fonts/noto-serif-jp-poster.woff2') format('woff2');
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
.about-page {
  padding:32px 8% 46px;
  align-items:center;
}
.about-poster { width:100%;max-width:1240px; }
.poster-meta,.poster-bottom {
  display:flex;
  justify-content:space-between;
  align-items:center;
  min-height:44px;
}
.poster-meta,.poster-bottom { justify-content:flex-end; }
.poster-title {
  font-size:clamp(100px,14vw,190px);
  line-height:.95;
  font-weight:500;
  letter-spacing:-.075em;
  margin:25px 0 0;
  padding-bottom:36px;
  border-bottom:1px solid var(--line);
}
.poster-title>span { color:var(--accent); }
.poster-field {
  display:grid;
  grid-template-columns:repeat(12,minmax(0,1fr));
  align-items:center;
  margin:26px 0 35px;
  min-height:300px;
}
.poster-symbol {
  position:relative;
  grid-column:1 / 6;
  width:100%;
  max-width:330px;
  aspect-ratio:1;
}
.poster-disc {
  position:absolute;
  inset:15% 18% 15% 12%;
  border-radius:50%;
  background:var(--accent);
}
.poster-orbit {
  position:absolute;
  inset:7% 5% 7% 9%;
  border:1px solid var(--ink);
  border-radius:50%;
  opacity:.65;
}
.poster-point {
  position:absolute;
  width:9px;height:9px;
  left:20%;top:17%;
  background:var(--ink);
  border-radius:50%;
}
.poster-japanese {
  grid-column:6 / 7;
  writing-mode:vertical-rl;
  font:20px 'Noto Serif JP Poster',serif;
  letter-spacing:.3em;
  margin:0;
  justify-self:center;
}
.poster-poem {
  grid-column:8 / -1;
  font-size:clamp(19px,2vw,29px);
  line-height:1.8;
  letter-spacing:-.025em;
}
.poster-poem p { margin:0; }
.poster-bottom { border-top:1px solid var(--line);padding-top:15px; }
.poster-seal {
  display:grid;
  place-items:center;
  border:1px solid var(--accent);
  color:var(--accent);
  width:34px;height:34px;
  font:21px 'Noto Serif JP Poster',serif;
}
@media(max-width:768px) {
  .about-page { padding:25px 7% 35px; }
  .poster-title {
    font-size:clamp(64px,17vw,124px);
    padding-bottom:26px;
    margin-top:24px;
  }
  .poster-field { grid-template-columns:1fr .5fr;min-height:0;margin:24px 0 30px; }
  .poster-symbol { grid-column:1;max-width:210px; }
  .poster-japanese { grid-column:2;font-size:17px; }
  .poster-poem { grid-column:1 / -1;font-size:clamp(18px,4.8vw,24px);margin-top:20px; }
  .poster-seal { width:30px;height:30px;font-size:19px; }
  .atmosphere-wash,.atmosphere-mist { filter:blur(36px); }
}
