/* XamSHOP v10 — cinematic full-bleed */

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

:root {
  --bg: #050506;
  --bg-2: #0c0c0e;
  --ink: #f4f4f5;
  --ink-soft: rgba(244, 244, 245, 0.72);
  --ink-muted: rgba(244, 244, 245, 0.4);
  --accent: #d4a574;
  --accent-ink: #120e0a;
  --line: rgba(244, 244, 245, 0.1);
  --nav: #141416;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --px: clamp(20px, 5.5vw, 56px);
}

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button,
input,
a {
  font-family: inherit;
}

/* Top */
.top-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-t)) var(--px) 12px;
  pointer-events: none;
}

.top-bar > * {
  pointer-events: auto;
}

.top-messenger,
.lang-btn {
  border: none;
  background: none;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 590;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.02em;
}

.lang-btn {
  display: inline-flex;
  gap: 6px;
}

.lang-btn-lang {
  color: var(--accent);
  font-weight: 700;
}

.top-messenger:hover,
.lang-btn:hover {
  color: var(--ink);
}

/* Panels */
.container {
  width: 100%;
  flex: 1;
}

.shop-panels {
  width: 100%;
  overflow: hidden;
  min-height: 100vh;
}

.shop-panels-track {
  display: flex;
  width: 400%;
  min-height: 100vh;
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.shop-panel {
  width: 25%;
  flex-shrink: 0;
  min-width: 0;
  padding: calc(52px + var(--safe-t)) 0 calc(100px + var(--safe-b));
}

.shop-panel--home {
  padding-top: 0;
}

.shop-panels.is-buy .shop-panels-track { transform: translateX(-25%); }
.shop-panels.is-about .shop-panels-track { transform: translateX(-50%); }
.shop-panels.is-purchases .shop-panels-track { transform: translateX(-75%); }

.screen-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 20px;
  padding: 0 var(--px);
}

/* ── Home stage ── */
.home-section {
  display: flex;
  flex-direction: column;
}

.home-stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(64px + var(--safe-t)) var(--px) calc(28px + 72px + var(--safe-b));
  overflow: hidden;
  background: var(--bg);
}

.home-mark {
  position: absolute;
  inset: 8% 0 38%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.home-mark::before {
  content: "";
  position: absolute;
  width: min(70vw, 340px);
  height: min(70vw, 340px);
  border-radius: 50%;
  background: rgba(212, 165, 116, 0.09);
  filter: blur(40px);
}

.home-mark img {
  position: relative;
  width: min(58vw, 280px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.55));
  animation: markIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes markIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.home-stage-copy {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  animation: copyIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
}

@keyframes copyIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.home-stage-copy h1 {
  font-family: var(--display);
  font-size: clamp(3.2rem, 15vw, 4.8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.92;
  margin-bottom: 12px;
}

.home-stage-copy .subtitle {
  font-size: 1.2rem;
  font-weight: 510;
  color: var(--ink-soft);
  min-height: 1.4em;
  margin-bottom: 6px;
}

.home-stage-copy .typewriter-cursor {
  color: var(--accent);
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.home-rate {
  font-size: 14px;
  font-weight: 510;
  color: var(--ink-muted);
  margin-bottom: 22px;
}

.home-cta {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 16px 18px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  margin-bottom: 14px;
}

.home-cta:active {
  opacity: 0.88;
}

.home-link {
  display: inline-block;
  border: none;
  background: none;
  padding: 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 640;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(244, 244, 245, 0.25);
}

.home-link:hover {
  color: var(--ink);
}

/* Info block under fold */
.home-info {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding-bottom: 8px;
}

.home-tabs-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 var(--px);
  border-bottom: 1px solid var(--line);
}

.home-tab {
  position: relative;
  min-height: 52px;
  border: none;
  background: none;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.home-tab.is-active {
  color: var(--ink);
}

.home-tab.is-active::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.home-tabs-panel {
  padding: 32px var(--px) 40px;
  min-height: 160px;
}

.home-tabs-panel h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 7vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 14px;
}

.home-tabs-panel p {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 34em;
}

/* ── Buy ── */
.buy-section {
  width: 100%;
  max-width: 520px;
}

.buy-hero {
  padding: 12px var(--px) 28px;
}

.buy-amount-display {
  font-family: var(--display);
  font-size: clamp(4rem, 18vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.buy-amount-display::after {
  content: " XAMS";
  font-size: 0.26em;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  vertical-align: 0.6em;
}

.buy-price-display {
  margin-top: 10px;
  font-size: 1.2rem;
  font-weight: 510;
  color: var(--ink-muted);
}

.buy-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.buy-preset {
  padding: 18px 4px;
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.buy-preset:last-child { border-right: none; }

.buy-preset.selected {
  color: var(--accent);
  background: rgba(212, 165, 116, 0.07);
}

.buy-slider-wrap {
  padding: 22px var(--px) 10px;
}

.buy-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 640;
  color: var(--ink-muted);
  margin-bottom: 12px;
}

.buy-slider {
  width: 100%;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--line);
  outline: none;
}

.buy-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.buy-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.field {
  display: block;
  padding: 16px var(--px);
  border-bottom: 1px solid var(--line);
}

.field > span {
  display: block;
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-muted);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 19px;
  font-weight: 510;
  padding: 2px 0;
  outline: none;
  border-radius: 0;
}

.field input::placeholder {
  color: var(--ink-muted);
}

.buy-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px var(--px);
}

.buy-checkbox-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.4;
}

