@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap");

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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: #070707;
  color: #bfbfbf;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.2s ease;
}

body.boot-ready {
  opacity: 1;
}

#background {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
  filter: brightness(0.85);
  transition: opacity 0.9s ease, filter 0.9s ease;
  transform-origin: center;
  animation: background-breath 32s ease-in-out infinite;
}

body:not(.scene-ready) #background,
body:not(.scene-ready) .confessions-layer {
  opacity: 0;
  pointer-events: none;
}

body.write-open #background,
body.confession-open #background,
body.payment-open #background {
  opacity: 0.32;
}

body.confession-open #background {
  filter: blur(2px);
}

@keyframes background-breath {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.01);
  }
}

.confessions-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.9s ease;
  filter: none;
}

.confessions-layer::before {
  content: "";
  position: absolute;
  inset: -10%;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(5, 5, 5, 0.3) 0%,
    rgba(5, 5, 5, 0.26) 35%,
    rgba(5, 5, 5, 0) 65%
  );
}

body.write-open .confessions-layer,
body.confession-open .confessions-layer,
body.payment-open .confessions-layer {
  opacity: 0.34;
}

body.confession-open .confessions-layer {
  filter: blur(1.5px);
}

body.write-open .confessions-layer::before,
body.confession-open .confessions-layer::before {
  opacity: 1;
}

body.write-open .confession-float,
body.confession-open .confession-float,
body.payment-open .confession-float {
  color: rgba(191, 191, 191, 0.28);
}

.confession-float {
  position: absolute;
  left: 0;
  top: 0;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.55;
  color: #b8b8b8;
  opacity: 0;
  white-space: nowrap;
  transform: translate3d(0, 0, 0) translate(-50%, -50%);
  will-change: transform, opacity;
}

.confession-float.is-author {
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
}

.confession-float.amount-frame-neutral {
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
}

.confession-float.amount-frame-gold {
  padding: 4px 6px;
  border: 1px solid rgba(196, 172, 108, 0.65);
  border-radius: 6px;
}

.intro {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  background: transparent;
  transition: opacity 1.2s ease;
  z-index: 1;
  transform: translateY(4vh);
}

.intro--fade {
  opacity: 0;
}

