@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

:root {
    /* === BASE COLORS === */
    --color-bg: #0b0d17;
    --color-bg-alt: #15192b;
    --color-primary: #00f2ea;
    --color-primary-dark: #00b8b0;
    --color-secondary: #4361ee;
    --color-text: #e0e6ed;
    --color-text-muted: #94a3b8;
    
    /* === GRADIENTS === */
    --gradient-primary: linear-gradient(135deg, #00f2ea 0%, #00c9ff 100%);
    --gradient-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    --gradient-warm: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* === SEMANTIC COLORS === */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* === GLASSMORPHISM === */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(255, 255, 255, 0.1);
    --glass-border-strong: rgba(255, 255, 255, 0.18);
    --glass-blur: 10px;
    --glass-blur-strong: 20px;
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.37);
    --shadow-glass-sm: 0 4px 16px rgba(0, 0, 0, 0.25);
    
    /* === FLUID TYPOGRAPHY === */
    --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
    --text-sm: clamp(0.875rem, 0.8rem + 0.4vw, 1rem);
    --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
    --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
    --text-2xl: clamp(1.5rem, 1.3rem + 1vw, 2rem);
    --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
    --text-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3rem);
    --text-5xl: clamp(3rem, 2.5rem + 2.5vw, 4rem);
    
    /* === LINE HEIGHTS === */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
    
    /* === SPACING SYSTEM (8pt grid) === */
    --space-1: 0.25rem;   /* 4px */
    --space-2: 0.5rem;    /* 8px */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */
    --space-24: 6rem;     /* 96px */
    --space-32: 8rem;     /* 128px */
    
    /* === BORDER RADIUS === */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* === SHADOWS === */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 4px 14px rgba(0, 242, 234, 0.4);
    --shadow-primary-lg: 0 8px 24px rgba(0, 242, 234, 0.5);
    
    /* === 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);
    
    /* === LAYOUT === */
    --container-width: 1200px;
    --header-height: 80px;
    
    /* === Z-INDEX SCALE === */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1100;
    --z-fixed: 1200;
    --z-modal: 1300;
    --z-popover: 1400;
    --z-tooltip: 1500;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

[x-cloak] {
    display: none !important;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

strong {
    color: var(--color-text);
    font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: var(--space-6);
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: var(--space-5);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    line-height: 1.3;
    margin-bottom: var(--space-4);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    margin-bottom: var(--space-3);
    font-weight: 600;
}

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(var(--space-4), 4vw, var(--space-6));
    width: 100%;
}

.section {
    padding: clamp(64px, 8vw, 100px) 0;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--glass-border) 50%, 
        transparent 100%
    );
    opacity: 0.5;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    text-align: center;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 1;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
    opacity: 0.6;
}

.section-title.visible {
    opacity: 1;
    animation: fadeInUp 0.6s ease-out;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.logo img {
    height: 60px;
    width: auto;
    box-shadow: none;
    border-radius: 0;
    display: block;
}

main {
    padding-top: 0;
}

.cta, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: var(--gradient-primary);
    color: #ffffff;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-base);
    letter-spacing: 0.02em;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
    text-decoration: none;
}

.cta::before, .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    transition: left 0.5s ease;
}

.cta:hover::before, .btn:hover::before {
    left: 100%;
}

.cta:hover, .btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-primary-lg);
    filter: brightness(1.1);
}

.cta:active, .btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

.link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-primary);
    font-weight: 600;
    opacity: 0.9;
    transition: all var(--transition-fast);
    position: relative;
    text-decoration: none;
}

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

.link:hover {
    opacity: 1;
    color: var(--color-primary);
}

.link:hover::after {
    width: 100%;
}

.section.alt {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    position: relative;
}

.section.alt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 242, 234, 0.2) 50%, 
        transparent 100%
    );
}

