/* ==========================================================================
   Apex Valley Global Bank — Public website styles
   Companion to Tailwind. Utilities come from Tailwind; complex components
   and animations live here.
   ========================================================================== */

:root {
    --apex-navy: #071B3A;
    --apex-blue: #0B2A5B;
    --apex-gold: #C9A227;
    --apex-gold-light: #E5C45A;
    --apex-ink: #172033;
    --apex-muted: #5A6A85;
    --apex-bg: #F7F9FC;
    --apex-line: #E6EBF3;
    --apex-white: #FFFFFF;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--apex-ink);
    background-color: var(--apex-white);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

.font-display {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

::selection {
    background-color: var(--apex-gold);
    color: var(--apex-navy);
}

/* Nice thin scrollbar for the whole site */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--apex-bg); }
::-webkit-scrollbar-thumb { background: #B9C4D6; border-radius: 8px; border: 2px solid var(--apex-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--apex-blue); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-apex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.75rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.925rem;
    line-height: 1;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-apex:focus-visible,
.apex-nav-toggle:focus-visible,
a:focus-visible {
    outline: 2px solid var(--apex-gold);
    outline-offset: 2px;
}
.btn-apex i { font-size: 1rem; transition: transform 0.3s ease; }
.btn-apex:hover i.bi-arrow-right, .btn-apex:hover i.bi-arrow-up-right { transform: translateX(3px); }

.btn-apex-gold {
    background: linear-gradient(135deg, var(--apex-gold-light) 0%, var(--apex-gold) 100%);
    color: var(--apex-navy);
    box-shadow: 0 10px 24px -10px rgba(201, 162, 39, 0.6);
}
.btn-apex-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -12px rgba(201, 162, 39, 0.65);
    background: linear-gradient(135deg, #EED06F 0%, #D6AF37 100%);
}

.btn-apex-navy {
    background: var(--apex-navy);
    color: var(--apex-white);
    box-shadow: 0 10px 24px -12px rgba(7, 27, 58, 0.6);
}
.btn-apex-navy:hover { transform: translateY(-2px); background: var(--apex-blue); }

.btn-apex-outline {
    background: transparent;
    border-color: rgba(7, 27, 58, 0.28);
    color: var(--apex-navy);
}
.btn-apex-outline:hover { transform: translateY(-2px); border-color: var(--apex-navy); background: rgba(7, 27, 58, 0.04); }

.btn-apex-white {
    background: var(--apex-white);
    color: var(--apex-navy);
    box-shadow: 0 10px 24px -12px rgba(7, 27, 58, 0.5);
}
.btn-apex-white:hover { transform: translateY(-2px); background: var(--apex-gold-light); }

.btn-apex-white-outline {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.45);
    color: var(--apex-white);
    backdrop-filter: blur(4px);
}
.btn-apex-white-outline:hover { transform: translateY(-2px); background: var(--apex-white); color: var(--apex-navy); }

/* --------------------------------------------------------------------------
   Section helpers
   -------------------------------------------------------------------------- */
.apex-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--apex-gold);
}
.apex-eyebrow::before {
    content: '';
    width: 34px;
    height: 2px;
    background: linear-gradient(90deg, var(--apex-gold), var(--apex-gold-light));
    border-radius: 2px;
}
.apex-eyebrow.is-center { justify-content: center; }
.apex-eyebrow.is-center::after {
    content: '';
    width: 34px;
    height: 2px;
    background: linear-gradient(90deg, var(--apex-gold-light), var(--apex-gold));
    border-radius: 2px;
}

.apex-h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1.12;
    color: var(--apex-navy);
    letter-spacing: -0.01em;
}

.apex-section {
    position: relative;
    padding-top: 6rem;
    padding-bottom: 6rem;
}
@media (min-width: 1024px) {
    .apex-section { padding-top: 7.5rem; padding-bottom: 7.5rem; }
}

/* Gold underline accent for headings */
.apex-heading-accent { position: relative; display: inline-block; }
.apex-heading-accent::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.35em;
    width: 64px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--apex-gold), var(--apex-gold-light));
}
.apex-heading-accent.is-center::after { left: 50%; transform: translateX(-50%); }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.apex-card {
    position: relative;
    background: var(--apex-white);
    border: 1px solid var(--apex-line);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
}
.apex-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px -20px rgba(7, 27, 58, 0.18);
    border-color: rgba(201, 162, 39, 0.45);
}

