/* creaths — minimal entrance */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-weight: 300;
  color: #1a1a1a;
  overflow: hidden;
  background: #ffffff;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  background: transparent;
}

/* ---------- center overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none; /* let the canvas breathe underneath */
  padding: 1.5rem;
}

.wordmark {
  font-weight: 200;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: 0.34em;
  margin-left: 0.34em; /* optically re-center the tracked text */
  color: #141414;
}

.tagline {
  font-family: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: #8a8a8a;
  margin-top: 1.1rem;
  letter-spacing: 0.06em;
}

.contact {
  pointer-events: auto;
  display: inline-block;
  margin-top: 3.2rem;
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  margin-left: 0.28em;
  text-transform: lowercase;
  color: #6f6f6f;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  padding-bottom: 0.45em;
  transition: color 0.4s ease, border-color 0.4s ease;
}

.contact:hover,
.contact:focus-visible {
  color: #141414;
  border-color: rgba(0, 0, 0, 0.45);
}

/* ---------- footer ---------- */

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 1.4rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.9em;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: #a3a3a3;
}

.site-footer .copyright {
  color: #9a9a9a;
}

.sep {
  color: #c9c9c9;
}

.link {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  letter-spacing: inherit;
  color: #9a9a9a;
  cursor: pointer;
  transition: color 0.35s ease;
}

.link:hover,
.link:focus-visible {
  color: #3a3a3a;
}

/* ---------- language switch ---------- */

.lang-switch {
  position: fixed;
  top: 1.4rem;
  right: 1.7rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
}

.lang-switch .link {
  color: #b5b5b5;
}

.lang-switch .link:hover,
.lang-switch .link:focus-visible,
.lang-switch .link.active {
  color: #3a3a3a;
}

.lang-switch .link.active {
  cursor: default;
}

/* ---------- Chinese typography ---------- */

html[lang^="zh"] .tagline {
  font-style: normal;
  letter-spacing: 0.14em;
}

html[lang^="zh"] .modal-card .sig {
  font-style: normal;
}

/* ---------- lightbox ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.modal.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s ease;
}

.modal-card {
  position: relative;
  width: min(92vw, 30rem);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.10), 0 4px 14px rgba(0, 0, 0, 0.05);
  padding: 2.6rem 2.4rem 2.2rem;
  transform: translateY(10px) scale(0.985);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card h2 {
  font-family: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  color: #1a1a1a;
  margin-bottom: 1.1rem;
}

.modal-card p {
  font-size: 0.86rem;
  line-height: 1.75;
  color: #5c5c5c;
  margin-bottom: 0.9rem;
}

.modal-card p:last-of-type {
  margin-bottom: 0;
}

.modal-card a {
  color: #3a3a3a;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.modal-card .sig {
  font-family: "Cormorant Garamond", "Noto Serif TC", Georgia, serif;
  font-style: italic;
  color: #8a8a8a;
  margin-top: 1.2rem;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  appearance: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: 200;
  line-height: 1;
  color: #a8a8a8;
  cursor: pointer;
  padding: 0.3rem;
  transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: #1a1a1a;
}

/* ---------- small screens ---------- */

@media (max-width: 540px) {
  .contact {
    margin-top: 2.4rem;
  }
  .site-footer {
    bottom: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-card,
  .link,
  .contact {
    transition: none;
  }
}
