/* ==========================================================================
   Kundli Calculator — styles v2
   Consumes VastuIQ's real :root tokens from header.php (--sf, --mn, --gd,
   --iv, --cr, --td, --tm, --tl, --wh, --r, --rl) rather than a separate
   palette, and mirrors cross-sell.php's own card pattern (border + radius +
   hover-lift, no drop-shadow-everywhere) so new sections read as the same
   product as the rest of the site, not a bolted-on tool.
   ========================================================================== */

.kundli-calculator-page {
    font-family: 'DM Sans', sans-serif;
    color: var(--td);
    background: var(--cr);
}

.kundli-calculator-page h1,
.kundli-calculator-page h2,
.kundli-calculator-page h3 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 0.5em;
    color: var(--mn);
}

/* ---------- Hero: the Kundli as a star map ---------- */

.kundli-calculator-page {
    --k-night: #0E1230;
    --k-ink: #1D2559;
    --k-gold: #D8B15A;
    --k-gold-soft: #E9D29B;
    --k-star: #F4EEDC;
}

.kundli-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 90% at 78% 45%, rgba(216, 177, 90, 0.13), transparent 60%),
        linear-gradient(170deg, var(--k-night) 0%, var(--k-ink) 100%);
    color: var(--k-star);
    padding: 3.5rem 1.5rem 3rem;
}

.kh-stars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.kundli-hero-grid {
    position: relative;
    z-index: 1;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 3rem;
    align-items: center;
}

.kundli-hero-inner {
    max-width: 34rem;
}

.kundli-hero h1 {
    color: var(--k-star);
    font-size: clamp(2.3rem, 4.8vw, 3.4rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.05;
    margin-bottom: 0.9rem;
}

.kundli-hero-sub {
    font-size: 1.04rem;
    color: rgba(244, 238, 220, 0.8);
    max-width: 46ch;
    margin: 0 0 1.6rem;
    line-height: 1.6;
}

.kundli-steps {
    list-style: none;
    counter-reset: kstep;
    display: flex;
    gap: 1.4rem;
    flex-wrap: wrap;
    padding: 0;
    margin: 0 0 1.75rem;
}

.kundli-step {
    counter-increment: kstep;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: rgba(244, 238, 220, 0.88);
}

.kundli-step::before {
    content: counter(kstep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
    background: var(--k-gold);
    color: var(--k-night);
    font-size: 0.74rem;
    font-weight: 700;
    flex-shrink: 0;
}

.kundli-trust-row {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(216, 177, 90, 0.22);
}

.kundli-trust-badge {
    font-size: 0.8rem;
    color: rgba(244, 238, 220, 0.72);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kundli-trust-badge::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--k-gold);
    transform: rotate(45deg);
}

/* The chart */
.kh-chart-wrap {
    margin: 0;
    justify-self: center;
    width: min(100%, 420px);
}

.kh-chart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.kh-line {
    stroke: var(--k-gold);
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: kh-draw 1.6s cubic-bezier(.6, .1, .3, 1) forwards;
}
.kh-line:nth-of-type(2) { animation-delay: .08s; }
.kh-line:nth-of-type(3) { animation-delay: .16s; }
.kh-line:nth-of-type(4) { animation-delay: .24s; }
.kh-line:nth-of-type(n+5) { animation-delay: .45s; }

@keyframes kh-draw { to { stroke-dashoffset: 0; } }

.kh-node {
    fill: var(--k-star);
    filter: drop-shadow(0 0 4px rgba(244, 238, 220, 0.85));
}

.kh-house {
    fill: rgba(216, 177, 90, 0);
    transition: fill .6s ease;
}

.kh-house.is-lit {
    fill: rgba(216, 177, 90, 0.16);
}

.kh-chart.is-complete .kh-house.is-lit {
    fill: rgba(216, 177, 90, 0.24);
}

.kh-num {
    fill: rgba(233, 210, 155, 0.75);
    font-family: 'Cormorant Garamond', serif;
    font-size: 17px;
    font-weight: 600;
}

.kh-cap {
    margin: 1.1rem auto 1.2rem;
    max-width: 34ch;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.4;
    text-align: center;
    color: var(--k-gold-soft);
}

.kh-chart-wrap .kundli-steps {
    justify-content: center;
    margin: 0;
}

@media (max-width: 860px) {
    .kundli-hero { padding: 2.25rem 1.25rem 2.5rem; text-align: center; }
    .kundli-hero-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .kh-chart-wrap { order: -1; width: min(60vw, 230px); }
    .kh-cap, .kh-chart-wrap .kundli-steps { display: none; }
    .kundli-form-section { margin: 0 auto 1.25rem; text-align: left; }
    .kundli-hero-inner { margin: 0 auto; }
    .kundli-hero-sub { margin-left: auto; margin-right: auto; }
    .kundli-steps, .kundli-trust-row { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .kh-line { animation: none; stroke-dashoffset: 0; }
    .kh-house { transition: none; }
}

/* ---------- Form: floats over the hero as a card, matching site card language ---------- */

.kundli-form-section {
    position: relative;
    z-index: 1;
    max-width: 27rem;
    margin: 0 0 1.5rem;
    padding: 0;
}

#kundli-form {
    background: var(--wh);
    border-radius: var(--rl);
    padding: 2rem 1.75rem;
    box-shadow: 0 24px 48px -20px rgba(74, 16, 16, 0.35);
    text-align: left;
}

.form-row {
    margin-bottom: 1.1rem;
}

.form-row label {
    display: block;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--tm);
    margin-bottom: 0.35rem;
}

