/* ==========================================================================
   Common Styles - Header, Footer, Navigation, CTA, Breadcrumb, etc.
   ========================================================================== */

/* ==========================================================================
   Loading Screen
   ========================================================================== */

body.is-loading {
    overflow: hidden;
}

.site-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.site-loader.is-loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-logo {
    width: 80px;
    height: 80px;
    color: var(--color-primary);
}

.loader-logo__circle {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    animation: loader-draw 1.2s ease forwards;
}

.loader-logo__square {
    stroke-dasharray: 560;
    stroke-dashoffset: 560;
    animation: loader-draw 1.2s ease 0.15s forwards;
}

.loader-logo__inner {
    stroke-dasharray: 420;
    stroke-dashoffset: 420;
    animation: loader-draw 1s ease 0.3s forwards;
}

.loader-logo__f1,
.loader-logo__f2,
.loader-logo__f3 {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: loader-draw 0.6s ease 0.5s forwards;
}

@keyframes loader-draw {
    to { stroke-dashoffset: 0; }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--color-cta);
    z-index: 1001;
    transition: width 0.1s linear;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #1a1a1a;
    transition: all var(--transition-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header.is-scrolled {
    background-color: #262626;
    box-shadow: none;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.site-header__logo {
    flex-shrink: 0;
}

.site-header__logo a {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: var(--font-size-lg);
    color: var(--color-white);
    text-decoration: none;
}

.site-header__logo a:hover {
    color: var(--color-white);
}

.site-header__logo img {
    height: 40px;
    width: auto;
}

/* Navigation */
.site-nav {
    display: none;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.site-nav__link {
    font-size: var(--font-size-sm);
    font-weight: 900;
    color: var(--color-white);
    padding: var(--space-sm) 0;
    position: relative;
    transition: color var(--transition-fast);
    letter-spacing: 0.03em;
}

.site-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1c69d4;
    transition: width var(--transition-base);
}

.site-nav__link:hover {
    color: var(--color-white);
}

.site-nav__link:hover::after {
    width: 100%;
}

.site-nav__cta {
    margin-left: var(--space-sm);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    transition: all var(--transition-base);
    border-radius: 0;
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .menu-toggle__bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: #1a1a1a;
    z-index: 999;
    overflow-y: auto;
    padding: var(--space-xl) var(--container-padding) var(--space-3xl);
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mobile-nav__link {
    display: block;
    padding: var(--space-md) 0;
    font-size: var(--font-size-lg);
    font-weight: 900;
    color: var(--color-white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color var(--transition-fast);
}

.mobile-nav__link:hover {
    color: #1c69d4;
}

.mobile-nav__cta {
    margin-top: var(--space-xl);
    text-align: center;
}

/* Desktop nav visible */
@media (min-width: 1024px) {
    .site-nav {
        display: block;
    }

    .menu-toggle {
        display: none;
    }
}

/* Header offset for content */
.site-main {
    padding-top: var(--header-height);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #1a1a1a;
    color: var(--color-gray-300);
    padding: var(--space-4xl) 0 0;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-3xl);
}

.site-footer__brand {
    max-width: 320px;
}

.site-footer__logo {
    font-family: var(--font-heading);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
}

.site-footer__desc {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-base);
    color: var(--color-gray-500);
}

.site-footer__nav-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
}

.site-footer__nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.site-footer__nav-link {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    transition: color var(--transition-fast);
}

.site-footer__nav-link:hover {
    color: var(--color-white);
}

.site-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-lg) 0;
    text-align: center;
}

.site-footer__copyright {
    font-size: var(--font-size-xs);
    color: var(--color-gray-500);
}

@media (min-width: 768px) {
    .site-footer__inner {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.section-cta {
    background-color: #1a1a1a;
    padding: var(--space-4xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-cta::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.06);
    top: -40px;
    right: -40px;
    pointer-events: none;
}

.section-cta::after {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    bottom: -30px;
    left: -30px;
    pointer-events: none;
}

.section-cta .section-cta__inner {
    position: relative;
    z-index: 1;
}

.section-cta__inner::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.04);
    top: -20px;
    left: 10%;
    animation: float-y-reverse 9s ease-in-out infinite;
    pointer-events: none;
}

.section-cta__inner::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.03);
    bottom: -15px;
    right: 8%;
    animation: rotate-slow 22s linear infinite;
    pointer-events: none;
}

.section-cta__heading {
    font-family: var(--font-body);
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--space-md);
    letter-spacing: 0.02em;
}

.section-cta__text {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--space-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.9;
}

.section-cta__buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

