:root {
  --bg: #101010;
  --panel: #202020;
  --panel-2: #2a2a2a;
  --line: rgba(255, 255, 255, .16);
  --line-strong: rgba(255, 255, 255, .28);
  --text: #f4f4f4;
  --muted: #9a9a9f;
  --soft: #d7d7d7;
  --danger: #d88f8f;
  --ok: #a9e5be;
  --radius: 28px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(255, 255, 255, .06), transparent 38%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  margin-bottom: 28px;
}

.brand, nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f4f4f4;
  color: #101010;
  font-weight: 900;
  font-size: 25px;
}
.mark-img {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
}

.brand span { font-weight: 800; font-size: 20px; }
nav a, .ghost {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, .04);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
nav a:hover, .ghost:hover { transform: translateY(-1px); border-color: var(--line-strong); }

.hero {
  display: block;
  min-height: 440px;
}

.hero-copy, .gallery, .grid article, .apply, .files-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  box-shadow: var(--shadow);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 6vw, 70px);
}

.eyebrow, .label {
  margin: 0 0 14px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
}

h1, h2 { margin: 0; line-height: .95; }
h1 { font-size: clamp(64px, 14vw, 160px); }
h2 { font-size: clamp(30px, 5vw, 56px); }
.lead {
  max-width: 620px;
  margin: 26px 0 34px;
  color: var(--soft);
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.35;
}

.button, .upload {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, #f5f5f5, #cfcfcf);
  color: #111;
  font-weight: 850;
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease;
}
.button:hover, .upload:hover { transform: translateY(-2px); filter: brightness(1.05); }

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
  padding: 14px;
  overflow: hidden;
}
.gallery button {
  border: 0;
  padding: 0;
  border-radius: 20px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}
.gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 20px;
  filter: saturate(.92) contrast(1.03);
  transition: transform .24s ease, filter .24s ease;
}
.gallery button:hover img {
  transform: scale(1.035);
  filter: saturate(1) contrast(1.06);
}
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 18px var(--ok);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}
.grid article { padding: 28px; }
.grid span { color: var(--muted); font-weight: 850; }
.grid h2 { margin-top: 40px; font-size: 30px; }
.grid p, .apply p { color: var(--soft); line-height: 1.55; }

.apply {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 34px;
  margin-top: 22px;
  padding: clamp(24px, 4vw, 44px);
}
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer a { color: var(--text); font-weight: 800; }

.modal {
  width: min(760px, calc(100vw - 28px));
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 28px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  padding: 0;
  color: var(--text);
  background: transparent;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transition: opacity .2s ease, transform .2s ease;
}
.modal.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.modal::backdrop {
  background: rgba(0, 0, 0, .68);
  backdrop-filter: blur(10px);
}
.modal-card {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: clamp(24px, 4vw, 42px);
  background: linear-gradient(145deg, rgba(38, 38, 38, .98), rgba(22, 22, 22, .98));
  border-radius: 30px;
}
.modal-card h2 { margin-bottom: 24px; }
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 72px 92px;
  background: rgba(0, 0, 0, .84);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .18s ease;
}
.lightbox.is-open {
  display: flex;
}
.lightbox.is-visible {
  opacity: 1;
}
.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1120px, 100%);
  height: min(720px, 100%);
}
.lightbox img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .5);
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, .72);
  color: var(--text);
  cursor: pointer;
}
.lightbox-close {
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
}
.lightbox-nav {
  top: 50%;
  width: 52px;
  height: 72px;
  border-radius: 18px;
  transform: translateY(-50%);
  font-size: 44px;
}
.lightbox-nav.prev { left: -72px; }
.lightbox-nav.next { right: -72px; }

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form.compact { grid-template-columns: 1fr; }
label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(0, 0, 0, .18);
  color: var(--text);
  padding: 15px 16px;
  outline: none;
  transition: border-color .18s ease, background .18s ease;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, textarea:focus { border-color: var(--line-strong); background: rgba(255, 255, 255, .04); }
.wide { grid-column: 1 / -1; }
.message { min-height: 22px; margin: 0; color: var(--muted); }
.message.ok { color: var(--ok); }
.message.err { color: var(--danger); }

.files-shell { max-width: 920px; }
.files-card { padding: clamp(24px, 5vw, 42px); }
.files-card h1 { font-size: 48px; }
.files-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
}