.intro__title {
  margin: 0;
  font-size: 72px;
  letter-spacing: 0.08em;
  line-height: 1.1;
  font-weight: 400;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

.intro__subtitle {
  margin: 0;
  margin-top: 18px;
  font-size: 14px;
  opacity: 0.45;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.site-header {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  z-index: 1;
  pointer-events: none;
}

.rules {
  position: fixed;
  left: 24px;
  bottom: 24px;
  font-size: 12px;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.45);
  z-index: 2;
}

.rules__first {
  opacity: 0.28;
  display: inline-block;
}

.rules__rest {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.rules__line {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.rules__line:empty {
  height: 6px;
}

.rules__first:hover + .rules__rest {
  opacity: 1;
  transform: translateY(0);
}

.rules__first:hover + .rules__rest .rules__line {
  opacity: 0.45;
  transform: translateY(0);
}

.rules__first:hover + .rules__rest .rules__line:nth-child(1) {
  transition-delay: 0.05s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(2) {
  transition-delay: 0.1s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(3) {
  transition-delay: 0.14s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(4) {
  transition-delay: 0.18s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(5) {
  transition-delay: 0.22s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(6) {
  transition-delay: 0.26s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(7) {
  transition-delay: 0.3s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(8) {
  transition-delay: 0.34s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(9) {
  transition-delay: 0.38s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(10) {
  transition-delay: 0.42s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(11) {
  transition-delay: 0.46s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(12) {
  transition-delay: 0.5s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(13) {
  transition-delay: 0.54s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(14) {
  transition-delay: 0.58s;
}

.rules__first:hover + .rules__rest .rules__line:nth-child(15) {
  transition-delay: 0.62s;
}

body.revealed .rules {
  display: none;
}

.intro__button {
  margin-top: 18px;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border: none;
  cursor: pointer;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  opacity: 0;
  animation: enterFadeIn 0.2s ease 0.4s forwards;
}

.intro__button:hover {
  color: rgba(255, 255, 255, 0.75);
}

@keyframes enterFadeIn {
  to {
    opacity: 1;
  }
}

@media (max-width: 1024px) {
  .intro__title {
    font-size: 56px;
  }

  .intro__subtitle {
    font-size: 13px;
  }

  .intro__button {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .intro__title {
    font-size: 40px;
  }

  .intro__subtitle {
    font-size: 12px;
  }

  .intro__button {
    font-size: 11px;
  }
}

.intro__button:focus-visible {
  outline: 2px solid #bfbfbf;
  outline-offset: 4px;
}

.manifesto-label {
  position: fixed;
  right: 24px;
  bottom: 20px;
  font-size: 0.7rem;
  color: #bfbfbf;
  background: transparent;
  border: none;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
  z-index: 1;
}

body.revealed .manifesto-label {
  opacity: 0.24;
  pointer-events: auto;
  cursor: pointer;
}

.write-toggle {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8rem;
  color: #bfbfbf;
  background: transparent;
  border: none;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
  z-index: 1200;
}

body.revealed .write-toggle {
  opacity: 0.25;
  pointer-events: auto;
  cursor: pointer;
}

.write-toggle:hover {
  opacity: 0.35;
}

.x-link {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 16px;
  height: 16px;
  color: #bfbfbf;
  opacity: 0.4;
  transition: opacity 0.2s ease;
  z-index: 1;
}

.x-link:hover {
  opacity: 0.8;
}

.x-link svg {
  width: 100%;
  height: 100%;
  display: block;
}


.payment-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 1100;
  transition: opacity 0.9s ease;
}


body.payment-open .payment-overlay {
  opacity: 1;
  pointer-events: auto;
}

.payment-modal {
  width: 420px;
  max-width: 80vw;
  background: rgba(16, 16, 16, 0.6);
  border: 1px solid rgba(191, 191, 191, 0.22);
  border-radius: 22px;
  color: #b8b8b8;
  padding: 28px 28px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  opacity: 0;
  transition: opacity 0.9s ease;
}

body.payment-open .payment-modal {
  opacity: 1;
}

body.payment-closing .payment-overlay {
  opacity: 0;
  pointer-events: none;
}

body.payment-closing .payment-modal {
  opacity: 0;
}

.payment-header {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.45;
}

.payment-amount {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  opacity: 0.25;
}

.payment-subtext {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0.45;
}

.payment-methods {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.payment-method {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px 10px;
  color: #b8b8b8;
  opacity: 0.32;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.payment-method.is-active {
  border-color: rgba(255, 255, 255, 0.32);
  color: rgba(255, 255, 255, 0.82);
  opacity: 0.52;
}

.payment-instruction {
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  opacity: 0.45;
}

.payment-details {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.payment-address {
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #b8b8b8;
  opacity: 0.6;
  overflow-wrap: anywhere;
}

.payment-copy {
  width: 16px;
  height: 16px;
  padding: 0;
  color: #b8b8b8;
  opacity: 0.45;
  pointer-events: none;
}

.payment-copy svg {
  width: 100%;
  height: 100%;
  display: block;
}

.payment-qr {
  width: 120px;
  height: 120px;
  background: repeating-linear-gradient(
    45deg,
    #1a1a1a,
    #1a1a1a 6px,
    #0f0f0f 6px,
    #0f0f0f 12px
  );
  opacity: 0.55;
  margin-top: 6px;
}

.payment-status {
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  opacity: 0.45;
  margin-top: 6px;
}

.payment-auto-publish {
  margin-top: 4px;
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  opacity: 0.65;
  color: rgba(255, 255, 255, 0.6);
}

.payment-amount-input {
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.payment-amount-field {
  width: 120px;
  background: transparent;
  border: 1px solid rgba(191, 191, 191, 0.25);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  font-weight: 500;
  padding: 6px 10px;
  outline: none;
  caret-color: rgba(255, 255, 255, 0.65);
  text-align: left;
  cursor: text;
  transition: border-color 0.3s ease, color 0.3s ease;
  appearance: textfield;
  -moz-appearance: textfield;
}

.payment-amount-field.is-invalid {
  border-color: rgba(191, 191, 191, 0.35);
  color: rgba(255, 255, 255, 0.6);
}

.payment-amount-field:hover,
.payment-amount-field:focus {
  border-color: rgba(191, 191, 191, 0.6);
  color: rgba(255, 255, 255, 0.95);
}

.payment-amount-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
}

.payment-amount-warning {
  margin-top: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  opacity: 0.5;
}

.payment-amount-field::-webkit-outer-spin-button,
.payment-amount-field::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}


.payment-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: #bfbfbf;
  opacity: 0.4;
  padding: 4px 6px;
  cursor: pointer;
}


.manifesto-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
  z-index: 1000;
}

.manifesto-container {
  position: relative;
  width: auto;
  max-width: 70vw;
  height: auto;
  min-height: 0;
  padding: 36px 40px;
  background: transparent;
  border: none;
}

.confession-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  height: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  background: rgba(16, 16, 16, 0.6);
  border: 1px solid rgba(191, 191, 191, 0.22);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
}

body.manifesto-open .manifesto-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.manifesto-open .manifesto-label {
  opacity: 0;
  pointer-events: none;
}

body.confession-open .manifesto-overlay {
  opacity: 1;
  pointer-events: auto;
  align-items: flex-start;
}

body.confession-open .manifesto-label {
  opacity: 0;
  pointer-events: none;
}

body.confession-open .write-toggle {
  opacity: 0;
  pointer-events: none;
}

body.confession-open .manifesto-container {
  pointer-events: none;
}

body.confession-open .confession-container {
  opacity: 1;
}

body.confession-open .write-container {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

body.write-open .manifesto-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.write-open .manifesto-label,
body.write-open .write-toggle {
  opacity: 0;
  pointer-events: none;
}

body.write-open .confession-container {
  opacity: 0;
  pointer-events: none;
}

body.write-open .write-container {
  opacity: 1;
  pointer-events: auto;
}

body.payment-open .write-container {
  opacity: 0;
  pointer-events: none;
}

body.payment-closing .write-container {
  opacity: 1;
  pointer-events: none;
}

.confession-text {
  font-family: "Inter", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.68;
  color: #b8b8b8;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 0;
  margin: 2px 0 0 0;
  width: 100%;
  max-width: 360px;
  align-self: flex-start;
  user-select: none;
}

.confession-title {
  font-family: "Inter", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 400;
  color: #9a9a9a;
  opacity: 0.35;
  letter-spacing: 0.18em;
  text-align: left;
}

.confession-amount {
  font-family: "Inter", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 14px 0 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #9a9a9a;
  opacity: 0.38;
  text-align: left;
}

.confession-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: #bfbfbf;
  opacity: 0.4;
  padding: 4px 6px;
  cursor: pointer;
}

.confession-share-group {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 12px;
  z-index: 2;
}

.confession-share {
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: #bfbfbf;
  opacity: 0.6;
  cursor: pointer;
  pointer-events: auto;
}

.confession-share:hover {
  opacity: 1;
}

.confession-share svg {
  width: 100%;
  height: 100%;
  display: block;
}

.write-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 540px;
  padding: 16px;
  z-index: 1001;
  pointer-events: none;
  visibility: visible;
  transition: opacity 0.9s ease;
}

.write-title {
  font-family: "Inter", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 500;
  color: #9a9a9a;
  opacity: 0.35;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: left;
}

.write-input {
  width: 100%;
  max-width: calc(100% - 24px);
  margin: 10px 0 0 0;
  padding: 0;
  font-family: "Inter", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  color: #b8b8b8;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  text-align: left;
}

.write-input::placeholder {
  color: #9a9a9a;
  opacity: 0.35;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-size: 14px;
}

.write-input:focus::placeholder {
  opacity: 0.15;
}

.write-count {
  margin: 14px 0 0 0;
  font-family: "Inter", "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9a9a;
  opacity: 0.35;
  text-align: left;
}

.write-footer {
  margin: 12px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}


.write-publish {
  margin: 0;
  padding: 0;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border: none;
  cursor: pointer;
  font-family: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  pointer-events: auto;
  position: relative;
  z-index: 1002;
}

.write-publish:disabled {
  opacity: 0.3;
  cursor: default;
}


.manifesto-close {
  position: fixed;
  right: 24px;
  bottom: 20px;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  background: transparent;
  border: none;
  color: #bfbfbf;
  opacity: 0.4;
  padding: 6px 10px;
  cursor: pointer;
}
