:root {
  --bg: #ffffff;
  --surface: #fbfbfd;
  --surface-2: #f5f5f7;
  --border: #d2d2d7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-strong: #0077ed;
  --accent-wash: #e8f2fd;
  --danger: #d70015;
  --dark-bg: #000000;
  --dark-surface: #1d1d1f;
  --dark-text: #f5f5f7;
  --dark-muted: #86868b;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, Arial, sans-serif;
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #1d1d1f;
    --surface-2: #161617;
    --border: #38383c;
    --text: #f5f5f7;
    --muted: #86868b;
    --accent: #2997ff;
    --accent-strong: #0a84ff;
    --accent-wash: #0f2942;
    --danger: #ff453a;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #1d1d1f; --surface-2: #161617; --border: #38383c;
  --text: #f5f5f7; --muted: #86868b; --accent: #2997ff; --accent-strong: #0a84ff;
  --accent-wash: #0f2942; --danger: #ff453a;
}
:root[data-theme="light"] {
  --bg: #ffffff; --surface: #fbfbfd; --surface-2: #f5f5f7; --border: #d2d2d7;
  --text: #1d1d1f; --muted: #6e6e73; --accent: #0071e3; --accent-strong: #0077ed;
  --accent-wash: #e8f2fd; --danger: #d70015;
}

* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.47059;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 22px; }
.wrap-wide { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

/* ---------- nav ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; max-width: 1200px; margin: 0 auto; height: 48px;
}
.brand {
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  color: var(--text); text-decoration: none; letter-spacing: -0.01em;
}
.brand span { color: var(--accent); }
nav.main { display: flex; gap: 26px; align-items: center; }
nav.main a { color: var(--text); text-decoration: none; font-size: 12px; font-weight: 400; opacity: 0.8; }
nav.main a:hover { opacity: 1; color: var(--text); }
.balance-pill {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0;
  background: var(--accent-wash); color: var(--accent-strong);
  padding: 4px 12px; border-radius: 980px;
}

/* ---------- hamburger menu ---------- */
.menu-toggle {
  appearance: none; border: none; background: transparent; cursor: pointer;
  width: 32px; height: 32px; padding: 0; margin-right: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; flex-shrink: 0;
}
.menu-toggle span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text); transition: transform 0.25s ease, opacity 0.2s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

header.site .bar { justify-content: flex-start; gap: 4px; }
header.site .bar .brand { margin-right: auto; }