.apex-icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.9rem;
    background: rgba(201, 162, 39, 0.12);
    color: var(--apex-gold);
    font-size: 1.5rem;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.apex-card:hover .apex-icon-tile {
    background: linear-gradient(135deg, var(--apex-gold-light), var(--apex-gold));
    color: var(--apex-navy);
    transform: rotate(-6deg) scale(1.04);
}

.apex-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--apex-navy);
    text-decoration: none;
    transition: color 0.25s ease, gap 0.25s ease;
}
.apex-card-link:hover { color: var(--apex-gold); gap: 0.7rem; }

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.apex-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.88);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(230, 235, 243, 0.9);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}
.apex-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px -18px rgba(7, 27, 58, 0.28);
}

.apex-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--apex-ink);
    text-decoration: none;
    transition: color 0.25s ease;
}
.apex-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--apex-gold), var(--apex-gold-light));
    transition: width 0.3s ease;
}
.apex-nav-link:hover, .apex-nav-link.is-active { color: var(--apex-navy); }
.apex-nav-link:hover::after, .apex-nav-link.is-active::after { width: 100%; }

/* Mobile drawer */
.apex-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: linear-gradient(160deg, var(--apex-navy) 0%, var(--apex-blue) 100%);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    visibility: hidden;
}
.apex-mobile-menu.is-open {
    transform: translateX(0);
    visibility: visible;
}
.apex-mobile-menu a.apex-mobile-link {
    display: block;
    padding: 0.9rem 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: color 0.25s ease, padding-left 0.25s ease;
}
.apex-mobile-menu a.apex-mobile-link:hover { color: var(--apex-gold-light); padding-left: 0.5rem; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.apex-hero {
    position: relative;
    background:
        linear-gradient(180deg, rgba(3, 9, 20, 0.5) 0%, rgba(3, 9, 20, 0.68) 55%, rgba(2, 6, 15, 0.92) 100%),
        url('../brand/img/board-meeting.jpg') no-repeat center center;
    background-size: cover;
    color: var(--apex-white);
    overflow: hidden;
}
.apex-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 30% 40%, black 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 30% 40%, black 0%, transparent 70%);
    pointer-events: none;
}
.apex-hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    pointer-events: none;
}
.apex-hero-orb {
    position: absolute;
    border: 1px solid rgba(229, 196, 90, 0.22);
    border-radius: 50%;
    pointer-events: none;
    animation: apex-float 7s ease-in-out infinite;
}

.apex-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(229, 196, 90, 0.4);
    background: rgba(229, 196, 90, 0.1);
    color: var(--apex-gold-light);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.apex-hero-h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--apex-white);
}
.apex-hero-h1 .gold-text {
    color: transparent;
    background: linear-gradient(100deg, var(--apex-gold-light) 0%, var(--apex-gold) 55%, #F0D98B 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Hero card / banking card visual */
.apex-bankcard {
    position: relative;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 8 / 5;
    border-radius: 1.4rem;
    background: linear-gradient(135deg, #0E2F63 0%, #0A2350 45%, #060F26 100%);
    border: 1px solid rgba(229, 196, 90, 0.35);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
    overflow: hidden;
}
.apex-bankcard::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.28) 0%, transparent 65%);
}
.apex-bankcard::after {
    content: '';
    position: absolute;
    bottom: -45%;
    left: -15%;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(11, 42, 91, 0.9) 0%, transparent 70%);
}
.apex-chip {
    width: 2.6rem;
    height: 2rem;
    border-radius: 0.35rem;
    background: linear-gradient(135deg, #F0D98B, #C9A227 60%, #8F7018);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}
.apex-chip::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0.35rem;
    background-image: repeating-linear-gradient(90deg, transparent 0 4px, rgba(7, 27, 58, 0.35) 4px 5px);
}

/* Stats */
.apex-stat-number {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1;
}

/* Floating animation for hero imagery */
@keyframes apex-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-16px) rotate(3deg); }
}
.apex-float { animation: apex-float 7s ease-in-out infinite; }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .apex-float, .apex-hero-orb, .apex-hero-glow { animation: none; }
    * { animation-duration: 0.001s !important; }
}

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */
.apex-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    background: radial-gradient(circle at 50% 35%, #0C2E63 0%, #071B3A 60%, #040E1F 100%);
    transition: opacity 0.7s ease, visibility 0.7s ease;
}
.apex-preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.apex-preloader-ring {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.apex-preloader-ring svg { position: relative; z-index: 2; animation: apex-pulse 1.6s ease-in-out infinite; }
.apex-preloader-ring::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(229, 196, 90, 0.15);
}
.apex-preloader-ring::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--apex-gold);
    border-right-color: var(--apex-gold-light);
    animation: apex-spin 1.1s linear infinite;
}
.apex-preloader-glow {
    position: absolute;
    inset: -26px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.25) 0%, transparent 65%);
    filter: blur(18px);
    animation: apex-pulse 2.2s ease-in-out infinite;
}
.apex-preloader-text {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    animation: apex-blink 1.6s ease-in-out infinite;
}
.apex-preloader-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: #fff;
    font-size: 1.35rem;
    letter-spacing: 0.06em;
}