/* Hero Section */
.hero, .legacy-hero {
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    width: 100%;
    position: relative;
    overflow: hidden;
    background: url('/images/hero_bg.png') no-repeat center center/cover;
    background-attachment: fixed;
    background-size: cover;
}

.hero::after, .legacy-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 242, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(67, 97, 238, 0.1) 0%, transparent 50%),
        linear-gradient(to bottom, rgba(11,13,23,0.7) 0%, rgba(11,13,23,0.95) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-inner {
    min-height: inherit;
    display: grid;
    place-items: center;
    padding: var(--space-6) 0;
    position: relative;
    z-index: 2;
}

.hero-inner > div {
    width: min(1100px, 100%);
    padding: 0 var(--space-5);
    text-align: center;
    position: relative;
    z-index: 2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: var(--space-6);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.page-hero {
    position: relative;
    padding: clamp(64px, 8vw, 96px) 0 clamp(48px, 6vw, 64px);
    background: 
        radial-gradient(circle at top right, rgba(0, 242, 234, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(67, 97, 238, 0.1), transparent 40%);
    text-align: center;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(180deg, rgba(11, 13, 23, 0.3) 0%, transparent 50%),
        linear-gradient(0deg, rgba(11, 13, 23, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.page-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-5);
    background: linear-gradient(135deg, #ffffff 0%, #e0e6ed 50%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.page-hero p {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    color: var(--color-text-muted);
    max-width: 70ch;
    margin: 0 auto;
    line-height: 1.75;
    position: relative;
    z-index: 1;
}

/* Enhanced Lists */
ul.check-list {
    list-style: none;
    padding: 0;
}

ul.check-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    color: var(--color-text-muted);
}

ul.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

/* Feature List (Grid) */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Removed duplicate .hero::after - now defined above with enhanced gradients */

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.5s;
}

.hero h1, .legacy-hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1.15;
    margin-bottom: var(--space-6);
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero h1 span, .legacy-hero h1 span {
    color: var(--color-primary);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.hero p, .legacy-hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    margin-bottom: var(--space-8);
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--space-4);
    text-align: center;
}

/* Glass Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(var(--space-4), 3vw, var(--space-6));
    margin-top: var(--space-8);
}

.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: clamp(var(--space-6), 4vw, var(--space-10));
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    transition: all var(--transition-base);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    will-change: transform, border-color, box-shadow;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity var(--transition-base), transform var(--transition-base);
}

.card.visible {
    opacity: 1;
}

.card:hover {
    transform: translateY(-8px) scale(1.01);
    border-color: rgba(0, 242, 234, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(0, 242, 234, 0.1);
}

.card:hover::before {
    opacity: 1;
    transform: scaleX(1);
}

.card h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    margin-bottom: var(--space-4);
    color: var(--color-primary);
    font-weight: 600;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

.card:hover h3 {
    color: var(--color-primary);
    text-shadow: 0 0 20px rgba(0, 242, 234, 0.3);
}

.card p {
    color: var(--color-text-muted);
    line-height: 1.7;
    flex-grow: 1;
}

.card-icon {
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: var(--space-5);
    color: var(--color-secondary);
    transition: transform var(--transition-base), color var(--transition-base);
    display: inline-block;
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    color: var(--color-primary);
}

/* About Section */
#about p {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
    text-align: justify;
}

/* Team Section */
.team-member {
    text-align: center;
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-text-muted), var(--color-bg-alt));
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-bg);
    border: 2px solid var(--color-primary);
}

/* Contact/Footer */
footer, .footer {
    background: var(--color-bg-alt);
    padding: clamp(48px, 6vw, 60px) 0 var(--space-5);
    margin-top: var(--space-12);
    border-top: 1px solid var(--glass-border);
    position: relative;
}

footer::before, .footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 242, 234, 0.3) 50%, 
        transparent 100%
    );
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: clamp(var(--space-6), 4vw, var(--space-10));
    align-items: start;
}

.footer-grid nav[aria-label]::before {
    content: attr(aria-label);
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 650;
    color: rgba(224, 230, 237, 0.92);
    opacity: 0.9;
}