.mega-menu {
  position: fixed; top: 48px; left: 0; right: 0; z-index: 60;
  background: var(--surface); border-bottom: 1px solid var(--border);
  transform: translateY(-8px); opacity: 0; pointer-events: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  max-height: calc(100vh - 48px); overflow-y: auto;
}
.mega-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mega-menu-inner {
  max-width: 1200px; margin: 0 auto; padding: 24px 22px 32px;
  display: grid; gap: 28px;
}
.mega-menu-title {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.mega-menu-link {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px; border-radius: 12px; text-decoration: none;
  transition: background 0.15s ease;
}
.mega-menu-link:hover { background: var(--surface-2); }
.mega-menu-link-name { font-family: var(--sans); font-size: 15px; font-weight: 600; color: var(--text); }
.mega-menu-link-desc { font-family: var(--sans); font-size: 12px; color: var(--muted); }

.mega-menu-backdrop {
  position: fixed; inset: 0; z-index: 55;
  background: color-mix(in srgb, var(--dark-bg, #000) 30%, transparent);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.mega-menu-backdrop.open { opacity: 1; pointer-events: auto; }

.passkey-modal-backdrop {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in srgb, var(--dark-bg, #000) 30%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.passkey-modal { max-width: 380px; width: 100%; text-align: left; }
.passkey-modal h3 { margin-top: 0; }

main { padding: 0 0 100px; }
main.page { padding: 56px 0 100px; }

/* ---------- type ---------- */
h1 {
  font-family: var(--sans); font-size: clamp(32px, 8vw, 56px); font-weight: 600; letter-spacing: -0.015em;
  margin: 0 0 8px; text-wrap: balance; line-height: 1.07; overflow-wrap: break-word;
}
h2 {
  font-family: var(--sans); font-size: clamp(24px, 6vw, 32px); font-weight: 600; letter-spacing: -0.01em;
  margin: 0 0 12px; text-wrap: balance; line-height: 1.1; overflow-wrap: break-word;
}
h3 { font-family: var(--sans); font-size: 20px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.005em; }
p.lead { color: var(--muted); font-size: 21px; line-height: 1.38; max-width: 42ch; font-weight: 400; }

/* ---------- hero ---------- */
.hero {
  text-align: center;
  padding: 88px 22px 64px;
  max-width: 900px;
  margin: 0 auto;
}
.hero .eyebrow {
  font-size: 19px; font-weight: 600; color: var(--accent); margin-bottom: 6px;
}
.hero h1 { font-size: clamp(34px, 10vw, 64px); }
.hero p.lead { margin: 0 auto 32px; text-align: center; max-width: 46ch; font-size: 24px; }
.hero .actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-visual {
  height: 320px; border-radius: 28px; margin: 0 auto 8px; max-width: 980px;
  background:
    radial-gradient(60% 100% at 30% 20%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%),
    radial-gradient(50% 90% at 75% 70%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 65%),
    #000;
  position: relative;
  overflow: hidden;
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.14) 1px, transparent 0);
  background-size: 22px 22px;
  mix-blend-mode: overlay;
}

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section.dark {
  background: var(--dark-bg); color: var(--dark-text);
}
.section.dark .muted { color: var(--dark-muted); }
.section.alt { background: var(--surface-2); }
.section h2 { text-align: center; margin: 0 auto 16px; max-width: 30ch; }
.section p.lead { text-align: center; margin: 0 auto 48px; }

.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
  background: var(--border); border-radius: var(--radius); overflow: hidden;
}
.section.dark .feature-grid { background: #2c2c2e; }
@media (max-width: 860px) { .feature-grid { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface); padding: 40px 32px;
}
.section.dark .feature { background: #000; }
.feature h3 { font-size: 22px; }
.feature p { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0; }

/* ---------- card / grid ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.10);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--sans); font-weight: 400; font-size: 17px;
  padding: 10px 22px; border-radius: 980px; border: 1px solid var(--accent);
  background: var(--accent); color: #fff; text-decoration: none; cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.btn.secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn.secondary:hover { background: var(--accent-wash); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }

/* ---------- pricing card ---------- */
.plan-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px;
  padding: 36px 32px; text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.10);
}
.plan-card .price {
  font-family: var(--sans); font-size: 48px; font-weight: 600; letter-spacing: -0.02em;
  margin: 8px 0 4px;
}
.plan-card .period { color: var(--muted); font-size: 15px; margin-bottom: 24px; }

/* ---------- status / table (unchanged structure, restyled) ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 12px; border-radius: 980px; background: var(--surface-2);
}
.status-pill.pending { color: #b36b00; }
.status-pill.confirmed, .status-pill.live { color: #1a7d3a; }
.status-pill.rejected { color: var(--danger); }
.status-pill.soon { color: var(--muted); }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.soon::before { display: none; }

/* ---------- storefront catalog ---------- */
.catalog-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.catalog-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 26px 26px; text-decoration: none; color: inherit; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.10);
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
a.catalog-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.06), 0 16px 32px -14px rgba(0,0,0,0.16);
}
.catalog-card-img {
  margin: 0 -26px; aspect-ratio: 16 / 9; overflow: hidden; background: #0a0a0a;
}
.catalog-card-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; display: block; }
.catalog-card h3 { margin: 12px 0 0; font-size: 20px; }
.catalog-card .status-pill { margin-top: 18px; }
.catalog-card .tagline { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.catalog-card-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px;
}
.catalog-card-foot .price-block { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.catalog-card-foot .price { font-family: var(--sans); font-weight: 600; font-size: 22px; }
.catalog-card-cta {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  padding: 9px 18px; border-radius: 980px; background: var(--accent); color: #fff;
  white-space: nowrap; transition: background 120ms ease; margin-left: auto;
}
a.catalog-card:hover .catalog-card-cta { background: var(--accent-strong); }
.catalog-card-soon { opacity: 0.55; }
.catalog-card-soon h3 { color: var(--muted); }

.product-photo {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.10);
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) { .product-photo { margin-top: 24px; } }

/* ---------- media gallery (карточка "как на Wildberries": видео + фото, свайп) ---------- */
.gallery-hero-wrap { padding-top: 56px; }
@media (max-width: 720px) { .gallery-hero-wrap { padding-top: 0; } }

