/* 
   iFAST Securities US - Design System
   Refined for exact match and scroll snapping
*/

:root {
    /* Colors */
    --teal-primary: #14b8a6;
    --teal-accent: #00d1c1; /* More vibrant version for text accents */
    --teal-hover: #0d9488;
    --teal-light: rgba(20, 184, 166, 0.1);

    --navy-deep: #042f2e;
    --navy-darker: #020617;

    --bg-white: #ffffff;
    --bg-light: #f8fafc;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-white: #ffffff;

    /* Spacing & Sizes */
    --header-height: 80px;
    --container-max: 1200px;
    --transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    /* Scroll Snapping */
    scroll-snap-type: y mandatory;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    height: 100%;
}


/* Layout */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    scroll-snap-align: start;
    position: relative;
    padding: var(--header-height) 0;
}

/* Header & Nav */
header {
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    background: transparent;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(2, 6, 23, 0.95); /* Midnight Navy for high contrast */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo {
    height: 56px;
    width: auto;
    display: block;
}

.footer-logo-img {
    height: 64px;
    width: auto;
    display: block;
    margin-bottom: 1rem;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    margin-left: auto;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--teal-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: var(--teal-primary);
}

.nav-links a:hover::after {
    transform: scaleX(1);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background: white;
    transition: 0.3s;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0; /* Base position */
    transform: translateX(100%); /* Start hidden off-screen */
    width: 100%;
    height: 100vh;
    background: var(--navy-darker);
    z-index: 1002;
    transition: transform var(--transition);
    padding: 10rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.mobile-nav.open {
    transform: translateX(0); /* Slide into view */
}

.mobile-nav .mobile-link {
    color: white;
    font-size: 2rem;
    text-decoration: none;
    font-weight: 700;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.85)),
        url('assets/images/first_background.avif');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    justify-content: center;
    padding-bottom: 5rem;
}

/* Subtle Circuit Placeholder */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(20, 184, 166, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 184, 166, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.2;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.hero-title span {
    color: var(--teal-accent);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.5;
}

.hero-footer {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    letter-spacing: 3px;
    opacity: 0.4;
    text-transform: uppercase;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.btn {
    padding: 1rem 2.8rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--teal-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--teal-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(20, 184, 166, 0.3);
}

.btn-outline {
    border: 1px solid var(--teal-primary);
    color: white;
}

.btn-outline:hover {
    background: var(--teal-primary);
    transform: translateY(-2px);
}

/* Integrity Section (Split) */
.integrity {
    background: var(--bg-white);
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    /* Reduced from 5rem */
    align-items: center;
}

.tagline {
    color: var(--teal-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    /* Smaller tagline */
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    font-size: 3.5rem;
    color: var(--navy-deep);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-title span {
    color: var(--teal-accent);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--teal-accent);
    font-weight: 500;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    color: var(--text-muted);
}

.image-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.image-container::before {
    content: '';
    position: absolute;
    width: 80%;
    /* Narrower like the sketch */
    height: 110%;
    /* Taller like the sketch */
    background: #f1f5f9;
    /* Light grey */
    border-radius: 2.5rem;
    z-index: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.image-card {
    position: relative;
    z-index: 1;
    background: #eef2ff;
    border-radius: 2rem;
    max-height: 480px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Services */
.services {
    background: rgba(20, 184, 166, 0.04);
    /* Very light primary teal */
    flex-direction: column;
    justify-content: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    /* Reduced gap */
    margin-top: 2.5rem;
    width: 100%;
}

.service-card {
    background: white;
    padding: 3rem 2.5rem;
    /* Reduced padding */
    border-radius: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.icon-box {
    width: 60px;
    /* More minimal icon size */
    height: 60px;
    background: var(--teal-light);
    border-radius: 1rem;
    /* Switched to matching rounded square theme */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-primary);
}

/* Contact Card */
.contact-section {
    position: relative;
    background: linear-gradient(rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.75)),
        url('assets/images/contact_us_background.avif');
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    /* Compact padding */
}

.contact-card-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* Ultra-tight gap */
    max-width: 750px;
    margin: 0 auto;
}

.contact-glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    /* Extremely compact padding */
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 1rem;
}

.contact-glass-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateX(8px);
}

.contact-glass-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1rem !important;
    /* margin-bottom: 0.5rem !important; */
    width: 100%;
    justify-content: center;
}

