/* ═══════════════════════════════════════════════════════════════════════
   Космический Оракул — v1.56 «WOW-слой SEO-кластера» (oracle-wow.css).

   Вау-эффекты страниц нумерологии, хиромантии, сезонов и матрицы:
   - фоновые частицы .wow-canvas (режимы digits/runes/snow/sparks/sun/fireflies/hearts/starfield)
   - reveal-on-scroll (.ow-reveal, гейтится классом .wow-on на <html> — без JS всё видно)
   - большая цифра .ow-num-big (свечение + орбитальное кольцо)
   - анимация расчёта .ow-calc (пошаговое сложение цифр)
   - SVG-ладонь .ow-hand (самопрорисовка активной линии)
   - SVG-звезда .ow-star (подсветка активных позиций)
   - карточки линий/сезонов/матрицы
   Уважает prefers-reduced-motion. ═════════════════════════════════════ */

/* ── база ─────────────────────────────────────────────────────────────── */
.ow-body { position: relative; overflow-x: hidden; }
.ow-body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(1100px 520px at 78% -8%, rgba(85,128,247,.14), transparent 62%),
        radial-gradient(900px 480px at 12% 12%, rgba(94,226,240,.09), transparent 60%);
    pointer-events: none; z-index: 0;
}
.ow-wrap { position: relative; z-index: 1; }
.wow-canvas {
    position: fixed; inset: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 0; opacity: .85;
}
@supports (mix-blend-mode: screen) { .wow-canvas { mix-blend-mode: screen; } }

/* ── reveal-on-scroll (только при JS) ─────────────────────────────────── */
html.wow-on .ow-reveal { opacity: 0; transform: translateY(22px); }
html.wow-on .ow-reveal.in {
    opacity: 1; transform: none;
    transition: opacity .7s ease, transform .7s cubic-bezier(.19,1,.22,1);
}

/* ── большая цифра нумерологии ────────────────────────────────────────── */
.ow-num-hero { display: flex; gap: 26px; align-items: center; }
.ow-num-figure {
    position: relative; flex: 0 0 190px; height: 190px;
    display: grid; place-items: center;
}
.ow-num-big {
    font-family: 'Unbounded', var(--ff-fallback, sans-serif);
    font-size: 92px; font-weight: 800; line-height: 1;
    background: linear-gradient(135deg, #f0c75e 8%, #5ee2f0 58%, #5580f7 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 0 22px rgba(240,199,94,.35));
    animation: owNumPulse 3.6s ease-in-out infinite;
}
.ow-num-ring {
    position: absolute; inset: 8px; border-radius: 50%;
    border: 1.5px dashed rgba(240,199,94,.4);
    animation: owSpin 14s linear infinite;
}
.ow-num-ring::before {
    content: ''; position: absolute; top: -5px; left: 50%;
    width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
    background: #f0c75e; box-shadow: 0 0 12px 2px rgba(240,199,94,.8);
}
@keyframes owNumPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.045); }
}
@keyframes owSpin { to { transform: rotate(360deg); } }
.ow-num-caption b { display: block; font-size: 20px; margin-bottom: 4px; }
.ow-num-keys { color: rgba(235,240,255,.72); }
.ow-master {
    display: inline-block; margin: 6px 0 4px; padding: 3px 12px;
    border-radius: 999px; font-size: 12.5px; font-weight: 700;
    color: #120a24; background: linear-gradient(135deg, #f0c75e, #ffe9a8);
    box-shadow: 0 0 18px rgba(240,199,94,.45);
}

