/* ========================================
   Capital Advisory
   Light, traditional finance aesthetic
   ======================================== */

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f6f3;
    --bg-tertiary: #efeee9;
    --bg-dark: #1a1f2e;
    --bg-hero: #1a1f2e;
    --border: rgba(0, 0, 0, 0.08);
    --border-dark: rgba(255, 255, 255, 0.1);
    --text-dark: #1a1f2e;
    --text-body: #4a4f5c;
    --text-muted: #8b8f9a;
    --text-light: #b0b3bb;
    --accent: #2c5545;
    --accent-light: #3a7a5c;
    --accent-bg: rgba(44, 85, 69, 0.06);
    --white: #ffffff;
    --cream: #faf9f6;
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-body);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes lineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

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

.animate-in {
    animation: fadeInUp 1s var(--ease-out) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease-out);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ---- Navigation ---- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    transition: all 0.4s var(--ease);
}

.nav.scrolled {
    padding: 0.875rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

/* Hero has dark bg, so nav starts light text */
.nav .nav-links a {
    color: rgba(255, 255, 255, 0.6);
}
.nav .nav-links a:hover {
    color: rgba(255, 255, 255, 0.95);
}
.nav .logo-text {
    color: #fff;
}
.nav .logo-accent {
    color: rgba(255, 255, 255, 0.5);
}
.nav .nav-cta {
    border-color: rgba(255, 255, 255, 0.2) !important;
}
.nav .nav-cta:hover {
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #fff !important;
}
.nav .nav-toggle span {
    background: #fff;
}

/* When scrolled, switch to dark text */
.nav.scrolled .nav-links a {
    color: var(--text-muted);
}
.nav.scrolled .nav-links a:hover {
    color: var(--text-dark);
}
.nav.scrolled .logo-text {
    color: var(--text-dark);
}
.nav.scrolled .logo-accent {
    color: var(--text-muted);
}
.nav.scrolled .nav-cta {
    border-color: var(--border) !important;
}
.nav.scrolled .nav-cta:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}
.nav.scrolled .nav-toggle span {
    background: var(--text-dark);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo-icon {
    color: var(--accent-light);
    transition: color 0.4s var(--ease);
}

.logo-text {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: color 0.4s var(--ease);
}

.logo-accent {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: color 0.4s var(--ease);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    transition: color 0.3s var(--ease);
}

.nav-cta {
    padding: 0.5rem 1.25rem !important;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: all 0.3s var(--ease) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    width: 20px;
    height: 1.5px;
    transition: all 0.3s var(--ease);
}

/* ---- Hero (Dark) ---- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
    background: var(--bg-hero);
    color: #fff;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 75% 40%, rgba(44, 85, 69, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 15% 70%, rgba(30, 40, 70, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.06), transparent);
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 3rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 780px;
}

.hero-line {
    width: 48px;
    height: 2px;
    background: var(--accent-light);
    margin-bottom: 2.5rem;
    animation: lineGrow 0.8s var(--ease-out) 0.5s forwards;
    transform-origin: left;
    transform: scaleX(0);
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 5.5vw, 4.5rem);
    font-weight: 400;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1.75rem;
}

.hero-sub {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 530px;
    line-height: 1.85;
    margin-bottom: 3rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 2rem;
    font-size: 0.8125rem;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-decoration: none;
    border-radius: 2px;
    transition: all 0.35s var(--ease);
    cursor: pointer;
}

.btn-primary {
    color: var(--white);
    background: var(--accent);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
}

.btn-ghost {
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    right: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: fadeIn 1s var(--ease) 1.5s forwards;
    opacity: 0;
}

.hero-scroll span {
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
    writing-mode: vertical-rl;
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent-light), transparent);
    animation: lineGrow 1.5s var(--ease) 2s forwards;
    transform-origin: top;
    transform: scaleY(0);
}

/* ---- Divider Bar ---- */
.divider-bar {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

.divider-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 3rem;
}

.divider-content span {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-light);
}

.divider-content .dot {
    color: var(--accent);
    font-size: 0.875rem;
}

/* ---- Section Common ---- */
.section-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 3rem;
}

.section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

