/* Modern Minimal Premium Design System */
/* Local Font Assets - Plus Jakarta Sans (Modern Geometric) */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-300.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-400.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-500.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: block;
}

@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('assets/fonts/plus-jakarta-sans-600.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: block;
}

:root {
    /* Palette - Refined & Premium - STRUCTURED */
    --bg-main: #F4F4F5;
    /* Zinc-100: Distinct background color for contrast */
    --bg-surface: #FFFFFF;
    /* White cards */
    --bg-glass: rgba(255, 255, 255, 0.9);
    /* Slightly more opaque for header */

    --text-main: #18181B;
    --text-muted: #52525B;
    --text-subtle: #A1A1AA;

    --accent: #2563EB;
    --accent-hover: #1D4ED8;

    --border-subtle: #E4E4E7;
    --border-focus: #2563EB;

    /* Typography - Plus Jakarta Sans (Geometric/Modern - Local Asset) */

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --measure: 760px;
    /* Slightly wider card */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Effects - Surfaces */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    /* Card radius */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.1);

    --transition-fast: all 0.15s ease;
    --transition-base: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);

    /* Header Specifics - Light Mode Defaults (Premium/Clean Frosted) */
    --header-bg: rgba(248, 248, 250, 0.65);
    --header-border: 1px solid rgba(0, 0, 0, 0.03);
    /* Cleaner look with subtle definition */
    --header-shadow: 0 2px 4px rgba(0, 0, 0, 0.015);
}

html.dark-mode {
    --bg-main: #000000;
    /* True black background */
    --bg-surface: #18181B;
    /* Zinc-900 cards */
    --bg-glass: rgba(24, 24, 27, 0.9);

    --text-main: #FAFAFA;
    --text-muted: #A1A1AA;
    --text-subtle: #52525B;

    --border-subtle: #27272A;

    --accent: #60A5FA;
    --accent-hover: #93C5FD;

    /* Header Specifics - Dark Mode Overrides (Strictly Original) */
    --header-bg: rgba(24, 24, 27, 0.9);
    --header-border: 1px solid var(--border-subtle);
    --header-shadow: var(--shadow-sm);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.65;
    /* Generous line height */
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    display: flex;
    flex-direction: column;
}

/* Enable transitions only when class is added applied via JS */
body.theme-transition {
    transition: background-color 0.3s ease, color 0.3s ease;
}





/* Typography Details */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-top: 2em;
    margin-bottom: 0.75em;
    line-height: 1.25;
    letter-spacing: -0.025em;
    /* Tight tracking for headings */
    transition: color 0.3s ease;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    /* Slightly smaller max */
    font-weight: 600;
    /* Stronger for structure */
    margin-top: 0;
    letter-spacing: -0.03em;
    /* Tighter */
    color: var(--text-main);
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

h2 a:hover {
    color: inherit;
}

p {
    /* No max-width on P tags matching previous edit intent - controlled by container */
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 400;
    font-size: 1.05rem;
    /* Slight bump for readability */
    line-height: 1.75;
    /* breathable */
    color: var(--text-muted);
    /* Softer than main black */
    transition: color 0.3s ease;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition-base);
    border-bottom: 1px solid transparent;
}

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

/* Links inside paragraphs */
p a {
    color: var(--text-main);
    border-bottom: 1px solid var(--border-subtle);
}

p a:hover {
    text-decoration: none;
    border-bottom-color: var(--accent);
    color: var(--accent);
}

/* Layout Containers */
.container {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Reverting Card/Surface - Back to Clean/Minimal but with visual weight */
main .container {
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-xl);
}

@media (max-width: 768px) {
    main .container {
        padding-top: var(--spacing-md);
    }
}

/* Sticky Glass Header - Original Full Width */
body>header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: var(--header-border);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--header-shadow);
    pointer-events: auto;
}

body>header .container {
    /* Reset to simple container logic */
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0 !important;

    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--text-muted);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Navigation */
nav {
    display: flex;
    gap: 0.5rem;
}

nav a.subtle {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

nav a.subtle:hover {
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.04);
}

