/* =========================================
   JUNCTIONKIT MASTER STYLESHEET
   ========================================= */

:root {
    /* Core Colors */
    --bg: #000000;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --border: rgba(255, 255, 255, 0.06);
    
    /* DEFAULT ACCENT COLORS (The Fallback Theme) */
    --accent-bg: rgba(255, 255, 255, 0.05); 
    --accent-border: rgba(255, 255, 255, 0.1);
    --accent-text: #ffffff; 

    /* Aurora Background Colors */
    --glow-blue: rgba(59, 130, 246, 0.25);
    --glow-indigo: rgba(99, 102, 241, 0.20);
    --glow-teal: rgba(20, 184, 166, 0.15);
    --glow-purple: rgba(139, 92, 246, 0.15);
    
    /* Gradient Text */
    --text-gradient: linear-gradient(90deg, #fde047 0%, #4ade80 50%, #2dd4bf 100%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

/* The Visible Blue Aurora Background */
.aurora-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, var(--glow-blue) 0%, transparent 60%),
        radial-gradient(circle at 80% 70%, var(--glow-teal) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, var(--glow-indigo) 0%, transparent 70%),
        radial-gradient(circle at 30% 80%, var(--glow-purple) 0%, transparent 50%);
    filter: blur(100px); opacity: 0.8;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 1; }

/* Navigation */
nav { display: flex; justify-content: space-between; align-items: center; padding: 2.5rem 0; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 500; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--text-primary); text-decoration: none; }
.logo svg { width: 20px; height: 20px; fill: var(--text-primary); }
.nav-link { color: var(--text-secondary); text-decoration: none; font-size: 0.9rem; font-weight: 400; transition: color 0.3s ease; }
.nav-link:hover { color: var(--text-primary); }