h2 {
    font-family: var(--font-serif);
    font-size: clamp(2.25rem, 4vw, 3.25rem);
    font-weight: 400;
    color: var(--text-dark);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

.section-header {
    margin-bottom: 4rem;
}

.section-header h2 {
    margin-bottom: 1.5rem;
}

.section-intro {
    font-size: 1.0625rem;
    color: var(--text-body);
    max-width: 540px;
    line-height: 1.8;
    font-weight: 300;
}

/* ---- Expertise (Light) ---- */
.expertise {
    padding: 7rem 0 8rem;
    background: var(--bg-primary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
}

.expertise-card {
    padding: 3rem;
    background: var(--bg-primary);
    position: relative;
    transition: all 0.4s var(--ease);
}

.expertise-card:hover {
    background: var(--accent-bg);
}

.card-number {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: var(--bg-tertiary);
    font-weight: 300;
    margin-bottom: 1.25rem;
    line-height: 1;
    transition: color 0.4s var(--ease);
}

.expertise-card:hover .card-number {
    color: rgba(44, 85, 69, 0.15);
}

.expertise-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.875rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.expertise-card p {
    font-size: 0.9375rem;
    color: var(--text-body);
    line-height: 1.75;
    font-weight: 300;
}

.card-line {
    position: absolute;
    top: 0;
    left: 3rem;
    width: 32px;
    height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.expertise-card:hover .card-line {
    opacity: 1;
}

/* ---- Philosophy (Cream) ---- */
.philosophy {
    padding: 8rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.philosophy-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: start;
}

.philosophy-left {
    position: sticky;
    top: 8rem;
}

.philosophy-left h2 {
    margin-top: 0;
}

.philosophy-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.philosophy-block {
    padding: 0;
}

.philosophy-lead {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    color: var(--text-dark);
    line-height: 1.6;
    font-weight: 400;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.philosophy-block p:not(.philosophy-lead) {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.85;
    font-weight: 300;
}

.philosophy-stats {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 1rem;
    padding: 2rem 2.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.stat {
    flex: 1;
    text-align: center;
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ---- Contact (Dark) ---- */
.contact {
    padding: 8rem 0;
    background: var(--bg-dark);
    color: #fff;
}

.contact .section-label {
    color: var(--accent-light);
}

.contact h2 {
    color: #fff;
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.contact-left h2 {
    margin-bottom: 1.25rem;
}

.contact-sub {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.8;
    font-weight: 300;
}

.contact-card {
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.contact-item {
    padding: 0.5rem 0;
}

.contact-item-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.5rem;
}

.contact-link {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s var(--ease);
}

.contact-link:hover {
    color: #fff;
}

.contact-detail {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 400;
}

.contact-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
    margin: 1.25rem 0;
}

/* ---- Footer ---- */
.footer {
    padding: 4rem 0 2.5rem;
    background: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 3rem;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
    max-width: 320px;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    margin-bottom: 1rem;
}

.footer-logo-icon {
    color: var(--accent-light);
}

.footer-logo-link .logo-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
}

.footer-logo-link .logo-accent {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8125rem;
}

.footer-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.7;
    font-weight: 300;
}

.footer-nav {
    display: flex;
    gap: 5rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-heading {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
}

.footer-col a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s var(--ease);
    font-weight: 300;
}

.footer-col a:hover {
    color: rgba(255, 255, 255, 0.85);
}

.footer-location {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 300;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
}

.footer-legal {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.2);
    letter-spacing: 0.03em;
}

.footer-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(44, 85, 69, 0.3), transparent);
    margin-left: 2rem;
}

.footer-tagline {
    display: none;
}

/* ---- Responsive ---- */
@media (max-width: 968px) {
    .philosophy-layout,
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .philosophy-left {
        position: static;
    }

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

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(26, 31, 46, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 99;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links.open a {
        color: rgba(255, 255, 255, 0.6) !important;
        font-size: 1.25rem;
    }

    .nav-links.open a:hover {
        color: #fff !important;
    }

    .nav-toggle {
        display: flex;
        z-index: 101;
    }

    .hero-container,
    .section-container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 7rem 0 5rem;
    }

    .hero h1 br,
    h2 br {
        display: none;
    }

    .hero-scroll {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .divider-content {
        padding: 0 1.5rem;
        gap: 1rem;
    }

    .expertise, .philosophy, .contact {
        padding: 5rem 0;
    }

    .expertise-card {
        padding: 2rem;
    }

    .card-line {
        left: 2rem;
    }

    .philosophy-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .footer-container {
        padding: 0 1.5rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-nav {
        gap: 3rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .expertise-grid {
        border: none;
        background: none;
        gap: 0;
    }

    .expertise-card {
        border-bottom: 1px solid var(--border);
    }
}
