/* ===================================================
   iLogs Group — Divided Fan Landing Page (JPG Version)
   =================================================== */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
    --ilogs-blue: #0d4f78;
    --ilogs-blue-light: #1a6fa0;
    --ilogs-blue-dark: #072e47;
    --ilogs-blue-glow: rgba(13, 79, 120, 0.45);

    --surface: #f0f2f6;
    --surface-card: #ffffff;
    --text-primary: #0f1c2e;
    --text-secondary: #5a6a7e;
    --text-on-dark: #ffffff;

    --radius-lg: 14px;
    --shadow-card: 0 8px 40px rgba(0, 0, 0, 0.12), 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 20px 60px rgba(13, 79, 120, 0.30), 0 4px 20px rgba(0, 0, 0, 0.10);
    --transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* card dimensions */
    --card-width: 380px;
    --card-height: 520px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #e8ecf2 0%, #f4f6f9 30%, #e0e7ef 100%);
}

/* ---------- Subtle gradient background ---------- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(13, 79, 120, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(26, 111, 160, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(7, 46, 71, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* ===================================================
   HEADER — ilogs.systems style
   =================================================== */
.site-header {
    position: relative;
    width: 100%;
    height: 170px;
    /* 50px top + 120px bar */
    display: flex;
    align-items: center;
    z-index: 50;
    opacity: 0;
    animation: fadeDown 0.8s 0.2s ease forwards;
}

/* Diamond logo */
.header-logo {
    position: absolute;
    left: 40px;
    top: -12px;
    z-index: 51;
    width: 330px;
    height: 225px;
}

.header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* White bar */
.header-bar {
    position: relative;
    width: 100%;
    height: 120px;
    margin-top: 50px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
}

.header-bar__content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.header-bar__title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: var(--ilogs-blue-dark);
    letter-spacing: 0.05em;
}

/* ===================================================
   SUBTITLE SECTION
   =================================================== */
.page-intro {
    text-align: center;
    padding: 3rem 1rem 0;
    opacity: 0;
    animation: fadeDown 0.8s 0.4s ease forwards;
}

.page-intro__subtitle {
    font-size: clamp(1.1rem, 1.8vw, 1.4rem);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ===================================================
   FAN LAYOUT
   =================================================== */
.fan-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}

.fan {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: clamp(1rem, 2.5vw, 2rem);
    width: 100%;
    max-width: 1200px;
}

/* ===================================================
   FAN CARD
   =================================================== */
.fan-card {
    position: relative;
    flex: 1;
    max-width: var(--card-width);
    height: var(--card-height);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: var(--surface-card);
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    transition:
        transform var(--transition),
        box-shadow var(--transition);
    will-change: transform;
}

/* --- Card label overlay --- */
.card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 1.4rem 1.5rem 1.2rem;
    background: linear-gradient(to top,
            rgba(7, 46, 71, 0.95) 0%,
            rgba(7, 46, 71, 0.85) 40%,
            rgba(7, 46, 71, 0.50) 75%,
            transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: opacity var(--transition), transform var(--transition);
}

.card-label__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.card-label__desc {
    font-size: 0.8rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
}

/* --- Image wrapper --- */
.img-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
    transition: object-fit var(--transition), object-position var(--transition);
}

/* On hover: show complete image */
.fan-card:hover .img-wrapper img {
    object-fit: contain;
    object-position: top left;
}

/* --- Hover states --- */
.fan-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-hover);
    z-index: 10;
}

.fan-card:hover .card-label {
    opacity: 1;
}

/* --- Blue top accent bar --- */
.fan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 11;
    background: linear-gradient(90deg, var(--ilogs-blue), var(--ilogs-blue-light));
    opacity: 0;
    transition: opacity var(--transition);
}

.fan-card:hover::before {
    opacity: 1;
}

/* --- Entrance animations --- */
.fan-card:nth-child(1) {
    opacity: 0;
    animation: fadeUp 0.7s 0.2s ease forwards;
}

.fan-card:nth-child(2) {
    opacity: 0;
    animation: fadeUp 0.7s 0.35s ease forwards;
}

.fan-card:nth-child(3) {
    opacity: 0;
    animation: fadeUp 0.7s 0.5s ease forwards;
}

/* --- Dim siblings on hover --- */
.fan:hover .fan-card:not(:hover) {
    opacity: 0.6;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        opacity var(--transition);
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
    background: linear-gradient(135deg, var(--ilogs-blue-dark), var(--ilogs-blue));
    color: rgba(255, 255, 255, 0.8);
    padding: 1.4rem 0;
    text-align: center;
    font-size: 0.82rem;
}

.footer__inner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #fff;
}

.footer__sep {
    opacity: 0.4;
}

/* ===================================================
   KEYFRAMES
   =================================================== */
@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================
   RESPONSIVE
   =================================================== */

/* Large screens */
@media (min-width: 1400px) {
    :root {
        --card-width: 440px;
        --card-height: 580px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --card-width: 280px;
        --card-height: 390px;
    }

    .site-header {
        height: 130px;
    }

    .header-logo {
        width: 200px;
        height: 136px;
        left: 20px;
        top: -5px;
    }

    .header-bar {
        height: 80px;
        margin-top: 40px;
    }

    .header-bar__title {
        font-size: 1.5rem;
    }
}

/* Mobile — stack vertically */
@media (max-width: 768px) {
    :root {
        --card-width: 90vw;
        --card-height: 300px;
    }

    .site-header {
        height: auto;
        flex-direction: column;
        align-items: center;
        padding-top: 1rem;
    }

    .header-logo {
        position: relative;
        left: auto;
        top: auto;
        width: 160px;
        height: 109px;
        margin-bottom: -15px;
        z-index: 51;
    }

    .header-bar {
        margin-top: 0;
        height: auto;
        padding: 0.8rem 1rem;
    }

    .header-bar__content {
        padding-left: 0;
        justify-content: center;
    }

    .header-bar__title {
        font-size: 1.3rem;
    }

    .page-intro {
        padding-top: 1.5rem;
    }

    .page-intro__subtitle {
        font-size: 1rem;
    }

    .fan-container {
        padding: 1rem 1rem 2rem;
    }

    .fan {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .fan-card {
        width: var(--card-width);
        max-width: 480px;
    }

    .fan-card:hover {
        transform: scale(1.02);
    }

    .fan:hover .fan-card:not(:hover) {
        opacity: 1;
    }

    .footer__inner {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer__sep {
        display: none;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================
   ACCESSIBILITY
   =================================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

.fan-card:focus-visible {
    outline: 3px solid var(--ilogs-blue);
    outline-offset: 4px;
}