.form-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--td);
    background: var(--iv);
    border: 1px solid rgba(212, 96, 26, 0.18);
    border-radius: var(--r);
    transition: border-color 0.15s ease;
}

.form-row input:focus {
    border-color: var(--sf);
    outline: none;
}

#kundli-submit-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    margin-top: 0.4rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--k-night);
    background: linear-gradient(135deg, var(--k-gold-soft), var(--k-gold));
    border: none;
    border-radius: var(--r);
    cursor: pointer;
    transition: transform 0.15s ease;
}

#kundli-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

#kundli-submit-btn:disabled {
    opacity: 0.7;
    cursor: progress;
}

.kundli-error {
    max-width: 440px;
    margin: 0 auto 1.5rem;
    padding: 0.85rem 1.1rem;
    background: #fff4ec;
    border: 1px solid var(--sf);
    border-left-width: 3px;
    color: var(--mn2);
    font-size: 0.92rem;
    border-radius: 8px;
}

.kundli-pre-form-line {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--mn);
    max-width: 40ch;
    margin: 0 auto 1.25rem;
    line-height: 1.4;
}

/* ---------- Result: "Your Astro Profile" ---------- */

.kundli-result {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 1.25rem 4rem;
}

.kundli-section-label {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--mn);
    margin: 2.5rem 0 0.4rem;
}

.kundli-section-sub {
    text-align: center;
    font-size: 0.9rem;
    color: var(--tl);
    margin-bottom: 1.5rem;
}

.kundli-profile-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.kundli-profile-card {
    background: var(--wh);
    border: 1px solid rgba(212, 96, 26, 0.14);
    border-radius: var(--r);
    padding: 1rem 0.5rem;
    text-align: center;
}

.kundli-profile-icon {
    font-size: 1.3rem;
    display: block;
    margin-bottom: 0.4rem;
}

.kundli-profile-label {
    display: block;
    font-size: 0.72rem;
    color: var(--tl);
    margin-bottom: 0.2rem;
}

.kundli-profile-value {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--td);
}

.kundli-snapshot-line {
    background: var(--iv);
    border-radius: var(--r);
    padding: 1.1rem 1.4rem;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--tm);
    text-align: center;
    margin-bottom: 2.25rem;
}

/* ---------- Explore Your Life: preview cards, not fake content ---------- */

.kundli-explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-bottom: 2.5rem;
}