.footer-grid nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-grid a {
    display: block;
    padding: var(--space-2) var(--space-3);
    margin: 0 calc(-1 * var(--space-3));
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    color: var(--color-text-muted);
    transition: all var(--transition-fast);
    position: relative;
}

.footer-grid a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-base);
}

.footer-grid a:hover {
    color: var(--color-primary);
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
    padding-left: var(--space-4);
}

.footer-grid a:hover::before {
    width: 4px;
}

.footer strong {
    color: var(--color-text);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

.footer-col h4 {
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.copyright {
    text-align: center;
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.4);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* Animations */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timeline Styles (Sandbox) */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--color-primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    opacity: 0.3;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--color-bg);
    border: 2px solid var(--color-primary);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--color-primary);
}

.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

.timeline-left::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    right: 30px;
    border: medium solid white;
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.05);
}

.timeline-right::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 22px;
    width: 0;
    z-index: 1;
    left: 30px;
    border: medium solid white;
    border-width: 10px 10px 10px 0;
    border-color: transparent rgba(255, 255, 255, 0.05) transparent transparent;
}

.timeline-right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    border-radius: 12px;
    position: relative;
}

.timeline-content h3 {
    margin-bottom: 15px;
    color: var(--color-primary);
}

.timeline-content h4 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: var(--color-text);
    font-size: 1.1rem;
}

.timeline-content ul {
    list-style-type: none;
    padding-left: 0;
}

.timeline-content ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: var(--color-text-muted);
}

.timeline-content ul li::before {
    content: '•';
    color: var(--color-secondary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Tabs Styles (Living Lab) */
.tabs-container {
    max-width: 1000px;
    margin: 40px auto;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tabs-header {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
}

.tab-btn.active, .tab-btn:hover {
    background: rgba(0, 242, 234, 0.1);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 600;
}

.doc-link:hover {
    text-decoration: underline;
}

.legal {
    max-width: 90ch;
    margin-left: auto;
    margin-right: auto;
}

.legal h2 {
    margin-top: 28px;
    margin-bottom: 12px;
}

.legal ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-top: 10px;
    margin-bottom: 10px;
}

.legal li {
    margin: 6px 0;
    color: var(--color-text-muted);
}

.legal p {
    margin-top: 10px;
}

.note {
    color: var(--color-text-muted);
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
}

.cta-final {
    padding: 72px 0;
    text-align: center;
}

.cta-final .cta-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.small {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1, .legacy-hero h1 {
        font-size: 2.5rem;
    }
    .page-hero {
        padding: 72px 0 48px;
    }
    .card {
        padding: 28px;
    }
    .card-grid {
        grid-template-columns: 1fr;
    }
    .timeline::after {
        left: 20px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 60px;
        padding-right: 20px;
    }
    .timeline-left, .timeline-right {
        left: 0;
    }
    .timeline-item::after {
        left: 10px;
        right: auto;
    }
    .timeline-right::after {
        left: 10px;
    }
    .timeline-left::before, .timeline-right::before {
        left: 50px;
        right: auto;
        border-width: 10px 10px 10px 0;
        border-color: transparent rgba(255, 255, 255, 0.05) transparent transparent;
    }
}

/* Legacy sections from older pages (kept for compatibility) */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: center; /* Align cards vertically */
}

.pricing-card {
    text-align: center;
    position: relative;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 15px 0;
}

.pricing-card.featured {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 242, 234, 0.05));
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(0, 242, 234, 0.1);
    z-index: 1;
}

/* Project Cards (Living Lab) */
.project-card h3 {
    color: var(--color-secondary);
    margin-bottom: 5px;
}

/* Form Styles */
input, select, textarea {
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: width 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-primary) !important;
    background: rgba(255,255,255,0.1) !important;
}

/* === Longevity Technology Academy – styling spójny z Health4You === */

