:root {
    --bg-color: #0d1115;
    --bg-grid: rgba(255, 255, 255, 0.03);
    --text-primary: #f2efe9;
    --text-secondary: #b5b0a8;
    --accent-primary: #ffb47b;
    --accent-hover: #e59e66;
    
    --glass-bg: rgba(20, 24, 32, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --card-bg: rgba(20, 24, 32, 0.4);
    --track-bg: rgba(255, 255, 255, 0.05);
    
    --ability-color: #ffb47b;
    --desire-color: #e5e5e5;
    --obligation-color: #8892b0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.text-accent {
    color: var(--accent-primary);
}

/* Background Grid & Glow */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background-color: var(--bg-color);
    background-image: 
        linear-gradient(var(--bg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center center;
}

.bg-glow {
    position: absolute;
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 80vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(255, 180, 123, 0.15) 0%, rgba(13, 17, 21, 0) 70%);
    filter: blur(80px);
    z-index: 0;
}

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

.section {
    margin-bottom: 8rem;
}

.mt-8 {
    margin-top: 4rem;
}

/* Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Typography elements */
.tagline {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.section-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Hero Section */
.hero {
    margin-top: 6rem;
    margin-bottom: 8rem;
    position: relative;
}

.hero-title {
    font-size: 5.5rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    line-height: 1.05;
    max-width: 1000px;
}

.lede-container {
    max-width: 650px;
    margin-bottom: 3rem;
}

.lede {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.lede-secondary {
    font-size: 1.1rem;
    color: var(--accent-primary);
    font-style: italic;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 999px; /* Pill shape */
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #000;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Glass Panels & Cards */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    padding: 3rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(30, 36, 48, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Grids */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card-icon {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: monospace;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

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

/* Diagnostic Engine Layout */
.engine-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 992px) {
    .engine-layout {
        grid-template-columns: 1fr;
    }
}

.sliders-panel {
    padding: 2.5rem;
}

.force-group {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.force-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.force-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.force-status {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    background: var(--track-bg);
    color: var(--text-secondary);
    font-weight: 600;
}

.force-status.active {
    background: rgba(255, 180, 123, 0.15);
    color: var(--accent-primary);
}

.slider-container {
    margin-bottom: 1.5rem;
    position: relative;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.slider-header label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.slider-value {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Make actual inputs invisible but clickable */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    height: 10px; /* slightly taller than track for easier grabbing */
    position: absolute;
    bottom: 25px; /* align with the track */
    left: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    margin: 0;
}

.slider-container:focus-within .progress-track {
    box-shadow: 0 0 0 2px var(--bg-color), 0 0 0 4px var(--accent-primary);
}

.progress-track {
    position: relative;
    width: 100%;
    height: 6px;
    background: var(--track-bg);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.fill-ability { background: var(--ability-color); }
.fill-desire { background: var(--desire-color); }
.fill-obligation { background: var(--obligation-color); }

.slider-helper {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Radar Chart Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .results-panel {
        position: sticky;
        top: 2rem;
    }
}

.radar-container {
    padding: 1rem;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagnosis-card {
    padding: 2.5rem;
}

.diagnosis-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.diagnosis-header h3 {
    font-size: 2rem;
    color: #fff;
}

.coordinate {
    font-family: monospace;
    background: var(--track-bg);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.gap-alert {
    background: rgba(255, 180, 123, 0.1);
    border-left: 3px solid var(--accent-primary);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.gap-alert strong {
    color: var(--accent-primary);
}

.diagnosis-body {
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.next-move-box {
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.next-move-title {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

#diag-next-move {
    color: var(--text-secondary);
}

/* Scenarios */
.scenario-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Rollout Steps */
.rollout-steps {
    display: grid;
    gap: 1.5rem;
}

.step-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding: 2rem;
}

.step-number {
    flex-shrink: 0;
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1;
    opacity: 0.8;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.step-owner {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.step-content p {
    color: var(--text-secondary);
}

/* 8 States Grid */
.states-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.state-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.8rem;
    transition: all 0.3s ease;
}

.state-card:hover {
    background: rgba(40, 48, 64, 0.4);
}

.state-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.state-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #fff;
}

.state-coord {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.state-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.state-card.active-state {
    border-color: var(--accent-primary);
    background: rgba(255, 180, 123, 0.05);
}

.state-card.active-state .state-name {
    color: var(--accent-primary);
}

/* Label with Theory Tooltip */
.label-with-theory {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}

.theory-badge-trigger {
    font-size: 0.85rem;
    opacity: 0.4;
    transition: opacity 0.2s, transform 0.2s;
    user-select: none;
}

.label-with-theory:hover .theory-badge-trigger,
.theory-badge-trigger:focus {
    opacity: 1;
    transform: scale(1.1);
}

.theory-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    width: 280px;
    background: rgba(15, 20, 28, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
}

.label-with-theory:hover .theory-tooltip,
.theory-badge-trigger:focus + .theory-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Expert Advisor Card */
.expert-advisor-box {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.advisor-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.advisor-avatar-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 180, 123, 0.3);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advisor-avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.advisor-content {
    flex: 1;
}

.advisor-role {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.advisor-quote {
    font-size: 0.95rem;
    font-style: italic;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 0.4rem;
}

.advisor-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Theory Anchor Accordions */
.theory-anchor {
    margin-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.6rem;
}

.theory-anchor-btn {
    background: none;
    border: none;
    color: var(--accent-primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0;
    font-family: inherit;
    transition: color 0.2s;
}

.theory-anchor-btn:hover {
    color: var(--accent-hover);
}

.theory-anchor-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.theory-anchor.active .theory-anchor-content {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.bento-card {
    display: flex;
    flex-direction: column;
    padding: 2.2rem;
    height: 100%;
}

.bento-wide {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
}

.bento-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bento-card-image {
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-wide .bento-card-image {
    width: 200px;
    height: 200px;
}

.bento-card-image.small-image {
    width: 100%;
    height: 160px;
    margin-bottom: 1.2rem;
}

.bento-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    filter: contrast(1.1) brightness(0.9);
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.bento-card:hover .bento-card-image img {
    opacity: 1;
    filter: contrast(1.15) brightness(1.05);
}

.bento-badge {
    align-self: flex-start;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
}

.badge-desire {
    background: rgba(255, 255, 255, 0.08);
    color: #f2efe9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-ability {
    background: rgba(255, 180, 123, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 180, 123, 0.15);
}

.badge-obligation {
    background: rgba(136, 146, 176, 0.15);
    color: #a4b1cd;
    border: 1px solid rgba(136, 146, 176, 0.2);
}

.bento-header h3 {
    font-size: 1.4rem;
    color: #fff;
    margin-bottom: 0.15rem;
}

.bento-theory {
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 1.2rem;
    display: block;
}

.bento-quote {
    font-size: 1.05rem;
    font-style: italic;
    color: #fff;
    line-height: 1.4;
    border-left: 2px solid var(--accent-primary);
    padding-left: 1rem;
    margin-bottom: 1.2rem;
}

.bento-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

footer {
    display: flex;
    justify-content: center;
    padding: 4rem 0 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
.fade-in:nth-child(4) { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-wide {
        grid-column: span 1;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.2rem;
    }
    .bento-wide .bento-card-image {
        width: 100%;
        height: 180px;
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 3.5rem; }
    .section-title { font-size: 2.5rem; }
    .glass-panel { padding: 1.5rem; }
    .nav-links { display: none; }
}