@keyframes apex-spin { to { transform: rotate(360deg); } }
@keyframes apex-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: 0.85; } }
@keyframes apex-blink { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* --------------------------------------------------------------------------
   Marquee / ticker
   -------------------------------------------------------------------------- */
.apex-ticker {
    overflow: hidden;
    white-space: nowrap;
}
.apex-ticker-track {
    display: inline-flex;
    gap: 3.5rem;
    padding-right: 3.5rem;
    animation: apex-marquee 30s linear infinite;
}
.apex-ticker:hover .apex-ticker-track { animation-play-state: paused; }
@keyframes apex-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Timeline / steps
   -------------------------------------------------------------------------- */
.apex-step {
    position: relative;
    padding-left: 3.25rem;
}
.apex-step::before {
    content: '';
    position: absolute;
    left: 1.4rem;
    top: 3.4rem;
    bottom: -1.5rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.4), rgba(201, 162, 39, 0.06));
}
.apex-step:last-child::before { display: none; }
.apex-step-num {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--apex-navy);
    background: linear-gradient(135deg, var(--apex-gold-light), var(--apex-gold));
    box-shadow: 0 8px 18px -8px rgba(201, 162, 39, 0.6);
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */
.text-balance { text-wrap: balance; }

.apex-prose ul { list-style: none; padding: 0; margin: 0; }
.apex-prose ul li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.7rem;
    color: var(--apex-muted);
    line-height: 1.7;
}
.apex-prose ul li::before {
    content: '\F26B';
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    top: 0.15rem;
    color: var(--apex-gold);
}

.apex-footer-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(214, 224, 240, 0.82);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.25s ease, padding-left 0.25s ease;
}
.apex-footer-link::before {
    content: '\F285';
    font-family: 'bootstrap-icons';
    font-size: 0.7rem;
    color: var(--apex-gold);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.apex-footer-link:hover { color: var(--apex-gold-light); padding-left: 0.4rem; }
.apex-footer-link:hover::before { opacity: 1; }

.apex-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.3s ease;
}
.apex-social:hover {
    background: linear-gradient(135deg, var(--apex-gold-light), var(--apex-gold));
    color: var(--apex-navy);
    border-color: transparent;
    transform: translateY(-3px);
}

.apex-divider-gold {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--apex-gold), transparent);
    border: 0;
}

/* Inner page hero */
.apex-page-hero {
    position: relative;
    padding: 7.5rem 0 4.5rem;
    background:
        radial-gradient(700px 380px at 90% 0%, rgba(11, 42, 91, 0.35) 0%, rgba(11, 42, 91, 0) 60%),
        linear-gradient(160deg, #0B2A5B 0%, #071B3A 100%);
    color: #fff;
    overflow: hidden;
}
.apex-page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.apex-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}
.apex-breadcrumb a { color: var(--apex-gold-light); text-decoration: none; transition: color 0.25s; }
.apex-breadcrumb a:hover { color: #fff; }
.apex-breadcrumb span.sep { color: rgba(255, 255, 255, 0.35); }

/* Form controls */
.apex-input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border-radius: 0.65rem;
    border: 1px solid var(--apex-line);
    background: #fff;
    font-size: 0.925rem;
    color: var(--apex-ink);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.apex-input::placeholder { color: #9AA7BD; }
.apex-input:focus {
    outline: none;
    border-color: var(--apex-gold);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.14);
}

/* Accordion */
.apex-accordion-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid var(--apex-line);
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--apex-navy);
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.apex-accordion-btn:hover { border-color: rgba(201, 162, 39, 0.5); }
.apex-accordion-btn i { color: var(--apex-gold); transition: transform 0.3s ease; }
.apex-accordion-btn[aria-expanded="true"] i { transform: rotate(45deg); }
.apex-accordion-panel { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; }