.hero .lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.7;
}

.intro,
.value-prop,
.courses,
.partners,
.cta-final {
  max-width: 1200px;
  margin: 0 auto;
}

/* Sekcje edukacyjne – spokojny rytm */
.value-prop,
.courses,
.partners {
  padding-top: 64px;
  padding-bottom: 64px;
}

/* Grid kart – jak w reszcie serwisu */
.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 40px;
}

/* Karty – instytucjonalne, nie marketingowe */
.value-card {
  padding: 24px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  background: #fff;
  /* Proactive contrast fix for dark mode global text */
  color: #1a1a1a;
}

.value-card h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  color: #111; /* Strong contrast for header */
}

.value-card p {
    color: #444;
}

/* Programy / kursy */
.course-tier {
  margin-top: 48px;
  padding: 32px;
  background: #f9fafb;
  border-left: 4px solid var(--color-primary);
  /* Proactive contrast fix */
  color: #1a1a1a;
}

.course-tier h3 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #111;
}

.course-tier p {
  color: #444;
}

.course-tier .btn {
  background: var(--color-primary);
  color: #000;
  margin-top: 24px;
  text-transform: none;
  letter-spacing: 0;
  box-shadow: none;
}

@media (max-width: 768px) {
  .value-prop,
  .courses,
  .partners {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .course-tier {
    padding: 24px;
  }
}

/* ========================================
   MODERN UTILITIES & COMPONENTS
   ======================================== */

/* === BENTO BOX GRID SYSTEM === */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: var(--space-6);
    grid-auto-rows: minmax(200px, auto);
}

.bento-item {
    background: var(--glass-strong);
    border: 1px solid var(--glass-border-strong);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.bento-item:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glass);
}

/* Span utilities for bento grid */
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.row-span-2 { grid-row: span 2; }

@media (max-width: 1024px) {
    .span-2, .span-3 { grid-column: span 1; }
    .row-span-2 { grid-row: span 1; }
}

/* === ENHANCED GLASSMORPHISM CARDS === */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glass);
    transition: all var(--transition-base);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 242, 234, 0.5);
    transform: translateY(-2px);
}

.glass-card-sm {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(var(--glass-blur)) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass-sm);
}

/* === MODERN ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays */
.animate-on-scroll:nth-child(1) { transition-delay: 0ms; }
.animate-on-scroll:nth-child(2) { transition-delay: 100ms; }
.animate-on-scroll:nth-child(3) { transition-delay: 200ms; }
.animate-on-scroll:nth-child(4) { transition-delay: 300ms; }
.animate-on-scroll:nth-child(5) { transition-delay: 400ms; }
.animate-on-scroll:nth-child(6) { transition-delay: 500ms; }

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* === IMPROVED BUTTON SYSTEM === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: var(--gradient-primary);
    color: white;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-primary);
    transition: all var(--transition-base);
}

.btn-primary:hover {
    box-shadow: var(--shadow-primary-lg);
    transform: translateY(-2px);
}

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

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: calc(var(--space-4) - 2px) calc(var(--space-8) - 2px);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: var(--text-base);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: rgba(0, 242, 234, 0.1);
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: transparent;
    border: none;
    color: var(--color-text);
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-primary);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-lg);
}

/* === BADGE SYSTEM === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(0, 242, 234, 0.15);
    color: var(--color-primary);
    border: 1px solid rgba(0, 242, 234, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* === UTILITY CLASSES === */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-balance {
    text-wrap: balance;
}