.hidden { display: none !important; }
.upload input { display: none; }
.drop {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  color: var(--muted);
  margin-bottom: 18px;
}
.drop.active { background: rgba(255, 255, 255, .06); }
.file-list { display: grid; gap: 10px; }
.file-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(0, 0, 0, .16);
}
.file-row small { display: block; color: var(--muted); margin-top: 4px; }
.file-row a, .file-row button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  padding: 9px 12px;
  cursor: pointer;
}
.file-row button { color: var(--danger); }
.hidden { display: none !important; }

.reveal {
  animation: enter .52s ease both;
}

@keyframes enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  :root {
    --radius: 22px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .34);
  }
  body {
    background:
      radial-gradient(circle at 50% -8%, rgba(255, 255, 255, .055), transparent 34%),
      var(--bg);
  }
  .shell {
    width: min(100% - 22px, 560px);
    padding: 14px 0 34px;
  }
  .topbar {
    min-height: 50px;
    margin-bottom: 14px;
  }
  .mark-img {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }
  .brand span {
    font-size: 18px;
  }
  nav { display: none; }
  /* На странице оферты навигация «назад» нужна и на телефоне. */
  .legal-shell .topbar nav { display: flex; gap: 10px; }
  .hero {
    min-height: auto;
  }
  .hero-copy {
    min-height: 430px;
    padding: 28px 22px;
  }
  h1 {
    font-size: clamp(58px, 22vw, 92px);
    overflow-wrap: anywhere;
  }
  h2 {
    font-size: clamp(30px, 11vw, 44px);
  }
  .lead {
    margin: 18px 0 24px;
    font-size: 18px;
  }
  .button, .upload {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 14px;
  }
  .grid article {
    padding: 22px;
  }
  .grid h2 {
    margin-top: 26px;
    font-size: 28px;
  }
  .grid p, .apply p {
    font-size: 15px;
  }
  .gallery { grid-template-columns: 1fr; }
  .gallery {
    gap: 10px;
    margin-top: 14px;
    padding: 10px;
  }
  .gallery img {
    height: 220px;
    border-radius: 16px;
  }
  .apply {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 14px;
    padding: 22px;
  }
  .footer {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    font-size: 12px;
    line-height: 1.45;
  }
  .modal {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
    border-radius: 24px;
  }
  .modal-card {
    max-height: calc(100dvh - 18px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px 18px 18px;
    border-radius: 24px;
  }
  .modal-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }
  .form { grid-template-columns: 1fr; }
  textarea { min-height: 130px; }
  .lightbox { padding: 64px 10px 78px; }
  .lightbox-stage { height: 100%; }
  .lightbox img {
    border-radius: 12px;
  }
  .lightbox-close {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
  }
  .lightbox-nav {
    top: auto;
    bottom: -60px;
    transform: none;
    width: 44px;
    height: 58px;
    font-size: 34px;
  }
  .lightbox-nav.prev { left: calc(50% - 54px); }
  .lightbox-nav.next { right: calc(50% - 54px); }
  .files-shell {
    width: min(100% - 22px, 560px);
  }
  .files-card {
    padding: 22px;
  }
  .files-card h1 {
    font-size: 38px;
  }
  .files-head { align-items: stretch; flex-direction: column; }
  .drop {
    min-height: 96px;
    text-align: center;
  }
  .file-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .file-row > div {
    grid-column: 1 / -1;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .file-row a, .file-row button {
    width: 100%;
    text-align: center;
    padding: 11px 8px;
  }
}

@media (max-width: 430px) {
  .shell {
    width: calc(100% - 16px);
    padding-top: 10px;
  }
  .hero-copy {
    min-height: 390px;
    padding: 24px 18px;
  }
  h1 {
    font-size: clamp(50px, 20vw, 76px);
  }
  .eyebrow, .label {
    font-size: 10px;
  }
  .lead {
    font-size: 16px;
  }
  .grid article, .apply, .files-card {
    padding: 18px;
  }
  .gallery img {
    height: 190px;
  }
  .file-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .brand span {
    font-size: 16px;
  }
  h1 {
    font-size: 46px;
  }
  h2 {
    font-size: 28px;
  }
  .hero-copy {
    min-height: 360px;
  }
}

