@import url('./genesis-box.css');

* { box-sizing: border-box; }

.eth-page {
  --eth-ink: #373333;
  --eth-muted: #645a5d;
  --eth-line: #4d40435c;
  --eth-background-tint: #b8e0ef;
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  color: var(--eth-ink);
  background:
    radial-gradient(ellipse at 51% 69%, #fff9 0%, #fffa 9%, #e7f6fc40 32%, transparent 57%),
    radial-gradient(ellipse at 64% 24%, #d2edf7, transparent 59%),
    linear-gradient(125deg, #b5dfef, var(--eth-background-tint) 44%, #bbe0ef);
  background-color: var(--eth-background-tint);
  isolation: isolate;
}

.eth-page::before,
.eth-page::after {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
}

.eth-page::before {
  background: url('/worlds/bsc/assets/reflected-light.svg') center / cover no-repeat;
  opacity: .61;
  filter: blur(1.8px);
  animation: eth-light-drift 25s ease-in-out infinite alternate;
}

.eth-page::after {
  background:
    radial-gradient(ellipse at 50% 75%, transparent 29%, #fdf9f4a6 30%, #fff3 31%, transparent 33%) center bottom / 140% 55% no-repeat,
    linear-gradient(145deg, transparent 18%, #fff8 18.8%, #fff0 20.1%, transparent 55%, #fff4 55.7%, transparent 57%);
  filter: blur(2px);
}

.eth-water {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  opacity: .66;
  mix-blend-mode: luminosity;
}

/* Apply the page palette to the rendered surface while retaining its luminance. */
.eth-water:has(:is(canvas, video)) {
  background-color: var(--eth-background-tint);
  isolation: isolate;
}
.eth-water:has(:is(canvas, video))::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: var(--eth-background-tint);
  mix-blend-mode: color;
}

.eth-water :is(canvas, video) {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.eth-water canvas {
  opacity: 0;
  transition: opacity .8s ease;
}

.eth-page[data-water-reveal="ready"]::before {
  opacity: .28;
}

@keyframes eth-light-drift {
  from { transform: translate(-.55%, -.6%) scale(1.015); }
  to { transform: translate(.9%, .8%) scale(1.04); }
}

.eth-page .genesis-header {
  --world-header-white-opacity: 60%;
  color: #17212e;
}

.eth-wallet-status {
  position: absolute;
  inset-block-start: 100%;
  inset-inline-end: 0;
  max-width: 100%;
  margin: 0;
  color: #792e3c;
  font-size: 13px;
}

.eth-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: clamp(27px, 3.5svh, 43px) 24px clamp(16px, 1.7svh, 27px);
  text-align: center;
}

.eth-intro { position: relative; z-index: 1; }

.eth-world {
  margin: 0 0 clamp(14px, 2.25svh, 25px);
  color: var(--eth-muted);
  font-size: clamp(.76rem, 1.45vw, 1.25rem);
  font-weight: 600;
  letter-spacing: .32em;
  text-indent: .32em;
}

.eth-world span { margin-inline: .2em; }

.eth-intro h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5.4vw, 4.65rem);
  font-weight: 420;
  line-height: 1.03;
  letter-spacing: .06em;
  text-wrap: balance;
}

.eth-subtitle {
  margin: .55em 0 0;
  font-size: clamp(1rem, 2.25vw, 1.98rem);
  font-weight: 500;
  letter-spacing: .25em;
  text-indent: .23em;
}

.eth-description {
  margin: .97em 0 0;
  color: var(--eth-muted);
  font-size: clamp(.87rem, 1.45vw, 1.28rem);
  letter-spacing: .19em;
  line-height: 1.65;
  text-wrap: balance;
}

.eth-art {
  position: relative;
  width: min(100%, 870px, 82svh);
  margin: clamp(3px, .6svh, 9px) auto 0;
}

.eth-art img { display: block; width: 100%; height: auto; }

.eth-hero-actions { width: min(100%, 536px); }
.eth-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.9vw, 27px); }

.eth-button {
  display: inline-flex;
  min-height: clamp(46px, 5.6svh, 60px);
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid var(--eth-line);
  border-radius: var(--rv-radius-pill);
  background: #fff2;
  color: var(--eth-ink);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-size: clamp(.95rem, 1.7vw, 1.45rem);
  font-weight: 500;
  letter-spacing: .09em;
  transition: background-color .2s, transform .2s;
}

.eth-button--primary {
  border-color: transparent;
  background: var(--eth-ink);
  color: #fff9f5;
}

