/* Federated Biologics - Shared Styles */

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

html {
    scroll-behavior: smooth;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #fff;
    background: #0f1f18;
    overflow-x: hidden;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #e6daca;
    color: #0f1f18;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight: 500;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #e6daca;
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Animated gradient background */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        radial-gradient(ellipse 70% 50% at 15% 85%, #1d5a5b 0%, transparent 50%),
        radial-gradient(ellipse 60% 70% at 85% 15%, #e6daca 0%, transparent 40%),
        radial-gradient(ellipse 50% 40% at 5% 25%, #a4ac79 0%, transparent 45%),
        radial-gradient(ellipse 45% 35% at 15% 15%, #91a065 0%, transparent 40%),
        radial-gradient(ellipse 80% 60% at 50% 50%, #1d5a5b 0%, transparent 50%),
        linear-gradient(135deg, #0f1f18 0%, #1d5a5b 50%, #0f1f18 100%);
}

.gradient-layer-1 {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 35% 35% at 25% 25%, rgba(29, 90, 91, 0.9) 0%, transparent 50%),
        radial-gradient(ellipse 45% 45% at 75% 65%, rgba(230, 218, 202, 0.6) 0%, transparent 45%),
        radial-gradient(ellipse 40% 40% at 65% 15%, rgba(164, 172, 121, 0.7) 0%, transparent 50%),
        radial-gradient(ellipse 30% 30% at 10% 55%, rgba(145, 160, 101, 0.6) 0%, transparent 45%);
    animation: drift1 15s ease-in-out infinite;
    z-index: 1;
    will-change: transform;
}

.gradient-layer-2 {
    position: absolute;
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: 
        radial-gradient(ellipse 50% 45% at 85% 75%, rgba(15, 31, 24, 0.85) 0%, transparent 50%),
        radial-gradient(ellipse 45% 50% at 15% 35%, rgba(230, 218, 202, 0.55) 0%, transparent 45%),
        radial-gradient(ellipse 35% 35% at 95% 25%, rgba(29, 90, 91, 0.7) 0%, transparent 50%),
        radial-gradient(ellipse 40% 40% at 35% 90%, rgba(29, 90, 91, 0.6) 0%, transparent 50%);
    animation: drift2 18s ease-in-out infinite;
    z-index: 2;
    will-change: transform;
}

.gradient-layer-3 {
    position: absolute;
    top: -20%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: 
        radial-gradient(ellipse 25% 25% at 80% 20%, rgba(230, 218, 202, 0.5) 0%, transparent 45%),
        radial-gradient(ellipse 30% 30% at 20% 80%, rgba(29, 90, 91, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse 20% 20% at 55% 5%, rgba(164, 172, 121, 0.5) 0%, transparent 45%),
        radial-gradient(ellipse 25% 25% at 5% 15%, rgba(145, 160, 101, 0.55) 0%, transparent 50%);
    animation: drift3 12s ease-in-out infinite;
    z-index: 3;
    will-change: transform;
}

@keyframes drift1 {
    0%, 100% { transform: translate(0%, 0%) rotate(0deg) scale(1); }
    25% { transform: translate(10%, 15%) rotate(3deg) scale(1.05); }
    50% { transform: translate(20%, 10%) rotate(-2deg) scale(0.95); }
    75% { transform: translate(10%, -10%) rotate(2deg) scale(1.02); }
}

@keyframes drift2 {
    0%, 100% { transform: translate(0%, 0%) rotate(0deg) scale(1); }
    33% { transform: translate(-15%, 10%) rotate(-3deg) scale(1.08); }
    66% { transform: translate(12%, -15%) rotate(3deg) scale(0.95); }
}

@keyframes drift3 {
    0%, 100% { transform: translate(0%, 0%) scale(1) rotate(0deg); }
    25% { transform: translate(8%, -8%) scale(1.1) rotate(2deg); }
    50% { transform: translate(-10%, 10%) scale(1.15) rotate(-2deg); }
    75% { transform: translate(-5%, -5%) scale(1.05) rotate(1deg); }
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #0f1f18;
    border-bottom: 1px solid rgba(230, 218, 202, 0.1);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: opacity 0.2s;
}

.nav-logo:hover {
    opacity: 0.8;
}

.nav-logo span {
    color: #e6daca;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: color 0.2s;
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #e6daca;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #e6daca;
    border-radius: 1px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle-bar {
    width: 24px;
    height: 2px;
    background: #e6daca;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 280px;
        max-width: 80vw;
        background: #0f1f18;
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        border-left: 1px solid rgba(230, 218, 202, 0.1);
        z-index: 1000;
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-menu li {
        border-bottom: 1px solid rgba(230, 218, 202, 0.1);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }

    .nav-menu a.active::after {
        display: none;
    }
}

/* Page Content */
.page-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
}

.page-inner {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 300;
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.page-subtitle {
    font-size: 1.1rem;
    color: rgba(230, 218, 202, 0.7);
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 600px;
}

/* Contact Form Wrapper */
.contact-form-wrapper {
    background: rgba(29, 90, 91, 0.1);
    border: 1px solid rgba(230, 218, 202, 0.1);
    border-radius: 16px;
    padding: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    color: rgba(230, 218, 202, 0.8);
    font-weight: 500;
}

.form-group input {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 1px solid rgba(230, 218, 202, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: #fff;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input::placeholder {
    color: rgba(230, 218, 202, 0.5);
}

.form-group input:focus {
    border-color: #e6daca;
    background: rgba(230, 218, 202, 0.15);
    box-shadow: 0 0 20px rgba(230, 218, 202, 0.2);
}

.form-group input.error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.form-error {
    font-size: 0.85rem;
    color: #ff6b6b;
    min-height: 1.2em;
}

.btn {
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: #e6daca;
    color: #1f3328;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(230, 218, 202, 0.4);
}

.success-message {
    display: none;
    padding: 1.5rem 2rem;
    background: rgba(230, 218, 202, 0.15);
    border: 1px solid rgba(230, 218, 202, 0.3);
    border-radius: 8px;
    color: #e6daca;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-direct {
    padding-top: 2rem;
    border-top: 1px solid rgba(230, 218, 202, 0.1);
    text-align: center;
}

.contact-direct h2 {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #fff;
}

.contact-direct p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
}

.contact-email {
    display: inline-block;
    font-size: 1.25rem;
    color: #e6daca;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border: 1px solid rgba(230, 218, 202, 0.3);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-email:hover {
    background: rgba(230, 218, 202, 0.1);
    border-color: #e6daca;
}

/* Team Page */
.team-section {
    margin-bottom: 4rem;
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 400;
    color: #e6daca;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(230, 218, 202, 0.1);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.placeholder-text {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    padding: 2rem;
    background: rgba(29, 90, 91, 0.1);
    border-radius: 12px;
    text-align: center;
}

/* Footer */
footer {
    position: relative;
    z-index: 10;
    padding: 2rem;
    background: rgba(15, 31, 24, 0.98);
    text-align: center;
    border-top: 1px solid rgba(230, 218, 202, 0.1);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

footer p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-content {
        padding: 6rem 1.5rem 3rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }

    .nav-inner {
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-content {
        padding: 5rem 1rem 2rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 1.75rem;
    }
}

/* High contrast mode */
@media (forced-colors: active) {
    .nav,
    .contact-form-wrapper {
        border: 2px solid CanvasText;
    }
}

/* Print styles */
@media print {
    .gradient-bg,
    .nav {
        display: none;
    }
    
    .page-content {
        padding-top: 2rem;
        background: white;
        color: black;
    }
}