.apps-shell { max-width: 1040px; }
.apps-head {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .03));
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 58px);
}
.apps-head h1 { font-size: clamp(58px, 13vw, 128px); }
.live-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, .04);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.apps-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.app-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  box-shadow: 0 18px 54px rgba(0, 0, 0, .24);
  padding: clamp(18px, 3vw, 28px);
}
.app-card.is-new {
  animation: enter .34s ease both;
}
.app-card-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}
.app-id {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
}
.app-card h2 { font-size: clamp(26px, 5vw, 42px); }
.app-status {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--soft);
  background: rgba(255,255,255,.04);
  font-size: 12px;
  font-weight: 850;
}
.app-status.approved { color: var(--ok); }
.app-status.rejected { color: var(--danger); }
.app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.app-meta span {
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(0,0,0,.14);
  font-size: 13px;
}
.app-reason {
  margin: 0;
  color: var(--soft);
  line-height: 1.55;
  white-space: pre-wrap;
}
.app-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding: 0 13px;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.react-btn:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.react-btn.active { background: #f0f0f0; color: #101010; border-color: #fff; }
.react-btn b { font-size: 14px; }
.react-btn small {
  color: inherit;
  opacity: .72;
  font-size: 12px;
  font-weight: 800;
}
.empty-apps {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  color: var(--muted);
  background: rgba(255,255,255,.035);
}

.donate-shell { max-width: 1180px; }
.donate-head, .success-card, .legal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  padding: clamp(28px, 6vw, 64px);
}
.donate-head h1 { font-size: clamp(62px, 14vw, 148px); }
.donate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.donate-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.025));
}
.donate-card.featured { border-color: var(--line-strong); background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.035)); }
.donate-card h2 { font-size: 38px; }
.donate-card p { color: var(--soft); line-height: 1.55; }
.donate-card p a, .donate-note a, .legal-card a { text-decoration: underline; text-underline-offset: 3px; }
.donate-card .button { margin-top: auto; width: 100%; }
.donate-price { font-size: 42px; font-weight: 900; }
.donate-note { color: var(--muted); padding: 22px 4px; }
.donate-form { display: grid; gap: 18px; overflow-x: hidden; }
.donate-form > *, .payment-choice > * { min-width: 0; }
.donate-form h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.payment-choice { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.payment-choice label { display: block; cursor: pointer; }
.payment-choice input { position: absolute; opacity: 0; pointer-events: none; }
.payment-choice span {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
}
.payment-choice small { color: var(--muted); margin-top: 4px; font-weight: 500; }
.payment-choice input:checked + span { border-color: #fff; background: rgba(255,255,255,.1); }
.success-shell { min-height: 100vh; display: grid; place-items: center; }
.success-card { width: min(760px, 100%); text-align: center; }
.success-card .mark-img { margin: 0 auto 28px; }
.success-card h1 { font-size: clamp(52px, 11vw, 96px); }
.success-card .lead { margin-left: auto; margin-right: auto; }
.legal-shell { max-width: 900px; }
.legal-card h1 { font-size: clamp(46px, 10vw, 86px); margin-bottom: 18px; }
.legal-card h2 { font-size: clamp(20px, 3.4vw, 26px); margin: 34px 0 12px; }
.legal-card p { color: var(--soft); line-height: 1.7; margin: 0 0 18px; }
.legal-updated { font-size: 14px; opacity: .7; margin-bottom: 28px; }
.legal-list { color: var(--soft); line-height: 1.7; margin: 0 0 18px; padding-left: 22px; }
.legal-list li { margin: 0 0 8px; }
.fillme {
  color: #ffd1d1;
  background: rgba(255, 70, 70, .14);
  border-bottom: 1px dashed rgba(255, 120, 120, .7);
  padding: 0 4px;
  border-radius: 4px;
}

@media (max-width: 820px) {
  .donate-grid { grid-template-columns: 1fr; }
  .donate-card { min-height: 350px; padding: 22px; }
  .payment-choice { grid-template-columns: 1fr; }
  .apps-head { padding: 24px 20px; }
  .apps-head h1 { font-size: clamp(48px, 18vw, 76px); }
  .app-card-top { display: grid; }
  .app-status { width: max-content; }
  .react-btn {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
  }
}