html.dark-mode nav a.subtle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Theme Toggle */
.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-muted);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-main);
    background-color: rgba(0, 0, 0, 0.04);
}

html.dark-mode .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* Icon Visibility Logic */
/* Icon Visibility Logic - Smooth Animation */
.theme-toggle {
    position: relative;
    /* Needed for absolute icon positioning */
    overflow: hidden;
    /* Keep animations contained */
}

/* Base state for icons */
.sun-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    /* Smooth ease-out back */
}

/* Light Mode: Normal Sun Visible */
.sun-normal {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* Light Mode: Short Sun (Dark Icon) Hidden */
.sun-short {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.5);
}

/* Dark Mode Overrides */
html.dark-mode .sun-normal {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.5);
}

html.dark-mode .sun-short {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    color: var(--text-main);
    cursor: pointer;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Main Content Area */
.hero-section {
    padding: 6rem 0 var(--spacing-lg);
}

.lead-text {
    font-size: 1.25rem;
    color: var(--text-subtle);
    /* Lighter than before */
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

.featured-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.featured-pill:hover {
    border-color: var(--text-subtle);
    transform: translateY(-1px);
    color: var(--text-main);
    box-shadow: var(--shadow-card);
}

html.dark-mode .featured-pill {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-subtle);
    box-shadow: none;
}

html.dark-mode .featured-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--text-muted);
}

/* Styling specifically for current 'Work in Progress' states */
.mt-xl {
    margin-top: var(--spacing-xl);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

/* Footer - Ultra Minimal */
footer.container {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid transparent;
    /* Cleaner without border, maybe? Let's keep transparent or subtle */
}

.footer-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.footer-links a.subtle {
    color: var(--text-muted);
    transition: color 0.3s ease;
}



.footer-links a.subtle:hover {
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

footer .subtle {
    color: var(--text-subtle);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

/* Restore separators */
.footer-links span.subtle {
    display: inline;
}

/* Hide the middle separator (between X and LinkedIn) on desktop as per original design */
.footer-links span.subtle:nth-of-type(2) {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
    }

    .hero-section {
        padding-top: 3rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        /* Hide default nav */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: column;
        padding: 1rem;
        gap: 0.5rem;
        box-shadow: var(--shadow-md);
    }

    nav.active {
        display: flex;
    }

    nav a.subtle {
        width: 100%;
        padding: 0.75rem;
    }

    .footer-content {
        flex-direction: column-reverse;
        align-items: center;
        gap: 0.6rem;
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }

    /* Hide the first separator on mobile as copyright is now below */
    .footer-links span.subtle:first-child {
        display: none;
    }

    /* Always show the separator between X and LinkedIn on mobile */
    .footer-links span.subtle:nth-of-type(2) {
        display: inline;
    }
}

/* ===== One App Showcase Styles ===== */

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6366f1;
    margin-bottom: 1rem;
}

html.dark-mode .status-badge {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* App Screenshot Showcase */
.app-showcase {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.phone-mockup {
    position: relative;
    width: 240px;
    height: auto;
    overflow: hidden;
}

.phone-mockup img {
    width: 100%;
    height: auto;
    border-radius: 24px;
    display: block;
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.feature-card {
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: rgba(99, 102, 241, 0.3);
}

.feature-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.feature-card h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.feature-card p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Social Links for One */
.one-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.one-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.one-link:hover {
    border-color: var(--text-subtle);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
}

/* Responsive adjustments for One page */
@media (max-width: 768px) {
    .app-showcase {
        gap: 1.5rem;
    }

    .phone-mockup {
        width: 180px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Interactive Breathing Exercise Demo ===== */

.breathing-demo {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin: 2.5rem 0;
    text-align: center;
    min-height: 400px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Exercise Picker */
.exercise-picker {
    padding: 1rem 0;
}

.exercise-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    max-width: 620px;
    margin: 0 auto;
}

.exercise-card {
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-family: inherit;
}

.exercise-card:hover {
    transform: translateY(-4px);
}

/* Bluish-Purple glow for Box Breathing */
.exercise-card[data-exercise="box"]:hover {
    border-color: #6366f1;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.35), 0 0 20px rgba(99, 102, 241, 0.2);
}

/* Teal/Green glow for Coherence */
.exercise-card[data-exercise="coherence"]:hover {
    border-color: #14b8a6;
    box-shadow: 0 8px 30px rgba(20, 184, 166, 0.3), 0 0 20px rgba(20, 184, 166, 0.15);
}

/* Purple-Pink glow for Relaxation */
.exercise-card[data-exercise="relaxation"]:hover {
    border-color: #a855f7;
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.35), 0 0 20px rgba(168, 85, 247, 0.2);
}

.exercise-card-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-md);
    color: #6366f1;
}

.exercise-card-icon.coherence-icon {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.1) 0%, rgba(45, 212, 191, 0.1) 100%);
    color: #14b8a6;
}

.exercise-card-icon.relaxation-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    color: #a855f7;
}