/* Hero & Typography */
.hero { min-height: 85vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 4rem 0; }
.hero-label { font-size: 0.75rem; color: var(--text-secondary); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 2.5rem; padding: 0.5rem 1.2rem; border: 1px solid var(--border); border-radius: 100px; background: rgba(255,255,255,0.02); }
h1 { font-family: 'Fraunces', serif; font-size: clamp(3.5rem, 9vw, 7.5rem); font-weight: 300; line-height: 1.05; letter-spacing: -0.03em; margin-bottom: 2rem; max-width: 900px; }
h1 em { font-style: italic; font-weight: 400; background: var(--text-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p { font-size: clamp(1.1rem, 2vw, 1.35rem); color: var(--text-secondary); max-width: 550px; margin: 0 auto 3.5rem; font-weight: 300; line-height: 1.6; }

/* Buttons */
.cta-button { background: var(--text-primary); color: var(--bg); padding: 1rem 2.5rem; border-radius: 100px; text-decoration: none; font-weight: 500; font-size: 1rem; transition: all 0.4s ease; display: inline-flex; align-items: center; gap: 0.5rem; }
.cta-button:hover { transform: scale(1.05); box-shadow: 0 0 40px rgba(255, 255, 255, 0.15); }

/* Calculator Layout */
.calculator-container { max-width: 900px; margin: 0 auto; padding: 2rem 0 6rem; }
.calculator-header { text-align: center; margin-bottom: 3rem; }
.calculator-header h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
.calculator-main { background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 24px; padding: 3rem; }

/* Forms */
.form-section { margin-bottom: 2.5rem; }
.form-section h3 { font-family: 'Fraunces', serif; font-size: 1.3rem; margin-bottom: 1.5rem; color: var(--text-primary); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.6rem; color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 1rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 12px; color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 1rem; transition: all 0.3s ease; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--text-primary); box-shadow: 0 0 0 3px rgba(255,255,255,0.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.checkbox-group { display: flex; align-items: flex-start; gap: 0.75rem; margin-top: 0.75rem; padding: 1rem; background: rgba(255,255,255,0.03); border-radius: 12px; }
.checkbox-group input[type="checkbox"] { width: 20px; height: 20px; margin-top: 2px; cursor: pointer; accent-color: var(--text-primary); }
.checkbox-group label { margin: 0; cursor: pointer; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }

/* Results & Accents */
.results-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.results-header h3 { font-family: 'Fraunces', serif; font-size: 1.5rem; color: var(--text-primary); margin: 0; }

.copy-btn { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.05); border: 1px solid var(--border); color: var(--text-secondary); padding: 0.5rem 1rem; border-radius: 100px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.3s ease; }
.copy-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.copy-btn svg { width: 14px; height: 14px; }

.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.result-card { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; text-align: center; }

/* THE MAGIC ACCENT VARIABLES */
.result-card.highlight { background: var(--accent-bg); border-color: var(--accent-border); }
.result-card.highlight .result-value { color: var(--accent-text); }

.result-label { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.result-value { font-family: 'Fraunces', serif; font-size: 2.2rem; color: var(--text-primary); font-weight: 400; }

/* Slider */
.target-margin-section { margin-top: 2rem; padding: 2rem; background: rgba(255,255,255,0.03); border-radius: 16px; border: 1px solid var(--border); }
.target-margin-section label { display: block; margin-bottom: 1rem; color: var(--text-secondary); font-size: 0.9rem; }
.slider-container { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1rem; }
.slider-container input[type="range"] { flex: 1; height: 8px; background: var(--border); border-radius: 100px; outline: none; -webkit-appearance: none; cursor: pointer; }
.slider-container input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; background: var(--text-primary); border-radius: 50%; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.target-value { min-width: 100px; text-align: center; font-family: 'Fraunces', serif; font-size: 1.8rem; color: var(--text-primary); font-weight: 600; }
.slider-hint { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* Info & Support */
.info-section { margin-top: 4rem; padding: 2.5rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 20px; }
.info-section h2 { font-family: 'Fraunces', serif; font-size: 1.6rem; margin-bottom: 1.5rem; color: var(--text-primary); }
.info-section h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; margin: 2rem 0 1rem; color: var(--text-primary); }
.info-section ul { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.info-section li { padding: 0.75rem 0; border-bottom: 1px solid var(--border); color: var(--text-secondary); line-height: 1.6; }
.info-section li:last-child { border-bottom: none; }
.info-section li strong { color: var(--text-primary); }

.support-section { margin-top: 4rem; text-align: center; padding: 3rem 2rem; background: rgba(255,255,255,0.02); border: 1px solid var(--border); border-radius: 24px; }
.support-section h3 { font-family: 'Fraunces', serif; font-size: 1.4rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.support-section p { color: var(--text-secondary); margin-bottom: 2rem; max-width: 450px; margin-left: auto; margin-right: auto; font-size: 0.95rem; }
.kofi-button { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.9rem 2rem; background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25); color: #fbbf24; border-radius: 100px; text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: all 0.3s ease; }
.kofi-button:hover { background: rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.5); transform: translateY(-2px); }
.kofi-button img { height: 18px; width: auto; opacity: 0.9; }

footer { border-top: 1px solid var(--border); padding: 3rem 0; text-align: center; }
.footer-text { color: var(--text-secondary); font-size: 0.8rem; letter-spacing: 0.05em; }

/* Mobile */
@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .form-row, .results-grid { grid-template-columns: 1fr; }
    .calculator-main { padding: 2rem; }
    .slider-container { flex-direction: column; gap: 1rem; }
    .target-value { min-width: auto; }
    .results-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

/* =========================================
   FIX FOR DROPDOWN VISIBILITY
   ========================================= */
select option {
    background-color: #000000; /* Dark background */
    color: #f5f5f7; /* White text */
    padding: 10px;
}

/* =========================================
   TOOLS PAGE - CREATIVE LAYOUT
   ========================================= */

.tools-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
}

.tools-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.tools-hero > * {
    position: relative;
    z-index: 1;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto 6rem;
    padding: 0 2rem;
}

.tool-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.tool-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card > * {
    position: relative;
    z-index: 1;
}

.tool-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
}

.tool-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    margin-top: auto;
    transition: gap 0.3s ease;
}

.tool-card:hover .tool-link {
    gap: 1.25rem;
}

.tool-link svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-link svg {
    transform: translateX(4px);
}

/* Future Articles Section */
.articles-section {
    padding: 6rem 2rem;
    border-top: 1px solid var(--border);
    max-width: 1200px;
    margin: 0 auto;
}

.articles-header {
    text-align: center;
    margin-bottom: 4rem;
}

.articles-header h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-4px);
}

.article-card .article-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.article-card h3 {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

.article-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }
    
    .tool-card {
        padding: 2.5rem 2rem;
        min-height: auto;
    }
}

/* =========================================
   BULLETPROOF FIX FOR PHILOSOPHY TEXT
   ========================================= */
.philosophy {
    text-align: center !important; /* Forces text to center */
    margin: 8rem auto !important;  /* Centers the whole block */
    padding: 0 2rem;
    width: 100%;
}

.philosophy h2 {
    font-family: 'Fraunces', serif !important;
    font-size: clamp(2rem, 4vw, 3rem) !important;
    font-weight: 300 !important;
    line-height: 1.3 !important;
    max-width: 800px !important; /* Prevents it from stretching too wide */
    margin: 0 auto !important;   /* Centers the heading block */
    color: var(--text-primary) !important;
    letter-spacing: -0.01em;
}

.philosophy h2 em {
    font-style: italic !important;
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

/* Navigation Links Container */
.nav-links {
    display: flex;
    gap: 2rem;
}