@media (min-width: 768px) {
    .section-cta__buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .section-cta__heading {
        font-size: var(--font-size-xl);
    }

    .section-cta__text {
        font-size: var(--font-size-base);
    }
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb {
    background-color: var(--color-gray-50);
    padding: var(--space-md) 0;
    font-size: var(--font-size-sm);
}

.breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    align-items: center;
}

.breadcrumb__item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.breadcrumb__item:not(:last-child)::after {
    content: '>';
    color: var(--color-gray-500);
    font-size: var(--font-size-xs);
}

.breadcrumb__link {
    color: var(--color-gray-700);
}

.breadcrumb__link:hover {
    color: var(--color-accent);
}

.breadcrumb__current {
    color: var(--color-gray-500);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    margin-top: var(--space-3xl);
    text-align: center;
}

.pagination__list {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.pagination__item a,
.pagination__item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
    border: 1px solid var(--color-gray-300);
    border-radius: 0;
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
    transition: all var(--transition-fast);
}

.pagination__item a:hover {
    background-color: #1c69d4;
    color: var(--color-white);
    border-color: #1c69d4;
}

.pagination__item .current {
    background-color: #1c69d4;
    color: var(--color-white);
    border-color: #1c69d4;
}

/* ==========================================================================
   Page Header
   ========================================================================== */

.page-header {
    background-color: #1a1a1a;
    padding: var(--space-2xl) 0;
    text-align: center;
}

.page-header__label {
    font-family: var(--font-heading);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #1c69d4;
    opacity: 0.6;
    margin-bottom: var(--space-xs);
}

.page-header__title {
    font-size: var(--font-size-3xl);
    color: var(--color-white);
}

@media (max-width: 767px) {
    .page-header {
        padding: var(--space-2xl) 0;
    }

    .page-header__title {
        font-size: var(--font-size-xl);
    }
}

/* ==========================================================================
   CTA Inline (for use in content)
   ========================================================================== */

.cta-inline {
    background-color: var(--color-gray-50);
    border: 2px solid #1c69d4;
    border-radius: var(--radius-none, 0);
    padding: var(--space-2xl);
    text-align: center;
    margin: var(--space-2xl) 0;
}