html.dark-mode .exercise-card-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    color: #a5b4fc;
}

html.dark-mode .exercise-card-icon.coherence-icon {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.2) 0%, rgba(45, 212, 191, 0.2) 100%);
    color: #5eead4;
}

html.dark-mode .exercise-card-icon.relaxation-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(236, 72, 153, 0.2) 100%);
    color: #c084fc;
}

.exercise-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

.exercise-timing {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6366f1;
    margin: 0 0 0.25rem;
}

.exercise-card[data-exercise="coherence"] .exercise-timing {
    color: #14b8a6;
}

.exercise-card[data-exercise="relaxation"] .exercise-timing {
    color: #a855f7;
}

html.dark-mode .exercise-timing {
    color: #a5b4fc;
}

html.dark-mode .exercise-card[data-exercise="coherence"] .exercise-timing {
    color: #5eead4;
}

html.dark-mode .exercise-card[data-exercise="relaxation"] .exercise-timing {
    color: #c084fc;
}

.exercise-desc {
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin: 0;
}

/* Exercise Session */
.exercise-session {
    position: relative;
    padding-top: 2rem;
}

.back-button {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.back-button:hover {
    background: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--text-subtle);
}

/* Visualizer Common */
.visualizer {
    margin: 1.5rem 0;
}

/* Session Timer */
.session-timer {
    font-size: 1rem;
    color: var(--text-subtle);
    font-variant-numeric: tabular-nums;
    margin-bottom: 1.5rem;
}

/* Start/Stop Button */
.breathing-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    min-width: 160px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 999px;
    color: white;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.breathing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.breathing-button:active {
    transform: translateY(0);
}

