/*
 * catalog.css — Стили каталога (accordion, illustration, burn-in)
 * Используется на tarot.html, astrology.html
 */

@property --reveal {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ── Illustration ── */
.illustration-section {
    width: 100%; max-width: var(--container);
    display: flex; flex-direction: column; align-items: center;
    padding: clamp(2px, 0.5vh, 6px) 0 clamp(4px, 1vh, 8px);
    z-index: 10; position: relative;
}

.illustration-wrap {
    position: relative;
    -webkit-mask-image: conic-gradient(from -90deg at 50% 50%, #000 var(--reveal), transparent 0);
    mask-image: conic-gradient(from -90deg at 50% 50%, #000 var(--reveal), transparent 0);
    animation: burn-in 3s ease-out 0.3s forwards;
}
.illustration-wrap.revealed {
    -webkit-mask-image: none; mask-image: none;
    filter: drop-shadow(0 0 20px rgba(var(--gold-rgb), 0.2));
}
.illustration-wrap img { width: 100%; height: auto; display: block; }

@keyframes burn-in { to { --reveal: 360deg; } }

/* Spark */
.spark-ring {
    position: absolute; inset: -12px;
    border-radius: 50%; pointer-events: none;
}
.spark {
    position: absolute;
    width: 4px; height: 4px;
    background: var(--gold-bright); border-radius: 50%;
    box-shadow: 0 0 8px var(--gold), 0 0 20px var(--gold);
    top: -2px; left: 50%;
    animation: spark-orbit 3s ease-out 0.3s forwards;
    opacity: 0;
}
.spark.settled { animation: none; opacity: 0; }
@keyframes spark-orbit {
    0% { transform: rotate(-90deg); opacity: 0.9; }
    85% { opacity: 0.9; }
    100% { transform: rotate(270deg); opacity: 0; }
}

/* ── Page Title ── */
.page-title { text-align: center; margin-top: clamp(4px, 1vh, 8px); }

.page-title h1 {
    font-family: var(--font-display); font-weight: 700;
    font-size: clamp(20px, 5.9vw, 25px);
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--text-light);
}
.subtitle {
    font-family: var(--font-body); font-weight: 400;
    font-size: clamp(12px, 3.1vw, 14px);
    color: var(--text-dim);
    margin-top: 4px; display: block;
}

/* ── Section Label ── */
.section-label {
    width: 100%; max-width: var(--container);
    padding: 0 clamp(24px, 6vw, 40px);
    margin: clamp(10px, 2vh, 16px) 0 clamp(4px, 1vh, 8px);
    display: flex; align-items: center; gap: 14px;
    z-index: 10;
}
.section-label span {
    font-family: var(--font-body);
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.2em; color: var(--gold-dim);
    white-space: nowrap;
}
.section-label::after {
    content: ''; flex: 1; height: 1px;
    background: var(--gold-border);
}

/* ── Accordion ── */
.accordion-list {
    width: 100%; max-width: var(--container);
    padding: 0 clamp(24px, 6vw, 40px);
    z-index: 10; flex: 1;
}

.accordion-item {
    border-bottom: 1px solid var(--gold-border);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease both;
}
.accordion-item:first-child { border-top: 1px solid var(--gold-border); }

.accordion-item:nth-child(1) { animation-delay: 0.1s; }
.accordion-item:nth-child(2) { animation-delay: 0.15s; }
.accordion-item:nth-child(3) { animation-delay: 0.2s; }
.accordion-item:nth-child(4) { animation-delay: 0.25s; }
.accordion-item:nth-child(5) { animation-delay: 0.3s; }
.accordion-item:nth-child(6) { animation-delay: 0.35s; }
.accordion-item:nth-child(7) { animation-delay: 0.4s; }
.accordion-item:nth-child(8) { animation-delay: 0.45s; }
.accordion-item:nth-child(9) { animation-delay: 0.5s; }

/* ── Accordion Header ── */
.acc-header {
    padding: clamp(16px, 3.5vw, 22px) 0;
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    gap: 10px;
}

.acc-title-group { flex: 1; min-width: 0; }

.acc-title {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(14px, 4vw, 19px);
    color: var(--text-light);
    transition: var(--transition);
    letter-spacing: 0.03em;
}
.accordion-item.active .acc-title {
    color: var(--gold);
    text-shadow: 0 0 12px rgba(var(--gold-rgb), 0.3);
}

.acc-sub {
    font-family: var(--font-body);
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold-dim); opacity: 0.9;
    margin-top: 2px; display: block;
}

.acc-price {
    font-family: var(--font-body);
    font-size: clamp(14px, 3.4vw, 14px);
    font-weight: 500;
    color: var(--gold); letter-spacing: 0.04em;
    flex-shrink: 0;
}
.acc-price.free {
    opacity: 1;
    text-shadow: 0 0 8px rgba(var(--gold-rgb), 0.3);
}

/* Chevron */
.acc-chevron {
    width: 12px; height: 12px;
    flex-shrink: 0;
    transition: transform 0.4s ease;
    opacity: 0.4;
    color: var(--gold);
}
.acc-chevron svg { width: 100%; height: 100%; }
.accordion-item.active .acc-chevron {
    transform: rotate(180deg);
    opacity: 0.8;
}

/* ── Accordion Content ── */
.acc-content {
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}
.accordion-item.active .acc-content {
    max-height: 400px; opacity: 1;
}

.acc-content-inner {
    padding: 0 0 clamp(14px, 3vw, 20px);
    padding-left: clamp(14px, 3.5vw, 20px);
    border-left: 1px solid var(--gold);
    margin-left: 2px;
}

.acc-content-inner p {
    font-family: var(--font-body);
    font-size: clamp(13px, 3.1vw, 14px);
    font-weight: 400;
    line-height: 1.6; color: var(--text-dim);
    letter-spacing: 0.01em;
    margin-bottom: clamp(12px, 2.5vw, 16px);
}

.acc-cards-count {
    font-family: var(--font-body);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gold-dim);
    opacity: 0.8;
    margin-bottom: clamp(10px, 2.5vw, 14px);
    display: block;
}

/* ── CTA Button ── */
.acc-cta {
    display: inline-block;
    background: transparent;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 12px; font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    padding: clamp(12px, 2.5vw, 16px) clamp(22px, 5vw, 32px);
    border: 1px solid var(--gold);
    cursor: pointer; text-decoration: none;
    transition: var(--transition);
}
.acc-cta:hover {
    background: var(--gold);
    color: var(--bg-deep);
    box-shadow: var(--shadow-cta);
}
.acc-cta:active { transform: scale(0.98); }
