:root {
  --bg: #07111a;
  --bg-2: #0c1622;
  --panel: rgba(14, 23, 36, 0.78);
  --panel-strong: rgba(18, 29, 44, 0.96);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f7fb;
  --muted: #9db0c7;
  --accent-yellow: #f4dd3f;
  --accent-green: #96ff54;
  --accent-purple: #8b5cf6;
  --accent-blue: #4da3ff;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --maxw: 1280px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

body {
  min-height: 100vh;
  position: relative;
}

button,
a,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.page-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(244, 221, 63, 0.2), transparent 22%),
    radial-gradient(circle at 78% 18%, rgba(77, 163, 255, 0.18), transparent 24%),
    radial-gradient(circle at 72% 76%, rgba(139, 92, 246, 0.16), transparent 24%),
    radial-gradient(circle at 18% 82%, rgba(150, 255, 84, 0.14), transparent 20%),
    linear-gradient(180deg, #07111a 0%, #091420 100%);
  pointer-events: none;
}

.site-shell {
  width: min(var(--maxw), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  position: relative;
  z-index: 1;
}

.hero-card,
.members-section,
.member-card,
.member-modal__dialog {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow);
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.hero-brand {
  display: flex;
  gap: 18px;
  align-items: center;
}

.hero-logo-wrap {
  width: 88px;
  height: 88px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.hero-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-logo-fallback {
  background:
    linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  font-size: 28px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero-kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-track {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.hero-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-card {
  min-width: 150px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 14px 16px;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-intro {
  margin-top: 22px;
  color: #dbe6f3;
  font-size: 16px;
  line-height: 1.6;
  max-width: 860px;
}

.members-section {
  margin-top: 20px;
  background: rgba(9, 17, 28, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow);
}

.section-head {
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.member-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  min-height: 320px;
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.16);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
}

.member-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #0d1622;
  overflow: hidden;
}

.member-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(244,221,63,0.32), transparent 34%),
    radial-gradient(circle at 78% 20%, rgba(77,163,255,0.24), transparent 32%),
    radial-gradient(circle at 72% 78%, rgba(139,92,246,0.24), transparent 34%),
    radial-gradient(circle at 18% 76%, rgba(150,255,84,0.22), transparent 30%),
    linear-gradient(135deg, #132234 0%, #0a111b 100%);
}

.member-card__badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #09111a;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
}

.member-card__body {
  padding: 16px;
}

.member-card__name {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.member-card__city {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.member-card__project {
  margin: 12px 0 0;
  color: #dbe6f3;
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 60px;
}

.member-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.member-modal.is-open {
  display: block;
}

.member-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 14, 0.72);
}

.member-modal__dialog {
  position: relative;
  width: min(1120px, calc(100% - 24px));
  min-height: min(760px, calc(100vh - 24px));
  margin: 12px auto;
  background: var(--panel-strong);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.member-modal__content {
  height: 100%;
  min-height: min(760px, calc(100vh - 24px));
  padding: 36px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
}

.modal-close,
.modal-nav {
  position: absolute;
  z-index: 3;
  border: none;
  cursor: pointer;
  color: white;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
}

.modal-close {
  top: 16px;
  right: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 18px;
}

.modal-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}

.modal-nav--prev {
  left: 16px;
}

.modal-nav--next {
  right: 16px;
}

.modal-media {
  position: relative;
  min-height: 520px;
  border-radius: 28px;
  overflow: hidden;
  background: #0d1622;
  border: 1px solid rgba(255,255,255,0.08);
}

.modal-media img,
.modal-media .member-card__placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-side {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.modal-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.modal-index {
  color: var(--muted);
  font-size: 14px;
}

.modal-ready {
  display: inline-flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,0.06);
  color: #dbe6f3;
}

.modal-name {
  margin: 0;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.modal-city {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.modal-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.info-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 18px 18px 20px;
}

.info-card__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.info-card__value {
  margin: 0;
  color: #f3f8ff;
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.modal-actions {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  font-weight: 700;
  transition: transform 160ms ease, opacity 160ms ease;
}

.action-btn:hover {
  transform: translateY(-2px);
}

.action-btn--tg {
  color: #07111a;
  background: linear-gradient(135deg, var(--accent-blue), #7fc2ff);
}

.action-btn--site {
  color: #07111a;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
}

.placeholder-note {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.14);
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1120px) {
  .members-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .member-modal__content {
    grid-template-columns: 340px 1fr;
  }
}

@media (max-width: 860px) {
  .site-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 10px;
  }

  .hero-head {
    flex-direction: column;
  }

  .hero-stats {
    justify-content: flex-start;
  }

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

  .member-modal__dialog {
    width: calc(100% - 12px);
    min-height: calc(100vh - 12px);
    margin: 6px auto;
    border-radius: 24px;
  }

  .member-modal__content {
    min-height: calc(100vh - 12px);
    grid-template-columns: 1fr;
    padding: 56px 16px 18px;
    gap: 16px;
  }

  .modal-media {
    min-height: 340px;
  }

  .modal-nav {
    top: auto;
    bottom: 14px;
    transform: none;
    width: 46px;
    height: 46px;
    font-size: 28px;
  }

  .modal-nav--prev {
    left: 16px;
  }

  .modal-nav--next {
    right: 16px;
  }
}

@media (max-width: 560px) {
  .hero-card,
  .members-section {
    padding: 18px;
    border-radius: 22px;
  }

  .hero-brand {
    align-items: flex-start;
  }

  .hero-logo-wrap {
    width: 68px;
    height: 68px;
    border-radius: 18px;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .member-card {
    min-height: 0;
  }

  .member-card__project {
    min-height: 0;
  }

  .modal-name {
    font-size: 34px;
  }
}
.member-card__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.member-card__open {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.modal-share {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: white;
  border: none;
}

/* SHARE */
.share-sheet {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}
.share-sheet.is-open { display:block; }

.share-sheet__backdrop {
  position:absolute;
  inset:0;
  background:rgba(0,0,0,0.6);
}

.share-sheet__panel {
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  background:#111;
  padding:20px;
  border-radius:20px 20px 0 0;
}
/* =========================
   PATCH: TOP SHARE BUTTON
========================= */

.modal-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-share-btn {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.modal-share-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.14);
}

/* =========================
   PATCH: MODAL MOBILE SCROLL FIX
========================= */

@media (max-width: 860px) {
  .member-modal__content {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-side {
    min-height: auto;
  }
}

/* =========================
   PATCH: SHARE SHEET FULL UI
========================= */

.share-sheet {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 999;
}

.share-sheet.is-open {
  display: block;
}

.share-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.share-sheet__panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0f1722;
  padding: 20px;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

/* header */

.share-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.share-sheet__close {
  border: none;
  background: rgba(255,255,255,0.08);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}

/* input */

.share-sheet__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
  color: #fff;
  margin-bottom: 10px;
}

/* copy */

.share-sheet__copy {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent-yellow), var(--accent-green));
  color: #09111a;
  font-weight: 700;
  margin-bottom: 12px;
  cursor: pointer;
}

/* buttons row */

.share-sheet__row {
  display: flex;
  gap: 10px;
}

.share-sheet__btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  font-size: 14px;
  cursor: pointer;
  transition: background 160ms ease;
}

