/* 
 * Design System for Faris Capital (Redesign)
 * Elevated Institutional, Jazzy, Refined
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Color Palette - Refined & "Oomph" */
    --bg-color: #FFFFFF;
    --text-primary: #0B1220;
    /* Deep navy-charcoal */
    --text-secondary: #475569;
    /* Slate */

    --accent-color: #0F2A5F;
    /* Deep Navy Base */
    --accent-gold: #C5A059;
    /* Muted Gold/Bronze for "Oomph" */
    --accent-gold-hover: #D4AF37;

    --border-color: #E2E8F0;

    /* Gradients for depth */
    --section-bg-gradient: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    --card-hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --white: #FFFFFF;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    /* Editorial / High-End */
    --font-body: 'Inter', sans-serif;
    /* Clean / Modern */

    /* Scale */
    --h1-size: clamp(3rem, 6vw, 4.5rem);
    --h2-size: clamp(1.75rem, 3.5vw, 2.5rem);
    /* Reduced max size from 3rem */
    --h3-size: 1.5rem;
    --body-size: clamp(0.95rem, 1rem + 0.5vw, 1.125rem);
    --small-size: 0.875rem;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1.5rem;
    --spacing-md: 3rem;
    --spacing-lg: 6rem;
    --spacing-xl: 10rem;
    --container-width: 1320px;
    --header-height: 100px;

    /* Transitions */
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}
h1 {
    font-size: var(--h1-size);
    font-weight: 700;
    color: var(--accent-color);
}

h2 {
    font-size: var(--h2-size);
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

/* Subtle underline for H2s to add refinement */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
    margin-top: 1rem;
}

h3 {
    font-size: var(--h3-size);
    font-family: var(--font-heading);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: var(--body-size);
    max-width: 70ch;
    font-weight: 300;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-gold);
}

ul {
    list-style: none;
}

/* Use this class when you want real bullets (override the global reset) */
.bullet-list {
    list-style-type: disc;
    list-style-position: outside;
    /* restore left padding so bullets are visible */
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

/* Optional: style the marker (supported in modern browsers) */
.bullet-list li::marker {
    color: var(--text-primary);
    font-size: 1rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    /* Reduced vertical padding for tighter layout across pages */
    padding: var(--spacing-md) 0;
    position: relative;
    overflow: hidden;
}

/* Jazzy Backgrounds */
.section-bg {
    background: var(--section-bg-gradient);
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

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

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

@media (min-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }
}

/* Animations - "Oomph" Factor */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

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

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 0;
    /* Sharp, editorial */
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-body);
    font-size: 0.875rem;
    min-height: 44px; /* ensure comfortable touch target */
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    border: 1px solid var(--accent-color);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: var(--accent-gold);
    transition: width 0.4s ease;
    z-index: -1;
}

.btn-primary:hover {
    border-color: var(--accent-gold);
    color: var(--white);
    /* Ensure text stays white */
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Softer border */
    border-top: 4px solid var(--accent-gold);
    /* Gold top bar */
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
}

/* Ensure header content lines up exactly with page containers on desktop
   (enforce the same max-width, centering and horizontal padding). */
.site-header .header-container.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* Responsive logo sizing & offset tweaks
   Use breakpoint-specific left offsets so the visible logo lines up with
   section content across a wide range of desktop widths. These values
   compensate for whitespace inside the PNG and different container widths. */

/* Narrow desktop / large tablet — small left nudge */
@media (min-width: 900px) and (max-width: 1099px) {
    .logo img {
        height: 72px;
        display: block;
        /* use trimmed image; no CSS offset needed */
        margin-left: 0;
    }
}

/* Standard desktop — moderate left nudge */
@media (min-width: 1100px) and (max-width: 1399px) {
    .logo img {
        height: 64px;
        display: block;
        /* use trimmed image; no CSS offset needed */
        margin-left: 0;
    }
}

/* Wide / ultra-wide desktop — stronger left nudge as container grows */
@media (min-width: 1400px) {
    .logo img {
        height: 64px;
        display: block;
        /* use trimmed image; no CSS offset needed */
        margin-left: 0;
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 50px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: -0.02em;
}

.nav-desktop {
    display: none;
}

@media (min-width: 1100px) {
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 2.5rem;
    }
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

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

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color);
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--accent-color);
}

@media (min-width: 1100px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--white);
    /* Reduced padding and gap for tighter mobile menu spacing */
    padding: 1.25rem;
    transform: translateY(-150%);
    transition: transform var(--transition-smooth);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
}

.mobile-nav .nav-link {
    font-size: 1.125rem;
    line-height: 1.2;
    font-family: var(--font-body);
    text-transform: none;
    /* make each link a clear touch target and reduce perceived vertical spacing */
    padding: 0.5rem 0;
    display: block;
    width: 100%;
    text-align: center;
    /* subtle divider between items (low-contrast) */
    border-top: 1px solid rgba(11,18,32,0.04);
    transition: background-color 0.18s ease, color 0.18s ease;
}

.mobile-nav .nav-link:first-child {
    border-top: none;
}

/* Touch / hover feedback for mobile nav items */
.mobile-nav .nav-link:hover,
.mobile-nav .nav-link:focus,
.mobile-nav .nav-link:active {
    background-color: rgba(15,42,95,0.04);
    color: var(--text-primary);
}
/* Stronger visible focus for keyboard users on mobile/desktop */
.mobile-nav .nav-link:focus-visible {
    outline: 2px solid rgba(15,42,95,0.12);
    outline-offset: 2px;
}

.mobile-nav.open {
    transform: translateY(0);
}

/* Footer */
.site-footer {
    background-color: var(--accent-color);
    /* Navy footer */
    color: var(--white);
    /* Reduced vertical padding to remove excess headroom */
    padding: 2.5rem 0 1.5rem;
    font-size: 0.9375rem;
    margin-top: auto;
}

