/*
 * app/mobile/css/designography.css
 *
 * Kamos Designography (Material Expressive 3) - Dark Kamos Theme.
 * Updated to Kamos Green core with high-contrast White text.
 */

:root {
    /* --- Core Palette (True Kamos Identity) --- */
    --kd-primary: #10B981;        /* Vibrant Kamos Green */
    --kd-primary-dark: #059669;
    --kd-primary-deep: #064e3b;
    --kd-primary-rgb: 16, 185, 129;
    --kd-primary-glow: rgba(16, 185, 129, 0.8);
    
    --kd-background: #10B981;     /* Main Screen Color */
    
    --kd-text-default: #FFFFFF;
    --kd-text-high: #FFFFFF;
    --kd-text-low: rgba(255, 255, 255, 0.8);
    --kd-text-deep: #064e3b;      /* For dark labels on light bg */
    
    /* --- Accents --- */
    --kd-vitamin-yellow: #FFFF00;
    --kd-vitamin-pink: #FF1493;
    
    /* --- Surfaces & Glass (Vibrant Optimized) --- */
    --kd-glass-bg: rgba(6, 78, 59, 0.25); /* Darker glass on light green bg */
    --kd-glass-border: rgba(255, 255, 255, 0.3);
    --kd-glass-shadow: rgba(0, 71, 58, 0.2);
    
    /* --- Accents --- */
    --kd-lavender: #D49BFF;

/* --- Typography --- */
    --kd-font-english: 'Josefin Sans', 'Roboto', sans-serif;
    --kd-font-japanese: 'Noto Sans JP', sans-serif;
    
    /* --- Dimensions --- */
    --kd-radius-shell: 24px;
    --kd-radius-card: 16px;
    
    /* --- Motion --- */
    --kd-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --kd-duration: 0.4s;
}

/* --- Global Utilities --- */
html, body {
    margin: 0; padding: 0;
    min-height: 100vh;
    font-family: var(--kd-font-english), var(--kd-font-japanese);
    color: #FFFFFF;
    background: var(--kd-background);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Vibrant Kamos Background Engine --- */
.kd-background-engine {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #059669 0%, #064e3b 100%);
    overflow: hidden;
}

.kd-background-engine::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 0%, transparent 50%),
                      radial-gradient(circle at 80% 70%, rgba(6, 78, 59, 0.4) 0%, transparent 50%);
    opacity: 0.8;
}

.kd-blob {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4) 0%, transparent 70%);
    filter: blur(60px);
    border-radius: 50%;
    animation: blob-morph-green 25s infinite ease-in-out alternate;
}

.kd-blob-yellow {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 0, 0.15) 0%, transparent 70%);
    filter: blur(70px);
    border-radius: 50%;
    animation: blob-morph-yellow 22s infinite ease-in-out alternate;
    bottom: -100px;
    right: -100px;
}

@keyframes blob-morph-green {
    0% {
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
        transform: translate(-50px, -50px) scale(1) rotate(0deg);
    }
    33% {
        border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%;
        transform: translate(80px, 120px) scale(1.15) rotate(120deg);
    }
    66% {
        border-radius: 30% 70% 60% 40% / 40% 60% 30% 70%;
        transform: translate(140px, 30px) scale(0.9) rotate(240deg);
    }
    100% {
        border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%;
        transform: translate(-50px, -50px) scale(1) rotate(360deg);
    }
}

@keyframes blob-morph-yellow {
    0% {
        border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    50% {
        border-radius: 30% 70% 70% 30% / 60% 40% 60% 40%;
        transform: translate(-120px, -90px) scale(1.2) rotate(-180deg);
    }
    100% {
        border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
        transform: translate(0, 0) scale(1) rotate(-360deg);
    }
}

/* --- Kamos Glass Shell (Dark Mode) --- */
.kd-shell {
    position: relative;
    background: var(--kd-glass-bg);
    backdrop-filter: blur(25px) saturate(120%);
    -webkit-backdrop-filter: blur(25px) saturate(120%);
    border-radius: var(--kd-radius-card);
    border: 1px solid var(--kd-glass-border);
    box-shadow: 0 12px 40px 0 var(--kd-glass-shadow);
    transition: all var(--kd-duration) var(--kd-ease-bounce);
}

.kd-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.05) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* --- Pulse Indicator --- */
.kd-pulse {
    width: 12px; height: 12px;
    background: var(--kd-vitamin-yellow);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 15px var(--kd-vitamin-yellow);
}

.kd-pulse::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    background: var(--kd-vitamin-yellow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: kd-pulse-ring 2.5s infinite;
}

@keyframes kd-pulse-ring {
    0% { width: 100%; height: 100%; opacity: 0.8; }
    100% { width: 350%; height: 350%; opacity: 0; }
}

/* --- Typography --- */
.kd-title-en {
    font-family: var(--kd-font-english);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: white;
}

.kd-text-primary { color: var(--kd-primary); }
.kd-text-subtle { color: var(--kd-text-subtle); font-size: 0.82rem; }

/* --- Interactive Elements --- */
.kd-button {
    background: var(--kd-primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--kd-radius-card);
    font-family: var(--kd-font-english);
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.kd-button:active {
    transform: scale(0.96);
    background: #0d9668;
}

/* --- Mobile OS Specific Components --- */
.os-card-small {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Tactile Biomorphic Micro-interactions --- */
.carousel-card, .glass-tile, .briefing-card, .smart-dock {
    transition: transform var(--kd-duration) var(--kd-ease-bounce),
                border-radius var(--kd-duration) var(--kd-ease-bounce),
                box-shadow var(--kd-duration) ease;
}

.carousel-card:active {
    transform: scale(0.93) translateY(3px);
    border-radius: 38px 22px 34px 26px / 28px 34px 22px 38px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
}

.glass-tile:active {
    transform: scale(0.95) translateY(2px);
    border-radius: 34px 22px 30px 26px / 24px 30px 22px 34px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.briefing-card:active {
    transform: scale(0.95) translateY(4px);
    border-radius: 42px 30px 44px 36px / 32px 42px 30px 46px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18) !important;
}

/* --- Starfish Morphing Loader --- */
.starfish-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
    width: 100%;
    box-sizing: border-box;
}

.starfish-loader {
    width: 72px;
    height: 72px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 0, 0.45))
            drop-shadow(0 0 24px rgba(16, 185, 129, 0.35));
    animation: starfish-float 3.8s infinite ease-in-out, starfish-spin 20s infinite linear;
}

.starfish-path {
    fill: var(--kd-vitamin-yellow);
    fill-opacity: 0.84;
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 1.2px;
}

/* Small inline size for status indicators */
.starfish-loader-small {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 3px rgba(255, 255, 0, 0.5));
    animation: starfish-spin 10s infinite linear;
}

.starfish-loader-small .starfish-path {
    stroke-width: 0.8px;
}

@keyframes starfish-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.08);
    }
}

@keyframes starfish-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* --- Preload Logo Pulse Animation --- */
.kamos-preload-logo {
    width: 96px;
    height: 96px;
    animation: kamos-logo-pulse 2.2s infinite ease-in-out;
}


@keyframes kamos-logo-pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px rgba(255,255,255,0.15)) brightness(1);
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 22px rgba(255,255,255,0.4)) brightness(1.05);
    }
}