.share-sheet__btn:hover {
  background: rgba(255,255,255,0.14);
}
/* =========================
   SHARE SHEET DESKTOP MODE
========================= */

@media (min-width: 768px) {

  .share-sheet__panel {
    position: absolute;
    top: 50%;
    left: 50%;
    bottom: auto;
    right: auto;

    transform: translate(-50%, -50%);

    width: 520px;
    max-width: calc(100% - 32px);

    border-radius: 20px;
    padding: 22px;
  }

}
/* =========================
   PATCH: MOBILE MODAL FIX
========================= */

@media (max-width: 860px) {
  .member-modal {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .member-modal__dialog {
    height: auto;
    min-height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    overflow: visible;
  }

  .member-modal__content {
    min-height: calc(100vh - 12px);
    max-height: calc(100vh - 12px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: 72px;
    padding-bottom: 84px;
  }

  .modal-side {
    min-width: 0;
    padding-bottom: 12px;
  }

  .modal-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-right: 64px;
    flex-wrap: wrap;
  }

  .modal-top-actions {
    display: flex;
    width: 100%;
    order: 2;
  }

  .modal-share-btn {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
    padding: 10px 14px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }
}
/* =========================
   PATCH: MOBILE CONTROLS BAR
========================= */

@media (max-width: 860px) {

  /* 🔥 поднимаем стрелки выше */
  .modal-nav {
    bottom: 72px; /* было ~14px → поднимаем над браузером */
    width: 52px;
    height: 52px;
    font-size: 28px;
  }

  /* 🔥 делаем центральную кнопку share */
  .modal-top-actions {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 120px); /* чтобы не налезала на стрелки */
    z-index: 5;
  }

  .modal-share-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 999px;
    font-size: 14px;
    background: rgba(255,255,255,0.12);
  }

  /* 🔥 чтобы контент не перекрывался кнопками */
  .member-modal__content {
    padding-bottom: 140px;
  }

}
/* =========================
   PATCH: MOBILE BUTTON BALANCE
========================= */

