/* =============================================================================
   Compass Resource Management — Custom Styles (Pass 2)
   =============================================================================
   Supplements Tailwind CSS with photo dividers, parallax, card effects,
   reconciliation earth tones, and refined typography.
   ============================================================================= */

/* --- Base & Smooth Scroll --- */
html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(15, 141, 203, 0.2);
    color: #1c1c1c;
}

/* --- Navigation --- */

#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Nav links — white on hero, dark when scrolled */
.nav-link {
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #0f8dcb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0f8dcb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* When scrolled, nav links switch to dark */
#navbar.scrolled .nav-link {
    color: #444444;
}

#navbar.scrolled .nav-link:hover {
    color: #0f8dcb;
}

.nav-logo-text {
    color: white;
}

#navbar.scrolled .nav-logo-text {
    color: #1c1c1c;
}

.nav-link-cta {
    color: white;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.nav-link-cta:hover {
    background: #0f8dcb;
    border-color: #0f8dcb;
    color: white;
}

#navbar.scrolled .nav-link-cta {
    color: #0f8dcb;
    border-color: #0f8dcb;
}

#navbar.scrolled .nav-link-cta:hover {
    background: #0f8dcb;
    color: white;
}

.hamburger-line {
    background-color: white;
}

#navbar.scrolled .hamburger-line {
    background-color: #1c1c1c;
}

/* Mobile menu open state */
#mobile-menu-btn.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.open .hamburger-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Hero --- */
.hero-title,
.hero-subtitle,
.scroll-indicator {
    opacity: 0;
}

.tagline-text {
    opacity: 0;
}

/* Hero gradient overlay — brand blue tint fading to dark */
.hero-gradient {
    background: linear-gradient(
        to bottom,
        rgba(15, 80, 120, 0.5) 0%,
        rgba(10, 50, 80, 0.6) 40%,
        rgba(15, 20, 30, 0.8) 100%
    );
}

/* --- Photo Dividers --- */
.photo-divider {
    position: relative;
}

/* Parallax is handled by GSAP, but we set base styles */
.parallax-img {
    will-change: transform;
}

/* --- Tools Gradient Section --- */
.tools-gradient {
    background: linear-gradient(135deg, #0a6795 0%, #0f8dcb 40%, #08547a 100%);
}

/* --- Service Cards --- */
.service-card {
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
}

/* Brand-blue accent bar at top of card */
.service-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0f8dcb;
    border-radius: 1rem 1rem 0 0;
    transform: scaleX(0.3);
    transition: transform 0.4s ease;
}

.service-card:hover .service-accent {
    transform: scaleX(1);
}

/* Card shadow on hover */
.service-card:hover > div {
    box-shadow: 0 20px 60px rgba(15, 141, 203, 0.08);
}

/* --- Pillar Cards --- */
.pillar-card {
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: white;
    transition: all 0.4s ease;
}

.pillar-card:hover {
    border-color: rgba(15, 141, 203, 0.15);
    box-shadow: 0 20px 40px rgba(15, 141, 203, 0.06);
    transform: translateY(-4px);
}

/* --- Practice Tags (Tag Cloud) --- */
.practice-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1.5px solid rgba(15, 141, 203, 0.15);
    color: #444444;
    background: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: default;
}

.practice-tag:hover {
    background: #0f8dcb;
    border-color: #0f8dcb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 141, 203, 0.2);
}

.practice-tag[data-size="lg"] {
    font-size: 1rem;
    padding: 0.625rem 1.5rem;
}

.practice-tag[data-size="md"] {
    font-size: 0.875rem;
}

.practice-tag[data-size="sm"] {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
}

/* --- Project Cards --- */
.project-card {
    transition: transform 0.4s ease;
}

.project-card:hover {
    transform: translateY(-6px);
}

.project-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(15, 141, 203, 0.08);
    color: #0f8dcb;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Team Members --- */
.team-member {
    text-align: center;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-4px);
}

.team-member-avatar {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #0f8dcb 0%, #0a6795 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

/* Principal avatars are larger and have a subtle ring */
.team-member-avatar.principal {
    width: 88px;
    height: 88px;
    font-size: 1.35rem;
    box-shadow: 0 0 0 3px rgba(15, 141, 203, 0.15);
}

.team-member:hover .team-member-avatar {
    border-radius: 1.25rem;
    box-shadow: 0 12px 24px rgba(15, 141, 203, 0.25);
}

.team-member-avatar.sm {
    width: 60px;
    height: 60px;
    font-size: 0.875rem;
    border-radius: 0.75rem;
}

.team-member:hover .team-member-avatar.sm {
    border-radius: 1rem;
}

/* --- Reconciliation Section — Earth tones --- */
.reconciliation-overlay {
    background: linear-gradient(
        to bottom,
        rgba(44, 24, 16, 0.82) 0%,
        rgba(92, 64, 51, 0.75) 50%,
        rgba(44, 24, 16, 0.85) 100%
    );
}

/* Slow fade-in for reconciliation content */
.reconciliation-reveal {
    opacity: 0;
    transform: translateY(15px);
}

/* --- Book Visual --- */
.book-visual {
    position: relative;
    width: 260px;
    height: 360px;
    perspective: 1000px;
}

.book-cover {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2332 0%, #0f1922 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 12px 12px 0;
    box-shadow:
        -4px 0 0 #0a6795,
        -8px 0 0 #08547a,
        -12px 0 0 #05415f,
        0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: transform 0.5s ease;
}

.book-visual:hover .book-cover {
    transform: rotateY(-8deg);
}

.book-cover-content {
    text-align: center;
}

/* --- News Cards --- */
.news-card {
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
}

/* --- Reveal Animations (initial state — GSAP animates these in) --- */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
}

/* --- Responsive Tweaks --- */
@media (max-width: 768px) {
    .team-member-avatar {
        width: 64px;
        height: 64px;
        font-size: 1rem;
    }

    .team-member-avatar.principal {
        width: 72px;
        height: 72px;
        font-size: 1.1rem;
    }

    .team-member-avatar.sm {
        width: 48px;
        height: 48px;
        font-size: 0.75rem;
    }

    .book-visual {
        width: 200px;
        height: 280px;
    }
}

/* --- Form Focus States --- */
input:focus,
textarea:focus {
    outline: none;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: rgba(15, 141, 203, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(15, 141, 203, 0.5);
}
