/* ===================================================================
   karmabadge.com — neomorphism soft ui meets ethereal spiritual
   Palette: warm pearl, copper, sage, honey
   Typography: Philosopher (display), Nunito (body), Quicksand (accent)
   =================================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --pearl: #e8e0d4;        /* primary background, neomorphic base */
    --warm: #f0e6d8;         /* light pearl, badge highlight */
    --sand: #e8c49a;         /* warm sand, gradient mid */
    --copper: #d4a574;       /* warm amber accent */
    --honey: #f0d8a8;        /* badge inner glow */
    --sage: #8fa89a;         /* sage green secondary accent */
    --dark: #4a4440;         /* warm dark brown text */
    --shadow-dark: #c8c0b4;  /* depth shadow */
    --shadow-light: #f5ede1; /* highlight shadow */

    --neo-raised: 8px 8px 16px var(--shadow-dark), -8px -8px 16px var(--shadow-light);
    --neo-raised-lg: 12px 12px 24px var(--shadow-dark), -12px -12px 24px var(--shadow-light);
    --neo-raised-sm: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
    --neo-pressed: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
    --neo-pressed-deep: inset 6px 6px 12px var(--shadow-dark), inset -6px -6px 12px var(--shadow-light);

    --max-content: 800px;
    --max-section: 920px;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--pearl);
    color: var(--dark);
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

body::before {
    /* subtle vignette to deepen the neomorphic surface */
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(74, 68, 64, 0.05) 100%);
    z-index: 1;
}

/* ===================================================================
   MANDALA BACKGROUNDS — slow-rotating geometric patterns at low opacity
   =================================================================== */

.mandala {
    position: fixed;
    width: 700px;
    height: 700px;
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
    animation: mandalaSpin 120s linear infinite;
}

.mandala-top {
    top: -150px;
    left: -200px;
}

.mandala-bottom {
    bottom: -250px;
    right: -200px;
    animation-direction: reverse;
    animation-duration: 180s;
}

@keyframes mandalaSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===================================================================
   KARMA METER — sticky vertical scroll-progress bar
   =================================================================== */

.karma-meter {
    position: fixed;
    top: 20vh;
    right: 2rem;
    width: 6px;
    height: 60vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.karma-meter-track {
    position: relative;
    width: 4px;
    height: 100%;
    background: var(--shadow-dark);
    border-radius: 2px;
    box-shadow: var(--neo-pressed);
    overflow: hidden;
}

.karma-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, var(--copper), var(--sand), var(--honey));
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(212, 165, 116, 0.5);
    transition: height 0.18s ease-out;
}

.karma-meter-label {
    position: absolute;
    top: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Quicksand', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    color: var(--copper);
    opacity: 0.7;
    white-space: nowrap;
}

/* ===================================================================
   HERO — The Aura
   =================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem 6rem;
    position: relative;
    z-index: 2;
}

.hero-inner {
    max-width: var(--max-content);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge-wrap {
    margin-bottom: 3rem;
    position: relative;
}

.hero-badge {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, var(--warm), var(--pearl));
    box-shadow: var(--neo-raised-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.5s ease, transform 0.5s ease;
    position: relative;
    cursor: pointer;
}

.hero-badge::after {
    /* subtle ambient glow halo */
    content: "";
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(240, 216, 168, 0.25), transparent 70%);
    z-index: -1;
    animation: haloPulse 6s ease-in-out infinite;
}

@keyframes haloPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.hero-badge.pressed {
    box-shadow: var(--neo-pressed-deep);
    transform: scale(0.98);
}

.badge-svg {
    display: block;
    width: 240px;
    height: 240px;
}

.badge-arc-text {
    text-transform: uppercase;
}

.ring {
    transform-origin: 120px 120px;
}

.ring-inner {
    animation: pulseRing 4s ease-in-out infinite;
}

.ring-mid {
    animation: pulseRing 4s ease-in-out infinite 0.7s;
}

.ring-outer {
    animation: pulseRing 4s ease-in-out infinite 1.4s;
}

