/* ===== HARNESS App Styles ===== */
/* Fearless. Protected. Empowered. */

:root {
    /* HARNESS Project Official Color Palette */
    --color-gray: #737373;
    --color-teal: #00BDBD;
    --color-gold: #F6CC00;
    --color-magenta: #DD0E6E;
    
    /* Semantic Mappings */
    --color-safe: #00A8A8;
    --color-curious: #00A8A8;
    --color-bold: #F6CC00;
    --color-clear: #00A8A8;
    --color-grounded: #737373;
    --color-empowered: #F6CC00;
    
    /* Neutrals */
    --color-bg: #F5F7FA;
    --color-surface: #FFFFFF;
    --color-text: #2C3E50;
    --color-text-secondary: #7F8C8D;
    --color-border: #E0E6ED;
    
    /* Semantic Colors */
    --color-green: #00A8A8;
    --color-yellow: #F6CC00;
    --color-red: #FF007F;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Bree Serif', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', serif;
    background: linear-gradient(180deg, #FFFFFF 0%, #F5F7FA 40%, #E8ECEF 100%);
    background-attachment: fixed;
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ===== Typography ===== */
h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-md);
}

.subtitle {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: var(--spacing-lg);
}

.tagline {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* ===== Buttons ===== */
.btn-primary {
    background: linear-gradient(90deg, #00BDBD 0%, #F6CC00 50%, #DD0E6E 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-family: 'Bree Serif', serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(90deg, var(--color-teal) 0%, #DDBB00 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--color-teal);
    border: 2px solid var(--color-teal);
    padding: 14px 28px;
    border-radius: var(--radius-lg);
    font-family: 'Bree Serif', serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--color-teal);
    color: white;
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== Animations ===== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* ===== Splash Screen ===== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Fallback gradient if image doesn't load */
    background: linear-gradient(135deg, #00BDBD 0%, #F6CC00 50%, #DD0E6E 100%);
    /* Try to load background image */
    background-image: url('../images/app-gradient-background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    overflow-y: auto;
}

.splash-screen.active {
    opacity: 1;
    pointer-events: all;
}

.splash-content {
    text-align: center;
    color: white;
    padding: var(--spacing-xl);
    max-width: 900px;
    margin: 0 auto;
}

.logo-container {
    margin-bottom: var(--spacing-xl);
}

.logo-image {
    width: 150px;
    height: 150px;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.logo-title {
    max-width: 400px;
    width: 90%;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

.splash-content h1 {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Enhanced Splash Screen Landing Page */
.splash-tagline {
    font-size: 2.5em;
    font-weight: bold;
    color: white;
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
}

.splash-description {
    font-size: 1.3em;
    color: rgba(255,255,255,0.95);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease-out;
}

.splash-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    max-width: 700px;
    margin: 0 auto 50px;
    animation: fadeInUp 1.2s ease-out;
}

.splash-feature {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.2);
}

.splash-feature:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.splash-feature .feature-icon {
    font-size: 2.5em;
}

.splash-feature .feature-text {
    color: white;
    font-size: 1em;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.splash-cta {
    margin-bottom: 40px;
    animation: fadeInUp 1.4s ease-out;
}

.btn-large {
    font-size: 1.4em;
    padding: 18px 60px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.4);
}

.splash-note {
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
    margin-top: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.splash-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 50px;
    animation: fadeInUp 1.6s ease-out;
}

.splash-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    padding: 8px 15px;
    border-radius: 8px;
}

.splash-link:hover {
    color: white;
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.splash-divider {
    color: rgba(255,255,255,0.5);
    font-size: 1.2em;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive for splash screen */
@media (max-width: 768px) {
    .splash-tagline {
        font-size: 2em;
    }
    
    .splash-description {
        font-size: 1.1em;
        padding: 0 20px;
    }
    
    .splash-features {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 20px;
    }
    
    .btn-large {
        font-size: 1.2em;
        padding: 15px 40px;
    }
    
    .splash-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .splash-divider {
        display: none;
    }
}

/* ===== Screens ===== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    opacity: 1;
    pointer-events: all;
}

.container {
    padding: var(--spacing-xl);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Journey Cards (Onboarding) ===== */
.journey-cards {
    display: grid;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.journey-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.journey-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.journey-card .icon {
    font-size: 48px;
    display: block;
    margin-bottom: var(--spacing-sm);
}

.journey-card h3 {
    margin-bottom: var(--spacing-xs);
}

.journey-card p {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin: 0;
}

/* ===== Values Grid ===== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.value-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: 3px solid transparent;
}

.value-card:hover {
    transform: scale(1.05);
}

.value-card.selected {
    border-color: var(--color-magenta);
    background: linear-gradient(135deg, rgba(0, 168, 168, 0.1), rgba(246, 204, 0, 0.1));
}

.value-card .icon {
    font-size: 36px;
    display: block;
    margin-bottom: var(--spacing-sm);
}

.value-card h3 {
    font-size: 16px;
    margin: 0;
}

/* ===== Main App Layout ===== */
#main-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.app-header {
    background: transparent;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
}

.header-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    /* Make logo transparent */
    background: transparent !important;
    background-color: transparent !important;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.header-title {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #00BDBD, #F6CC00, #DD0E6E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
}

/* Hamburger Menu */
.hamburger-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
}

.hamburger-menu span {
    width: 25px;
    height: 3px;
    background: var(--color-gray);
    border-radius: 2px;
    transition: 0.3s;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.header-nav {
    display: none;
    flex-direction: column;
    background: white;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.header-nav.active {
    display: flex;
    max-height: 300px;
    padding: var(--spacing-md);
    border-top: 1px solid var(--color-border);
}

.header-nav a {
    padding: var(--spacing-sm);
    text-decoration: none;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.header-nav a:hover {
    background: var(--color-bg);
    color: var(--color-teal);
}

/* ===== App Content ===== */
.app-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* ===== Bottom Navigation ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: none;
    background: none;
    padding: 8px;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
}

.nav-item:hover {
    color: var(--color-text);
}

.nav-item.active {
    color: var(--color-magenta);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* ===== Home View ===== */
.home-hero {
    background: linear-gradient(135deg, rgba(0, 168, 168, 0.1), rgba(246, 204, 0, 0.1));
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin: var(--spacing-md);
    text-align: center;
}

.home-logo {
    width: 80px;
    height: 80px;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.harness-framework {
    padding: var(--spacing-md);
    text-align: center;
}

.framework-image {
    max-width: 100%;
    width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.home-hero h2 {
    margin-bottom: var(--spacing-sm);
}

.feature-grid {
    display: grid;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.feature-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin: 0;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 769px) {
    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    .app-content {
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden {
    display: none !important;
}

/* ===== Relationship Styles ===== */
.relationship-styles {
    max-width: 900px;
    width: 95%;
}

.connection-styles-image {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) auto;
    display: block;
    box-shadow: var(--shadow-sm);
}

.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.style-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.style-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.style-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.style-card h3 {
    color: var(--color-teal);
    margin-bottom: var(--spacing-xs);
    font-size: 1.3rem;
}

.style-subtitle {
    font-weight: 600;
    color: var(--color-gold);
    margin-bottom: var(--spacing-sm);
    font-size: 0.95rem;
}

.style-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.style-detail {
    max-width: 700px;
    width: 95%;
}

.style-detail-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 0 auto var(--spacing-xl);
    display: block;
    box-shadow: var(--shadow-md);
}

.style-features {
    background: var(--color-bg);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

.style-features h3 {
    color: var(--color-teal);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    background: var(--color-surface);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    border-left: 4px solid var(--color-gold);
    line-height: 1.6;
    font-size: 0.95rem;
}

.style-tagline {
    background: linear-gradient(135deg, var(--color-teal), var(--color-gold));
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
    text-align: center;
}

.style-tagline p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    font-style: italic;
}

.style-reflection {
    background: #FFF9E6;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
    border: 2px dashed var(--color-gold);
}

.style-reflection h3 {
    color: var(--color-magenta);
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.style-reflection p {
    margin: 0;
    line-height: 1.6;
    color: var(--color-text);
    font-style: italic;
}

/* Mobile responsive for relationship styles */
@media (max-width: 640px) {
    .styles-grid {
        grid-template-columns: 1fr;
    }
    
    .style-card {
        padding: var(--spacing-md);
    }
}

/* ===== Emergency Alert Card (Home Screen) ===== */
.emergency-alert-card {
    background: linear-gradient(135deg, #FF007F, #FF6B6B);
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 0, 127, 0.3);
}

.emergency-alert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 0, 127, 0.4);
}

.alert-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-content h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
}

.alert-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.alert-btn {
    background: white;
    color: #FF007F;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-family: 'Bree Serif', serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.alert-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Daily Ritual Banner */
.daily-ritual-banner {
    background: linear-gradient(135deg, #00A8A8, #D946EF);
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 168, 168, 0.3);
}

.daily-ritual-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 168, 168, 0.4);
}

.ritual-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.ritual-content {
    flex: 1;
}

.ritual-content h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
}

.ritual-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.ritual-btn {
    background: white;
    color: #00A8A8;
    border: none;
    padding: 12px 24px;
    border-radius: 24px;
    font-family: 'Bree Serif', serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.ritual-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    .emergency-alert-card {
        flex-direction: column;
        text-align: center;
    }
    
    .alert-btn {
        width: 100%;
    }
}