/* ClubConn — главный портал clubconn.com: тёмная «сияющая» тема в цветах логотипа (лайм → зелёный), стекло, анимации.
   Поверх общих стилей app.css. Портал всегда тёмный — это витрина сети; CRM живёт по своей теме. */
body.portal {
  --pb: #050d09; --pb2: #0a1d14; --ptext: #eaf5ee; --pmuted: #9fb6a8; --pline: rgba(255,255,255,.10);
  --pglass: rgba(255,255,255,.05); --lime: #a3e635; --green: #22c55e; --grad: linear-gradient(120deg, #c7f04a 0%, #84cc16 40%, #22c55e 100%);
  background: var(--pb); color: var(--ptext); color-scheme: dark; overflow-x: hidden;
  --bg: var(--pb); --card: #0f1f17; --text: var(--ptext); --muted: var(--pmuted); --line: var(--pline); --accent: #84cc16; --soft: #142a1d;
}
body.portal::before {                       /* сияние на фоне всей страницы */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(900px 600px at 10% -5%, rgba(163, 230, 53, .22), transparent 60%),
              radial-gradient(800px 600px at 100% 20%, rgba(34, 197, 94, .18), transparent 60%),
              radial-gradient(900px 700px at 50% 120%, rgba(22, 163, 74, .18), transparent 60%),
              linear-gradient(180deg, var(--pb) 0%, var(--pb2) 50%, var(--pb) 100%);
}
body.portal::after {                        /* тонкая сетка, тает к краям */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 20%, transparent 80%);
}
.portal a { color: inherit; }
.portal a.btn { text-decoration: none; }

/* ---------- шапка: прозрачная, при прокрутке — стекло ---------- */
.p-top { position: sticky; top: 0; z-index: 1000; display: flex; align-items: center; gap: 18px; padding: 14px clamp(16px, 4vw, 40px);
         background: transparent; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s, padding .25s; }
.p-top.scrolled { background: rgba(5, 13, 9, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
                  border-bottom-color: var(--pline); padding-top: 10px; padding-bottom: 10px; }
.p-logo-link { display: flex; align-items: center; }
.p-brand { height: 26px; width: auto; display: block; }
.p-nav { display: flex; gap: 22px; margin-left: auto; }
.p-nav a { color: var(--pmuted); text-decoration: none; font-weight: 600; font-size: 14px; transition: color .15s; white-space: nowrap; }
.p-nav a:hover { color: #fff; }
.p-top .lang-select { background: var(--pglass); color: var(--ptext); border: 1px solid var(--pline); border-radius: 10px; padding: 7px 10px; }
.p-top .lang-select option { color: #111; }
.p-login { background: var(--grad) !important; color: #06110b !important; border: 0 !important; font-weight: 800; border-radius: 10px; }

.portal main { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px) 40px; }

/* ---------- герой ---------- */
.p-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; min-height: min(78vh, 720px); padding: 32px 0 24px; }
.p-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
           color: #d9f99d; background: rgba(163, 230, 53, .10); border: 1px solid rgba(163, 230, 53, .28); }
.p-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(163,230,53,.7); animation: p-pulse 2s infinite; }
@keyframes p-pulse { 70% { box-shadow: 0 0 0 10px rgba(163,230,53,0); } 100% { box-shadow: 0 0 0 0 rgba(163,230,53,0); } }
.p-hero h1 { font-size: clamp(38px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -.03em; margin: 18px 0 18px; font-weight: 850; }
.p-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-lead { font-size: clamp(16px, 1.6vw, 20px); color: var(--pmuted); max-width: 620px; margin: 0 0 26px; line-height: 1.55; }
.p-cta { gap: 12px; }
.p-btn-glow { background: var(--grad) !important; color: #06110b !important; border: 0 !important; font-weight: 800; padding: 14px 22px !important;
              border-radius: 14px !important; font-size: 16px; box-shadow: 0 10px 40px rgba(132, 204, 22, .35); transition: transform .15s, box-shadow .15s; }
.p-btn-glow:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(132, 204, 22, .45); }
.p-btn-glass { background: var(--pglass) !important; color: var(--ptext) !important; border: 1px solid var(--pline) !important; padding: 14px 22px !important;
               border-radius: 14px !important; font-weight: 700; font-size: 16px; backdrop-filter: blur(8px); transition: background .15s, transform .15s; }
.p-btn-glass:hover { background: rgba(255,255,255,.10) !important; transform: translateY(-2px); }
.p-trust { color: var(--pmuted); font-size: 13px; margin: 18px 0 0; opacity: .85; }

/* логотип с видами спорта на орбите */
.p-orbit { position: relative; width: min(440px, 100%); aspect-ratio: 1; justify-self: center; }
.p-orbit::before { content: ""; position: absolute; inset: 18%; border-radius: 50%;
                   background: radial-gradient(circle, rgba(163,230,53,.35), rgba(34,197,94,.12) 45%, transparent 70%); filter: blur(20px); }
.p-core { position: absolute; inset: 33%; border-radius: 28%; background: #fff; display: grid; place-items: center;
          box-shadow: 0 0 0 1px rgba(255,255,255,.2), 0 20px 60px rgba(0,0,0,.5), 0 0 80px rgba(132,204,22,.35); animation: p-float 6s ease-in-out infinite; }
.p-core img { width: 78%; height: 78%; object-fit: contain; }
@keyframes p-float { 50% { transform: translateY(-8px); } }
.p-ring { position: absolute; border-radius: 50%; border: 1px dashed rgba(163, 230, 53, .25); }
.p-ring.r1 { inset: 18%; animation: p-spin 26s linear infinite; }
.p-ring.r2 { inset: 2%; animation: p-spin 44s linear infinite reverse; border-color: rgba(34, 197, 94, .18); }
.p-ring span { position: absolute; width: 52px; height: 52px; margin: -26px 0 0 -26px; display: grid; place-items: center; font-size: 26px;
               border-radius: 16px; background: rgba(15, 31, 23, .85); border: 1px solid var(--pline); box-shadow: 0 8px 24px rgba(0,0,0,.35);
               backdrop-filter: blur(6px); }
.p-ring.r1 span { animation: p-spin 26s linear infinite reverse; }
.p-ring.r2 span { animation: p-spin 44s linear infinite; }
.p-ring.r1 span:nth-child(1) { left: 50%; top: 0; } .p-ring.r1 span:nth-child(2) { left: 100%; top: 50%; }
.p-ring.r1 span:nth-child(3) { left: 50%; top: 100%; } .p-ring.r1 span:nth-child(4) { left: 0; top: 50%; }
.p-ring.r2 span:nth-child(1) { left: 75%; top: 6.7%; } .p-ring.r2 span:nth-child(2) { left: 100%; top: 50%; }
.p-ring.r2 span:nth-child(3) { left: 75%; top: 93.3%; } .p-ring.r2 span:nth-child(4) { left: 25%; top: 93.3%; }
.p-ring.r2 span:nth-child(5) { left: 0; top: 50%; } .p-ring.r2 span:nth-child(6) { left: 25%; top: 6.7%; }
@keyframes p-spin { to { transform: rotate(360deg); } }

/* ---------- живые цифры ---------- */
.p-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 8px 0 20px; border-radius: 20px; overflow: hidden;
           background: var(--pline); border: 1px solid var(--pline); }