.media-gallery {
  position: relative;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px -12px rgba(0,0,0,0.10);
  background: #000;
}
.media-gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none;
  height: 100%;
}
.media-gallery-track::-webkit-scrollbar { display: none; }
.media-slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: center;
  aspect-ratio: 4 / 5; background: #000; cursor: pointer;
}
.media-slide img, .media-slide .media-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; padding: 0;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.45); color: #fff;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.media-play::before { content: ""; margin-left: 4px; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff; }
.media-play.is-hidden { display: none; }
.media-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; padding: 0; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(0,0,0,0.35); color: #fff; font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.media-nav-prev { left: 10px; }
.media-nav-next { right: 10px; }
.media-counter {
  position: absolute; top: 12px; right: 12px; padding: 3px 10px; border-radius: 980px;
  background: rgba(0,0,0,0.4); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums;
}
.media-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; }
.media-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.45); transition: background 120ms, width 120ms; }
.media-dot.active { background: #fff; width: 16px; border-radius: 3px; }

.media-gallery--wide .media-slide { aspect-ratio: 16 / 9; }
@media (max-width: 720px) { .media-gallery--wide .media-slide { aspect-ratio: 16 / 9; height: auto; } .media-gallery.media-gallery--wide { height: auto; order: 0; } }

.media-lightbox {
  display: none; position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,0.92);
  align-items: center; justify-content: center; padding: 24px; cursor: zoom-out;
}
.media-lightbox.open { display: flex; }
.media-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }

@media (max-width: 720px) {
  .media-gallery {
    width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    height: calc(100dvh - 48px); border-radius: 0; border-left: none; border-right: none;
    order: -1; margin-bottom: 20px;
  }
  .media-slide { aspect-ratio: auto; height: 100%; }
  .media-play { width: 72px; height: 72px; }
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.table-wrap { overflow-x: auto; }

.auth-alt-methods {
  display: flex; flex-direction: column; align-items: stretch; gap: 14px;
}
.auth-alt-method { display: flex; justify-content: center; width: 100%; }
.auth-alt-method .btn { min-height: 48px; }

@media (max-width: 700px) {
  .responsive-table table, .responsive-table thead, .responsive-table tbody,
  .responsive-table th, .responsive-table td, .responsive-table tr {
    display: block;
  }
  .responsive-table thead { display: none; }
  .responsive-table tr {
    border: 1px solid var(--border); border-radius: 12px;
    padding: 14px; margin-bottom: 12px;
  }
  .responsive-table td {
    display: flex; justify-content: space-between; align-items: center;
    gap: 12px; padding: 7px 0; border: none; text-align: right;
  }
  .responsive-table td[data-label]:before {
    content: attr(data-label); color: var(--muted); font-size: 12px;
    text-align: left; flex-shrink: 0;
  }
  .responsive-table td[data-label=""]:before { content: none; }
  .responsive-table td[data-label=""] { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
}

.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

.field { margin-bottom: 16px; text-align: left; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.terms-row {
  display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px;
  font-size: 13px; font-weight: 400; cursor: pointer; color: var(--text);
}
.terms-row input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 18px; height: 18px; margin: 1px 0 0; border-radius: 5px;
  border: 1.5px solid var(--border); background: var(--surface);
  cursor: pointer; position: relative;
}
.terms-row input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.terms-row input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 1px;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.terms-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.field input, .field select {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-family: var(--sans); font-size: 15px;
}

.password-field-wrap { position: relative; }
.password-field-wrap input { padding-right: 44px; }
.password-field-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: none; background: transparent; cursor: pointer;
  font-size: 16px; opacity: 0.5; border-radius: 8px;
}
.password-field-toggle:hover { opacity: 0.8; background: var(--border); }
.password-field-toggle.showing { opacity: 0.9; }

.pay-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; font-family: var(--mono); font-size: 14px; text-align: left;
}
.pay-box dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 10px; }
.pay-box dd { margin: 2px 0 0; }

.qr-frame { background: #fff; padding: 12px; border-radius: 16px; border: 1px solid var(--border); display: inline-block; }
.qr-frame img { display: block; width: 156px; height: 156px; }

footer.site { border-top: 1px solid var(--border); padding: 28px 0; background: var(--surface-2); }
footer.site .wrap { color: var(--muted); font-size: 12px; }