@keyframes pulseRing {
    0%, 100% { opacity: 0.4; transform: scale(1); transform-origin: 120px 120px; }
    50% { opacity: 0.95; transform: scale(1.04); transform-origin: 120px 120px; }
}

.badge-sigil {
    transform-origin: 120px 120px;
    animation: sigilDrift 30s linear infinite;
}

@keyframes sigilDrift {
    from { transform: translate(120px, 120px) rotate(0deg); }
    to { transform: translate(120px, 120px) rotate(360deg); }
}

.hero-title {
    font-family: 'Philosopher', serif;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 700;
    color: var(--dark);
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.title-accent {
    color: var(--copper);
    font-style: italic;
    font-weight: 400;
}

.hero-sub {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    color: var(--copper);
    margin-top: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

.hero-tag {
    margin-top: 1.5rem;
    max-width: 480px;
    font-size: 1.05rem;
    color: var(--dark);
    opacity: 0.75;
    font-style: italic;
}

.hero-tag em {
    color: var(--copper);
    font-style: italic;
}

.hero-scroll-cue {
    margin-top: 3.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.cue-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--copper);
}

.cue-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--copper), transparent);
    animation: cuePulse 2.4s ease-in-out infinite;
}

@keyframes cuePulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.8); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ===================================================================
   LOTUS DIVIDER — sequential petal reveal
   =================================================================== */

.lotus-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    position: relative;
    z-index: 2;
}

.lotus-divider svg {
    overflow: visible;
}

.petal {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    transition: stroke-dashoffset 0.9s cubic-bezier(0.4, 0.1, 0.3, 1);
}

.lotus-divider.revealed .petal-1 { transition-delay: 0s;   stroke-dashoffset: 0; }
.lotus-divider.revealed .petal-2 { transition-delay: 0.2s; stroke-dashoffset: 0; }
.lotus-divider.revealed .petal-3 { transition-delay: 0.4s; stroke-dashoffset: 0; }
.lotus-divider.revealed .petal-4 { transition-delay: 0.6s; stroke-dashoffset: 0; }
.lotus-divider.revealed .petal-5 { transition-delay: 0.8s; stroke-dashoffset: 0; }

.lotus-core {
    opacity: 0;
    transition: opacity 0.4s ease 1s;
}

.lotus-divider.revealed .lotus-core {
    opacity: 1;
}

/* ===================================================================
   SECTIONS — generic
   =================================================================== */

.section {
    padding: 5rem 2rem;
    max-width: var(--max-section);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-narrow {
    max-width: 720px;
}

.section-title {
    font-family: 'Philosopher', serif;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--dark);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.section-lede {
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--dark);
    opacity: 0.7;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 3.5rem;
    font-style: italic;
}

/* ===================================================================
   NEO ELEMENTS — generic raised/pressed surfaces
   =================================================================== */

.neo-raised {
    background: var(--pearl);
    border-radius: 24px;
    box-shadow: var(--neo-raised);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.neo-raised:hover {
    box-shadow: var(--neo-raised-sm);
}

/* ===================================================================
   BADGE MASONRY — The Badge Wall
   =================================================================== */

.badge-masonry {
    columns: 3;
    column-gap: 2rem;
    max-width: var(--max-content);
    margin: 0 auto;
}

.badge-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    background: var(--pearl);
    border-radius: 24px;
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: var(--neo-raised);
    transition: box-shadow 0.4s ease, transform 0.4s ease, opacity 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.badge-item:hover {
    box-shadow: var(--neo-pressed);
}

.badge-item:hover .disc-glyph {
    transform: scale(1.08);
}

.badge-disc {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, var(--warm), var(--pearl));
    box-shadow: var(--neo-raised-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.4s ease;
    position: relative;
}

.badge-item:hover .badge-disc {
    box-shadow: var(--neo-raised);
}

.disc-glyph {
    transition: transform 0.5s ease;
    transform-origin: center;
}

.disc-ring.solid {
    animation: pulseRing 5s ease-in-out infinite;
    transform-origin: 60px 60px;
}

.disc-ring.dashed {
    animation: pulseRing 5s ease-in-out infinite 0.6s;
    transform-origin: 60px 60px;
}

.disc-ring.dotted {
    animation: pulseRing 5s ease-in-out infinite 1.2s;
    transform-origin: 60px 60px;
}

.badge-body-text {
    width: 100%;
}

.badge-eyebrow {
    display: block;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 0.5rem;
}

.badge-name {
    font-family: 'Philosopher', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.005em;
}

.badge-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--dark);
    opacity: 0.78;
    margin-bottom: 1rem;
}

