/*
 * Template 1: Mystical Emergence
 * Dark cosmic theme with bioluminescent mycelial network aesthetics
 */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================
   CSS VARIABLES - Mystical Dark Theme
   ============================================ */
:root {
    /* Deep cosmic colors */
    --deep-teal: #0a2e2e;
    --teal: #0d4a4a;
    --emerald: #1a6b5c;
    --dark-emerald: #0f4a3f;

    /* Bioluminescent accent colors */
    --gold: #d4a84b;
    --amber: #f5c542;
    --soft-cyan: #4ecdc4;
    --bright-cyan: #6ee7e0;
    --cream: #f5f2e8;

    /* Glowing effects */
    --glow-green: rgba(78, 205, 196, 0.4);
    --glow-gold: rgba(245, 197, 66, 0.4);
    --glow-cyan: rgba(78, 205, 196, 0.6);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--deep-teal);
    color: var(--cream);
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* ============================================
   ANIMATED BACKGROUNDS
   ============================================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background:
        radial-gradient(ellipse at 20% 80%, var(--glow-green) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--glow-gold) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 107, 92, 0.2) 0%, transparent 70%),
        var(--deep-teal);
}

.mycelium-network {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg width='800' height='800' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M100,400 Q200,300 300,350 T500,300 T700,400' stroke='%234ecdc4' fill='none' stroke-width='1'/%3E%3Cpath d='M50,500 Q150,400 250,450 T450,400 T650,500' stroke='%234ecdc4' fill='none' stroke-width='1'/%3E%3Cpath d='M200,200 Q300,150 400,200 T600,150 T750,250' stroke='%23f5c542' fill='none' stroke-width='1'/%3E%3Ccircle cx='300' cy='350' r='4' fill='%23f5c542'/%3E%3Ccircle cx='500' cy='300' r='4' fill='%23f5c542'/%3E%3Ccircle cx='250' cy='450' r='3' fill='%234ecdc4'/%3E%3Ccircle cx='400' cy='200' r='3' fill='%23f5c542'/%3E%3C/svg%3E");
    animation: float 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-20px) translateX(10px); }
    50% { transform: translateY(-10px) translateX(-10px); }
    75% { transform: translateY(-30px) translateX(5px); }
}

/* ============================================
   NAVIGATION
   ============================================ */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(10, 46, 46, 0.95), transparent);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(10, 46, 46, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.logo:hover {
    text-shadow: 0 0 20px var(--glow-gold);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, var(--gold) 30%, var(--emerald) 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px var(--glow-gold);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    margin-top: 6px;
}

.nav-links li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    position: relative;
    display: inline-block;
    line-height: 1;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--soft-cyan);
    box-shadow: 0 0 10px var(--glow-cyan);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--soft-cyan);
    text-shadow: 0 0 10px var(--glow-green);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--soft-cyan);
}

h4 {
    font-size: 1.3rem;
    color: var(--gold);
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: rgba(245, 242, 232, 0.9);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--soft-cyan);
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

a:hover {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 0;
    list-style-position: outside;
}

li {
    margin-bottom: 0.5rem;
    margin-left: 1.5rem;
    padding-left: 0.5rem;
    line-height: 1.7;
}

strong {
    font-weight: 600;
    color: var(--cream);
}

em {
    font-style: italic;
    color: var(--soft-cyan);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--gold);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: rgba(245, 242, 232, 0.7);
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

.section-intro {
    font-size: 1.15rem;
    color: rgba(245, 242, 232, 0.85);
    max-width: 800px;
    margin: 0 auto var(--spacing-md);
    text-align: center;
}

/* ============================================
   ICONS - Cosmic SVG Styling
   ============================================ */
.icon {
    width: 40px;
    height: 40px;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 0 8px rgba(78, 205, 196, 0.4));
    transition: all 0.3s ease;
}

.icon:hover {
    filter: drop-shadow(0 0 15px rgba(212, 168, 75, 0.6));
    transform: scale(1.1);
}

/* Icon size variants */
.icon-sm {
    width: 24px;
    height: 24px;
}

.icon-md {
    width: 32px;
    height: 32px;
}

.icon-lg {
    width: 48px;
    height: 48px;
}

.icon-xl {
    width: 64px;
    height: 64px;
}

/* Inline icons within text */
.icon-inline {
    width: 1.2em;
    height: 1.2em;
    margin: 0 0.2em;
    vertical-align: -0.2em;
}

