/* === akalinCPA - styles.css (migrated from original, paths unchanged) ===
   Source: cpa-service-delivery-platform/site/styles.css
   No structural changes — only deployed here for relative path resolution.
*/

:root {
    --brand-primary: #1E3A8A;
    /* Deep Navy */
    --brand-primary-dark: #1E40AF;
    --brand-dark: #0B1120;
    --brand-dark-soft: #1E293B;
    --color-primary: #0F172A;
    --color-secondary: #94A3B8;
    --color-accent: #D97706;
    /* Rich Gold/Amber */
    --color-bg: #F8FAFC;
    --color-bg-light: #F1F5F9;
    --color-card-bg: #FFFFFF;
    --color-text-main: #0F172A;
    --color-text-muted: #475569;
    --color-border: #E2E8F0;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-glass: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", "Outfit", sans-serif;
    color: var(--color-text-main);
    background: var(--color-bg);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: min(1140px, calc(100% - 2rem));
    margin: 0 auto;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--color-bg-light);
}

.section-title {
    margin: 0 0 0.75rem;
    text-align: center;
    font-size: clamp(1.6rem, 2vw + 1rem, 2.2rem);
    line-height: 1.2;
}

.section-subtitle {
    margin: 0 auto 2rem;
    text-align: center;
    color: var(--color-text-muted);
    max-width: 760px;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--color-border);
}

.navbar.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.logo-img {
    height: 48px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-toggle {
    display: none;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 8px;
    padding: 0.35rem 0.55rem;
    font-size: 1.15rem;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.8rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text-main);
}

.nav-link:hover,
.nav-link.active {
    background: #e2e8f0;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    min-width: 230px;
    margin: 0;
    padding: 0.45rem;
    list-style: none;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    display: none;
}

/* Invisible bridge to prevent hover loss between nav item and dropdown */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 12px;
    background: transparent;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.hero {
    background: linear-gradient(135deg, #F8FAFC 0%, #E0E7FF 100%);
    padding: 12rem 0 6rem;
    /* Increased top padding so text starts lower */
    overflow: hidden;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    max-width: 1200px;
    text-align: left;
    margin: 0 auto;
}

@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }
}

.hero-text {
    flex: 1;
}