.kundli-explore-card {
    display: block;
    width: 100%;
    background: var(--wh);
    border: 1px solid rgba(212, 96, 26, 0.14);
    border-radius: var(--r);
    padding: 1.1rem 1rem;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

.kundli-explore-card:hover {
    border-color: var(--sf);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 26, 26, 0.1);
}

.kundli-explore-card.is-selected {
    background: var(--iv);
    border-color: var(--sf);
    border-width: 1.5px;
    box-shadow: 0 4px 14px rgba(107, 26, 26, 0.12);
}

.kundli-explore-card.is-selected .kundli-explore-tag {
    color: var(--wh);
    background: var(--sf);
}

.kundli-explore-card.is-selected .kundli-explore-tag .en-i::before,
.kundli-explore-card.is-selected .kundli-explore-tag .hi-i::before {
    content: '✓ ';
}

.kundli-explore-icon {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 0.5rem;
}

.kundli-explore-title {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--td);
    display: block;
    margin-bottom: 0.25rem;
}

.kundli-explore-question {
    font-size: 0.8rem;
    color: var(--tl);
    display: block;
    line-height: 1.4;
}

.kundli-explore-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gd);
    background: var(--iv2);
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    margin-top: 0.55rem;
    transition: 0.15s;
}

.kundli-explore-hint {
    text-align: center;
    font-size: 0.82rem;
    color: var(--tl);
    margin: -0.75rem 0 2rem;
    transition: color 0.15s;
}

.kundli-explore-hint-limit {
    color: var(--sf);
    font-weight: 600;
}

/* ---------- Chart frame ---------- */

.kundli-chart-wrap {
    max-width: 420px;
    margin: 0 auto 2.5rem;
    padding: 1.75rem;
    background: var(--iv);
    border: 1px solid var(--gd);
    border-radius: var(--rl);
    opacity: 0;
    transform: scale(0.97);
}

.kundli-chart-wrap.is-revealed {
    animation: kundli-reveal 0.5s ease-out forwards;
}

@keyframes kundli-reveal {
    to { opacity: 1; transform: scale(1); }
}

.kundli-chart-wrap svg {
    display: block;
    width: 100%;
    height: auto;
}

.kundli-chart-ceremony {
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    color: var(--tm);
    max-width: 38ch;
    margin: 0 auto 1rem;
}

.kundli-related-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.kundli-related-label {
    font-size: 0.82rem;
    color: var(--tl);
    margin-right: 0.2rem;
}

.kundli-related-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--mn);
    background: var(--iv);
    border: 1px solid rgba(212, 96, 26, 0.16);
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    text-decoration: none;
    transition: 0.15s;
}

.kundli-related-chip:hover {
    border-color: var(--sf);
    background: var(--wh);
}

/* ---------- Report / pricing: free-vs-report checklist, not a paywall notice ---------- */

.kundli-report-section {
    scroll-margin-top: 90px;
    background: var(--wh);
    border: 1px solid rgba(212, 96, 26, 0.14);
    border-radius: var(--rl);
    padding: 2rem 1.75rem;
    margin-bottom: 2.5rem;
}

.kundli-report-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.kundli-report-col h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    color: var(--mn);
    margin: 0 0 0.75rem;
}

.kundli-report-col.is-paid h4 {
    color: var(--sf);
}

.kundli-report-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kundli-report-col li {
    font-size: 0.88rem;
    color: var(--tm);
    padding: 0.3rem 0;
    padding-left: 1.4rem;
    position: relative;
}

.kundli-report-col li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gd);
    font-weight: 700;
}

.kundli-report-price {
    text-align: center;
}

.kundli-report-price .price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--mn);
}

#kundli-buy-report-btn {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 1rem auto 0;
    padding: 0.85rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wh);
    background: linear-gradient(135deg, var(--sf), var(--sf2));
    border: none;
    border-radius: var(--r);
    cursor: pointer;
    transition: transform 0.15s ease;
}