@media (max-width: 860px) {

  /* 🔥 делаем стрелки той же высоты что share */
  .modal-nav {
    height: 48px;
    width: 48px;
    font-size: 24px;
  }

  /* 🔥 уменьшаем share кнопку */
  .modal-share-btn {
    min-height: 48px;
    font-size: 13px;
    padding: 8px 12px;
  }

  /* 🔥 чуть уменьшаем ширину чтобы не налезала */
  .modal-top-actions {
    width: calc(100% - 110px);
  }

}
/* =========================
   PATCH: MOBILE CONTROL BAR FINAL
========================= */

@media (max-width: 860px) {

  /* 🔥 делаем подложку панели (НЕ прозрачная) */
  .modal-top-actions {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);

    width: calc(100% - 32px);
    padding: 10px;

    background: rgba(10, 18, 28, 0.85);
    backdrop-filter: blur(16px);

    border-radius: 20px;
    z-index: 6;
  }

  /* 🔥 уменьшенная share кнопка (перебиваем старые стили) */
  .modal-share-btn {
    width: 100%;
    height: 44px !important;
    min-height: 44px !important;

    font-size: 13px !important;
    padding: 6px 10px !important;

    border-radius: 999px;
    background: rgba(255,255,255,0.12);
  }

  /* 🔥 стрелки выравниваем под неё */
  .modal-nav {
    bottom: 72px;
    height: 44px;
    width: 44px;
    font-size: 22px;
  }

  /* 🔥 чтобы контент не перекрывался */
  .member-modal__content {
    padding-bottom: 150px;
  }

}
/* =========================
   PATCH: MOBILE UNIFIED CONTROL BAR
========================= */

@media (max-width: 860px) {
  .modal-top-actions {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 70px;
    transform: none;
    width: auto;
    padding: 0;
    background: none;
    backdrop-filter: none;
    border-radius: 0;
    z-index: 6;
    pointer-events: none;
  }

  .modal-share-btn {
    display: block;
    width: 100%;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 76px !important;
    border-radius: 999px;
    background: rgba(58, 67, 82, 0.94) !important;
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    font-size: 13px !important;
    line-height: 52px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.28);
    pointer-events: auto;
  }

  .modal-nav {
    bottom: 70px;
    transform: none;
    width: 52px;
    height: 52px;
    font-size: 24px;
    line-height: 1;
    z-index: 7;
    background: rgba(58, 67, 82, 0.94);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  }

  .modal-nav--prev {
    left: 16px;
  }

  .modal-nav--next {
    right: 16px;
  }

  .member-modal__content {
    padding-bottom: 150px;
  }
}