.badge-meta {
    display: inline-block;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--sage);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: var(--pearl);
    box-shadow: var(--neo-pressed);
}

/* ===================================================================
   HOW LIST — three quiet steps
   =================================================================== */

.how-list {
    list-style: none;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.how-step {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--pearl);
    border-radius: 24px;
    box-shadow: var(--neo-raised);
    transition: box-shadow 0.4s ease, transform 0.5s ease, opacity 0.6s ease;
    opacity: 0;
    transform: translateY(20px);
}

.how-step.visible {
    opacity: 1;
    transform: translateY(0);
}

.how-step:hover {
    box-shadow: var(--neo-raised-sm);
}

.step-disc {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--pearl);
    box-shadow: var(--neo-pressed);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.step-disc::after {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 1px dashed var(--copper);
    opacity: 0.4;
}

.step-num {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--copper);
    letter-spacing: 0.05em;
}

.step-body h3 {
    font-family: 'Philosopher', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.4rem;
}

.step-body p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark);
    opacity: 0.78;
}

/* ===================================================================
   PHILOSOPHY content block
   =================================================================== */

.content-block {
    padding: 3.5rem 3rem;
    text-align: center;
    position: relative;
}

.content-symbol {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: symbolSpin 60s linear infinite;
    transform-origin: center;
}

@keyframes symbolSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.philosophy-text {
    font-family: 'Nunito', sans-serif;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--dark);
    opacity: 0.85;
    margin-bottom: 1.25rem;
}

.philosophy-quote {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--shadow-dark);
    font-family: 'Philosopher', serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--copper);
    position: relative;
}

.philosophy-quote em {
    font-style: italic;
}

.quote-mark {
    font-family: 'Philosopher', serif;
    font-size: 1.5rem;
    color: var(--copper);
    opacity: 0.6;
    margin: 0 0.25rem;
}

/* ===================================================================
   BEGIN — closing block
   =================================================================== */

.begin-block {
    text-align: center;
}

.begin-glyph {
    display: flex;
    justify-content: center;
    margin: 2rem auto 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--pearl);
    box-shadow: var(--neo-raised-lg);
    align-items: center;
    transition: box-shadow 0.5s ease;
}

.begin-glyph:hover {
    box-shadow: var(--neo-pressed-deep);
}

.begin-ring {
    transform-origin: 100px 100px;
    animation: pulseRing 5s ease-in-out infinite;
}

.begin-ring:nth-child(2) {
    animation-delay: 0.7s;
}

.begin-ring:nth-child(3) {
    animation-delay: 1.4s;
}

/* ===================================================================
   FOOTER
   =================================================================== */

.footer {
    text-align: center;
    padding: 4rem 2rem 3rem;
    position: relative;
    z-index: 2;
}

.footer-mark {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.footer-text {
    font-family: 'Philosopher', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 0.02em;
}

.footer-sub {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.85rem;
    color: var(--copper);
    margin-top: 0.4rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.footer-fine {
    margin-top: 1.5rem;
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    color: var(--dark);
    opacity: 0.5;
    font-style: italic;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 980px) {
    .badge-masonry {
        columns: 2;
    }
}

@media (max-width: 720px) {
    .karma-meter {
        right: 1rem;
        width: 4px;
    }
    .karma-meter-label {
        display: none;
    }
    .how-step {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding: 2rem 1.5rem;
    }
    .content-block {
        padding: 2.5rem 1.5rem;
    }
    .section {
        padding: 4rem 1.5rem;
    }
    .hero-badge,
    .badge-svg {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 560px) {
    .badge-masonry {
        columns: 1;
    }
    .hero-title {
        font-size: 2.4rem;
    }
    .mandala {
        width: 500px;
        height: 500px;
    }
}
