:root {
  --bg: #10161d;
  --bg-deep: #0b1015;
  --surface: rgba(29, 39, 49, 0.78);
  --surface-hover: rgba(42, 53, 64, 0.9);
  --indigo: #586b7e;
  --indigo-soft: #8393a2;
  --indigo-pale: #b1bbc4;
  --text: #f0ede7;
  --muted: #9da6ae;
  --line: rgba(174, 188, 201, 0.15);
  --focus: #b7c4d1;
  --radius: 17px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scrollbar-color: var(--indigo) var(--bg-deep);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg-deep);
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.hero {
  position: relative;
  min-height: 980px;
  overflow: hidden;
  isolation: isolate;
}

.hero-background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background: #111820 url("assets/hero-background.jpg") 50% 0 / cover no-repeat;
  filter: saturate(0.72) brightness(0.84);
  pointer-events: none;
  will-change: transform;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(11, 16, 21, 0.2) 0%, rgba(12, 18, 24, 0.12) 31%, rgba(16, 22, 29, 0.9) 82%, var(--bg) 100%),
    linear-gradient(90deg, rgba(16, 22, 29, 0.58) 0%, rgba(16, 22, 29, 0.05) 47%, rgba(16, 22, 29, 0.24) 100%);
  content: "";
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100%, 1040px);
  margin: 0 auto;
  padding: 52px 16px 62px;
}

.identity {
  position: relative;
  z-index: 2;
}

.identity h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(4rem, 19vw, 6.5rem);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.86;
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.5);
}

.identity h1 span {
  color: var(--indigo-pale);
}

.hero-handle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 13px;
  color: var(--indigo-pale);
  font-size: 1.02rem;
  font-weight: 700;
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.72);
  transition: color 150ms ease;
}

.language-switch {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 29, 38, 0.62);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.language-switch button {
  min-width: 38px;
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  transition: background 150ms ease, color 150ms ease;
}

.language-switch button.is-active {
  background: rgba(131, 147, 162, 0.22);
  color: var(--text);
}

.moon {
  position: absolute;
  top: 70px;
  right: 22px;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #98a5b1;
  -webkit-mask: radial-gradient(circle at 72% 28%, transparent 0 48%, #000 49%);
  mask: radial-gradient(circle at 72% 28%, transparent 0 48%, #000 49%);
  opacity: 0.74;
  pointer-events: none;
}

.moon::after {
  content: none;
}

.primary-links {
  display: grid;
  width: min(100%, 660px);
  gap: 10px;
  margin: 232px auto 0;
}

.link-card {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 13px;
  padding: 11px 15px 11px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  text-decoration: none;
  transition:
    background 170ms ease,
    border-color 170ms ease,
    transform 170ms var(--ease);
}

.card-avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(8, 12, 16, 0.74);
}

.card-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-avatar.is-wallet img {
  object-fit: contain;
  filter: none;
}

.card-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 4px;
}

.card-title {
  overflow: hidden;
  font-size: 1.02rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-subtitle {
  overflow: hidden;
  color: var(--indigo-pale);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-quick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  width: min(100%, 660px);
  margin: 15px auto 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.address-copy,
.ton-fallback {
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--indigo-pale);
  text-decoration: none;
}

.address-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  cursor: pointer;
}

.address-copy-label {
  color: var(--muted);
}

.ton-fallback {
  display: inline-flex;
  align-items: center;
  font-weight: 650;
}

.domains-section {
  position: relative;
  background: var(--bg-deep);
}

.domains-inner {
  width: min(100%, 840px);
  margin: 0 auto;
  padding: 64px 16px 78px;
}

.domains-inner h2 {
  margin: 0 0 25px;
  color: var(--text);
  font-size: clamp(2.15rem, 11vw, 3.4rem);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.domains-inner h3 {
  margin: 48px 0 18px;
  color: var(--text);
  font-size: clamp(1.18rem, 5.6vw, 1.65rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.domain-list {
  display: grid;
  gap: 9px;
}

.domain-row {
  display: flex;
  min-width: 0;
  min-height: 58px;
  align-items: center;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(26, 35, 44, 0.62);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms var(--ease);
}

.domain-icon-wrap {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(88, 107, 126, 0.22);
  color: var(--indigo-pale);
}

.domain-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.numeric-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--indigo-pale);
}

.domain-name {
  overflow: hidden;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-copy-hint {
  color: var(--muted);
  font-size: 0.7rem;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(31, 42, 52, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 680;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 160ms ease, transform 180ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.noscript-message {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 100;
  max-width: min(90vw, 420px);
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg-deep);
}

:where(a, button):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .hero-handle:hover,
  .address-copy:hover,
  .ton-fallback:hover {
    color: var(--text);
  }

  .link-card:hover,
  .domain-row:hover {
    border-color: rgba(183, 196, 209, 0.28);
    background: var(--surface-hover);
    transform: translateY(-2px);
  }
}

@media (max-width: 839px) {
  .hero {
    overflow: clip;
  }

  .hero-background {
    position: sticky;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    margin-bottom: -100vh;
    margin-bottom: -100lvh;
    will-change: auto;
  }

  .domains-title-tail {
    display: block;
  }
}

@media (min-width: 600px) {
  .hero-inner {
    padding-inline: 28px;
  }

  .domain-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .domains-inner {
    padding-inline: 28px;
  }
}

@media (min-width: 840px) {
  .hero {
    min-height: 1040px;
  }

  .hero-background {
    background-position: center 8%;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(11, 16, 21, 0.12) 0%, rgba(12, 18, 24, 0.08) 40%, rgba(16, 22, 29, 0.9) 85%, var(--bg) 100%),
      linear-gradient(90deg, rgba(16, 22, 29, 0.85) 0%, rgba(16, 22, 29, 0.22) 45%, rgba(16, 22, 29, 0.08) 78%, rgba(16, 22, 29, 0.25) 100%);
  }

  .hero-inner {
    padding-top: 88px;
  }

  .identity h1 {
    font-size: clamp(6.5rem, 11vw, 8.7rem);
  }

  .primary-links {
    margin-top: 268px;
  }

  .moon {
    top: 72px;
    right: max(38px, calc(50% - 492px));
    width: 68px;
    height: 68px;
  }

  .moon::after {
    top: -8px;
    left: 21px;
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 359px) {
  .identity h1 {
    font-size: 3.65rem;
  }

  .moon {
    top: 66px;
    right: 15px;
    width: 48px;
    height: 48px;
  }

  .moon::after {
    width: 50px;
    height: 50px;
  }

  .card-title {
    font-size: 0.94rem;
  }

  .card-subtitle {
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
