/* ---------- Темы ---------- */
:root,
:root[data-theme="emerald"] {
  --bg-1: #0c1a14;
  --bg-2: #050b08;
  --glow: rgba(43, 212, 125, 0.18);
  --accent: #2bd47d;
  --accent-hover: #4ae092;
  --accent-ink: #062113;
  --accent-text: #1f8f55;
  --text: #f2f7f4;
  --muted: #a7b8b0;
  --ghost-border: rgba(255, 255, 255, 0.28);
  --ghost-bg: rgba(255, 255, 255, 0.04);
}

:root[data-theme="taxi"] {
  --bg-1: #1a1712;
  --bg-2: #0a0907;
  --glow: rgba(255, 200, 36, 0.16);
  --accent: #ffc824;
  --accent-hover: #ffd451;
  --accent-ink: #1a1400;
  --accent-text: #a87800;
  --text: #faf7ef;
  --muted: #bab3a2;
  --ghost-border: rgba(255, 255, 255, 0.28);
  --ghost-bg: rgba(255, 255, 255, 0.04);
}

:root[data-theme="ocean"] {
  --bg-1: #0d1a2e;
  --bg-2: #050a14;
  --glow: rgba(61, 139, 255, 0.2);
  --accent: #3d8bff;
  --accent-hover: #5e9fff;
  --accent-ink: #fff;
  --accent-text: #2366d1;
  --text: #f0f5fc;
  --muted: #a3b2c7;
  --ghost-border: rgba(255, 255, 255, 0.28);
  --ghost-bg: rgba(255, 255, 255, 0.04);
}

:root[data-theme="violet"] {
  --bg-1: #1a1230;
  --bg-2: #0a0614;
  --glow: rgba(155, 107, 255, 0.22);
  --accent: #9b6bff;
  --accent-hover: #ae86ff;
  --accent-ink: #fff;
  --accent-text: #7444e0;
  --text: #f5f2fc;
  --muted: #b3aac7;
  --ghost-border: rgba(255, 255, 255, 0.28);
  --ghost-bg: rgba(255, 255, 255, 0.04);
}

:root[data-theme="sunset"] {
  --bg-1: #2a1410;
  --bg-2: #120806;
  --glow: rgba(255, 112, 74, 0.2);
  --accent: #ff704a;
  --accent-hover: #ff8a69;
  --accent-ink: #1f0700;
  --accent-text: #d24a24;
  --text: #fcf3f0;
  --muted: #c7aea7;
  --ghost-border: rgba(255, 255, 255, 0.28);
  --ghost-bg: rgba(255, 255, 255, 0.04);
}

/* Белая карточка одинакова во всех темах */
:root {
  --card-bg: #fbfcfb;
  --card-text: #141a17;
  --card-muted: #5d6763;
  --card-border: #e2e7e4;
  --radius: 18px;
}

/* ---------- База ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 60% at 80% 0%, var(--glow), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  background-attachment: fixed;
  transition: background 0.3s;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 20px 32px;
}

/* ---------- Hero ---------- */
.eyebrow {
  margin: 0 0 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow__region {
  color: var(--text);
}

.eyebrow__since {
  color: var(--accent);
  margin-left: 4px;
}

.hero__title {
  margin: 0 0 20px;
  font-size: clamp(32px, 8vw, 46px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand {
  color: var(--accent);
}

.hero__lead {
  margin: 0 0 32px;
  font-size: clamp(17px, 4.2vw, 20px);
  line-height: 1.5;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border-radius: 14px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background-color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -8px var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  border: 2px solid var(--ghost-border);
  background: var(--ghost-bg);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--accent);
}

.btn:focus-visible,
.link:focus-visible,
.theme-dot:focus-visible,
.sheet__close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Карточка мессенджеров ---------- */
.card {
  background: var(--card-bg);
  color: var(--card-text);
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.card__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-text);
}

.card__lead,
.card__note {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--card-muted);
}

.card__note {
  color: var(--card-text);
}

.links {
  list-style: none;
  margin: 22px 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--card-text);
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.link:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, 0.25);
}

.link:active {
  transform: scale(0.99);
}

.link__icon {
  flex: none;
  width: 48px;
  height: 48px;
}

.link__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.link__text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.link__title {
  font-size: 17px;
  font-weight: 700;
}

.link__sub {
  font-size: 13px;
  color: var(--card-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link__arrow {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent-text);
  transition: transform 0.2s;
}

.link:hover .link__arrow {
  transform: translateX(3px);
}

/* ---------- Футер и переключатель тем ---------- */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  margin-top: 28px;
  font-size: 13px;
  color: var(--muted);
}

.themes {
  display: flex;
  gap: 10px;
}

.theme-dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s;
}

.theme-dot:hover {
  transform: scale(1.12);
}

.theme-dot[aria-pressed="true"] {
  border-color: #fff;
}

.theme-dot[data-theme="emerald"] { background: #2bd47d; }
.theme-dot[data-theme="taxi"] { background: #ffc824; }
.theme-dot[data-theme="ocean"] { background: #3d8bff; }
.theme-dot[data-theme="violet"] { background: #9b6bff; }
.theme-dot[data-theme="sunset"] { background: #ff704a; }

/* ---------- Окно с номерами ---------- */
.sheet {
  width: min(480px, calc(100% - 32px));
  padding: 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--card-text);
  font-family: inherit;
}

.sheet::backdrop {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
}

.sheet[open] {
  animation: pop 0.2s ease-out;
}

.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sheet__title {
  margin: 0;
  font-size: 21px;
  color: var(--accent-text);
}

.sheet__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #eef1ef;
  color: var(--card-text);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.sheet__lead {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--card-muted);
}

.sheet .links {
  margin-bottom: 0;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* На телефоне окно выезжает снизу */
@media (max-width: 520px) {
  .page {
    padding: 36px 16px 24px;
  }

  .hero__actions {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .hero__actions .btn {
    flex: 1 1 auto;
    padding: 0 16px;
    font-size: 16px;
    white-space: nowrap;
  }

  .card {
    padding: 24px 16px 20px;
  }

  .link {
    padding: 14px;
    gap: 14px;
  }

  .sheet {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    border-radius: var(--radius) var(--radius) 0 0;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .sheet[open] {
    animation: slide-up 0.25s ease-out;
  }
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  .sheet[open] {
    animation: none !important;
    transition: none !important;
  }
}