.hero-visual {
    flex: 1;
    position: relative;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-glass);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-visual:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.hero-subtitle {
    margin: 0 0 1rem;
    color: var(--brand-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.hero h1 {
    margin: 0 0 1.25rem;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    color: var(--brand-dark);
}

.hero-desc {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 1.15rem;
    max-width: 600px;
}

@media (max-width: 992px) {
    .hero-desc {
        margin: 0 auto;
    }
}

.hero-cta {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 992px) {
    .hero-cta {
        justify-content: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    /* Pill shape */
    border: 1px solid transparent;
    padding: 0.85rem 1.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.2);
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-primary-dark);
}

.btn-outline {
    background: transparent;
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: #fff;
}

.btn-nav {
    padding-inline: 0.9rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.card,
.feature-card,
.step-item,
.form-container,
.error-content,
.letter-container {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card,
.feature-card {
    padding: 1.25rem;
}

.card h3,
.feature-card h3 {
    margin-top: 0;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    margin-bottom: 0.8rem;
    overflow: hidden;
}

.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-highlight {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
}

.trusted-by-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem 2rem;
}

.steps-container {
    display: grid;
    gap: 1rem;
}

.step-item {
    padding: 1rem 1.2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
    display: grid;
    place-items: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.feature-title {
    margin: 0 0 0.45rem;
}

.feature-text {
    margin: 0;
    color: var(--color-text-muted);
}

.feature-list {
    margin: 0.6rem 0 0;
    padding-left: 1rem;
    color: var(--color-text-muted);
}

.form-container {
    padding: 1.35rem;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.72rem 0.85rem;
    font: inherit;
    background: #fff;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.13);
}

.form-note {
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.consent-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.92rem;
}

.footer {
    background: var(--brand-dark);
    color: #e2e8f0;
    margin-top: 2rem;
}

.footer-content {
    padding: 2.2rem 0 1.4rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1.2rem;
}

.footer-links h4 {
    margin: 0 0 0.75rem;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li+li {
    margin-top: 0.45rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.35);
    text-align: center;
    padding: 0.9rem 0 1.2rem;
    font-size: 0.9rem;
}

.error-page {
    min-height: 72vh;
    display: grid;
    place-items: center;
}

.error-content {
    max-width: 720px;
    padding: 2rem;
    text-align: center;
}

.error-code {
    margin: 0;
    font-size: clamp(3rem, 8vw, 6rem);
    line-height: 1;
    color: var(--brand-primary);
}

.error-title {
    margin: 0.75rem 0;
}

.error-desc {
    margin: 0;
    color: var(--color-text-muted);
}

.error-actions {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.fade-in,
.fade-in-up {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.fade-in.visible,
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

#backToTop {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    background: var(--brand-primary);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    z-index: 999;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {

    .grid-3,
    .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .mobile-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        right: 1rem;
        top: 66px;
        width: min(320px, calc(100% - 2rem));
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 12px;
        box-shadow: var(--shadow-md);
        padding: 0.6rem;
        flex-direction: column;
        align-items: stretch;
        display: none;
    }

    .nav-links.open {
        display: flex;
    }

    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        border: 1px dashed var(--color-border);
        margin-top: 0.4rem;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    .grid-2,
    .grid-3,
    .features-grid,
    .footer-content,
    .signature-block {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 4rem;
    }
}

/* ========================================= */
/* PREMIUM ENHANCEMENTS: MARQUEE & BENTO BOX */
/* ========================================= */

/* Infinite Marquee for Trusted By */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.trusted-by {
    overflow: hidden;
    position: relative;
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    padding: clamp(3rem, 5vw, 6rem) 0;
}

.trusted-by::before,
.trusted-by::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    z-index: 2;
    pointer-events: none;
}

.trusted-by::before {
    left: 0;
    background: linear-gradient(to right, #ffffff 0%, transparent 100%);
}

.trusted-by::after {
    right: 0;
    background: linear-gradient(to left, #ffffff 0%, transparent 100%);
}

.trusted-by-track {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: max-content;
    gap: clamp(1.5rem, 3vw, 4rem);
    animation: marquee 35s linear infinite;
}

.trusted-by-track:hover {
    animation-play-state: paused;
}

.trusted-by-container {
    display: flex;
    flex-wrap: nowrap;
    white-space: nowrap;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    gap: clamp(1.5rem, 3vw, 4rem);
    padding: 0;
}

.trusted-by img {
    height: clamp(80px, 8vw, 160px);
    width: auto;
    max-width: none;
    object-fit: contain;
    flex-shrink: 0;
    padding: 0 clamp(0.5rem, 1.5vw, 1.5rem);
    filter: grayscale(100%) opacity(0.8);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-content p {
    text-align: justify;
}

.trusted-by img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Bento Box Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 1.5rem;
    margin-top: 3rem;
}

.bento-item {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    /* In case it's a link */
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.03) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.bento-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(30, 58, 138, 0.15);
    /* deeper, richer shadow */
    border-color: var(--color-accent);
    /* use gold accent on hover for impact */
}

.bento-item:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.05) 0%, transparent 60%);
    /* subtle gold gradient */
}

.bento-item:hover .bento-icon {
    background: var(--color-accent);
    color: white;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

.bento-item .bento-icon {
    transition: all 0.3s ease;
    /* Ensure transition exists on default state too */
}

.bento-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(30, 58, 138, 0.06);
    color: var(--brand-primary);
    display: grid;
    place-items: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

.bento-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--brand-dark);
    position: relative;
    z-index: 1;
}

.bento-desc {
    color: var(--color-text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

/* Specific Bento Sizing */
.bento-span-4 {
    grid-column: span 4;
}

.bento-span-6 {
    grid-column: span 6;
}

.bento-span-8 {
    grid-column: span 8;
}

.bento-span-12 {
    grid-column: span 12;
}

@media (max-width: 992px) {

    .bento-span-4,
    .bento-span-6,
    .bento-span-8 {
        grid-column: span 6;
    }
}

@media (max-width: 768px) {

    .bento-span-4,
    .bento-span-6,
    .bento-span-8 {
        grid-column: span 12;
    }
}