/* =========================================
   VARIABLES & THEME SETTINGS
   ========================================= */
:root {
    /* Color Palette - Lighter, approachable, premium */
    --clr-primary: #1A365D;
    /* Deep Navy for trust/headings */
    --clr-secondary: #4A5568;
    /* Slate gray for text */
    --clr-accent: #8DA399;
    /* Soft Sage Green for vibrant but calm accents */
    --clr-accent-hover: #7b9187;

    --clr-bg-main: #FAFBFC;
    /* Off-white for minimal strain */
    --clr-bg-alt: #F3F4ED;
    /* Warm Beige background alt */
    --clr-bg-slate: #1E293B;
    /* Dark slate for footer/banners */

    --clr-text-main: #334155;
    --clr-text-light: #64748B;
    --clr-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Effects */
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);

    /* Transitions */
    --trans-fast: 0.2s ease;
    --trans-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    color: var(--clr-text-main);
    background-color: var(--clr-bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--clr-primary);
    line-height: 1.2;
    font-weight: 600;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: var(--clr-secondary);
}

.lead {
    font-size: 1.25rem;
    color: var(--clr-main);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: var(--clr-primary);
    transition: var(--trans-fast);
}

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

/* Utilities */
.container {
    width: 90%;
    max-width: 1280px;
    margin: 0 auto;
}

.section-padding {
    padding: 6rem 0;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

.w-full {
    width: 100%;
}

.bg-light {
    background-color: var(--clr-bg-alt);
}

.bg-slate {
    background-color: var(--clr-bg-slate);
    color: var(--clr-white);
}

.text-white {
    color: var(--clr-white);
}

.text-color-light {
    color: #CBD5E1;
}

.max-w-2xl {
    max-width: 42rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.hide-overflow {
    overflow: hidden;
}

/* =========================================
   BUTTONS & FORMS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: var(--trans-smooth);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--clr-accent);
    color: var(--clr-white);
}

.btn-primary:hover {
    background-color: var(--clr-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(141, 163, 153, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--clr-accent);
    color: var(--clr-primary);
}

.btn-outline:hover {
    background-color: var(--clr-accent);
    color: var(--clr-white);
}

.btn-text {
    color: var(--clr-primary);
    font-weight: 600;
    font-family: var(--font-heading);
    padding: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.btn-text:hover {
    color: var(--clr-accent);
    margin-left: 5px;
    /* Subtle arrow move effect */
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--clr-white);
    transition: var(--trans-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--clr-accent);
    box-shadow: 0 0 0 3px rgba(141, 163, 153, 0.2);
}

/* =========================================
   GLASSMORPHISM & CARDS
   ========================================= */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    padding: 2.5rem;
    transition: var(--trans-smooth);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.25rem 0;
    z-index: 1000;
    transition: var(--trans-smooth);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-img {
    height: 60px;
    /* Scaled up */
    width: auto;
    border-radius: 50%;
    /* The original logo is a circle gold coin */
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.logo-pileus-text {
    font-weight: 700;
    color: var(--clr-primary);
    font-size: 1.65rem;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.logo-wm-text {
    font-weight: 500;
    color: var(--clr-text-light);
    /* Lighter color */
    font-size: 0.85rem;
    line-height: 1.1;
    font-family: var(--font-body);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--clr-primary);
    white-space: nowrap;
}

.nav-links a:hover:not(.btn) {
    color: var(--clr-accent);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--clr-primary);
    transition: 0.3s;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    /* Account for navbar */
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    /* Soften the abstract background */
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    background: rgba(141, 163, 153, 0.15);
    color: var(--clr-accent);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 2.5rem;
}

.hero-image-wrapper {
    position: relative;
}

.main-hero-img {
    padding: 0.5rem;
    border-radius: 24px;
    background: var(--clr-white);
}

.main-hero-img img {
    border-radius: 20px;
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.stat-card {
    position: absolute;
    bottom: -30px;
    left: -30px;
    padding: 1.5rem;
    min-width: 160px;
    text-align: center;
    display: flex;
    flex-direction: column;
    animation: float 6s ease-in-out infinite;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--clr-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--clr-primary);
    margin-top: 0.25rem;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* =========================================
   SERVICES
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(141, 163, 153, 0.1);
    color: var(--clr-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 0.75rem;
}

.service-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-link {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    color: var(--clr-accent);
}

.service-link::after {
    content: '→';
    margin-left: 0.5rem;
    transition: var(--trans-fast);
}

.service-card:hover .service-link::after {
    transform: translateX(5px);
}

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.features-list {
    margin: 2rem 0;
    display: grid;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    color: var(--clr-primary);
}

.check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: var(--clr-accent);
    color: white;
    border-radius: 50%;
    font-size: 12px;
}