.buy-checkbox-item a { color: var(--accent); }
.buy-checkbox-item input { display: none; }

.buy-checkbox-item .check-mark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid var(--ink-muted);
  position: relative;
}

.buy-checkbox-item input:checked + .check-mark {
  border-color: var(--accent);
  background: var(--accent);
}

.buy-checkbox-item input:checked + .check-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 45%;
  width: 5px;
  height: 9px;
  border: solid var(--accent-ink);
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.btn-pay {
  display: block;
  width: calc(100% - 2 * var(--px));
  margin: 4px var(--px) 0;
  padding: 18px;
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

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

/* About */
.about-section { max-width: 680px; }

.about-lead {
  font-family: var(--display);
  font-size: clamp(1.75rem, 6.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
  padding: 0 var(--px);
  margin-bottom: 16px;
}

.about-copy {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.65;
  padding: 0 var(--px);
  margin-bottom: 40px;
  max-width: 34em;
}

.about-section h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0 var(--px);
  margin-bottom: 12px;
}

.about-contacts {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  margin-bottom: 14px;
}

.about-contacts a {
  display: block;
  padding: 20px var(--px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 600;
}

.about-contacts a:hover { color: var(--accent); }

.about-note {
  font-size: 14px;
  color: var(--ink-muted);
  padding: 0 var(--px);
  margin-bottom: 40px;
}

.about-requisites { border-top: 1px solid var(--line); }

.about-requisites > div {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 15px var(--px);
  border-bottom: 1px solid var(--line);
}

.about-requisites dt {
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-muted);
}

.about-requisites dd {
  font-size: 15px;
  color: var(--ink-soft);
  word-break: break-word;
}

.about-requisites a {
  color: var(--accent);
  text-decoration: none;
}

/* Purchases */
.purchases-section { max-width: 680px; }

.purchases-disclaimer {
  font-size: 14px;
  color: var(--ink-muted);
  padding: 0 var(--px);
  margin-bottom: 18px;
}

.purchases-list {
  border-top: 1px solid var(--line);
}

.purchase-item {
  padding: 20px var(--px);
  border-bottom: 1px solid var(--line);
}

.purchase-item-amount {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 4px;
}

.purchase-item-code {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

.purchase-item-date {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.purchases-empty {
  padding: 48px var(--px);
  border-bottom: 1px solid var(--line);
  color: var(--ink-muted);
}

.purchases-empty-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  bottom: calc(12px + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(320px, calc(100% - 40px));
  height: 56px;
  padding: 4px;
  border-radius: 999px;
  background: var(--nav);
}

.bottom-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 4px 2px;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-btn svg {
  width: 20px;
  height: 20px;
}

.bottom-nav-btn span {
  font-size: 10px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav-btn.is-active {
  color: var(--accent);
  background: rgba(244, 244, 245, 0.06);
}

/* Payment / status */
.payment-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  display: none;
  flex-direction: column;
  z-index: 1200;
}

.payment-overlay.active { display: flex; }

.payment-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.payment-overlay-title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.payment-overlay-close {
  border: none;
  background: none;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.payment-overlay-close.is-locked {
  opacity: 0.45;
  pointer-events: none;
}

.payment-iframe {
  flex: 1;
  border: 0;
  width: 100%;
  min-height: 0;
}

.status-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 24px;
}

.status-modal.active { display: flex; }

.status-modal-content {
  width: min(420px, 100%);
  background: #101012;
  padding: 28px 22px;
}

.status-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.status-text {
  color: var(--ink-soft);
  margin-bottom: 16px;
}

.status-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin-bottom: 16px;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.status-code {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  color: var(--accent);
  margin-bottom: 14px;
  word-break: break-all;
}

.status-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.btn.status-close { color: var(--ink-soft); }

/* Desktop */
@media (min-width: 900px) {
  .home-stage {
    min-height: 100vh;
    flex-direction: row;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
  }

  .home-mark {
    position: relative;
    inset: auto;
    width: 54%;
    min-height: 100vh;
    background: #080809;
    border-right: 1px solid var(--line);
  }

  .home-mark::before {
    width: min(46vw, 420px);
    height: min(46vw, 420px);
  }

  .home-mark img {
    width: min(38vw, 360px);
  }

  .home-stage-copy {
    width: 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px clamp(40px, 5vw, 80px);
    max-width: none;
  }

  .home-stage-copy h1 {
    font-size: clamp(4.5rem, 7vw, 7rem);
  }

  .home-stage-copy .subtitle {
    font-size: 1.4rem;
  }

  .home-cta {
    max-width: 280px;
  }

  .home-info {
    min-height: 40vh;
  }

  .home-tabs-panel {
    padding: 48px var(--px) 64px;
    max-width: 900px;
  }

  .home-tabs-panel h2 {
    font-size: 2.8rem;
  }

  .home-tabs-panel p {
    font-size: 1.2rem;
  }

  .buy-section {
    padding-top: 28px;
  }

  .bottom-nav {
    bottom: 24px;
    width: 340px;
    height: 58px;
  }

  .bottom-nav-btn span {
    font-size: 11px;
  }
}

body.wallet-embed .top-messenger { display: none; }

body.wallet-embed .home-stage {
  min-height: 100svh;
  padding-bottom: calc(24px + 64px + var(--safe-b));
}

body.wallet-embed .home-mark {
  inset: 10% 0 42%;
}

body.wallet-embed .home-mark img {
  width: min(48vw, 200px);
}

body.wallet-embed .home-stage-copy h1 {
  font-size: 2.6rem;
}

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