﻿/* ==========================================================================
   MODULE: ABOUT TAB (CLEAN & PURE FADE INTRO SEQUENCE)
   ========================================================================== */

.about-page-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 16px 60px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: var(--bg-main);
}

/* ==========================================================================
   1. DESKTOP HERO STAGE
   ========================================================================== */
.desktop-arc-hero {
    width: 100%;
    height: 560px;
    background: radial-gradient(circle at 50% 28%, #f8faff 0%, #eaf2fd 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-box);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

[data-theme="dark"] .desktop-arc-hero {
    background: radial-gradient(circle at 50% 28%, #161b24 0%, #0e1218 100%);
}

.hero-interactive-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* ⚡ ១. Fade Logo ពេលចូលដំបូង */
.hero-pure-logo-layer {
    position: absolute;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 35;
    pointer-events: none;
    opacity: 0;
}

.hero-pure-logo-img {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

[data-theme="dark"] .hero-pure-logo-img {
    filter: brightness(0) invert(1);
}

.hero-pure-logo-layer.play-first-logo {
    animation: firstLogoFade 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes firstLogoFade {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px) scale(0.92);
        filter: blur(10px);
    }
    35% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.04);
        filter: blur(0);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.08);
        filter: blur(12px);
    }
}

/* ⚡ ២. Meet Our Team: Fade នៅកណ្តាល រួចរំកិលឡើងទៅលើ */
.arc-hero-header-title {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 38px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: center;
    z-index: 15;
    opacity: 0;
    margin: 0;
    white-space: nowrap;
    background: linear-gradient(135deg, #38bdf8 0%, #1a73e8 65%, #1557b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .arc-hero-header-title {
    background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 50%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.arc-hero-header-title.center-fade-in {
    animation: titleCenterFade 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.arc-hero-header-title.move-to-top {
    animation: titleRiseTop 0.85s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes titleCenterFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -35%) scale(0.92);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0);
    }
}

@keyframes titleRiseTop {
    0% {
        opacity: 1;
        top: 45%;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 1;
        top: 32px;
        transform: translate(-50%, 0) scale(1);
    }
}

/* ⚡ Slogan Engine */
.arc-center-slogan {
    position: absolute;
    left: 50%;
    bottom: 42px;
    transform: translateX(-50%);
    text-align: center;
    font-size: 29px;
    font-weight: var(--font-medium);
    color: var(--color-primary);
    z-index: 6;
    pointer-events: none;
    letter-spacing: -0.02em;
    width: 320px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.slogan-line {
    width: 100%;
    height: 38px;
    line-height: 38px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    overflow: visible;
    text-align: center;
}

.type-cursor {
    display: inline-block;
    width: 3px;
    height: 24px;
    background-color: var(--color-primary);
    margin-left: 4px;
    vertical-align: -2px;
    border-radius: 2px;
    animation: cursorBlink 0.75s infinite;
}

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

/* ==========================================================================
   ⚡ ៣. FADE រង្វង់រូបក្នុងល្បឿនធម្មតាតែម្តង (NO SPEED-UP / PURE ORBIT)
   ========================================================================== */
.arc-orbit-wheel {
    position: absolute;
    top: 460px;
    left: 50%;
    width: 500px;
    height: 500px;
    margin-left: -250px;
    margin-top: -250px;
    border-radius: 50%;
    transform-origin: center center;
    z-index: 2;
    pointer-events: auto;
    opacity: 0;
}

/* Fade ចូលមកក្នុងល្បឿនធម្មតា linear ជាប់រហូត */
.arc-orbit-wheel.stage-running {
    animation: continuousCurvedOrbitReverse 44s linear infinite, orbitPureFadeIn 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes orbitPureFadeIn {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes continuousCurvedOrbitReverse {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

/* កាតរូបថតទាំង ៩ */
.arc-card-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 145px;
    height: 200px;
    margin-left: -72px;
    margin-top: -100px;
    border-radius: 26px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 3px solid rgba(255, 255, 255, 0.95);
    cursor: pointer;
    transform-origin: center center;
    pointer-events: auto;
    transition: border-color 0.2s ease;
}

[data-theme="dark"] .arc-card-item {
    border-color: rgba(255, 255, 255, 0.15);
}

.arc-card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none !important;
}

/* ទីតាំង ៩ មុំជារង្វង់មូល */
.arc-card-item:nth-child(1) { transform: rotate(0deg) translateY(-250px); }
.arc-card-item:nth-child(2) { transform: rotate(40deg) translateY(-250px); }
.arc-card-item:nth-child(3) { transform: rotate(80deg) translateY(-250px); }
.arc-card-item:nth-child(4) { transform: rotate(120deg) translateY(-250px); }
.arc-card-item:nth-child(5) { transform: rotate(160deg) translateY(-250px); }
.arc-card-item:nth-child(6) { transform: rotate(200deg) translateY(-250px); }
.arc-card-item:nth-child(7) { transform: rotate(240deg) translateY(-250px); }
.arc-card-item:nth-child(8) { transform: rotate(280deg) translateY(-250px); }
.arc-card-item:nth-child(9) { transform: rotate(320deg) translateY(-250px); }

/* ==========================================================================
   2. SUB-TABS: "OUR TEAM" & "MISSION"
   ========================================================================== */
.about-subnav-bar {
    display: flex;
    justify-content: center;
    margin: 6px 0 10px 0;
}

.about-subnav-pill-group {
    display: flex;
    background: var(--bg-surface);
    padding: 3px;
    border-radius: var(--radius-pill);
    gap: 4px;
}

.about-sub-pill {
    padding: 7px 24px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.about-sub-pill.active {
    background: var(--bg-main);
    color: var(--text-title);
}

#aboutDynamicContent {
    position: relative;
    width: 100%;
}

.subtab-fade-stage {
    animation: pureFadeIn 0.22s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform: none !important;
}

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

/* ==========================================================================
   3. TEAM GRID: FLAT BORDERLESS
   ========================================================================== */
.about-team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    width: 100%;
}

.team-box-card {
    background: var(--bg-surface);
    border: none !important;
    border-radius: var(--radius-box);
    padding: 8px 8px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .team-box-card { transition: background-color 0.2s ease; }
    .team-box-card:hover { background-color: var(--bg-surface-hover); }
}

.team-box-thumb-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-main);
}

