/* ========================================
   Kohtalab Landing Page
   ======================================== */

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

:root {
    --color-bg: #000000;
    --color-bg-alt: #0a0a0a;
    --color-text: #e0dfe6;
    --color-text-muted: #9b9aab;
    --color-heading: #ffffff;
    --color-accent: #e0dfe6;
    --color-border: #2a2a44;
    --font-family: 'Montserrat', sans-serif;
    --font-hero: 'Space Grotesk', 'Montserrat', sans-serif;
    --container-width: 1290px;
    --header-height: 60px;
}

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

body {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.3;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

h4 {
    font-size: 1.15rem;
    font-weight: 600;
}

p {
    margin-bottom: 0;
}

strong {
    font-weight: 600;
}

/* --- Utilities --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section-spacer-lg {
    height: 80px;
}

.section {
    position: relative;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.header-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 36px;
}

.main-nav a {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-heading);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--color-heading);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-heading);
    transition: all 0.3s ease;
}

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

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

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

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero-video-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(2, 0, 2, 0.3) 0%,
        rgba(2, 0, 2, 0) 33%,
        rgba(2, 0, 2, 0.3) 67%,
        rgba(2, 0, 2, 1) 100%
    );
    pointer-events: none;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-align: center;
    padding: 0 20px;
}

.hero-logo {
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1.2s ease forwards;
    animation-delay: 0.1s;
}

.hero-logo img {
    height: 300px;
    width: auto;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-line {
    display: block;
    font-family: var(--font-hero);
    font-size: clamp(24px, 5vw, 72px);
    font-weight: 500;
    color: var(--color-heading);
    letter-spacing: -2px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 1.2s ease forwards;
}

.hero-line:nth-child(1) {
    animation-delay: 0.5s;
}

.hero-line:nth-child(2) {
    animation-delay: 1.0s;
}

.hero-line:nth-child(3) {
    animation-delay: 1.5s;
}

.hero-affiliation {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 14px;
    opacity: 0;
    animation: heroFadeIn 1.2s ease forwards;
    animation-delay: 2.0s;
}

.hero-affiliation span {
    display: block;
    font-family: var(--font-hero);
    font-size: clamp(11px, 1.4vw, 18px);
    font-weight: 400;
    color: var(--color-heading);
    letter-spacing: 0.5px;
    line-height: 1.6;
    opacity: 0.75;
    text-align: center;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-credit {
    position: absolute;
    bottom: 80px;
    right: 20px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.02em;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: heroFadeIn 1s ease 2.5s forwards;
    cursor: pointer;
}

.mouse-icon {
    width: 25px;
    height: auto;
    animation: mouseFloat 3s ease-in-out infinite;
}

@keyframes mouseFloat {
    0%, 100% { transform: translateY(-6px); }
    50% { transform: translateY(4px); }
}

/* --- Research Focus Section --- */
.research-focus {
    border-top: none;
}

.research-focus-header {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 30px;
    align-items: start;
    padding-bottom: 20px;
}

.research-focus-title h2 {
    margin: 0;
}

.research-focus-text p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--color-border);
}

.service-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 40px 30px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    transition: background 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.service-card:last-child {
    border-right: none;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.02);
}

.service-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    color: var(--color-accent);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-content {
    flex: 1;
}

.service-content h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.service-content p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.service-arrow {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-text-muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.service-arrow svg {
    width: 100%;
    height: 100%;
}

.service-card:hover .service-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Methods Section --- */
.methods-section {
    border-top: 1px solid var(--color-border);
}

.methods-header {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 30px;
    align-items: start;
    padding-bottom: 30px;
}

.methods-title h2 {
    margin: 0;
}

.methods-text p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

.methods-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.method-tag {
    padding: 14px 28px;
    border: 1px solid var(--color-border);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.method-tag:hover {
    border-color: var(--color-heading);
    color: var(--color-heading);
    background: rgba(255, 255, 255, 0.03);
}

/* --- Supported By Section --- */
.supported-by-inner {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-direction: column;
}

.supported-by-logos {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
}

.logo-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
}

.logo-item img {
    max-height: 110px;
    max-width: 180px;
    width: auto;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    filter: grayscale(0);
}

.logo-item img[src$=".svg"] {
    height: 90px;
    width: 90px;
    background-color: #ffffff;
    border-radius: 50%;
    padding: 6px;
}

.logo-item img:hover {
    opacity: 1;
}

.supported-by-label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.divider-line {
    display: block;
    width: 50px;
    height: 1px;
    background: var(--color-border);
}

.supported-by-label h3 {
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: none;
    white-space: nowrap;
    color: var(--color-heading);
}

.supported-by-text {
    font-size: 0.7rem;
    color: var(--color-text-muted, #888);
    margin: 0;
    text-align: center;
    width: 100%;
}

/* --- Team Section --- */
.team-header {
    margin-bottom: 10px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
}

.team-card {
    position: relative;
    overflow: hidden;
    cursor: default;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.team-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 447 / 760;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-card-image img {
    transform: scale(1.03);
}

.team-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 16px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.4) 60%,
        transparent 100%
    );
}

.team-card-info h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.team-role {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.team-socials {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    height: 0;
    overflow: visible;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease 0.1s;
}

.team-card:hover .team-socials {
    opacity: 1;
    transform: translateY(0);
}

.team-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.team-socials a:hover {
    background: var(--color-heading);
    color: var(--color-bg);
    border-color: var(--color-heading);
}

.team-socials svg {
    width: 14px;
    height: 14px;
}

.team-additional {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.team-additional h4 {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-heading);
    margin-bottom: 6px;
}

.team-additional p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

/* --- Contact Section --- */
.contact-section {
    border-top: 1px solid var(--color-border);
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.contact-inner h2 {
    margin: 0;
}

.contact-text p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.contact-text p:last-child {
    margin-bottom: 0;
}

.contact-group-photo {
    grid-column: 2;
    margin-top: 24px;
}

.contact-group-photo img {
    max-width: 100%;
    border-radius: 8px;
}

.contact-group-photo-caption {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted, #888);
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    color: var(--color-heading);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.contact-email svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* --- Animations --- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1080px) {
    h2 {
        font-size: 2rem;
    }

    .research-focus-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .methods-header {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        border-right: none;
    }

    .supported-by-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .supported-by-logos {
        flex-wrap: wrap;
        gap: 10px;
    }

    .logo-item {
        flex: 0 0 auto;
        padding: 8px 12px;
    }

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

    .team-card-info {
        transform: translateY(0);
    }

    .team-socials {
        opacity: 1;
        transform: translateY(0);
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-spacer-lg {
        height: 50px;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }

    h2 {
        font-size: 1.6rem;
    }

    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--color-bg-alt);
        padding: 100px 40px 40px;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 24px;
    }

    .main-nav a {
        font-size: 1rem;
    }

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

    .supported-by-logos {
        flex-wrap: wrap;
    }

    .logo-item {
        flex: 0 0 calc(50% - 10px);
    }

    .logo-item:first-child {
        display: none;
    }

    .section-spacer-lg {
        height: 40px;
    }

}

@media (max-width: 767px) {
    .hero-line {
        letter-spacing: -1px;
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logo-item img {
        max-height: 80px;
        max-width: 140px;
    }
}
