/* ========================================
   KARMABADGE.COM - STYLES
   Dark Mode Scholarly Folio Experience
   ======================================== */

/* Color Palette */
:root {
    --color-bg-primary: #0F0D0B;
    --color-bg-secondary: #1A1210;
    --color-bg-tertiary: #12101A;
    --color-accent-burgundy: #6B1D2A;
    --color-accent-sage: #3D5A3E;
    --color-accent-violet: #3E3460;
    --color-text-primary: #E8DCC8;
    --color-text-secondary: #9B8E7A;
    --color-gold: #C9A84C;
    --color-ember: #B8602A;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(180deg, #0F0D0B 0%, #1A1210 50%, #12101A 100%);
    color: #E8DCC8;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Leather Texture Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #0F0D0B 0%, #1A1210 50%, #12101A 100%);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(139, 90, 43, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(201, 168, 76, 0.02) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 20%, rgba(155, 142, 122, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Folio Container - Magazine Spread Experience */
.folio-container {
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* Spread Layout - Two-Page Folio */
.spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    position: relative;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.folio-page {
    position: relative;
    padding: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Left Page - Visual Content */
.left-page {
    background: linear-gradient(135deg, rgba(15, 13, 11, 0.8) 0%, rgba(26, 18, 16, 0.9) 100%);
    border-right: 1px solid rgba(201, 168, 76, 0.15);
}

.left-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 30% 40%, rgba(201, 168, 76, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 70% 70%, rgba(107, 29, 42, 0.02) 0%, transparent 40%);
    pointer-events: none;
}

/* Right Page - Text Content */
.right-page {
    background: linear-gradient(135deg, rgba(62, 52, 96, 0.3) 0%, rgba(15, 13, 11, 0.8) 100%);
    position: relative;
}

.right-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 50% 30%, rgba(61, 90, 62, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 50% 70%, rgba(62, 52, 96, 0.01) 0%, transparent 50%),
        radial-gradient(circle at 50% 70%, rgba(155, 142, 122, 0.01) 0%, transparent 50%);
    pointer-events: none;
}

/* Gutter Decoration - Binding Visual */
.gutter-decoration {
    position: absolute;
    left: 0;
    top: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(201, 168, 76, 0.3) 0%, 
        rgba(201, 168, 76, 0.1) 50%, 
        rgba(201, 168, 76, 0.05) 100%);
    border-left: 1px solid rgba(201, 168, 76, 0.2);
    box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.5);
}

/* Cover Spread */
.cover-spread {
    background: linear-gradient(135deg, #0F0D0B 0%, #1A1210 50%, #0F0D0B 100%);
}

.cover-badge {
    width: 280px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: subtle-float 6s ease-in-out infinite;
}

.badge-seal {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 20px 40px rgba(201, 168, 76, 0.2));
}

.seal-outer {
    fill: none;
    stroke: #C9A84C;
    stroke-width: 3;
}

.seal-inner {
    fill: none;
    stroke: #C9A84C;
    stroke-width: 1.5;
    opacity: 0.6;
}

.seal-text {
    font-size: 80px;
    fill: #C9A84C;
    text-anchor: middle;
    dominant-baseline: middle;
    font-weight: 700;
}

.seal-closing {
    width: 100%;
    height: 100%;
    stroke: #C9A84C;
}

/* Cover Header */
.cover-header {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 100%;
}

.domain-lockup {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.05;
    color: #C9A84C;
    margin-bottom: 1rem;
    text-transform: lowercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

.subtitle {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    color: #9B8E7A;
    font-weight: 400;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.tagline {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #E8DCC8;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.7;
    opacity: 0.9;
}

/* Typography */
h1, h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    color: #C9A84C;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 2.8rem;
    color: #C9A84C;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #E8DCC8;
    margin-bottom: 1.5rem;
}

blockquote {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    color: #C9A84C;
    font-weight: 600;
    font-style: italic;
    line-height: 1.6;
}

.quote-source {
    font-size: 0.9rem;
    color: #9B8E7A;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 400;
}

article {
    position: relative;
    z-index: 10;
}

/* Badge Grid - Virtue Spread */
.badge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 500px;
}

.badge-specimen {
    text-align: center;
    animation: float-badge 5s ease-in-out infinite;
}

.badge-specimen:nth-child(2) {
    animation-delay: 1s;
}

.badge-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    fill: #C9A84C;
    filter: drop-shadow(0 8px 16px rgba(201, 168, 76, 0.3));
    transition: transform 0.3s ease;
}

.badge-specimen:hover .badge-icon {
    transform: scale(1.1) rotateZ(5deg);
}