/* Guild/section header icons */
h2 .icon,
h3 .icon {
    margin-right: 0.5rem;
}

/* Summary grid icons */
.summary-number .icon {
    width: 48px;
    height: 48px;
    filter: drop-shadow(0 0 12px rgba(212, 168, 75, 0.5));
}

/* Logo icon in header */
.logo-icon .icon {
    filter: drop-shadow(0 0 20px rgba(212, 168, 75, 0.8));
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--amber));
    color: var(--deep-teal);
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--glow-gold);
}

.btn-secondary {
    background: transparent;
    color: var(--cream);
    padding: 1rem 2.5rem;
    border: 1px solid var(--soft-cyan);
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(78, 205, 196, 0.1);
    box-shadow: 0 0 20px var(--glow-green);
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-form label {
    font-size: 0.9rem;
    color: var(--cream);
    font-weight: 500;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    padding: 0.875rem 1rem;
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 8px;
    background: rgba(10, 46, 46, 0.8);
    color: var(--cream);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(245, 242, 232, 0.5);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--soft-cyan);
    box-shadow: 0 0 15px var(--glow-green);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form .btn-primary {
    margin-top: 0.5rem;
    width: 100%;
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: var(--spacing-xl) 5%;
    position: relative;
}

.section.bg-dark {
    background: linear-gradient(180deg, transparent, rgba(13, 74, 74, 0.5), transparent);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    padding: 8rem 5% 4rem 10%;
    position: relative;
    background-image: url('../images/planetary-party-banner.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
}

.hero-content {
    max-width: 900px;
    z-index: 1;
    background: rgba(10, 46, 46, 0.6);
    padding: 3rem 4rem;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--gold) 50%, var(--soft-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h1 em {
    font-style: italic;
    color: var(--gold);
    -webkit-text-fill-color: var(--gold);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(245, 242, 232, 0.8);
    max-width: 700px;
    margin: 0 0 1rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(245, 242, 232, 0.7);
    max-width: 650px;
    margin: 0 0 2.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Subpage Hero - Consistent header for all pages except home */
.hero-subpage {
    min-height: calc(50vh + 200px);
    height: calc(50vh + 200px);
    align-items: center;
    text-align: center;
    padding: 8rem 5% 3rem 5%;
}

.hero-subpage .hero-content {
    max-width: 800px;
}

.hero-subpage .hero-subtitle,
.hero-subpage .hero-description {
    margin: 0 auto 1rem;
}

.hero-subpage .hero-cta-group {
    justify-content: center;
}

/* ============================================
   VISUAL ELEMENTS
   ============================================ */
.spiral-divider {
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.spiral-divider svg {
    width: 80px;
    height: 80px;
    animation: rotate 20s linear infinite;
}

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

.glowing-mandala {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--gold) 0%, transparent 30%),
        conic-gradient(from 0deg, var(--emerald), var(--teal), var(--soft-cyan), var(--emerald));
    animation: pulse 4s ease-in-out infinite;
    box-shadow:
        0 0 60px var(--glow-gold),
        inset 0 0 60px rgba(78, 205, 196, 0.3);
}

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

/* ============================================
   SECTION IMAGES
   ============================================ */
.section-image {
    margin: 3rem auto;
    max-width: 800px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 60px rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.2);
    display: block;
    text-align: center;
}

.section-image img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.section-image.wide {
    max-width: 100%;
}

/* Image Placeholders (for prompts) */
.image-placeholder {
    background: linear-gradient(135deg, rgba(13, 74, 74, 0.4), rgba(10, 46, 46, 0.6));
    border: 2px dashed rgba(78, 205, 196, 0.4);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
    position: relative;
}

.image-placeholder-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--soft-cyan);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.image-placeholder-prompt {
    font-size: 0.9rem;
    color: rgba(245, 242, 232, 0.85);
    line-height: 1.7;
}

.image-placeholder-prompt strong {
    color: var(--gold);
    font-weight: 600;
}

/* ============================================
   FEATURE CARDS & GRIDS
   ============================================ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: var(--spacing-md);
}

.feature-card {
    background: linear-gradient(135deg, rgba(13, 74, 74, 0.6), rgba(10, 46, 46, 0.8));
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(78, 205, 196, 0.15);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--soft-cyan);
    margin-bottom: 1rem;
}

.feature-card p {
    color: rgba(245, 242, 232, 0.8);
    margin-bottom: 1rem;
}

.feature-card ul {
    list-style: none;
    padding-left: 0;
    color: rgba(245, 242, 232, 0.85);
}

.feature-card li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.5;
}

.feature-card li::before {
    content: "◆";
    position: absolute;
    left: 0;
    color: var(--soft-cyan);
    font-size: 0.5rem;
    top: 0.45rem;
}

.feature-card.no-bullets ul,
.feature-card.no-bullets ol {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.feature-card.no-bullets li::before {
    display: none;
    content: none;
}

.feature-card.no-bullets li {
    padding-left: 0 !important;
    list-style: none;
    position: static;
}

/* Center last card when alone on row - desktop only */
@media (min-width: 900px) {
    .feature-grid.center-last-card {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature-grid.center-last-card > .feature-card:last-child:nth-child(3n + 1) {
        grid-column: 2;
    }
}

/* SVG clickable links */
.svg-link {
    cursor: pointer;
}

.svg-link:hover .node-circle {
    filter: brightness(1.2);
}

/* Core Principles - Emphasized Stack Layout */
.principles-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 2rem auto 0;
}

.principle-card {
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.15), rgba(78, 205, 196, 0.1));
    border: 2px solid var(--gold);
    border-radius: 16px;
    padding: 2rem 3rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

