@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrumentserif/v5/jizHRFtNs2ka5fXjeivQ4LroWlx-6zAjjH7M.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("fonts/inter/v20/UcC73FwrK3iLTeHuS_nVMrMxCp50SjIa1ZL7.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: rgb(10, 10, 10);
  --text: rgb(240, 240, 240);
  --dim: rgba(255, 255, 255, 0.56);
  --accent: rgb(181, 116, 63);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  background: #000;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-user-select: none;
  user-select: none;
}

.scene {
  position: absolute;
  top: -100px;
  left: -100px;
  right: -100px;
  bottom: -100px;
  z-index: -1;
  overflow: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
}

.glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(181, 116, 63, 0.35);
  filter: blur(200px);
  opacity: 0;
  animation: enter 1.5s var(--ease) 0.8s forwards, breathe 8s ease-in-out 2.3s infinite;
  will-change: transform, opacity;
}

.dust {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: enter 2s var(--ease) 1s forwards;
}

.dust canvas {
  width: 100%;
  height: 100%;
}

.page {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.core {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
}

.intro {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.mark {
  font-size: clamp(3rem, 7vw, 3.75rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1.1;
  opacity: 0;
  animation: enter 1.2s var(--ease) 0.3s forwards;
}

.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

.about {
  font-size: clamp(1rem, 2vw, 1.0625rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1.6;
  color: var(--dim);
  max-width: 600px;
  opacity: 0;
  animation: rise 1s var(--ease) 0.6s forwards;
}

.action {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: rise 1s var(--ease) 0.8s forwards;
}

.note {
  font-size: 0.9375rem;
  letter-spacing: -0.03em;
  color: var(--dim);
  text-align: center;
}

.form {
  width: 100%;
  max-width: 440px;
  display: flex;
  gap: 0.5rem;
}

.field {
  flex: 1;
  min-width: 0;
  padding: 0.875rem 1.25rem;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: none;
  transition: all 0.3s var(--ease);
  -webkit-user-select: text;
  user-select: text;
}

.field::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.field:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.field:focus {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(181, 116, 63, 0.15);
}

.field.is-err {
  border-color: rgb(239, 68, 68);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.btn {
  padding: 0.875rem 2rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-label {
  display: inline-block;
  transition: all 0.3s var(--ease);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 -100%;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover:not(:disabled):not(.is-loading):not(.is-ok):not(.is-err) {
  background: rgba(181, 116, 63, 0.9);
  box-shadow: 0 6px 20px rgba(181, 116, 63, 0.3);
}

.btn:active:not(:disabled):not(.is-loading):not(.is-ok):not(.is-err) {
  box-shadow: 0 2px 8px rgba(181, 116, 63, 0.2);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.is-loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn.is-loading .btn-label::after {
  content: "...";
  animation: dots 1.4s infinite;
}

.btn.is-ok {
  background: rgb(34, 197, 94);
  border-color: rgb(34, 197, 94);
  pointer-events: none;
}

.btn.is-ok .btn-label {
  opacity: 0;
  transform: scale(0.8);
}

.btn.is-ok::after {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0) rotate(-180deg);
  font-size: 1.5rem;
  animation: pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.btn.is-err {
  background: rgb(239, 68, 68);
  border-color: rgb(239, 68, 68);
  pointer-events: none;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.btn.is-err .btn-label {
  opacity: 0;
  transform: scale(0.8);
}

.btn.is-err::after {
  content: "\2715";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 1.5rem;
  font-weight: 300;
  animation: pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.trap {
  display: none !important;
}

.foot {
  position: absolute;
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  left: calc(1.5rem + env(safe-area-inset-left, 0px));
  right: calc(1.5rem + env(safe-area-inset-right, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgb(69, 69, 71);
  opacity: 0;
  animation: enter 1s var(--ease) 1s forwards;
  text-align: center;
}

.sep {
  opacity: 0.5;
  margin: 0 0.15rem;
}

.foot-link {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.foot-link:hover {
  color: rgba(181, 116, 63, 0.8);
  text-decoration: underline;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgb(10, 10, 10);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  padding: 2rem;
  overflow-y: auto;
}

.overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.overlay-inner {
  max-width: 560px;
  width: 100%;
  transform: translateY(30px) scale(0.97);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay.is-open .overlay-inner {
  transform: translateY(0) scale(1);
}

.overlay-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--dim);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease);
  line-height: 1;
}

.overlay-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.overlay-head {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.overlay-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0.375rem;
}

.overlay-val {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--dim);
}

.overlay-val a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.overlay-val a:hover {
  color: var(--text);
}

.overlay-legal {
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.2);
}

@keyframes enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

@keyframes pop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-180deg); opacity: 0; }
  60% { transform: translate(-50%, -50%) scale(1.2) rotate(10deg); opacity: 1; }
  80% { transform: translate(-50%, -50%) scale(0.95) rotate(-5deg); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
}

@keyframes dots {
  0%, 20% { content: ""; }
  40% { content: "."; }
  60% { content: ".."; }
  80%, 100% { content: "..."; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 809px) {
  .scene {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  .scene::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 50% 44%, rgba(10, 10, 10, 0.06) 0%, rgba(10, 10, 10, 0.32) 58%, rgba(10, 10, 10, 0.68) 82%, rgba(10, 10, 10, 0.95) 100%),
      linear-gradient(to bottom, rgba(10, 10, 10, 0.84) 0%, rgba(10, 10, 10, 0.02) 22%, rgba(10, 10, 10, 0.02) 80%, rgba(10, 10, 10, 0.78) 100%),
      linear-gradient(to right, rgba(10, 10, 10, 0.92) 0%, rgba(10, 10, 10, 0.14) 18%, rgba(10, 10, 10, 0.14) 82%, rgba(10, 10, 10, 0.92) 100%);
    box-shadow:
      inset 0 82px 78px rgba(10, 10, 10, 0.92),
      inset 0 -70px 62px rgba(10, 10, 10, 0.88),
      inset 72px 0 70px rgba(10, 10, 10, 0.96),
      inset -72px 0 70px rgba(10, 10, 10, 0.96);
  }
  .glow { width: 520px; height: 520px; filter: blur(150px); background: rgba(181, 116, 63, 0.26); }
  .intro { gap: 1.5rem; }
  .mark { font-size: clamp(2.75rem, 9vw, 3.5rem); }
  .form { flex-direction: column; gap: 0.75rem; }
  .field, .btn { width: 100%; }
}

@media (max-width: 480px) {
  .page { padding: 1.75rem 1.25rem; }
  .foot { bottom: calc(0.1rem + env(safe-area-inset-bottom, 0px)); left: 1.25rem; right: 1.25rem; font-size: 0.875rem; }
  .core { gap: 2rem; }
  .mark { font-size: clamp(2.5rem, 10vw, 3rem); }
  .about { font-size: 1rem; }
  .overlay-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}
