/* ===== Custom Styles for Third Century Advisors ===== */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #d5b0c8;
    color: #2a1a22;
}

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #d97706;
    transition: width 0.3s ease;
}

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

/* Navbar scroll state */
.nav-scrolled {
    background-color: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(213, 176, 200, 0.3);
    box-shadow: 0 1px 20px rgba(75, 46, 62, 0.06);
}

.nav-scrolled .menu-line {
    background-color: #4b2e3e;
}

/* Mobile menu */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #d97706;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* Menu button animation */
#menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-btn.active .menu-line:last-child {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ===== Hero ===== */
.hero-title {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-tag {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.1s;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-cta {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-secondary {
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Floating stat cards */
.floating-card-1 {
    animation: floatCard1 6s ease-in-out infinite;
}

.floating-card-2 {
    animation: floatCard2 7s ease-in-out infinite;
}

.floating-card-3 {
    animation: floatCard3 5s ease-in-out infinite;
}

@keyframes floatCard1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}

@keyframes floatCard2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-0.5deg); }
}

@keyframes floatCard3 {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 48px; }
    50% { opacity: 1; height: 60px; }
}

/* ===== Philosophy ===== */
.philosophy-pillar {
    transition: padding-left 0.3s ease;
}

.philosophy-pillar:hover {
    padding-left: 12px;
}

.philosophy-pillar:hover h3 {
    color: #d97706;
    transition: color 0.3s ease;
}

/* ===== Services ===== */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(to bottom, #d97706, #a05f8a);
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

/* ===== General Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }
}

/* ===== Subtle grain texture overlay ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 9999;
}
