/* ================================================================
   Name Numerology Score — Mobile-First & Responsive Stylesheet
   Strictly compliant with Naam Hi Naam Brand Tokens & WCAG AA
   ================================================================ */

/* ── Container ── */
.bnm-num-wrap {
    font-family: var(--font-body, 'Inter', sans-serif);
    padding: 0;
    max-width: 100%;
    box-sizing: border-box;
    color: var(--ink, #1C1B29);
}

/* ── Main Card ── */
.bnm-num-card {
    background: var(--surface, #fff);
    border-radius: 24px;
    padding: 24px 20px 32px;
    box-shadow: var(--shadow-lg, 0 4px 20px rgba(0, 0, 0, .06));
    border: 1px solid var(--border, #E9E7F0);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.bnm-num-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--brand-gradient);
    background-size: 200% 100%;
    animation: bnmNumGradShift 4s linear infinite;
}

@keyframes bnmNumGradShift {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* ── Header ── */
.bnm-num-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.bnm-num-icon-badge {
    width: 60px;
    height: 60px;
    background: var(--brand-gradient);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(var(--brand-primary-rgb, 217, 0, 107), .35);
}

.bnm-num-title {
    font-family: var(--font-display, 'Sora', sans-serif);
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 800;
    margin: 0 0 8px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.25;
}

.bnm-num-subtitle {
    font-size: 14px;
    color: var(--ink-soft, #6B6878);
    line-height: 1.6;
    margin: 0;
    max-width: 520px;
    margin-inline: auto;
}

/* ── Form ── */
.bnm-num-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 520px;
    margin: 0 auto;
}

.bnm-num-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.bnm-num-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--ink, #1C1B29);
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.bnm-num-label .fas {
    color: var(--brand-secondary, #1A47E7);
}

.bnm-num-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border, #E9E7F0);
    border-radius: 14px;
    font-size: 16px;
    font-family: inherit;
    color: var(--ink, #1C1B29);
    background: var(--canvas, #FAFAFC);
    transition: border-color .2s, box-shadow .2s, background .2s;
    box-sizing: border-box;
    min-height: 52px;
}

.bnm-num-input:focus {
    outline: none;
    border-color: var(--brand-primary, #D9006B);
    background: var(--surface, #fff);
    box-shadow: 0 0 0 4px rgba(var(--brand-primary-rgb, 217, 0, 107), .12);
}

.bnm-num-error {
    font-size: 12.5px;
    color: #ef4444;
    font-weight: 600;
    min-height: 16px;
    display: block;
    text-align: center;
}

/* ── Submit Button ── */
.bnm-num-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(var(--brand-primary-rgb, 217, 0, 107), .35);
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.bnm-num-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--brand-gradient-hover);
    box-shadow: 0 8px 28px rgba(var(--brand-primary-rgb, 217, 0, 107), .45);
}

.bnm-num-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.bnm-num-submit-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
}

.bnm-num-btn-loading {
    display: none;
}

.bnm-num-submit-btn.is-loading .bnm-num-btn-text {
    display: none;
}

.bnm-num-submit-btn.is-loading .bnm-num-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bnm-num-submit-btn:focus-visible {
    outline: 3px solid var(--brand-primary, #D9006B);
    outline-offset: 2px;
}

/* ── Results Container ── */
.bnm-num-result {
    margin-top: 32px;
    border-top: 1px solid var(--border, #E9E7F0);
    padding-top: 28px;
    text-align: center;
}

/* ── Circular Power Meter ── */
.bnm-num-score-circle {
    width: 130px;
    height: 130px;
    margin: 0 auto 16px;
    position: relative;
}

.bnm-num-circular-chart {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.bnm-num-circle-bg {
    stroke: var(--border, #E9E7F0);
}

.bnm-num-circle {
    stroke: var(--brand-primary, #D9006B);
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s cubic-bezier(.16, 1, .3, 1);
}

.bnm-num-percentage {
    fill: var(--ink, #1C1B29);
    font-size: 0.52em;
    text-anchor: middle;
    font-family: inherit;
    font-weight: 800;
}

.bnm-num-meter-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-soft, #6B6878);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: 6px;
}

/* ── Destiny Hero Box ── */
.bnm-num-destiny-box {
    background: linear-gradient(135deg, var(--brand-primary-soft, #FDF0F6) 0%, var(--brand-secondary-soft, #EEF2FE) 100%);
    border: 1.5px solid var(--brand-primary-tint, #FCE7F1);
    border-radius: 20px;
    padding: 24px 20px;
    margin: 20px 0 24px;
    text-align: center;
    position: relative;
}

.bnm-num-destiny-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-primary, #D9006B);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.bnm-num-destiny-digit {
    font-size: clamp(42px, 8vw, 56px);
    font-weight: 900;
    color: var(--brand-primary, #D9006B);
    line-height: 1;
    margin: 6px 0;
}

.bnm-num-destiny-title {
    font-family: var(--font-display, 'Sora', sans-serif);
    font-size: clamp(18px, 3.5vw, 22px);
    font-weight: 800;
    color: var(--ink, #1C1B29);
    margin: 0 0 8px;
}

.bnm-num-destiny-desc {
    font-size: 14px;
    color: var(--ink-soft, #6B6878);
    line-height: 1.6;
    margin: 0 auto;
    max-width: 560px;
}

/* ── Section Block & Subheadings ── */
.bnm-num-section-block {
    margin-bottom: 24px;
    text-align: left;
}

.bnm-num-subheading {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--ink, #1C1B29);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bnm-num-subheading .fas {
    color: var(--brand-secondary, #1A47E7);
}

/* ── Letter Breakdown Card ── */
.bnm-num-breakdown-card {
    background: var(--canvas, #FAFAFC);
    border: 1.5px solid var(--border, #E9E7F0);
    border-radius: 18px;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bnm-num-letters-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bnm-num-letter-pill {
    background: var(--surface, #fff);
    border: 1.5px solid var(--border, #E9E7F0);
    border-radius: 12px;
    padding: 8px 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 36px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.bnm-num-letter-char {
    font-size: 16px;
    font-weight: 800;
    color: var(--ink, #1C1B29);
    line-height: 1;
}

.bnm-num-letter-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-secondary, #1A47E7);
    margin-top: 4px;
}

.bnm-num-sum-formula {
    font-size: 13.5px;
    color: var(--ink-soft, #6B6878);
    border-top: 1px dashed var(--border, #E9E7F0);
    padding-top: 10px;
}

.bnm-num-sum-formula strong {
    color: var(--brand-primary, #D9006B);
}

/* ── Traits Grid ── */
.bnm-num-traits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.bnm-num-trait-card {
    background: var(--canvas, #FAFAFC);
    border: 1px solid var(--border, #E9E7F0);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bnm-num-trait-icon {
    font-size: 20px;
    width: 36px;
    height: 36px;
    background: var(--surface, #fff);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.bnm-num-trait-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.bnm-num-trait-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-soft, #6B6878);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.bnm-num-trait-val {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ink, #1C1B29);
}

/* ── Database Match Card ── */
.bnm-num-db-match {
    margin: 24px 0;
    padding: 20px 16px;
    background: linear-gradient(180deg, var(--brand-primary-soft, #FDF0F6) 0%, var(--canvas, #FAFAFC) 100%);
    border: 1.5px solid var(--brand-primary-tint, #FCE7F1);
    border-radius: 20px;
    text-align: left;
}

.bnm-num-name-card {
    background: var(--surface, #fff);
    border: 1.5px solid var(--border, #E9E7F0);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(var(--brand-primary-rgb, 217, 0, 107), .06);
}

.bnm-num-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.bnm-num-db-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #d1fae5;
    color: #065f46;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.bnm-num-gender {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
}

.bnm-num-gender--boy {
    background: #dbeafe;
    color: #1e40af;
}

.bnm-num-gender--girl {
    background: var(--brand-primary-soft, #FDF0F6);
    color: var(--brand-primary, #D9006B);
}

.bnm-num-gender--unisex {
    background: var(--brand-secondary-soft, #EEF2FE);
    color: var(--brand-secondary, #1A47E7);
}

.bnm-num-name-link,
.bnm-num-name-text {
    font-family: var(--font-display, 'Sora', sans-serif);
    font-size: 22px;
    font-weight: 800;
    color: var(--ink, #1C1B29);
    line-height: 1.1;
}

.bnm-num-name-link {
    color: var(--brand-primary, #D9006B);
    text-decoration: none;
    transition: color .2s;
}

.bnm-num-name-link:hover {
    color: var(--brand-primary-hover, #BA005A);
    text-decoration: underline;
}

.bnm-num-meaning {
    font-size: 13px;
    color: var(--ink-soft, #6B6878);
    line-height: 1.5;
    margin: 0;
}

.bnm-num-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--btn-view-details-bg, var(--brand-gradient));
    color: var(--btn-view-details-color, #fff);
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 50px;
    align-self: flex-start;
    transition: transform .2s, box-shadow .2s;
    min-height: 36px;
    margin-top: 4px;
}

.bnm-num-view-btn:hover {
    transform: translateY(-1px);
    background: var(--btn-view-details-hover-bg, var(--brand-gradient-hover));
    box-shadow: 0 4px 14px rgba(var(--brand-primary-rgb, 217, 0, 107), .4);
    color: var(--btn-view-details-hover-color, #fff);
    text-decoration: none;
}

/* Skeleton Loading */
.bnm-num-skeleton-card {
    height: 100px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: bnmNumShimmer 1.4s ease infinite;
    border-radius: 16px;
}

@keyframes bnmNumShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ── Result Action Buttons ── */
.bnm-num-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 24px;
    align-items: stretch;
}

.bnm-num-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 50px;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    min-height: 48px;
    padding: 12px 24px;
    transition: transform .2s, background .2s, box-shadow .2s;
}

.bnm-num-share-btn {
    background: var(--brand-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(var(--brand-primary-rgb, 217, 0, 107), .3);
}

.bnm-num-share-btn:hover {
    transform: translateY(-1px);
    background: var(--brand-gradient-hover);
    box-shadow: 0 6px 20px rgba(var(--brand-primary-rgb, 217, 0, 107), .4);
}

.bnm-num-reset-btn {
    background: var(--canvas, #FAFAFC);
    color: var(--ink-soft, #6B6878);
    border: 1.5px solid var(--border, #E9E7F0);
}

.bnm-num-reset-btn:hover {
    background: var(--border, #E9E7F0);
    color: var(--ink, #1C1B29);
}

.bnm-num-action-btn:focus-visible {
    outline: 3px solid var(--brand-primary, #D9006B);
    outline-offset: 2px;
}

/* ── How It Works Section ── */
.bnm-num-info-section,
.bnm-num-faq-section {
    margin-bottom: 24px;
    text-align: left;
}

.bnm-num-section-title {
    font-family: var(--font-display, 'Sora', sans-serif);
    font-size: clamp(17px, 3.5vw, 22px);
    font-weight: 800;
    color: var(--ink, #1C1B29);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bnm-num-section-title .fas {
    color: var(--brand-primary, #D9006B);
}

.bnm-num-how-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.bnm-num-how-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #E9E7F0);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow, 0 1px 8px rgba(0, 0, 0, .04));
}

.bnm-num-how-icon {
    width: 44px;
    height: 44px;
    background: var(--brand-primary-soft, #FDF0F6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--brand-primary, #D9006B);
    margin-bottom: 12px;
}

.bnm-num-how-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--ink, #1C1B29);
}

.bnm-num-how-card p {
    font-size: 13.5px;
    color: var(--ink-soft, #6B6878);
    line-height: 1.6;
    margin: 0;
}

/* ── FAQ Section ── */
.bnm-num-faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bnm-num-faq-item {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #E9E7F0);
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow .2s;
}

.bnm-num-faq-item[open] {
    box-shadow: 0 4px 20px rgba(var(--brand-primary-rgb, 217, 0, 107), .08);
    border-color: var(--brand-primary-tint, #FCE7F1);
}

.bnm-num-faq-q {
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink, #1C1B29);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: color .2s;
    min-height: 44px;
    user-select: none;
}

.bnm-num-faq-q::-webkit-details-marker {
    display: none;
}

.bnm-num-faq-q::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    color: var(--brand-primary, #D9006B);
    transition: transform .3s;
    flex-shrink: 0;
}

.bnm-num-faq-item[open] .bnm-num-faq-q {
    color: var(--brand-primary, #D9006B);
}

.bnm-num-faq-item[open] .bnm-num-faq-q::after {
    transform: rotate(180deg);
}

.bnm-num-faq-a {
    padding: 0 20px 16px;
    border-top: 1px solid var(--border, #E9E7F0);
}

.bnm-num-faq-a p {
    font-size: 13.5px;
    color: var(--ink-soft, #6B6878);
    line-height: 1.7;
    margin: 12px 0 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .bnm-num-card::before,
    .bnm-num-submit-btn,
    .bnm-num-action-btn,
    .bnm-num-view-btn {
        transition: none;
        animation: none;
    }

    .bnm-num-skeleton-card {
        animation: none;
        background: #e2e8f0;
    }
}

/* ── Tablet Breakpoints (600px+) ── */
@media (min-width: 600px) {
    .bnm-num-card {
        padding: 36px 32px;
    }

    .bnm-num-submit-btn {
        width: auto;
        align-self: center;
        padding: 16px 36px;
    }

    .bnm-num-traits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bnm-num-actions {
        flex-direction: row;
        justify-content: center;
    }

    .bnm-num-how-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── Desktop Breakpoints (900px+) ── */
@media (min-width: 900px) {
    .bnm-num-card {
        padding: 40px;
    }

    .bnm-num-traits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}