#kundli-buy-report-btn:hover {
    transform: translateY(-1px);
}

/* ---------- Checkout panel + download card ---------- */

.kundli-checkout-panel {
    max-width: 440px;
    margin: 0 auto 2.5rem;
    padding: 2rem 1.75rem;
    background: var(--wh);
    border: 1px solid rgba(212, 96, 26, 0.16);
    border-radius: var(--rl);
}

.kundli-checkout-panel h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.kundli-coupon-row {
    display: flex;
    gap: 0.5rem;
}

.kundli-coupon-row input {
    flex: 1;
}

.kundli-coupon-row button {
    flex: 0 0 auto;
    padding: 0 1rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--iv);
    border: 1px solid rgba(212, 96, 26, 0.2);
    border-radius: var(--r);
    cursor: pointer;
    color: var(--mn);
}

.kundli-coupon-msg {
    font-size: 0.82rem;
    margin-top: 0.4rem;
}

.kundli-pay-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wh);
    background: linear-gradient(135deg, var(--sf), var(--sf2));
    border: none;
    border-radius: var(--r);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.kundli-pay-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.kundli-pay-btn:disabled {
    opacity: 0.7;
    cursor: progress;
}

/* ---------- Share card ---------- */

.kundli-share-card {
    background: linear-gradient(135deg, var(--mn), var(--mn2));
    border-radius: var(--rl);
    padding: 1.75rem;
    text-align: center;
    color: var(--wh);
    margin-bottom: 1rem;
}

.kundli-share-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.88rem;
    margin: 0.25rem 0 1rem;
}

.kundli-share-buttons {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.kundli-share-buttons button {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    border: none;
    background: var(--wh);
    color: var(--mn);
    cursor: pointer;
}

/* ---------- Pillar content + FAQ ---------- */

.kundli-pillar-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 1rem 1.25rem 3rem;
}

.kundli-toc {
    background: var(--iv);
    border: 1px solid rgba(212, 96, 26, 0.16);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 0 0 2rem;
}

.kundli-toc-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--gd);
    margin: 0 0 0.5rem;
}

.kundli-toc ol {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    line-height: 1.9;
}

.kundli-toc a {
    color: var(--tm);
    text-decoration: none;
    border-bottom: 1px dotted rgba(212, 96, 26, 0.35);
}

.kundli-toc a:hover {
    color: var(--sf);
    border-bottom-color: var(--sf);
}

.kundli-tool-table-wrap {
    overflow-x: auto;
    margin: 1rem 0 0.5rem;
}

.kundli-tool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.kundli-tool-table th {
    background: var(--iv2);
    color: var(--mn);
    text-align: left;
    padding: 0.6rem 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.kundli-tool-table td {
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid rgba(212, 96, 26, 0.12);
    color: var(--tm);
    vertical-align: top;
}

.kundli-tool-table a {
    color: var(--sf);
    font-weight: 600;
    text-decoration: none;
}

.kundli-tool-table a:hover {
    text-decoration: underline;
}

.kundli-pillar-content h2 {
    font-size: 1.6rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(212, 96, 26, 0.16);
    margin-bottom: 1.25rem;
}

.kundli-pillar-content h3 {
    font-size: 1.2rem;
    margin-top: 2.1rem;
    color: var(--sf);
}

.kundli-pillar-content p {
    line-height: 1.65;
    margin: 0 0 1.1rem;
    color: var(--tm);
}

.kundli-faq {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 1.25rem 3.5rem;
}

.kundli-faq h2 {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.faq-item {
    border-bottom: 1px solid rgba(212, 96, 26, 0.16);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 0;
    cursor: pointer;
    font-weight: 500;
    color: var(--td);
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    color: var(--sf);
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item .faq-answer {
    margin: 0 0 1.25rem;
    line-height: 1.6;
    color: var(--tm);
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
    .kundli-profile-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .kundli-explore-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .kundli-report-columns {
        grid-template-columns: 1fr;
    }
    .kundli-steps {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }
}
