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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-color: #1f2937;
    --bg-color: #ffffff;
    --secondary-bg: #f3f4f6;
    --accent-color: #f59e0b;
    --error-color: #ef4444;
    --success-color: #10b981;
    --font-main: 'Inter', sans-serif;
    --font-serif: 'Merriweather', serif;
    --max-width: 1200px;
}

/* Dark Theme Default for V1, but overridable */
body.dark-theme {
    --text-color: #f9fafb;
    --bg-color: #111827;
    --secondary-bg: #1f2937;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

code {
    font-weight: bold;
    font-size: larger;
    text-wrap: nowrap;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 0;
}

section {
    padding: 1rem 0;
    position: relative;
    z-index: 10;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.6;
}

.modal-close:hover {
    opacity: 1;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: var(--secondary-bg);
    padding: 3rem 0;
    text-align: center;
    margin-top: auto;
}

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

.footer-links a {
    margin: 0 0.5rem;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* --- Landing Page Specific Styles --- */
body.dark-theme {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --secondary-bg: #1e293b;
    --primary-color: #3b82f6;
}

/* Site Header */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 50;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-weight: 900;
    font-size: 1.5rem;
}

@media (max-width: 480px) {
    .site-header {
        padding: 1rem 0;
    }

    .site-header .container {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .site-logo {
        font-size: 1.2rem;
    }

    .site-header .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 6rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: #94a3b8;
}

.pain-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.pain-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1 1 300px;
    max-width: 400px;
}

.pain-card h3 {
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.solution-section {
    background: var(--secondary-bg);
    text-align: center;
}

.solution-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.solution-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex: 1 1 300px;
    max-width: 400px;
}

.solution-card h3 {
    color: var(--success-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

/* Method Section */
.method-step {
    padding: 4rem 0;
}

.step-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.step-label {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 1rem;
}

.engagement-card {
    padding: 0;
    border-left: 4px solid var(--primary-color);
    border-radius: 16px;
    overflow: hidden; /* Clips children to the rounded corners of the card */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.engagement-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.app-solution-box {
    background: rgba(59, 130, 246, 0.05);
    padding: 1.25rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.15);
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 992px) {
    .step-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (min-width: 993px) {
    .method-step:nth-of-type(even) .engagement-card {
        order: -1;
        border-left: none;
        border-right: 4px solid var(--primary-color);
    }
}

/* --- Word Weaver Animation Styles --- */
.ww-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* ==========================================================================
   Word Weaver Animation
   ========================================================================== */

#word-weaver {
    position: relative;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none; /* Let parent accent take over */
    border-radius: 16px;
    padding: 2rem;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    min-height: 240px;
}

.ww-stage-wrapper {
    position: relative;
    z-index: 10;
}

.ww-stage {
    position: relative;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

/* Columns and Slots */
.ww-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 1s ease;
    min-width: 0;
}

.ww-slot {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

/* Typography and Transitions */
.ww-digit-char, .ww-phonetic-char, .ww-word-char, .ww-slash-char {
    display: inline-block;
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
    white-space: pre;
}

/* Layer specific styling */
.ww-digit-char {
    font-weight: 900;
    font-size: 2.2rem;
    color: var(--primary-color, #3b82f6);
    transform: translateY(38px);
}

.ww-phonetic-char, .ww-slash-char {
    font-weight: bold;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.65);
    opacity: 0;
    transform: translateY(19px) scale(0.6);
}

.ww-word-char {
    font-weight: bold;
    font-size: 2.2rem;
    color: #fff;
    opacity: 0;
    transform: scale(0.8);
}

.ww-word-char.filler {
    opacity: 0;
}

/* Invisible until blossom */

/* Special Units */
.ww-digit-slot {
    min-width: 1.2rem;
}

.ww-word-slot {
    max-width: 0;
    overflow: hidden;
    transition: all 1s ease;
}

.filler-unit {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
}

/* --- Animation Steps --- */

/* Step 2: Phonetics Appear */
.step-phon .ww-digit-char {
    transform: translateY(0) scale(0.7);
    opacity: 0.5;
}

.step-phon .ww-phonetic-char, .step-phon .ww-slash-char {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Step 3: Word Blossoms */
.step-word .ww-digit-slot {
    margin: auto -1rem;
}

.step-word .ww-word-slot {
    max-width: 120px;
}

.step-word .filler-unit {
    max-width: 120px;
    opacity: 1;
    visibility: visible;
}

.step-word .ww-digit-char {
    transform: translateY(-8px) scale(0.5);
    opacity: 0.3;
}

.step-word .ww-phonetic-char, .step-word .ww-slash-char {
    opacity: 0.5;
    transform: translateY(-2px) scale(0.9);
}

.step-word .ww-word-char {
    opacity: 1;
    transform: scale(1);
}

.step-word .ww-word-char.filler {
    color: rgba(255, 255, 255, 0.6);
    opacity: 1;
}

/* --- Footer & controls --- */
.ww-footer {
    display: flex;
    margin-top: 15px;
    justify-content: space-between;
    align-items: center;
}

.ww-meta-domain {
    display: flex;
    align-items: center;
}

.ww-domain {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.ww-meta-desc {
    text-align: center;
}

.ww-desc-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.ww-btn-group {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.ww-back, .ww-play-pause {
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.ww-back:hover, .ww-play-pause:hover {
    color: #fff;
}

#word-weaver {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Mnemonic Phrase (Centered) */
.ww-phrase {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.35);
    opacity: 0;
    pointer-events: none;
    font-weight: 500;
    margin-top: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1rem;
}

.step-word .ww-phrase {
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

.ww-icon-back {
    font-size: 1.1rem;
    font-weight: bold;
}

/* --- Sound Game Styles --- */
.sound-game-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none; /* Let parent accent take over */
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: var(--text-color);
    font-family: var(--font-main);
    width: 100%;
}

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

.sg-level-info {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sg-progress-dots {
    display: flex;
    gap: 0.5rem;
}

.sg-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sg-dot.current {
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-color);
}

.sg-dot.complete {
    background: var(--success-color);
}

.sg-controls {
    display: flex;
    gap: 0.5rem;
}

.sg-controls button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 1rem;
    transition: background 0.2s;
}

.sg-controls button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.sg-btn-hint.hidden {
    visibility: hidden;
    pointer-events: none;
}

.sg-game-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.sg-separator {
    width: 1px;
    height: 120px;
    /*margin-left: .5rem;*/
    flex-shrink: 0;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1), transparent);
}

@media (max-width: 650px) {
    .sg-game-area {
        flex-direction: column;
        gap: 1.5rem;
    }

    .sg-separator {
        width: 80%;
        height: 1px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    }
}


.sg-display-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    width: 190px;
    flex-shrink: 0;
}

.sg-question-area, .sg-answer-area {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    min-height: 48px;
    font-size: 1.4rem;
    font-weight: 700;
}

.sg-q-item, .sg-a-item {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sg-q-item {
    color: rgba(255, 255, 255, 0.4);
    font-size: 2rem;
}

.sg-q-item.highlight {
    color: white;
    background: rgba(37, 99, 235, 0.2);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.3);
}

.sg-q-text span {
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.3s;
}

.sg-q-text span.highlight {
    color: white;
    text-shadow: 0 0 10px var(--primary-color);
}

.sg-slash {
    color: rgba(255, 255, 255, 0.2);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.8rem;
}

.sg-answer-units {
    display: flex;
    gap: 0.35rem;
}

.sg-a-item.placeholder {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
}

.sg-a-item.correct {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.sg-board-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 130px;
    width: 140px;
    flex-shrink: 0;
}

.sg-click-board {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    justify-items: center;
}

.sg-btn-board {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    color: white;
    font-family: 'Roboto Mono', 'Source Code Pro', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}


.sg-btn-board:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-color: var(--primary-color);
}

.sg-btn-board:active {
    transform: scale(0.95);
}

.sg-next-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.sg-btn-next {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
    transition: all 0.2s ease;
}

.sg-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
}

.sg-footer-instruction {
    text-align: center;
    margin-top: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    min-height: 1.5rem;
}

.sg-feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
    padding: 0;
}