.site-footer .footer-line {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer .footer-line-1 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1.75rem;
    text-transform: none;
}

/* Footer contact links (email / phone) */
.site-footer .footer-contact {
    display: inline-block;
    font-weight: 700;
    font-size: 1.125rem; /* ~18px, slightly larger for readability */
    color: var(--white);
}

.site-footer .footer-contact:hover {
    color: var(--accent-gold);
}

.site-footer a {
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.site-footer a:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Cards with "Oomph" */
.radius-card {
    background: var(--white);
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Lift + Glow + Border Highlight */
.radius-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--accent-gold);
}

.radius-card h3 {
    color: var(--accent-color);
    font-family: var(--font-heading);
}

.content-block {
    /* Apply base card styles if not using .card class explicitly, 
       or assume content blocks are just text. 
       Let's upgrade them to have hover effects if they feel like cards.
    */
    transition: transform 0.3s ease;
}

.content-block:hover {
    transform: translateY(-3px);
    /* Subtle lift for text blocks too */
}

/* Hero Section Specifics */
.hero {
    /* Tighter hero spacing while still allowing breathing room */
    padding: 120px 0 60px;
    max-width: 1400px;
}

/* Mobile / small-screen optimizations */
@media (max-width: 767px) {
    /* Ensure header height variable matches the smaller header size on mobile so mobile-nav positions correctly */
    :root {
        --header-height: 72px;
    }
    /* Reduce horizontal padding so content fits better on small screens
       but keep a slightly larger left/right inset so content doesn't feel cut off on phones.
       Use safe-area insets for devices with notches (iOS). */
        .container { 
                /* Reduce mobile container gutter to a comfortable size */
                padding-left: calc(1.5rem + env(safe-area-inset-left));
                padding-right: calc(1.5rem + env(safe-area-inset-right));
            }

    /* Slightly shorter header on mobile to reduce occupied vertical space */
    .site-header {
        height: 72px;
    }

    /* Tighter hero spacing on small screens, with left/right safe-area gutter
       applied directly to the hero so headings align with the page container. */
    .hero {
        /* Slightly reduce hero gutter to match updated container on phones */
        padding: 80px calc(1.75rem + env(safe-area-inset-left)) 40px calc(1.75rem + env(safe-area-inset-right));
    }

    /* Force hero heading to behave as block so its left alignment matches the container padding */
    .hero h2 {
        display: block;
    }

    /* Buttons: reduce padding and font-size for better fit */
    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
    }

    /* Mobile menu button: ensure comfortable tap target */
    .mobile-menu-btn {
        padding: 0.75rem;
        min-width: 44px;
        min-height: 44px;
    }

    /* Footer: compact and touch-friendly contact links */
    .site-footer {
        padding: 1.5rem 0;
    }

    .site-footer .footer-contact {
        font-size: 1rem; /* reduce slightly on very small screens */
    }

    .footer-line {
        margin-bottom: 0.25rem;
    }

    /* Reduce grid gaps so stacked content isn't too spaced out */
    .grid {
        gap: 1.5rem;
    }
    
    /* Remove paragraph max-width on small screens so text flows naturally */
    p {
        max-width: none;
    }

    /* Hide large decorative motif on small screens to avoid overlap */
    .global-motif {
        display: none;
    }

    /* Slightly reduce logo image height on small screens */
    .logo img {
        height: 56px;
    }
}

/* Tablet / small-desktop adjustments (addresses iPad layout) */
@media (max-width: 1024px) {
    /* Ensure header items align left with the container gutter; push the mobile menu button to the right */
    .header-container {
        justify-content: flex-start;
    }

    .mobile-menu-btn {
        margin-left: auto;
    }

    /* Slightly larger hero gutter on tablets so headings don't hug the left edge */
    .hero {
        padding-left: calc(2rem + env(safe-area-inset-left));
        padding-right: calc(2rem + env(safe-area-inset-right));
    }
    /* Apply matching container gutter on tablets so sections align with hero */
    .container {
        padding-left: calc(2rem + env(safe-area-inset-left));
        padding-right: calc(2rem + env(safe-area-inset-right));
    }
}

.hero h1 {
    margin-bottom: 1rem;
    line-height: 1;
}

.hero-subhead {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
    font-weight: 300;
    max-width: 800px;
}

/* Global Motif - More dynamic */
.global-motif {
    position: absolute;
    top: 50%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.08) 0%, rgba(15, 42, 95, 0) 70%);
    /* Gold/Navy subtle glow */
    z-index: -1;
    pointer-events: none;
    transform: translateY(-50%);
    animation: pulse 8s infinite alternate ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: translateY(-50%) scale(0.95);
    }

    100% {
        opacity: 0.8;
        transform: translateY(-50%) scale(1.05);
    }
}

/* Forms */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: #FAFAFA;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

/* Logo Grid Styles */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .logo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.logo-item {
    width: 100%;
    max-width: 160px;
    height: 80px;
    background-color: #F8FAFC;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    opacity: 0.7;
    transition: all 0.3s ease;
    padding: 1rem;
    text-align: center;
}

.logo-item:hover {
    opacity: 1;
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    background-color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.footer-logo {
    height: 10px;
    /* Slightly smaller for the footer */
    width: auto;
    opacity: 0.5;
    /* Optional: fades it slightly to look more "footer-like" */
    display: inline-block;
    vertical-align: middle;
}

.logo img {
    height: 80px;
    /* Adjust this height to fit your navbar */
    width: auto;
    /* Keeps the aspect ratio from distorting */
    display: block;
    /* Removes weird bottom spacing issues */
}

/* Debug outlines removed — logo should now be trimmed and align with container. */