.principle-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 168, 75, 0.2);
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.2), rgba(78, 205, 196, 0.15));
}

.principle-card h3 {
    color: var(--gold);
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-serif);
}

.principle-card p {
    color: rgba(245, 242, 232, 0.9);
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 768px) {
    .principle-card {
        padding: 1.5rem 1.5rem;
    }

    .principle-card h3 {
        font-size: 1.3rem;
    }

    .principle-card p {
        font-size: 1rem;
    }
}

/* ============================================
   IMAGE-TEXT SECTIONS
   ============================================ */
.image-text-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin: var(--spacing-lg) 0;
}

.image-text-section img {
    width: 100%;
    border-radius: 20px;
    border: 2px solid rgba(78, 205, 196, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ============================================
   QUOTE SECTIONS
   ============================================ */
.quote-section {
    padding: var(--spacing-xl) 5%;
    text-align: center;
    background: radial-gradient(ellipse at center, rgba(212, 168, 75, 0.1) 0%, transparent 70%);
}

.quote-section blockquote {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-style: italic;
    color: var(--gold);
    max-width: 900px;
    margin: 0 auto 2rem;
    line-height: 1.4;
}

.quote-attribution {
    color: rgba(245, 242, 232, 0.7);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    padding: 4rem 5% 2rem;
    border-top: 1px solid rgba(78, 205, 196, 0.2);
    background: linear-gradient(to bottom, transparent, rgba(10, 46, 46, 0.8));
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(245, 242, 232, 0.6);
    font-size: 0.9rem;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(245, 242, 232, 0.6);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 2;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--soft-cyan);
}

.footer-bottom {
    border-top: 1px solid rgba(78, 205, 196, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(245, 242, 232, 0.5);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: rgba(245, 242, 232, 0.6);
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--gold);
    text-shadow: 0 0 10px var(--glow-gold);
}

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

/* Tablet & Mobile */
@media (max-width: 1024px) {
    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .section {
        padding: var(--spacing-lg) 5%;
    }

    .hero {
        padding: 6rem 5% 3rem;
        min-height: 90vh;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    /* Reduce spacing for mobile */
    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.25rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    body {
        font-size: 16px;
    }

    /* Navigation - Mobile Menu */
    nav {
        padding: 1rem 5%;
    }

    .logo {
        font-size: 1.25rem;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .logo-icon .icon {
        width: 24px;
        height: 24px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(10, 46, 46, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        align-items: flex-start;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.75rem 0;
        width: 100%;
        border-bottom: 1px solid rgba(78, 205, 196, 0.1);
    }

    .mobile-menu-toggle {
        display: block;
        font-size: 1.75rem;
        padding: 0.5rem;
        min-width: 44px;
        min-height: 44px;
    }

    /* Hero Section */
    .hero {
        padding: 5rem 5% 2rem;
        min-height: 85vh;
    }

    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    /* Buttons - Full width on mobile */
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
        min-height: 48px;
        text-align: center;
        justify-content: center;
    }

    /* Typography */
    h1 {
        font-size: clamp(2rem, 7vw, 3rem);
    }

    h2 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    h3 {
        font-size: clamp(1.35rem, 5vw, 1.75rem);
    }

    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        margin-bottom: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .section-intro {
        font-size: 1.05rem;
        margin-bottom: 1.5rem;
    }

    /* Sections */
    .section {
        padding: var(--spacing-xl) 5%;
    }

    /* Layout Grids */
    .image-text-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .guilds-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .summary-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Accordions - Better touch targets and readable text */
    .accordion-header {
        padding: 1.25rem 1.5rem;
        min-height: 60px;
    }

    .accordion-title {
        font-size: 1.25rem;
    }

    .accordion-icon {
        font-size: 1.25rem;
        min-width: 32px;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .accordion-item.active .accordion-content {
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    /* Accordion content text - larger for mobile readability */
    .accordion-content p {
        font-size: 1.05rem;
        line-height: 1.75;
    }

    .accordion-content ul,
    .accordion-content ol {
        font-size: 1.05rem;
        padding-left: 0;
        margin-left: 0;
    }

    .accordion-content li {
        font-size: 1.05rem;
        line-height: 1.7;
        margin-bottom: 0.75rem;
        margin-left: 1rem;
        padding-left: 0.25rem;
    }

    .accordion-content h4 {
        font-size: 1.15rem;
        margin-top: 1.75rem;
        margin-bottom: 1rem;
    }

    /* Protocol Steps */
    .protocol-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .protocol-step {
        padding: 1.5rem;
    }

    /* Quote Section */
    .quote-section blockquote {
        font-size: clamp(1.25rem, 5vw, 2rem);
    }

    .quote-attribution {
        font-size: 1rem;
    }

    /* Footer */
    footer {
        padding: 3rem 5% 2rem;
    }

    .footer-section {
        margin-bottom: 1rem;
    }

    /* Tab Buttons */
    .tab-buttons {
        flex-wrap: nowrap;
        gap: 0.25rem;
    }

    .tab-button {
        padding: 0.5rem 0.5rem;
        font-size: 0.875rem;
        min-height: 44px;
        flex: 1;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }

    /* Images */
    .image-text-section img {
        border-radius: 12px;
    }

    /* Summary Cards */
    .summary-card {
        padding: 1.25rem;
    }

    .summary-item {
        padding: 1.25rem;
    }

    .summary-number {
        font-size: 2rem;
    }

    /* Icons - Slightly smaller on mobile */
    .icon-lg {
        width: 40px;
        height: 40px;
    }

    .icon-xl {
        width: 52px;
        height: 52px;
    }

    /* Fix icon bullet overlap on mobile - increase left padding for icon-prefixed list items */
    li[style*="position: relative"] {
        padding-left: 2.5rem !important;
    }

    li[style*="position: relative"] span[style*="position: absolute"] .icon,
    li[style*="position: relative"] span[style*="position: absolute"] .icon-md {
        width: 24px;
        height: 24px;
    }
}

/* Small Mobile (Portrait phones) */
@media (max-width: 480px) {
    :root {
        --spacing-xs: 0.5rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2.5rem;
    }

    nav {
        padding: 0.75rem 4%;
    }

    .logo {
        font-size: 1.1rem;
    }

    .hero {
        padding: 4rem 4% 2rem;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 9vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section {
        padding: var(--spacing-xl) 4%;
    }

    .feature-card,
    .protocol-step,
    .accordion-item {
        padding: 1.25rem;
    }

    .accordion-header {
        padding: 1rem 1.25rem;
    }

    .accordion-title {
        font-size: 1.1rem;
    }

    /* Accordion content text - still readable on small phones */
    .accordion-content p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .accordion-content ul,
    .accordion-content ol {
        font-size: 1rem;
        padding-left: 0;
        margin-left: 0;
    }

    .accordion-content li {
        font-size: 1rem;
        line-height: 1.65;
        margin-bottom: 0.6rem;
        margin-left: 0.875rem;
        padding-left: 0.25rem;
    }

    .accordion-content h4 {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 7vw, 2rem);
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }

    footer {
        padding: 2.5rem 4% 1.5rem;
    }

    .quote-section blockquote {
        font-size: clamp(1.1rem, 6vw, 1.75rem);
    }

    /* Maintain icon bullet fix on small phones */
    li[style*="position: relative"] {
        padding-left: 2.25rem !important;
    }

    li[style*="position: relative"] span[style*="position: absolute"] .icon,
    li[style*="position: relative"] span[style*="position: absolute"] .icon-md {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ACCORDION / COLLAPSIBLE SECTIONS
   ============================================ */
.accordion {
    margin: 2rem 0;
}

.accordion-item {
    background: linear-gradient(135deg, rgba(13, 74, 74, 0.4), rgba(10, 46, 46, 0.6));
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(78, 205, 196, 0.4);
}

.accordion-item.active {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(212, 168, 75, 0.2);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.accordion-header:hover {
    background: rgba(78, 205, 196, 0.05);
}

.accordion-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--soft-cyan);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.accordion-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--amber));
    color: var(--deep-teal);
    font-weight: 600;
    font-size: 1.1rem;
}

.accordion-icon {
    font-size: 1.5rem;
    color: var(--gold);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.accordion-item.active .accordion-content {
    max-height: 3000px;
    padding: 0 2rem 2rem 2rem;
}

.accordion-content p {
    color: rgba(245, 242, 232, 0.85);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.accordion-content ul {
    list-style-position: inside;
    color: rgba(245, 242, 232, 0.8);
    margin: 1rem 0;
}

.accordion-content li {
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.accordion-content h4 {
    color: var(--gold);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem 0;
}

/* Team Accordion Styles */
.team-accordion .accordion-header {
    align-items: flex-start;
    gap: 1rem;
}

.team-header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.team-header-text {
    flex: 1;
}

.team-header-text .accordion-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.team-header-text .emphasis {
    font-size: 0.95rem;
    line-height: 1.4;
}

.team-photo-small {
    flex-shrink: 0;
}

/* Mobile adjustments for team accordion */
@media (max-width: 768px) {
    .team-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .team-header-text .accordion-title {
        font-size: 1.2rem;
    }

    .team-header-text .emphasis {
        font-size: 0.85rem;
    }

    .team-accordion .accordion-header {
        flex-wrap: wrap;
        padding: 1rem 1.25rem;
    }

    .team-accordion .accordion-icon {
        position: absolute;
        right: 1.25rem;
        top: 1rem;
    }

    .team-accordion .accordion-item {
        position: relative;
    }
}

/* Summary Cards - Quick Overview */
.summary-card {
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.1), rgba(78, 205, 196, 0.05));
    border-left: 4px solid var(--gold);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.summary-card h3 {
    color: var(--gold);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.summary-card p {
    color: rgba(245, 242, 232, 0.85);
    font-size: 1.05rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.guilds-grid {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
    margin: 2rem auto;
}

.summary-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(13, 74, 74, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(78, 205, 196, 0.15);
    transition: all 0.3s;
}

.summary-item:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
}

.summary-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--gold);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.summary-label {
    color: var(--cream);
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-serif);
    display: block;
    margin-bottom: 0.5rem;
}

.summary-description {
    color: rgba(245, 242, 232, 0.75);
    font-size: 0.85rem;
    line-height: 1.4;
    display: block;
}

/* Toggle Sections */
.toggle-section {
    margin: 2rem 0;
}

.toggle-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--soft-cyan);
    cursor: pointer;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s;
    padding: 0.5rem 0;
}

.toggle-trigger:hover {
    color: var(--gold);
    text-shadow: 0 0 10px var(--glow-gold);
}

.toggle-trigger::before {
    content: '▶';
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.toggle-trigger.active::before {
    transform: rotate(90deg);
}

.toggle-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin 0.4s ease;
}

.toggle-content.active {
    max-height: 2000px;
    margin-top: 1rem;
}

/* Tabs */
.tabs {
    margin: 2rem 0;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    border-bottom: 2px solid rgba(78, 205, 196, 0.2);
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    color: rgba(245, 242, 232, 0.7);
    font-size: 1.1rem;
    font-family: var(--font-serif);
    padding: 1rem 1.5rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    box-shadow: 0 0 10px var(--glow-gold);
    transition: width 0.3s;
}

.tab-button:hover {
    color: var(--soft-cyan);
}

.tab-button.active {
    color: var(--gold);
}

.tab-button.active::after {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

/* ============================================
   PROTOCOL-SPECIFIC STYLES
   ============================================ */
.bg-cream {
    background: linear-gradient(180deg, transparent, rgba(245, 242, 232, 0.05), transparent);
}

.bg-light-green {
    background: linear-gradient(180deg, transparent, rgba(26, 107, 92, 0.15), transparent);
}

.protocol-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.protocol-step {
    background: linear-gradient(135deg, rgba(13, 74, 74, 0.4), rgba(10, 46, 46, 0.6));
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.protocol-step:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.protocol-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), var(--amber));
    color: var(--deep-teal);
    font-weight: 600;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px var(--glow-gold);
}

.protocol-step h3 {
    color: var(--soft-cyan);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.protocol-step p {
    color: rgba(245, 242, 232, 0.8);
    line-height: 1.7;
}

.emphasis {
    color: var(--gold);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: block;
}

.image-text-section.reverse {
    direction: ltr;
}

.image-text-section.reverse > *:first-child {
    order: 2;
}

.image-text-section.reverse > *:last-child {
    order: 1;
}

@media (max-width: 768px) {
    .image-text-section.reverse > *:first-child,
    .image-text-section.reverse > *:last-child {
        order: 0;
    }

    .protocol-steps {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   IMAGE LIGHTBOX / VIEWER
   ============================================ */

/* Make content images clickable */
.image-text-section img,
.protocol-step img,
.feature-card img,
.summary-card img {
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.image-text-section img:hover,
.protocol-step img:hover,
.feature-card img:hover,
.summary-card img:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

/* Lightbox container */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 46, 46, 0.98);
    backdrop-filter: blur(20px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

/* Lightbox content wrapper */
.lightbox-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lightbox image container with zoom/pan */
.lightbox-image-container {
    position: relative;
    overflow: hidden;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.lightbox-image-container.dragging {
    cursor: grabbing;
}

.lightbox-image-container.zoomed {
    cursor: move;
}

/* Lightbox image */
.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Close button */
.lightbox-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(212, 168, 75, 0.9), rgba(245, 197, 66, 0.9));
    border: none;
    border-radius: 50%;
    color: var(--deep-teal);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    box-shadow: 0 4px 20px var(--glow-gold);
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 30px var(--glow-gold);
}

/* Zoom controls */
.lightbox-controls {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10001;
}

.lightbox-control-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.9), rgba(110, 231, 224, 0.9));
    border: none;
    border-radius: 50%;
    color: var(--deep-teal);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--glow-cyan);
}

.lightbox-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px var(--glow-cyan);
}