.image-stack {
    position: relative;
    height: 500px;
}

.img-box {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 20px;
    overflow: hidden;
}

.box-1 {
    top: 0;
    right: 0;
    z-index: 2;
}

.box-2 {
    bottom: 0;
    left: 0;
    z-index: 1;
}

.color-block {
    width: 100%;
    height: 100%;
}

.color-block.beige {
    background-color: #E2D9C8;
}

.color-block.sage {
    background-color: var(--clr-accent);
    opacity: 0.5;
}

.experience-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--clr-white);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    z-index: 3;
}

.experience-badge h4 {
    color: var(--clr-accent);
    margin: 0;
    font-size: 1.5rem;
}

.experience-badge p {
    margin: 0;
    font-weight: 600;
    color: var(--clr-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

/* =========================================
   PARTNERS BANNER
   ========================================= */
.banner {
    padding: 4rem 0;
}

.partner-logos {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.logo-box {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0.8;
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
}

.custody-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    text-align: left;
}

.custody-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    transition: var(--trans-smooth);
    display: flex;
    flex-direction: column;
}

.custody-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.custody-card h3 {
    color: var(--clr-white);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    letter-spacing: 1px;
}

.custody-card p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.custody-card p:last-of-type {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.custody-card .btn {
    align-self: flex-start;
}


/* =========================================
   CONTACT
   ========================================= */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
}

.contact-block {
    margin-bottom: 2rem;
}

.contact-block h4 {
    margin-bottom: 0.5rem;
    color: var(--clr-accent);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background-color: var(--clr-white);
    color: var(--clr-primary);
    padding: 5rem 0 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    /* Subtle separation */
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    /* Lighter border */
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

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

.footer-brand h3 {
    color: var(--clr-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-brand p {
    color: var(--clr-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    /* Align to the right to balance the brand */
}

.footer-links h4 {
    color: var(--clr-primary);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--clr-secondary);
    font-weight: 500;
    transition: var(--trans-fast);
}

.footer-links a:hover {
    color: var(--clr-accent);
}

.footer-bottom {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: #94A3B8;
    /* Slate-400 for highly legible muted text */
    line-height: 1.8;
}

.footer-bottom p.text-center {
    font-weight: 500;
    color: var(--clr-secondary);
    margin-top: 2rem;
}

/* =========================================
   MODALS
   ========================================= */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 2000;
    /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5);
    /* Black w/ opacity */
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity var(--trans-fast);
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--clr-bg-main);
    margin: 5% auto;
    /* 5% from the top and centered */
    padding: 20px;
    border: 1px solid var(--glass-border);
    width: 90%;
    /* Could be more or less, depending on screen size */
    max-width: 1000px;
    height: 80vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(-20px);
    transition: transform var(--trans-fast);
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    color: var(--clr-text-light);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--trans-fast);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--clr-primary);
    text-decoration: none;
    cursor: pointer;
}

.pdf-container {
    width: 100%;
    height: calc(100% - 30px);
    margin-top: 10px;
}

/* =========================================
   TOAST NOTIFICATION
   ========================================= */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 3000;
    bottom: 30px;
    right: 30px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    visibility: visible;
    transform: translateY(0);
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-message {
    color: var(--clr-secondary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
}

/* =========================================
   ANIMATIONS & RESPONSIVE
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-1 {
    transition-delay: 0.1s;
}

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

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

.delay-4 {
    transition-delay: 0.4s;
}

.slide-up {
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1.2s ease forwards;
    animation-delay: 0.4s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 992px) {

    .hero-container,
    .about-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero {
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .stat-card {
        bottom: auto;
        top: -20px;
        right: -20px;
        left: auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Add mobile menu logic in JS if desired, keeping simple for now */
    }

    .mobile-menu-toggle {
        display: flex;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .section-padding {
        padding: 4rem 0;
    }

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

    .footer-links ul {
        flex-direction: column;
    }
}

/* Hide Google Translate toolbar and tooltips */
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

body {
    top: 0px !important;
}

.goog-tooltip {
    display: none !important;
}

.goog-tooltip:hover {
    display: none !important;
}

.goog-text-highlight {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.lang-toggle {
    font-weight: 600;
    color: var(--clr-primary);
    padding: 0.5rem 1rem;
    transition: var(--trans-fast);
}

.lang-toggle:hover {
    color: var(--clr-accent);
}