.sg-feedback-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sg-card {
    background: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 1.25rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sg-card.celebratory {
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.sg-card.error-feedback {
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.sg-feedback-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sg-card.celebratory .sg-feedback-title {
    color: var(--success-color);
}

.sg-card.error-feedback .sg-feedback-title {
    color: #ef4444;
}

.sg-card.hint-feedback .sg-feedback-title {
    color: var(--primary-color);
}

.sg-feedback-overlay.active .sg-card {
    transform: translateY(0);
}

.sg-card-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.sg-card-subtitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.sg-card-text {
    margin-bottom: 1rem;
    line-height: 1.4;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.sg-btn-close {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}

.sg-btn-close:hover {
    background: #2563eb;
}

.sg-congrats {
    text-align: center;
    padding: 2rem;
}

.sg-congrats h2 {
    color: var(--success-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.sg-cta {
    margin: 2.5rem 0;
}

.sg-btn-discrete-reset {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

.pop-in {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


/* --- Clarification Popup --- */
.clarification-anchor {
    position: relative;
    z-index: 50; /* Ensure popup stacks above subsequent sections */
}

.clarification-wrapper {
    display: inline-block;
}

.clarification-trigger {
    cursor: pointer;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
}

.clarification-trigger:hover,
.clarification-trigger[aria-expanded="true"] {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.clarification-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    bottom: auto;
    width: 90%;
    transform: translate(-50%, -50%);
    max-width: 320px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 100;
    font-size: 0.95rem; /* Slightly larger text */
    line-height: 1.5;
    color: #e2e8f0;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy pop */
    visibility: hidden;
}

.clarification-popup[hidden] {
    display: block;
}

.clarification-trigger[aria-expanded="true"] + .clarification-popup {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

/* Glass Button */
.btn-glass {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.btn-glass:hover {
    background: rgba(0, 0, 0, 0.1);
}

body.dark-theme .btn-glass {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

body.dark-theme .btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Use Cases Section --- */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.use-case-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.use-case-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.use-case-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.use-case-card .step-label {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.use-case-card p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Hidden Use Cases */
.hidden-row[hidden] {
    display: none;
}

/* Responsive Use Cases */
@media (max-width: 900px) {
    .use-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 650px) {
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .use-case-card {
        padding: 1.25rem;
    }
}

/* --- Use Case Summary --- */
.use-case-summary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.use-case-summary p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.use-case-summary strong {
    color: #fff;
    font-weight: 700;
}