.badge-label {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #E8DCC8;
    font-weight: 500;
    margin: 0;
}

/* Botanical Specimen */
.botanical-specimen {
    width: 100%;
    max-width: 150px;
    animation: sway-botanical 8s ease-in-out infinite;
}

.botanical-icon {
    width: 100%;
    height: 100%;
    stroke: #3D5A3E;
    stroke-width: 2;
    fill: none;
    filter: drop-shadow(0 4px 12px rgba(61, 90, 62, 0.3));
    transition: all 0.4s ease;
}

.botanical-specimen:hover .botanical-icon {
    stroke: #C9A84C;
}

/* Interactive Badge Grid */
.badge-interaction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    width: 100%;
    max-width: 450px;
}

.badge-interactive {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-interactive:hover {
    transform: translateY(-8px);
}

.badge-border {
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
    position: relative;
    background: radial-gradient(circle at 30% 30%, rgba(201, 168, 76, 0.1), transparent);
    border: 2px solid #C9A84C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    box-shadow: inset 0 0 20px rgba(201, 168, 76, 0.1), 0 8px 24px rgba(201, 168, 76, 0.2);
}

.badge-interactive:hover .badge-border {
    background: radial-gradient(circle at 30% 30%, rgba(201, 168, 76, 0.2), #6B1D2A);
    box-shadow: inset 0 0 30px rgba(201, 168, 76, 0.15), 0 12px 36px rgba(201, 168, 76, 0.3), 0 0 20px #B8602A;
    border-color: #E8DCC8;
}

.badge-inner {
    width: 120px;
    height: 120px;
}

.badge-inner circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    color: #C9A84C;
}

.badge-interactive:hover .badge-inner circle {
    color: #E8DCC8;
}

.badge-emoji {
    font-size: 48px;
    transition: all 0.3s ease;
}

.badge-interactive:hover .badge-emoji {
    font-size: 56px;
}

.badge-name {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #9B8E7A;
    font-weight: 500;
    margin: 0;
    transition: color 0.3s ease;
}

.badge-interactive:hover .badge-name {
    color: #E8DCC8;
}

/* Detail Panel */
#detail-panel {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(61, 90, 62, 0.1);
    border-left: 3px solid #3D5A3E;
    min-height: 80px;
}

.detail-text {
    font-style: italic;
    color: #9B8E7A;
    margin: 0;
    transition: all 0.4s ease;
}

.detail-text.active {
    color: #E8DCC8;
}

/* Philosophy Quote */
.philosophy-quote {
    position: relative;
    max-width: 100%;
    padding: 3rem 2rem;
    text-align: center;
}

.philosophy-quote p {
    margin-bottom: 1rem;
}

.philosophy-quote p:first-child {
    font-size: 2rem;
}

/* Closing Content */
.closing-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.closing-seal {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.8rem;
    color: #C9A84C;
    font-weight: 600;
    margin-top: 2rem;
    letter-spacing: 0.03em;
}

/* Animations */
@keyframes subtle-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes float-badge {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes sway-botanical {
    0%, 100% {
        transform: rotate(0deg) translateY(0);
    }
    25% {
        transform: rotate(1deg) translateY(-5px);
    }
    75% {
        transform: rotate(-1deg) translateY(5px);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .spread {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .left-page {
        border-right: none;
        border-bottom: 1px solid rgba(201, 168, 76, 0.15);
        min-height: 60vh;
    }

    .right-page {
        min-height: 60vh;
    }

    .domain-lockup {
        font-size: clamp(2rem, 6vw, 4rem);
    }

    .section-title {
        font-size: 2rem;
    }

    .badge-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 300px;
    }

    .badge-interaction-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .folio-page {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    .folio-page {
        padding: 2rem;
    }

    .domain-lockup {
        font-size: clamp(1.5rem, 5vw, 3rem);
    }

    h2, .section-title {
        font-size: 1.8rem;
    }

    p {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .badge-border {
        width: 100px;
        height: 100px;
    }

    .badge-emoji {
        font-size: 36px;
    }

    .badge-interaction-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .philosophy-quote p:first-child {
        font-size: 1.5rem;
    }

    .cta-text {
        font-size: 1.5rem;
    }
}

/* Content Area Positioning */
.virtue-article,
.botanical-article,
.interaction-article,
.philosophy-article {
    position: relative;
    z-index: 10;
    max-width: 100%;
}

.virtue-description,
.botanical-description,
.interaction-description,
.philosophy-text {
    color: #E8DCC8;
    margin-bottom: 1.5rem;
}

.virtue-text,
.botanical-text,
.interaction-text {
    color: #9B8E7A;
}

.closing-text {
    color: #E8DCC8;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