.p-stats div { background: rgba(10, 29, 20, .75); padding: 22px 16px; text-align: center; display: grid; gap: 4px; backdrop-filter: blur(8px); }
.p-stats b { font-size: clamp(28px, 4vw, 44px); font-weight: 850; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text;
             background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.p-stats span { color: var(--pmuted); font-size: 14px; }

/* ---------- блоки ---------- */
.p-block { margin: 72px 0; }
.p-h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.02em; margin: 0 0 24px; font-weight: 800; }
.p-card { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); border: 1px solid var(--pline); border-radius: 20px;
          padding: 22px; position: relative; transition: transform .2s, border-color .2s, box-shadow .2s; }
.p-card:hover { transform: translateY(-4px); border-color: rgba(163, 230, 53, .35); box-shadow: 0 20px 50px rgba(0,0,0,.35), 0 0 40px rgba(132,204,22,.10); }
.p-card h3 { margin: 10px 0 8px; font-size: 19px; }
.p-card p, .p-card li { color: var(--pmuted); line-height: 1.5; margin: 0; }
.p-card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.p-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px;
         background: rgba(163, 230, 53, .10); border: 1px solid rgba(163, 230, 53, .22); }
.p-for { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.p-feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.p-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.p-steps b { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: #06110b; font-size: 18px; }

/* карта */
.p-map-wrap { position: relative; display: grid; grid-template-columns: 1fr; }
.p-map { height: 480px; border-radius: 22px; border: 1px solid var(--pline); z-index: 0; box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.p-club { position: absolute; top: 14px; right: 14px; width: min(390px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto;
          z-index: 500; padding: 18px; display: grid; gap: 8px; align-content: start; border-radius: 18px;
          background: rgba(10, 24, 17, .92); backdrop-filter: blur(12px); border: 1px solid var(--pline); color: var(--ptext); }
.p-close { position: absolute; top: 8px; right: 8px; }
.p-club-head { display: flex; gap: 12px; align-items: center; padding-right: 28px; }
.p-club-head h3 { margin: 0; }
.p-sec { border-top: 1px solid var(--pline); padding: 8px 0; display: grid; gap: 4px; }
.p-grp { display: grid; }
.p-club .btn { background: var(--pglass); color: var(--ptext); border-color: var(--pline); }
/* логотип клуба — на тёмно-зелёном переливающемся фоне ClubConn (владелец 18.10: белый логотип сливался с белым) */
.p-pin, .p-logo { background: linear-gradient(135deg, #052e1a, #14532d 45%, #166534 60%, #0b3d24); background-size: 250% 250%;
                  animation: p-logo-flow 7s ease-in-out infinite; }
@keyframes p-logo-flow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .p-pin, .p-logo { animation: none; } }
.p-pin { display: grid; place-items: center; border-radius: 50%; border: 3px solid #84cc16; overflow: hidden;
         box-shadow: 0 0 0 6px rgba(132,204,22,.25), 0 4px 12px rgba(0,0,0,.4); }
.p-pin img { width: 100%; height: 100%; object-fit: contain; padding: 5px; box-sizing: border-box; }
.p-pin span { font-weight: 800; color: #d9f99d; font-size: 18px; }
.p-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin-top: 14px; }
.p-item { display: flex; gap: 12px; align-items: center; text-align: left; cursor: pointer; padding: 14px; font: inherit; color: var(--ptext);
          background: rgba(255,255,255,.04); border: 1px solid var(--pline); border-radius: 16px; transition: border-color .15s, background .15s; }
.p-item:hover { border-color: rgba(163,230,53,.4); background: rgba(255,255,255,.07); }
.p-item small { display: block; }
.p-dist { color: var(--lime); font-weight: 700; }
.p-logo { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; overflow: hidden;
          font-weight: 800; color: #d9f99d; }
.p-logo.big { width: 62px; height: 62px; }
.p-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; box-sizing: border-box; }

/* новости */
.p-news { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.p-news-item { background: rgba(255,255,255,.04); border: 1px solid var(--pline); border-radius: 18px; padding: 18px; color: var(--ptext); }
.p-news-item h3 { margin: 4px 0; }
.p-news-item p { white-space: pre-wrap; margin: 0; color: var(--pmuted); }

/* призыв */
.p-ctaband { margin: 80px 0 40px; padding: clamp(28px, 5vw, 56px); border-radius: 28px; text-align: center; position: relative; overflow: hidden;
             background: var(--grad); color: #06110b; box-shadow: 0 30px 80px rgba(132, 204, 22, .25); }
.p-ctaband::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 200px at 50% 0%, rgba(255,255,255,.35), transparent 70%); pointer-events: none; }
.p-ctaband h2 { font-size: clamp(26px, 3.6vw, 42px); margin: 0 0 10px; letter-spacing: -.02em; }
.p-ctaband p { margin: 0 auto 22px; max-width: 620px; font-size: 17px; opacity: .85; }
.p-btn-dark { background: #06110b !important; color: #fff !important; border: 0 !important; padding: 14px 26px !important; border-radius: 14px !important;
              font-weight: 800; font-size: 16px; position: relative; z-index: 1; }

/* анкета /join */
.p-join { max-width: 760px; margin: 0 auto; padding: 24px; border-radius: 22px; background: rgba(10, 24, 17, .85); border: 1px solid var(--pline); }
.p-join input, .p-join textarea { background: rgba(255,255,255,.04); color: var(--ptext); border-color: var(--pline); }
.p-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p-done { text-align: center; padding: 24px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.home-page #join { display: none; }
.join-page .p-hero, .join-page .p-stats, .join-page #for, .join-page #features, .join-page #map, .join-page #steps, .join-page #news,
.join-page #cta { display: none !important; }
.join-page #join { margin-top: 24px; }
.p-back { display: inline-block; margin: 0 0 12px; color: var(--pmuted); text-decoration: none; font-weight: 600; }
.p-back:hover { color: var(--lime); }

/* подвал */
.p-foot { border-top: 1px solid var(--pline); background: rgba(5, 13, 9, .8); padding: 22px clamp(16px, 4vw, 40px); display: flex;
          justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--pmuted); }
.p-foot a { color: var(--pmuted); }
.p-foot a:hover { color: #fff; }
.p-foot-brand { display: flex; align-items: center; gap: 6px; }
.p-foot-brand img { height: 14px; width: auto; }
.doc { max-width: 760px; }
.doc-body { white-space: pre-wrap; max-height: 60vh; overflow: auto; margin: 10px 0; }

/* появление блоков при прокрутке */
.p-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.p-reveal.in { opacity: 1; transform: none; }

/* портал закрыт на время тестов: остаются заголовок и «Войти» */
.portal-closed .p-nav, .portal-closed .p-cta, .portal-closed .p-trust, .portal-closed .p-stats, .portal-closed #for, .portal-closed #features,
.portal-closed #map, .portal-closed #steps, .portal-closed #news, .portal-closed #cta, .portal-closed #join,
.portal-closed .p-foot [data-doc] { display: none !important; }
.p-soon { display: grid; justify-items: start; gap: 14px; margin-top: 18px; }
.p-soon p { max-width: 520px; color: var(--pmuted); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .p-ring, .p-ring span, .p-core, .p-badge i { animation: none !important; }
  .p-reveal { opacity: 1; transform: none; transition: none; }
}

html:has(body.portal) { overflow-x: hidden; }
.p-top > * { flex-shrink: 0; }
@media (max-width: 1080px) { .p-nav { display: none; } .p-top .lang-select { margin-left: auto; } }

/* ---------- планшет ---------- */
@media (max-width: 980px) {
  .p-hero { grid-template-columns: 1fr; min-height: 0; gap: 10px; text-align: left; }
  .p-orbit { width: min(340px, 86%); order: -1; margin-top: 4px; }
  .p-for, .p-feat { grid-template-columns: 1fr 1fr; }
  .p-steps { grid-template-columns: 1fr; }
}
/* ---------- телефон ---------- */
@media (max-width: 760px) {
  .p-nav { display: none; }
  .p-top { gap: 8px; padding: 10px 14px; }
  .p-top.scrolled { padding-top: 8px; padding-bottom: 8px; }
  .p-top .lang-select { margin-left: auto; max-width: 112px; padding: 6px 8px; font-size: 14px; }
  .p-top .btn.small { flex: none; white-space: nowrap; }
  .p-brand { height: 20px; }
  .p-hero { padding: 6px 0 8px; }
  .p-orbit { width: min(280px, 78%); }
  .p-ring span { width: 42px; height: 42px; margin: -21px 0 0 -21px; font-size: 21px; border-radius: 12px; }
  .p-hero h1 { margin: 14px 0 12px; }
  .p-cta { display: grid; grid-template-columns: 1fr; }
  .p-cta .btn { width: 100%; justify-content: center; text-align: center; white-space: normal; }
  .p-stats { grid-template-columns: 1fr 1fr; }
  .p-block { margin: 48px 0; }
  .p-for, .p-feat { grid-template-columns: 1fr; }
  .p-map { height: 360px; border-radius: 18px; }
  .p-club { position: static; width: auto; max-height: none; margin-top: 10px; }
  .p-two { grid-template-columns: 1fr; }
  .p-join { padding: 16px; }
  .p-ctaband { margin: 56px 0 28px; border-radius: 22px; }
  .p-foot { padding: 16px 14px; }
}
@media (max-width: 360px) { .p-brand { height: 17px; } .p-top .lang-select { max-width: 96px; } }

/* отсчёт до официального запуска */
.p-countdown { margin: 8px 0 24px; padding: clamp(20px, 3vw, 32px); border-radius: 24px; display: grid; gap: 18px; justify-items: center; text-align: center;
               background: linear-gradient(180deg, rgba(163,230,53,.10), rgba(34,197,94,.04)); border: 1px solid rgba(163,230,53,.25); }
.p-cd-head { display: grid; gap: 4px; }
.p-cd-head b { font-size: clamp(18px, 2.2vw, 24px); }
.p-cd { display: grid; grid-template-columns: repeat(4, minmax(64px, 120px)); gap: 12px; }
.p-cd div { display: grid; gap: 2px; padding: 14px 6px; border-radius: 16px; background: rgba(5,13,9,.6); border: 1px solid var(--pline); }
.p-cd b { font-size: clamp(30px, 5vw, 56px); font-weight: 850; letter-spacing: -.02em; font-variant-numeric: tabular-nums;
          background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-cd span { color: var(--pmuted); font-size: 13px; }
.p-sub { color: var(--pmuted); margin: -12px 0 18px; }
.join-page #countdown, .join-page #who { display: none !important; }
.portal-closed #countdown, .portal-closed #who { display: none !important; }
@media (max-width: 760px) { .p-cd { grid-template-columns: repeat(4, 1fr); gap: 6px; } .p-cd div { padding: 10px 2px; } .p-countdown .btn { width: 100%; } }

/* ▶ «Попробовать ClubConn» — демо-клуб без регистрации (виден и до открытия сети) */
.p-demo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 14px; }
.p-demo small { opacity: .75; font-size: 13px; }
