/* ===================================
   Health Share - Premium Design
   Apple-inspired, not copied
   =================================== */

/* CSS Variables */
:root {
    /* Colors - Brand colors from logo */
    --primary: #4190DB;
    --primary-light: #5BA3E3;
    --primary-dark: #2E7AC4;

    --text-primary: #28353C;
    --text-secondary: #5a6469;
    --text-tertiary: #7a8388;

    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #fbfbfd;

    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);

    --success: #30d158;
    --error: #ff3b30;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Shadows - Soft, layered */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.06), 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.08), 0 10px 10px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* Typography - Refined hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 1.25rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

h4 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin-bottom: 0.75rem;
}

p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.text-large {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.6;
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

.container-narrow {
    max-width: 980px;
}

.container-wide {
    max-width: 1440px;
}

/* Navigation - Floating, minimal */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(180%) blur(20px);
    background-color: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid var(--border);
    transition: var(--transition-base);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    height: 32px;
    width: auto;
}

.navbar-brand:hover {
    color: var(--primary);
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.navbar-menu a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-fast);
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition-base);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Hero - Bold, spacious */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    padding: var(--space-2xl) 0;
    overflow: hidden;
    background: linear-gradient(135deg,
        rgba(65, 144, 219, 0.05) 0%,
        rgba(91, 163, 227, 0.02) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle,
        rgba(65, 144, 219, 0.08) 0%,
        transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, -30px) rotate(5deg); }
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    line-height: 1.5;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero .btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

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

/* Buttons - Modern, refined */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
}

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

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

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

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

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

.btn-outline:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-hover);
}

/* Sections */
section {
    padding: var(--space-2xl) 0;
}

.section-light {
    background-color: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title h2 {
    margin-bottom: 1rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards - Elevated, clean */
.card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid var(--border);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg,
        rgba(65, 144, 219, 0.1),
        rgba(91, 163, 227, 0.05));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.card h3 {
    font-size: 1.375rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.card ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.card ul li {
    padding: 0.625rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 600;
}

/* Feature Card - Special variant */
.feature-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.8),
        rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Platform Cards - Reduced padding */
.platform-card {
    padding: clamp(1.25rem, 2.5vw, 2rem);
}

/* Text Link - Simple link style */
.text-link {
    display: inline-block;
    margin-top: 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.text-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

/* Screenshots */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.screenshot-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition-base);
}

.screenshot-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.screenshot-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.screenshot-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.8),
        transparent);
    color: white;
    padding: 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Content Pages */
.content-page {
    padding: var(--space-xl) 0;
}

.content-page h1 {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.content-page h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.content-page h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-page ul,
.content-page ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-page li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Footer */
.footer {
    background-color: #000;
    color: rgba(255, 255, 255, 0.85);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.footer p {
    color: rgba(255, 255, 255, 0.85);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition-fast);
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
}

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

    .navbar-menu {
        display: none;
        position: fixed;
        top: 65px;
        left: 0;
        right: 0;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: saturate(180%) blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu li {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid var(--border);
    }

    .navbar-menu li:last-child {
        border-bottom: none;
    }

    .navbar-toggle {
        display: block;
    }

    .hero {
        min-height: 70vh;
        padding: var(--space-xl) 0;
    }

    .hero .btn-group {
        flex-direction: column;
        align-items: stretch;
    }

    section {
        padding: var(--space-xl) 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        width: 100%;
    }
}

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

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

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

.hidden { display: none; }
.visible { display: block; }

/* Legal Pages Formatting */
.content-page h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

.content-page h2 {
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    margin-bottom: 1rem;
}

.content-page h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin-bottom: 0.75rem;
}

.legal-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--background-light);
}

.legal-section:first-of-type {
    margin-top: 2rem;
    padding-top: 0;
    border-top: none;
}

.legal-section h2 {
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--background-light);
}

.legal-section h3 {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.legal-info-box {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.legal-info-box p:last-child {
    margin-bottom: 0;
}

.legal-highlight {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.legal-list {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-list li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