.cta-inline__heading {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.cta-inline__text {
    color: var(--color-gray-700);
    margin-bottom: var(--space-lg);
}

/* ==========================================================================
   Supervisor Box
   ========================================================================== */

.supervisor-box {
    background-color: var(--color-gray-50);
    border-radius: var(--radius-none, 0);
    padding: var(--space-xl);
    margin: var(--space-2xl) 0;
}

.supervisor-box__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.supervisor-box__icon {
    width: 60px;
    height: 60px;
    background-color: #1c69d4;
    border-radius: 0;
    flex-shrink: 0;
}

.supervisor-box__label {
    display: block;
    font-size: var(--font-size-xs);
    color: #1c69d4;
    font-weight: 600;
    margin-bottom: 2px;
}

.supervisor-box__name {
    display: block;
    font-size: var(--font-size-lg);
    color: #262626;
}

.supervisor-box__title {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
}

.supervisor-box__bio {
    font-size: var(--font-size-sm);
    color: var(--color-gray-700);
    line-height: var(--line-height-base);
}

/* TOC styles moved to blog.css */

/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

.mt-0  { margin-top: 0; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-0  { margin-bottom: 0; }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-to-content {
    position: absolute;
    top: -100%;
    left: var(--container-padding);
    padding: var(--space-sm) var(--space-md);
    background-color: #1c69d4;
    color: var(--color-white);
    border-radius: 0;
    font-size: var(--font-size-sm);
    z-index: 10000;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: var(--space-sm);
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* FAQ answer smooth animation */
.faq-item__answer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

.faq-item__answer:not([hidden]) {
    max-height: 500px;
    opacity: 1;
}

/* ==========================================================================
   Section Geometric Shapes (floating decorations) — expanded
   ========================================================================== */

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes float-y-reverse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(20px); }
}

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotate-slow-reverse {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.section-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Individual geometry elements */
.geo {
    position: absolute;
    border: 2px solid rgba(28, 105, 212, 0.06);
    display: block;
}

.geo--circle-lg {
    width: 240px;
    height: 240px;
    top: 5%;
    right: -6%;
    animation: float-y 10s ease-in-out infinite;
}

.geo--square-md {
    width: 160px;
    height: 160px;
    bottom: 8%;
    left: -4%;
    animation: rotate-slow 25s linear infinite;
}

.geo--circle-sm {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 10%;
    border-color: rgba(28, 105, 212, 0.04);
    animation: float-y-reverse 8s ease-in-out 1s infinite;
}

.geo--square-sm {
    width: 70px;
    height: 70px;
    top: 15%;
    left: 8%;
    border-color: rgba(28, 105, 212, 0.05);
    animation: rotate-slow-reverse 18s linear 3s infinite;
}

.geo--circle-xs {
    width: 50px;
    height: 50px;
    top: 45%;
    right: 20%;
    border-color: rgba(28, 105, 212, 0.04);
    animation: float-y 6s ease-in-out 2s infinite;
}

.geo--square-lg {
    width: 200px;
    height: 200px;
    top: -5%;
    left: 15%;
    border-color: rgba(28, 105, 212, 0.03);
    animation: rotate-slow-reverse 30s linear infinite;
}

.geo--circle-md {
    width: 130px;
    height: 130px;
    top: 70%;
    left: 25%;
    border-color: rgba(28, 105, 212, 0.04);
    animation: float-y-reverse 12s ease-in-out 3s infinite;
}

.geo--square-xs {
    width: 45px;
    height: 45px;
    bottom: 35%;
    right: 5%;
    border-color: rgba(28, 105, 212, 0.05);
    animation: rotate-slow 15s linear 2s infinite;
}

/* Light shapes (for dark sections) */
.section-shapes--light .geo {
    border-color: rgba(255, 255, 255, 0.07);
}

.section-shapes--light .geo--circle-sm {
    border-color: rgba(255, 255, 255, 0.05);
}

.section-shapes--light .geo--square-sm {
    border-color: rgba(255, 255, 255, 0.04);
}

.section-shapes--light .geo--circle-xs,
.section-shapes--light .geo--circle-md {
    border-color: rgba(255, 255, 255, 0.04);
}

.section-shapes--light .geo--square-lg,
.section-shapes--light .geo--square-xs {
    border-color: rgba(255, 255, 255, 0.03);
}

/* Gray section variant */
.section--gray .geo {
    border-color: rgba(28, 105, 212, 0.05);
}

.section--gray .geo--circle-sm,
.section--gray .geo--square-sm {
    border-color: rgba(28, 105, 212, 0.03);
}

.section--gray .geo--circle-xs,
.section--gray .geo--circle-md {
    border-color: rgba(28, 105, 212, 0.03);
}

.section--gray .geo--square-lg,
.section--gray .geo--square-xs {
    border-color: rgba(28, 105, 212, 0.025);
}

/* Sections need relative + overflow hidden */
.stats-section,
.persona-section,
.services-section,
.works-section,
.voices-section,
.blog-section,
.faq-section,
.company-summary,
.strengths-section {
    position: relative;
    overflow: hidden;
}

/* ==========================================================================
   Section Logo Mark Divider
   ========================================================================== */

.section-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) 0;
}

.section-logo-mark svg {
    width: 28px;
    height: 28px;
    color: #1c69d4;
    opacity: 0.4;
}

/* ==========================================================================
   Mobile Sticky CTA Bar
   ========================================================================== */

.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 950;
    background-color: #1a1a1a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-sm) var(--container-padding);
    box-shadow: none;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.mobile-cta-bar.is-visible {
    transform: translateY(0);
}

.mobile-cta-bar__inner {
    display: flex;
    gap: var(--space-sm);
    max-width: var(--container-max);
    margin: 0 auto;
}

.mobile-cta-bar__inner .btn {
    flex: 1;
    text-align: center;
    padding: 0.625rem 1rem;
    font-size: var(--font-size-sm);
}

@media (max-width: 1023px) {
    .mobile-cta-bar {
        display: block;
    }

    /* Push back-to-top up to avoid overlap */
    .back-to-top {
        bottom: 5rem;
    }
}

/* ==========================================================================
   Placeholder image pattern (for empty card images)
   ========================================================================== */

.card__image:empty,
.work-row__image:empty {
    background-color: var(--color-primary-bg);
    background-image:
        radial-gradient(circle at 30% 40%, rgba(28, 105, 212, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, var(--color-gray-100) 0%, transparent 50%);
    position: relative;
}

.card__image:empty::after,
.work-row__image:empty::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    border: 2px solid #1c69d4;
    border-radius: 0;
    opacity: 0.4;
}

/* ==========================================================================
   Trust Badge (hero)
   ========================================================================== */

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding: var(--space-xs) var(--space-lg);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--space-lg);
    letter-spacing: 0.05em;
}

.hero__badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background-color: #1c69d4;
    color: var(--color-white);
    border: none;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 900;
    box-shadow: none;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: #262626;
    transform: translateY(-2px);
}

.back-to-top__arrow {
    width: 18px;
    height: 18px;
    border-left: 2px solid currentColor;
    border-top: 2px solid currentColor;
    transform: rotate(45deg) translate(2px, 2px);
}