.eth-button:not(:disabled):hover { background-color: #fffa; transform: translateY(-2px); }
.eth-button--primary:not(:disabled):hover { background-color: #4e464a; }
.eth-button:disabled { opacity: .65; cursor: wait; }
.eth-page :focus-visible { outline: 2px solid #75556e; outline-offset: 4px; }

.eth-caption {
  margin: clamp(15px, 1.9svh, 22px) 0 0;
  color: var(--eth-muted);
  font-size: clamp(.76rem, 1.15vw, 1.02rem);
  letter-spacing: .16em;
}

.eth-dialog {
  position: fixed;
  width: min(calc(100% - 32px), 456px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 30px;
  border: 1px solid #fff;
  border-radius: 25px;
  background: #f9f4f3;
  color: var(--eth-ink);
  box-shadow: 0 18px 60px #4b394433;
}

.eth-dialog::backdrop { background: #38303954; backdrop-filter: blur(5px); }
.eth-dialog h2 { margin: 0 38px 12px 0; font-size: 1.45rem; }
.eth-dialog p { margin: 0 0 14px; color: var(--eth-muted); font-size: .94rem; line-height: 1.7; }
.eth-dialog .eth-button { width: 100%; min-height: 44px; margin-top: 8px; font-size: .91rem; letter-spacing: .035em; }
.eth-mint-details { margin: 0 0 14px; font-size: .9rem; }
.eth-mint-details div:not([hidden]) { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #4d40431f; }
.eth-mint-details dt { color: var(--eth-muted); }
.eth-mint-details dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
.eth-dialog-link { display: block; width: fit-content; margin: 16px auto 0; color: var(--eth-ink); text-underline-offset: .2em; font-size: .88rem; }
.eth-dialog .eth-mint-status { padding: 11px 13px; border-radius: 12px; background: #eee6eb; }
.eth-dialog .eth-mint-note { margin: 12px 0 0; text-align: center; font-size: .8rem; }

.eth-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--eth-muted);
  cursor: pointer;
  font-size: 1.5rem;
}

@media (min-width: 581px) and (max-height: 940px) {
  .eth-intro h1 { font-size: clamp(2.35rem, 6.9svh, 4.3rem); }
  .eth-art { width: min(100%, 800px, 73svh); }
}

@media (max-width: 580px) {
  .eth-hero { padding: clamp(35px, 6.2svh, 55px) 18px 28px; }
  .eth-intro h1 { font-size: clamp(1.8rem, 8.8vw, 2.35rem); letter-spacing: .025em; }
  .eth-subtitle { letter-spacing: .11em; text-indent: .11em; }
  .eth-description { letter-spacing: .075em; }
  .eth-art { width: min(calc(100% + 28px), 555px); margin-block: clamp(20px, 4.4svh, 42px) clamp(10px, 2.8svh, 24px); margin-inline: 0; }
  .eth-hero-actions { width: min(100%, 370px); }
}

@media (min-width: 860px) {
  .eth-hero {
    grid-template:
      "intro art" minmax(0, 1.22fr)
      "actions art" minmax(0, .78fr)
      / minmax(0, 1fr) minmax(0, 1.12fr);
    column-gap: clamp(16px, 3vw, 46px);
    width: min(1320px, 100%);
    min-height: clamp(500px, calc(100svh - 80px), 790px);
    justify-items: start;
    padding-inline: clamp(32px, 5vw, 68px);
    text-align: left;
  }

  .eth-intro {
    grid-area: intro;
    align-self: end;
  }

  .eth-world,
  .eth-subtitle {
    text-indent: 0;
  }

  .eth-intro h1 {
    max-width: 12ch;
    font-size: clamp(2.9rem, 5.35vw, 5.15rem);
    letter-spacing: .025em;
  }

  .eth-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.65rem);
    letter-spacing: .14em;
  }

  .eth-description {
    max-width: 100%;
    font-size: clamp(.93rem, 1.4vw, 1.15rem);
    letter-spacing: .075em;
    text-wrap: balance;
  }

  .eth-art {
    grid-area: art;
    place-self: center;
    width: min(calc(100% + min(9vw, 120px)), 113svh);
    margin: 0;
  }

  .eth-hero-actions {
    grid-area: actions;
    align-self: start;
    width: min(100%, 438px);
    margin-top: clamp(22px, 3.4svh, 36px);
  }

  .eth-actions .eth-button {
    font-size: clamp(1rem, 1.5vw, 1.28rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .eth-page::before { animation: none; }
  .eth-button { transition: none; }
  .eth-button:not(:disabled):hover { transform: none; }
}