/* Exercise-Specific Button Colors */
.breathing-button.box {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.breathing-button.box:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.breathing-button.coherence {
    background: linear-gradient(135deg, #14b8a6 0%, #2dd4bf 100%);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.3);
}

.breathing-button.coherence:hover {
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.breathing-button.relaxation {
    background: linear-gradient(135deg, #a855f7 0%, #d946ef 100%);
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

.breathing-button.relaxation:hover {
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.4);
}

.breathing-button.active {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.breathing-button.active:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* ===== Box Breathing Visualization ===== */
.box-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
}

.box-path {
    width: 100%;
    height: 100%;
}

.box-track {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 3;
    transition: stroke 0.3s ease;
}

.box-progress {
    fill: none;
    stroke: url(#boxGradient);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 720;
    stroke-dashoffset: 720;
    transition: stroke-dashoffset 0.05s linear;
}

.box-ball {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6), 0 0 40px rgba(99, 102, 241, 0.3);
    transform: translate(-50%, -50%);
    top: 20px;
    left: 20px;
}

.box-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.phase-icon {
    display: block;
    font-size: 1.25rem;
    color: #6366f1;
    margin-bottom: 0.25rem;
}

.phase-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6366f1;
}

html.dark-mode .phase-icon,
html.dark-mode .phase-text {
    color: #a5b4fc;
}

.phase-progress-bar {
    width: 60px;
    height: 3px;
    background: var(--border-subtle);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.phase-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #3b82f6);
    border-radius: 2px;
    transition: width 0.1s linear;
}

/* ===== Coherence Visualization ===== */
.infinity-container {
    position: relative;
    width: 280px;
    height: 140px;
    margin: 0 auto;
    /* Clean container, no background needed as per iOS screenshot */
}

.infinity-path {
    width: 100%;
    height: 100%;
    /* Ensure overflow is visible for thick strokes */
    overflow: visible;
}

.infinity-track {
    fill: none;
    /* Track is a faint/semi-transparent version of the main color */
    stroke: rgba(20, 184, 166, 0.2);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke 0.3s ease;
}

html.dark-mode .infinity-track {
    stroke: rgba(94, 234, 212, 0.15);
}

.infinity-progress {
    fill: none;
    /* Solid teal or subtle gradient */
    stroke: #14b8a6;
    stroke-width: 12;
    stroke-linecap: round;
    /* Dasharray is set via JS now */
    transition: stroke-dashoffset 0.05s linear, stroke 0.3s ease;
}

html.dark-mode .infinity-progress {
    stroke: #5eead4;
}

.infinity-ball {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    /* Subtle glow/shadow */
    box-shadow: 0 0 10px rgba(94, 234, 212, 0.5);
    transform: translate(-50%, -50%);
    /* Top/Left set by JS */
}

.coherence-phase-text {
    display: block;
    font-size: 1.5rem;
    font-weight: 500;
    color: #14b8a6;
    margin-top: 2rem;
    letter-spacing: 0.02em;
}

html.dark-mode .coherence-phase-text {
    color: #5eead4;
}

/* ===== Relaxation Visualization ===== */
.relax-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.relax-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.relax-track {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 3;
    transition: stroke 0.3s ease;
}

.relax-progress {
    fill: none;
    stroke: #6366f1;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 0.1s linear, stroke 0.3s ease;
}

.relax-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 130px;
    height: 130px;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.18) 100%);
    border-radius: 50%;
    box-shadow:
        0 0 40px rgba(99, 102, 241, 0.15),
        inset 0 0 30px rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1s ease-out, background 0.5s ease, box-shadow 0.5s ease;
}

.relax-orb.inhale {
    transform: translate(-50%, -50%) scale(1.15);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.28) 100%);
}

.relax-orb.hold {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(168, 85, 247, 0.22) 100%);
    box-shadow:
        0 0 50px rgba(168, 85, 247, 0.2),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
}

.relax-orb.exhale {
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(34, 211, 238, 0.18) 100%);
}

.relax-phase-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6366f1;
    text-transform: capitalize;
}

.relax-orb.hold .relax-phase-text {
    color: #a855f7;
}

.relax-orb.exhale .relax-phase-text {
    color: #3b82f6;
}

html.dark-mode .relax-phase-text {
    color: #a5b4fc;
}

html.dark-mode .relax-orb.hold .relax-phase-text {
    color: #c084fc;
}

html.dark-mode .relax-orb.exhale .relax-phase-text {
    color: #60a5fa;
}

@keyframes spin-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Relaxation Hold - Dashed ring effect */
.relax-progress.hold-style {
    stroke: #a855f7;
    /* 2x more density, half length: 10px dash, 14px gap */
    stroke-dasharray: 10 14;
    /* Use 'center' origin for circle rotation */
    transform-origin: center;
    transform-box: fill-box;
    animation: spin-ring 12s linear infinite;
}

/* Relaxation Exhale - Blue ring */
.relax-progress.exhale-style {
    stroke: #3b82f6;
}

/* Responsive */
@media (max-width: 768px) {
    .breathing-demo {
        padding: 1.5rem;
    }

    .exercise-cards {
        grid-template-columns: 1fr;
        max-width: 280px;
    }

    .box-container {
        width: 180px;
        height: 180px;
    }

    .infinity-container {
        width: 240px;
        height: 120px;
    }

    .relax-container {
        width: 160px;
        height: 160px;
    }

    .relax-orb {
        width: 100px;
        height: 100px;
    }
}