.container-narrow {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

/* === FORM UTILITIES === */
.form-container {
    background: var(--glass-bg);
    padding: clamp(var(--space-6), 4vw, var(--space-8));
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(var(--space-4), 4vw, var(--space-10));
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
}

.form-input {
    padding: var(--space-3);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(0, 242, 234, 0.15);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.consent-box {
    display: flex;
    gap: var(--space-3);
    align-items: start;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin: var(--space-5) 0;
}

.consent-box input[type="checkbox"] {
    margin-top: 4px;
    min-width: 18px;
    min-height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.consent-box.detailed {
    font-size: var(--text-xs);
    line-height: 1.6;
}

/* === LAYOUT UTILITIES === */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.max-width-900 {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.max-width-1000 {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.flex-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

/* === CONTENT UTILITIES === */
.content-box {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.content-box p {
    margin-bottom: var(--space-5);
}

.bio-header {
    border-left: 4px solid var(--color-primary);
    padding-left: var(--space-5);
    margin-bottom: var(--space-5);
}

.bio-header h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-3);
}

.bio-header p {
    font-size: clamp(1rem, 1.5vw, 1.1rem);
    color: var(--color-secondary);
    margin-bottom: 0;
}

.highlight-box {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-6);
    border-radius: var(--radius-md);
    margin-top: var(--space-5);
}

.contact-list {
    list-style: none;
    padding: 0;
    line-height: 2;
}

.contact-list li {
    margin-bottom: var(--space-2);
}

/* === SPACING UTILITIES === */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: var(--space-1); }
.pt-2 { padding-top: var(--space-2); }
.pt-3 { padding-top: var(--space-3); }
.pt-4 { padding-top: var(--space-4); }
.pt-5 { padding-top: var(--space-5); }
.pt-6 { padding-top: var(--space-6); }
.pt-8 { padding-top: var(--space-8); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: var(--space-1); }
.pb-2 { padding-bottom: var(--space-2); }
.pb-3 { padding-bottom: var(--space-3); }
.pb-4 { padding-bottom: var(--space-4); }
.pb-5 { padding-bottom: var(--space-5); }
.pb-6 { padding-bottom: var(--space-6); }
.pb-8 { padding-bottom: var(--space-8); }

.text-sm {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* === FOCUS STYLES (Accessibility) === */
*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 0 4px rgba(0, 242, 234, 0.2);
}

button:focus-visible,
a:focus-visible {
    outline-offset: 4px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(0, 242, 234, 0.15);
}

/* Skip to main content link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-bg);
    padding: var(--space-3) var(--space-6);
    text-decoration: none;
    z-index: 10000;
    border-radius: 0 0 var(--radius-md) 0;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* === LOADING STATES === */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: var(--radius-md);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === SCROLL PROGRESS INDICATOR === */
.scroll-progress {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform-origin: 0%;
    z-index: var(--z-fixed);
    box-shadow: 0 2px 8px rgba(0, 242, 234, 0.3);
}

/* === IMPROVED TEXT SELECTION === */
::selection {
    background: rgba(0, 242, 234, 0.3);
    color: var(--color-text);
}

::-moz-selection {
    background: rgba(0, 242, 234, 0.3);
    color: var(--color-text);
}

/* === SMOOTH SCROLLBAR STYLING === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 234, 0.3);
    border-radius: 5px;
    border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 242, 234, 0.5);
}

/* === IMPROVED SECTION STYLING === */
.section-modern {
    padding: var(--space-20) 0;
}

.section-modern-sm {
    padding: var(--space-16) 0;
}

.section-modern-lg {
    padding: var(--space-32) 0;
}

/* === PERFORMANCE OPTIMIZATIONS === */
.card,
.cta,
.btn {
    contain: layout style paint;
}

/* === SMOOTH SCROLLING ENHANCEMENTS === */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
    
    .card,
    .hero-inner > div {
        animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* === IMPROVED RESPONSIVE BREAKPOINTS === */
@media (max-width: 768px) {
    .section-modern {
        padding: var(--space-16) 0;
    }
    
    .section-modern-sm {
        padding: var(--space-12) 0;
    }
    
    .section-modern-lg {
        padding: var(--space-20) 0;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .cta,
    .hero-actions .link {
        width: 100%;
        max-width: 300px;
    }
    
    .cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .card {
        padding: var(--space-5);
    }
}