.team-box-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-box-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 4px;
}

.team-box-name {
    font-size: var(--fs-base);
    font-weight: var(--font-medium);
    color: var(--text-title);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-box-role {
    font-size: var(--fs-xs);
    font-weight: var(--font-regular);
    color: var(--color-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   4. MISSION TAB VIEW
   ========================================================================== */
.mission-view-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 8px 0;
    width: 100%;
}

.mission-headline-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mission-big-title {
    font-size: var(--fs-xl);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    line-height: 1.25;
}

.mission-sub-desc {
    font-size: var(--fs-base);
    color: var(--text-muted);
    line-height: 1.45;
}

.mission-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mission-pill-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: var(--bg-surface);
    border-radius: var(--radius-pill);
    border: none;
}

.mission-pill-feature .material-symbols-rounded {
    font-size: 22px !important;
    color: var(--color-primary);
}

.mission-pill-feature span {
    font-size: var(--fs-base);
    font-weight: var(--font-medium);
    color: var(--text-title);
}

/* ==========================================================================
   5. PROFILE VIEW: /about/:id
   ========================================================================== */
.profile-view-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.profile-top-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: -4px;
}

.profile-back-action {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: var(--color-primary);
    font-size: var(--fs-base);
    font-weight: var(--font-medium);
    cursor: pointer;
    padding: 4px 0;
}

.profile-hero-card {
    background: var(--bg-surface);
    border-radius: var(--radius-box);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-cover-wrap {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-surface-hover);
}

.profile-avatar-row {
    position: relative;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-circle-avatar {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 4px solid var(--bg-surface);
    overflow: hidden;
    margin-top: -54px;
    background: var(--bg-surface-hover);
}

.profile-circle-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-name-badge-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.profile-full-name {
    font-size: var(--fs-lg);
    font-weight: var(--font-medium);
    color: var(--text-title);
}

.profile-verified-badge {
    color: #1a73e8;
    font-size: 20px !important;
}

.profile-role-tag {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

.profile-tab-toggle {
    display: flex;
    justify-content: center;
    padding: 16px 0 20px 0;
}

.profile-pill-box {
    display: flex;
    background: var(--bg-main);
    padding: 3px;
    border-radius: var(--radius-pill);
    gap: 4px;
}

.profile-tab-pill {
    padding: 6px 20px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-weight: var(--font-medium);
    cursor: pointer;
}

.profile-tab-pill.active {
    background: var(--bg-surface);
    color: var(--text-title);
}

.profile-feed-stream {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-stream-card {
    background: var(--bg-surface);
    border-radius: var(--radius-box);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-feed-img {
    width: 100%;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    display: block;
}

.profile-feed-caption {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-feed-caption .time-tag {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.profile-feed-caption .text-body {
    font-size: var(--fs-base);
    color: var(--text-title);
    line-height: 1.45;
}

/* ==========================================================================
   DESKTOP & PHONE RULES
   ========================================================================== */
@media (min-width: 769px) {
    .about-team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
    .profile-cover-wrap { height: 240px; }
    .profile-circle-avatar { width: 124px; height: 124px; margin-top: -62px; }
    .mission-features-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .desktop-arc-hero {
        display: none !important;
    }
    .team-box-card, .team-box-card:hover {
        background-color: var(--bg-surface) !important;
        transform: none !important;
    }
}