.lightbox-control-btn:active {
    transform: scale(0.95);
}

/* Zoom level indicator */
.lightbox-zoom-level {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: rgba(13, 74, 74, 0.9);
    color: var(--cream);
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Image caption */
.lightbox-caption {
    position: fixed;
    bottom: 7rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 74, 74, 0.9);
    color: var(--cream);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    max-width: 80%;
    text-align: center;
    z-index: 10001;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(78, 205, 196, 0.3);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .lightbox-controls {
        bottom: 1rem;
        gap: 0.5rem;
    }

    .lightbox-control-btn {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .lightbox-zoom-level {
        top: 1rem;
        left: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .lightbox-caption {
        bottom: 5.5rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        max-width: 90%;
    }

    .lightbox-image {
        max-height: 75vh;
    }

    .lightbox-image-container {
        max-height: 75vh;
    }
}

/* Loading spinner */
.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(78, 205, 196, 0.3);
    border-top-color: var(--soft-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   INTERACTIVE MIND MAP - Living Architecture
   ============================================ */
.mind-map-container {
    width: 100%;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: var(--spacing-lg) 0;
    overflow: visible;
}

.mind-map-svg {
    width: 100%;
    max-width: 1200px;
    height: auto;
    min-height: 600px;
    cursor: default;
}

/* Central coherence node */
.mind-map-core {
    transition: all 0.4s ease;
}

.mind-map-core-glow {
    filter: url(#coreGlow);
    animation: coreBreathing 4s ease-in-out infinite;
}

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

/* Node styles */
.mind-map-node {
    cursor: pointer;
    transition: filter 0.3s ease;
}

.mind-map-node:hover {
    animation: hoverPulseGlow 1.2s ease-in-out infinite;
}

@keyframes hoverPulseGlow {
    0%, 100% { filter: drop-shadow(0 0 15px var(--glow-gold)) brightness(1.1); }
    50% { filter: drop-shadow(0 0 35px var(--glow-gold)) brightness(1.3); }
}

.node-circle {
    transition: filter 0.3s ease;
}

.node-label {
    font-family: var(--font-serif);
    fill: var(--cream);
    text-anchor: middle;
    transition: all 0.3s ease;
    pointer-events: none;
}

.node-sublabel {
    font-family: var(--font-sans);
    font-size: 11px;
    fill: rgba(245, 242, 232, 0.7);
    text-anchor: middle;
    pointer-events: none;
}

/* Old story nodes - dissolving effect */
.old-story-node {
    opacity: 0.5;
    animation: dissolving 8s ease-in-out infinite;
}

.old-story-node:hover {
    opacity: 0.85;
    animation: hoverPulseOld 1.2s ease-in-out infinite;
}

@keyframes hoverPulseOld {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(139, 90, 90, 0.5)) brightness(1.15); opacity: 0.8; }
    50% { filter: drop-shadow(0 0 28px rgba(139, 90, 90, 0.8)) brightness(1.35); opacity: 0.95; }
}

@keyframes dissolving {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.6; }
}

/* New story nodes - emerging effect */
.new-story-node {
    animation: emerging 4s ease-in-out infinite;
    transition: filter 0.3s ease;
}

.new-story-node:nth-child(2) { animation-delay: 0.5s; }
.new-story-node:nth-child(3) { animation-delay: 1s; }
.new-story-node:nth-child(4) { animation-delay: 1.5s; }

.new-story-node:hover {
    animation: hoverPulseNew 1.2s ease-in-out infinite;
}

@keyframes hoverPulseNew {
    0%, 100% { filter: drop-shadow(0 0 15px var(--glow-green)) brightness(1.1); }
    50% { filter: drop-shadow(0 0 40px var(--glow-green)) brightness(1.25); }
}

@keyframes emerging {
    0%, 100% { filter: drop-shadow(0 0 8px var(--glow-green)); }
    50% { filter: drop-shadow(0 0 20px var(--glow-green)); }
}

/* Protocol action nodes */
.protocol-node {
    animation: protocolPulse 3s ease-in-out infinite;
    transition: filter 0.3s ease;
}

.protocol-node:nth-child(odd) { animation-delay: 0.5s; }

.protocol-node:hover {
    animation: hoverPulseProtocol 1.2s ease-in-out infinite;
}

@keyframes hoverPulseProtocol {
    0%, 100% { filter: drop-shadow(0 0 12px var(--glow-gold)) brightness(1.1); }
    50% { filter: drop-shadow(0 0 30px var(--glow-gold)) brightness(1.3); }
}

@keyframes protocolPulse {
    0%, 100% { filter: drop-shadow(0 0 5px var(--glow-gold)); }
    50% { filter: drop-shadow(0 0 15px var(--glow-gold)); }
}

/* Mycelial connections */
.mycelial-path {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.4s ease;
}

.path-main {
    stroke: url(#mainPathGradient);
    stroke-width: 3;
    opacity: 0.7;
}

.path-secondary {
    stroke: url(#secondaryPathGradient);
    stroke-width: 2;
    opacity: 0.5;
}

.path-old-story {
    stroke: rgba(139, 90, 90, 0.4);
    stroke-width: 1.5;
    stroke-dasharray: 5 5;
    animation: fadePath 8s ease-in-out infinite;
}

@keyframes fadePath {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.5; }
}

.path-flowing {
    stroke-dasharray: 10 5;
    animation: flowingDash 3s linear infinite;
}

@keyframes flowingDash {
    to { stroke-dashoffset: -45; }
}

/* Particle effects on paths */
.flow-particle {
    fill: var(--gold);
    animation: flowParticle 4s ease-in-out infinite;
}

.flow-particle:nth-child(2) { animation-delay: 1s; }
.flow-particle:nth-child(3) { animation-delay: 2s; }
.flow-particle:nth-child(4) { animation-delay: 3s; }

@keyframes flowParticle {
    0% { opacity: 0; offset-distance: 0%; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; offset-distance: 100%; }
}

/* Tooltip/detail panel */
.mind-map-tooltip {
    position: absolute;
    background: linear-gradient(135deg, rgba(13, 74, 74, 0.95), rgba(10, 46, 46, 0.98));
    border: 1px solid var(--soft-cyan);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    max-width: 280px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.96);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                0 0 30px var(--glow-green);
    pointer-events: none;
}

.mind-map-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mind-map-tooltip h4 {
    color: var(--gold);
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.mind-map-tooltip p {
    color: rgba(245, 242, 232, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.mind-map-tooltip .tooltip-tag {
    display: inline-block;
    background: rgba(78, 205, 196, 0.2);
    color: var(--soft-cyan);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-top: 0.75rem;
}

/* Legend */
.mind-map-legend {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(245, 242, 232, 0.7);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.dissolving {
    background: rgba(139, 90, 90, 0.6);
    animation: dissolving 4s ease-in-out infinite;
}

.legend-dot.coherence {
    background: var(--gold);
    box-shadow: 0 0 10px var(--glow-gold);
}

.legend-dot.emerging {
    background: var(--soft-cyan);
    box-shadow: 0 0 10px var(--glow-green);
}

.legend-dot.action {
    background: linear-gradient(135deg, var(--gold), var(--soft-cyan));
}

/* Interaction hint */
.interaction-hint {
    text-align: center;
    color: rgba(245, 242, 232, 0.5);
    font-size: 0.85rem;
    margin-top: 1rem;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    /* Hide coherence mind map on mobile - too complex for small screens */
    .mind-map-container,
    .mind-map-legend,
    .interaction-hint {
        display: none;
    }

    .mind-map-svg {
        min-height: 450px;
    }

    .mind-map-legend {
        gap: 1rem;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    .mind-map-tooltip {
        max-width: 240px;
        padding: 1rem;
    }

    .mind-map-tooltip h4 {
        font-size: 1rem;
    }

    .mind-map-tooltip p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .mind-map-container {
        min-height: 400px;
    }

    .mind-map-legend {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

/* ============================================
   GUILDS PAGE MOBILE OPTIMIZATION
   ============================================ */
@media (max-width: 768px) {
    /* Force 1-column layout for guilds grid */
    .guilds-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        max-width: 100%;
    }

    .summary-item {
        padding: 1.25rem;
    }

    .summary-number {
        font-size: 2rem;
    }

    .summary-number .icon {
        width: 40px;
        height: 40px;
    }

    .summary-label {
        font-size: 1.35rem;
        line-height: 1.3;
    }

    .summary-description {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    /* Accordion mobile improvements for Guilds page */
    .accordion-item {
        margin-bottom: 0.75rem;
        border-radius: 12px;
    }

    .accordion-header {
        padding: 1rem 1.25rem;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .accordion-header > div {
        flex: 1;
        min-width: 0;
    }

    .accordion-title {
        font-size: 1.5rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
        line-height: 1.35;
    }

    .accordion-title .icon {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }

    .accordion-number {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .accordion-icon {
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .accordion-item.active .accordion-content {
        padding: 0 1.25rem 1.25rem 1.25rem;
    }

    .accordion-content h4 {
        font-size: 1.15rem;
        margin-top: 1.5rem;
    }

    .accordion-content ul {
        padding-left: 0;
        margin-left: 0;
    }

    .accordion-content li {
        margin-bottom: 0.6rem;
        font-size: 1.05rem;
        line-height: 1.7;
        margin-left: 1rem;
        padding-left: 0.25rem;
    }

    .accordion-content p {
        font-size: 1.05rem;
        line-height: 1.75;
    }
}

@media (max-width: 480px) {
    .guilds-grid {
        gap: 0.75rem;
    }

    .summary-item {
        padding: 1rem;
    }

    .summary-number {
        font-size: 1.75rem;
    }

    .summary-number .icon {
        width: 32px;
        height: 32px;
    }

    .summary-label {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .summary-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    /* Accordion optimizations for small phones */
    .accordion-item {
        margin-bottom: 0.5rem;
        border-radius: 10px;
    }

    .accordion-header {
        padding: 0.875rem 1rem;
    }

    .accordion-title {
        font-size: 1.35rem;
        font-weight: 600;
        line-height: 1.35;
        flex-wrap: wrap;
    }

    .accordion-title .icon {
        width: 20px;
        height: 20px;
    }

    .accordion-number {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
    }

    .accordion-icon {
        font-size: 1rem;
    }

    .accordion-item.active .accordion-content {
        padding: 0 1rem 1rem 1rem;
    }

    /* Accordion content readable on small phones */
    .accordion-content p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .accordion-content ul,
    .accordion-content ol {
        padding-left: 0;
        margin-left: 0;
    }

    .accordion-content li {
        font-size: 1rem;
        line-height: 1.65;
        margin-left: 0.875rem;
        padding-left: 0.25rem;
    }

    .accordion-content h4 {
        font-size: 1.1rem;
    }
}