/* ── анимация расчёта ─────────────────────────────────────────────────── */
.ow-calc { margin-top: 6px; }
.ow-calc-date { color: rgba(235,240,255,.75); margin: 0 0 12px; }
.ow-calc-digits { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.ow-digit {
    display: grid; place-items: center; width: 40px; height: 44px;
    border-radius: 10px; font-weight: 800; font-size: 20px;
    background: rgba(94,226,240,.1); border: 1px solid rgba(94,226,240,.4);
    color: #9beaff;
}
html.wow-on .ow-digit { opacity: 0; transform: translateY(14px) scale(.8); }
html.wow-on .ow-digit.pop {
    opacity: 1; transform: none;
    transition: opacity .35s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.ow-calc-eq { font-weight: 700; color: rgba(235,240,255,.8); margin-left: 6px; }
.ow-calc-steps { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.ow-step {
    display: inline-grid; place-items: center; min-width: 46px; height: 46px; padding: 0 12px;
    border-radius: 50px; font-weight: 800; font-size: 19px;
    background: rgba(240,199,94,.12); border: 1px solid rgba(240,199,94,.45); color: #f0c75e;
}
html.wow-on .ow-step { opacity: 0; transform: scale(.6); }
html.wow-on .ow-step.pop {
    opacity: 1; transform: none;
    transition: opacity .4s ease, transform .4s cubic-bezier(.34,1.56,.64,1);
}
.ow-step-arrow { color: rgba(235,240,255,.5); }
.ow-calc-final { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ow-calc-final .ow-num-big { font-size: 64px; }
.ow-calc-links { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ow-bday-note { color: rgba(235,240,255,.72); }
.ow-bday-note a { color: #9beaff; }

/* ── списки сильное/теневое ───────────────────────────────────────────── */
.ow-list { margin: 0; padding-left: 20px; }
.ow-list li { margin: 7px 0; }
.ow-list.plus  li::marker { content: '✦  '; color: #7ef0c0; }
.ow-list.minus li::marker { content: '✕  '; color: #ff9e9e; }

/* ── SVG-ладонь ───────────────────────────────────────────────────────── */
.ow-hand-stage { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.ow-hand-figure { flex: 0 0 220px; max-width: 220px; margin: 0 auto; }
.ow-hand { width: 100%; height: auto; display: block; }
.ow-hand .ow-fingers rect, .ow-hand .ow-thumb, .ow-hand .ow-palm {
    fill: none; stroke: rgba(155,234,255,.4); stroke-width: 2; stroke-linecap: round;
}
.ow-hand .ow-line {
    fill: none; stroke: #f0c75e; stroke-width: 2.4; stroke-linecap: round;
    stroke-linejoin: round; opacity: .95;
    filter: drop-shadow(0 0 6px rgba(240,199,94,.55));
}
.ow-hand.has-active .ow-line { opacity: .18; stroke-width: 2; filter: none; }
.ow-hand.has-active .ow-line.is-active {
    opacity: 1; stroke-width: 3.4;
    filter: drop-shadow(0 0 9px rgba(240,199,94,.85));
    animation: owLineGlow 2.2s ease-in-out infinite;
}
@keyframes owLineGlow {
    0%, 100% { stroke: #f0c75e; }
    50%      { stroke: #ffe9a8; }
}
.ow-hand .ow-dim { opacity: .1 !important; }
.ow-hand-legend { flex: 1 1 300px; display: grid; gap: 10px; }
.ow-hand-item {
    display: grid; grid-template-columns: 14px 1fr; gap: 4px 12px;
    padding: 12px 16px; border-radius: 14px; text-decoration: none;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
    transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.ow-hand-item:hover { border-color: rgba(240,199,94,.5); background: rgba(240,199,94,.06); transform: translateY(-2px); }
.ow-hand-dot {
    grid-row: span 2; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%;
    background: radial-gradient(circle, #f0c75e 30%, rgba(240,199,94,.15) 100%);
}
.ow-hand-item b { color: #fff; }
.ow-hand-where { color: rgba(235,240,255,.6); font-size: 13.5px; }
.ow-hand-facts { flex: 1 1 300px; }
.ow-hand-grid a span { font-size: 13.5px; }

/* самопрорисовка активной линии (только при JS) */
html.wow-on .ow-hand.has-active .ow-line.is-active {
    stroke-dasharray: 460; stroke-dashoffset: 460;
    animation: owDraw 1.6s ease forwards, owLineGlow 2.2s ease-in-out 1.6s infinite;
}
html.wow-on .ow-hand .ow-line { transition: opacity .8s ease .9s; }
html.wow-on .ow-hand.has-active .ow-line:not(.is-active) { opacity: .12; transition: opacity .8s ease .9s; }
html.wow-on .ow-hand:not(.has-active) .ow-line {
    stroke-dasharray: 460; stroke-dashoffset: 460;
    animation: owDraw 1.2s ease forwards;
}
html.wow-on .ow-hand:not(.has-active) .ow-line:nth-child(2) { animation-delay: .15s; }
html.wow-on .ow-hand:not(.has-active) .ow-line:nth-child(3) { animation-delay: .3s; }
html.wow-on .ow-hand:not(.has-active) .ow-line:nth-child(4) { animation-delay: .45s; }
html.wow-on .ow-hand:not(.has-active) .ow-line:nth-child(5) { animation-delay: .6s; }
html.wow-on .ow-hand:not(.has-active) .ow-line:nth-child(6) { animation-delay: .75s; }
html.wow-on .ow-hand:not(.has-active) .ow-line:nth-child(7) { animation-delay: .9s; }
html.wow-on .ow-hand:not(.has-active) .ow-line:nth-child(8) { animation-delay: 1.05s; }
@keyframes owDraw { to { stroke-dashoffset: 0; } }

/* ── карточки вариантов (хиромантия/сезоны) ───────────────────────────── */
.ow-variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ow-variant {
    padding: 16px 18px; border-radius: 14px;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
    transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.ow-variant:hover {
    border-color: rgba(94,226,240,.45); transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(0,0,0,.28);
}
.ow-variant b { display: block; margin-bottom: 6px; color: #9beaff; }
.ow-variant p { margin: 0; color: rgba(235,240,255,.82); font-size: 14.5px; line-height: 1.55; }

/* ── SVG-звезда матрицы ───────────────────────────────────────────────── */
.ow-star-stage { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.ow-star-figure { flex: 0 0 320px; max-width: 320px; margin: 0 auto; }
.ow-star { width: 100%; height: auto; display: block; }
.ow-star .ow-star-diamond, .ow-star .ow-star-square {
    fill: none; stroke: rgba(155,234,255,.35); stroke-width: 1.6;
}
.ow-star .ow-star-link { stroke: rgba(155,234,255,.14); stroke-width: 1; }
.ow-star .ow-star-node circle {
    fill: rgba(18,10,36,.9); stroke: rgba(240,199,94,.55); stroke-width: 1.6;
}
.ow-star .ow-star-node text {
    fill: rgba(235,240,255,.85); font-size: 15px; font-weight: 700;
    font-family: 'Unbounded', sans-serif;
}
.ow-star .ow-star-label {
    fill: rgba(235,240,255,.55); font-size: 12px;
}
.ow-star.has-active .ow-star-node { opacity: .45; transition: opacity .6s ease; }
.ow-star.has-active .ow-star-node.is-active {
    opacity: 1;
}
.ow-star.has-active .ow-star-node.is-active circle {
    stroke: #f0c75e; stroke-width: 3;
    animation: owStarPulse 2s ease-in-out infinite;
}
.ow-star.has-active .ow-star-node.is-active text { fill: #ffe9a8; }
.ow-star.has-active .ow-star-label { opacity: .3; }
.ow-star.has-active .ow-star-label.is-active { opacity: 1; fill: #f0c75e; font-weight: 700; }
@keyframes owStarPulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(240,199,94,.5)); }
    50%      { filter: drop-shadow(0 0 14px rgba(240,199,94,.95)); }
}
html.wow-on .ow-star .ow-star-diamond, html.wow-on .ow-star .ow-star-square {
    stroke-dasharray: 1200; stroke-dashoffset: 1200;
    animation: owDraw 1.6s ease forwards;
}
html.wow-on .ow-star .ow-star-square { animation-delay: .5s; }
html.wow-on .ow-star .ow-star-node { opacity: 0; }
html.wow-on .ow-star .ow-star-node.pop { opacity: 1; transition: opacity .5s ease; }
.ow-star-legend { flex: 1 1 300px; display: grid; gap: 10px; }
.ow-star-legend .ow-hand-item { cursor: pointer; }

/* ── результат мини-калькулятора матрицы ──────────────────────────────── */
.ow-mx-result { margin-top: 4px; }
.ow-mx-item {
    padding: 14px 16px; margin: 10px 0; border-radius: 14px;
    background: rgba(94,226,240,.06); border: 1px solid rgba(94,226,240,.3);
}
.ow-mx-item-head { display: flex; gap: 14px; align-items: flex-start; }
.ow-mx-num {
    flex: 0 0 52px; height: 52px; display: grid; place-items: center;
    border-radius: 12px; font-weight: 800; font-size: 24px;
    background: linear-gradient(135deg, rgba(240,199,94,.2), rgba(85,128,247,.18));
    border: 1px solid rgba(240,199,94,.45); color: #f0c75e;
}
.ow-mx-item b { display: block; margin-bottom: 4px; }
.ow-mx-item p { margin: 0; color: rgba(235,240,255,.85); font-size: 14.5px; }
.ow-mx-arc-link { display: inline-block; margin-top: 8px; color: #9beaff; font-size: 14px; }
.ow-mx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ow-mx-card {
    padding: 14px 16px; border-radius: 14px;
    background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08);
}
.ow-mx-card b { color: #f0c75e; font-size: 14.5px; }
.ow-mx-card a { color: #9beaff; }
.ow-mx-card p { margin: 6px 0 0; color: rgba(235,240,255,.82); font-size: 14px; line-height: 1.5; }

/* ── сетка чисел нумерологии ──────────────────────────────────────────── */
.ow-num-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.ow-num-grid a { text-align: center; }
.ow-num-grid a b { font-size: 26px; display: block; margin-bottom: 2px; }

/* ── карточки сезонов ─────────────────────────────────────────────────── */
.ow-season-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ow-season-card { position: relative; display: grid; gap: 4px; }
.ow-season-tag {
    justify-self: start; margin-top: 6px; padding: 3px 12px; border-radius: 999px;
    font-size: 12.5px; font-weight: 700; color: rgba(235,240,255,.8);
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15);
}
.ow-season-tag.open {
    color: #123324; background: linear-gradient(135deg, #7ef0c0, #b8ffe4);
    border-color: transparent; box-shadow: 0 0 16px rgba(126,240,192,.4);
    animation: owTagPulse 2.4s ease-in-out infinite;
}
.ow-season-tag.big { margin-top: 16px; padding: 6px 16px; font-size: 14px; }
@keyframes owTagPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(126,240,192,.3); }
    50%      { box-shadow: 0 0 22px rgba(126,240,192,.65); }
}

/* ── мини-гадание сезона (переворот карты) ────────────────────────────── */
.ow-draw { margin-top: 4px; }
.ow-draw-fan { display: flex; justify-content: center; gap: 16px; margin: 10px 0 18px; perspective: 900px; }
.ow-draw-card {
    width: 120px; height: 180px; border-radius: 14px; cursor: pointer;
    border: 1px solid rgba(240,199,94,.4);
    background:
        radial-gradient(80px 60px at 50% 34%, rgba(240,199,94,.22), transparent 70%),
        linear-gradient(160deg, #1c1136, #120a24);
    display: grid; place-items: center; font-size: 40px; color: #f0c75e;
    transition: transform .35s ease, box-shadow .35s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    font-family: 'Unbounded', sans-serif;
}
.ow-draw-card:hover { transform: translateY(-8px); box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.ow-draw-card:nth-child(1) { transform: rotate(-6deg); }
.ow-draw-card:nth-child(3) { transform: rotate(6deg); }
.ow-draw-card:nth-child(2) { z-index: 1; }
html.wow-on .ow-draw-card { animation: owFanIn .6s cubic-bezier(.34,1.56,.64,1) both; }
html.wow-on .ow-draw-card:nth-child(2) { animation-delay: .12s; }
html.wow-on .ow-draw-card:nth-child(3) { animation-delay: .24s; }
@keyframes owFanIn {
    from { opacity: 0; transform: translateY(26px) rotate(0deg) scale(.8); }
    to   { opacity: 1; }
}
.ow-draw-card.is-picked { animation: owPick .5s ease forwards; }
@keyframes owPick {
    to { transform: translateY(-10px) scale(1.06); box-shadow: 0 0 34px rgba(240,199,94,.55); }
}
.ow-draw-card.is-flipped {
    transform: rotateY(180deg); pointer-events: none;
    background: linear-gradient(160deg, #241747, #181030);
    border-color: rgba(240,199,94,.7);
}
.ow-draw-card.is-flipped span { opacity: 0; }
.ow-draw-card.is-flipped::after {
    content: ''; position: absolute; inset: 8px; border-radius: 10px;
    border: 1px dashed rgba(240,199,94,.3);
}
.ow-draw-result { text-align: center; }
.ow-draw-text {
    max-width: 560px; margin: 0 auto 14px; padding: 18px 22px;
    border-radius: 14px; font-size: 17px; line-height: 1.6;
    background: rgba(240,199,94,.08); border: 1px solid rgba(240,199,94,.35);
    color: #ffe9a8;
    animation: owRevealText .6s ease both;
}
@keyframes owRevealText {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
.ow-draw-again { margin-bottom: 10px; }

/* ── адаптив ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .ow-num-hero { flex-direction: column; text-align: center; }
    .ow-calc-final { justify-content: center; }
    .ow-calc-links { align-items: center; text-align: center; }
    .ow-hand-figure, .ow-star-figure { flex-basis: 100%; max-width: 250px; }
    .ow-draw-card { width: 92px; height: 140px; font-size: 32px; }
    .ow-num-big { font-size: 72px; }
}

/* ── уважение к reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ow-num-big, .ow-num-ring, .ow-season-tag.open,
    .ow-hand.has-active .ow-line.is-active { animation: none !important; }
    html.wow-on .ow-reveal,
    html.wow-on .ow-digit, html.wow-on .ow-step { transition: none !important; opacity: 1 !important; transform: none !important; }
    html.wow-on .ow-hand.has-active .ow-line.is-active { stroke-dashoffset: 0; }
    .wow-canvas { display: none; }
}