.contact-glass-header .icon-box {
    background: rgba(20, 184, 166, 0.15) !important;
    border: 1px solid rgba(20, 184, 166, 0.4) !important;
    width: 36px !important;
    /* Smaller icon for row fit */
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    filter: drop-shadow(0 0 6px rgba(20, 184, 166, 0.3));
}

.contact-glass-header .icon-box svg {
    width: 18px !important;
    height: 18px !important;
}

.contact-glass-header h3 {
    color: #ffffff !important;
    font-size: 1.15rem !important;
    margin: 0 !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.contact-glass-content {
    width: 100%;
}

.contact-glass-content p,
.contact-glass-content a {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    display: block !important;
    margin: 0 !important;
}

.contact-glass-content h3 {
    color: #ffffff !important;
    font-size: 1.15rem !important;
    margin: 0 !important;
    font-weight: 700 !important;
    white-space: nowrap;
}

.contact-glass-content a:hover {
    color: var(--teal-primary) !important;
}

.icon-box {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    /* Prevents visual distortion in flex containers */
    background: rgba(20, 184, 166, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--teal-primary);
}

.icon-box svg {
    width: 20px;
    height: 20px;
}

.contact-text h3 {
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
    font-weight: 700;
}

.contact-text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.2;
    transition: var(--transition);
}

.contact-text p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.2;
}

.contact-text a:hover {
    color: var(--teal-primary);
    text-decoration: none;
}



/* Responsive Grid Adjustments */
@media (max-width: 768px) {
    .contact-card-container {
        padding: 0 1rem;
    }

    .contact-glass-card {
        padding: 2.5rem 1.5rem;
    }

    .contact-glass-card h3 {
        font-size: 1.25rem;
    }

    .contact-glass-card p,
    .contact-glass-card a {
        font-size: 1rem;
    }
}

/* Footer */
footer {
    background: var(--navy-darker);
    color: white;
    padding: 6rem 0 3rem;
    scroll-snap-align: end;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo-placeholder {
    margin-bottom: 1rem;
}

.footer-description {
    opacity: 0.5;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 320px;
}

.footer-col h4 {
    color: white;
    /* Header shown in white/off-white in ref */
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    opacity: 0.9;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--teal-primary);
}

.inquiry-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.inquiry-item .subheading {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
}

.footer-legal-block {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 0;
    font-size: 0.8rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.35);
}

.footer-legal-block p {
    margin-bottom: 1.5rem;
}

.footer-legal-block a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
}

.legal-highlight {
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    opacity: 0.3;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 991px) {

    .split-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .nav-links {
        display: none;
        /* Hide for mobile */
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        padding: 2rem;
        border-radius: 1.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-item {
        align-items: center;
        /* Ensure icons stay centered even with multi-line text */
        gap: 1.5rem;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Self drawn Logo */
/* Container for the logo group (Icon + Text Column) */
/* Container styling */
.logo-wrap {
    display: inline-flex;
    align-items: center;
    /* This centers the icon with the text block */
    text-decoration: none;
    gap: 10px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 0.9;
    /* Tightens the vertical gap between words */
}

.brand-main {
    color: #ffffff;
    /* We use 'Arial Black' or 'Inter Black' for maximum thickness */
    font-family: "Arial Black", Gadget, sans-serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: -1.5px;
    /* CRITICAL: This pulls the letters together */
    text-transform: none;
    margin: 0;
    padding: 0;
}

.brand-sub {
    color: #89D1CA;
    /* The exact soft teal from the design */
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: -0.2px;
    margin-top: 2px;
    /* Precision gap */
}
