/**
 * SquareCode homepage — BairesDev-inspired layout
 */

:root {
    --bd-ink: #111827;
    --bd-muted: #6b7280;
    --bd-surface: #f3f4f6;
    --bd-white: #ffffff;
    --bd-dark: #0a0a0a;
    --bd-accent: #FF3131;
    --bd-accent-hover: #E02525;
    --bd-radius: 6px;
    --bd-container: 1200px;
}

.home .site-main {
    overflow-x: clip;
}

/* Header */
.home .site-header {
    background: var(--bd-white);
    box-shadow: none;
    border-bottom: 1px solid #eceff3;
}

.home .header-wrapper {
    padding: 1rem 0;
}

.home .custom-logo {
    max-height: 40px;
}

.home .nav-menu {
    gap: clamp(1rem, 1.4vw, 1.75rem);
    flex-wrap: nowrap;
}

.home .nav-menu li a {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--bd-ink);
}

.home .btn-primary {
    background: var(--bd-accent);
    border-color: var(--bd-accent);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0;
    line-height: 1.25;
    padding: 0.875rem 1.75rem;
}

.home .btn-primary:hover {
    background: var(--bd-accent-hover);
    border-color: var(--bd-accent-hover);
    color: var(--color-white);
    transform: none;
    box-shadow: none;
}

.bd-hero-copy .btn-primary {
    border-radius: 8px;
}

/* Hero */
.bd-hero {
    position: relative;
    background: var(--bd-surface);
    padding: 4.5rem 0 0;
}

.bd-hero-inner {
    max-width: var(--bd-container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 520px;
}

.bd-hero-copy {
    max-width: 34rem;
}

.bd-hero h1 {
    font-size: clamp(2.5rem, 4.2vw, 3.75rem);
    line-height: 1.08;
    font-weight: 700;
    color: var(--bd-ink);
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}

.bd-hero h1 strong {
    display: block;
    color: var(--bd-ink);
    font-weight: 800;
}

.bd-lead {
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--bd-muted);
    margin-bottom: 2rem;
    max-width: 30rem;
}

.bd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.6rem;
    background: var(--bd-accent);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--bd-radius);
    border: none;
    transition: background 0.2s ease;
}

.bd-btn:hover {
    background: var(--bd-accent-hover);
    color: #fff;
}

.bd-hero-media {
    position: relative;
    isolation: isolate;
}

.bd-hero-media::before {
    content: '';
    position: absolute;
    right: -1rem;
    bottom: -1rem;
    width: 72%;
    height: 72%;
    background: linear-gradient(135deg, rgba(255, 49, 49, 0.18), rgba(255, 49, 49, 0.04));
    border-radius: 16px;
    z-index: -1;
}

.bd-hero-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 360px;
    max-height: 480px;
    object-fit: cover;
    object-position: center 38%;
    border-radius: 16px;
    display: block;
    box-shadow:
        0 24px 60px rgba(17, 24, 39, 0.16),
        0 0 0 1px rgba(17, 24, 39, 0.06);
}

.bd-hero-wave {
    display: block;
    width: 100%;
    height: 72px;
    margin-top: 3rem;
    line-height: 0;
}

.bd-hero-wave svg {
    width: 100%;
    height: 72px;
}

/* Trust band */
.bd-trust {
    background: var(--bd-white);
    padding: 3.5rem 0 0;
    overflow: hidden;
}

.bd-trust h2 {
    text-align: center;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--bd-ink);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.bd-trust h2 .dot,
.bd-section-head h2 .dot {
    color: var(--bd-accent);
}

.bd-trust-marquee {
    overflow: hidden;
    padding: 0 0 3.5rem;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.bd-trust-track {
    display: flex;
    align-items: center;
    gap: 3.5rem;
    width: max-content;
    animation: bd-trust-scroll 50s linear infinite;
}

.bd-trust-marquee:hover .bd-trust-track {
    animation-play-state: paused;
}

.bd-trust-logo-item {
    display: inline-flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}

.bd-trust-logo-mark {
    display: block;
    width: auto;
    height: 28px;
    max-width: 130px;
    object-fit: contain;
}

.bd-trust-logo-mark--brand {
    height: 30px;
    max-width: 150px;
}

.bd-trust-logo-item--logo-only {
    padding: 0.625rem 1rem;
}

.bd-trust-logo-item--logo-only .bd-trust-logo-mark--brand {
    height: 28px;
    max-width: 120px;
}

.bd-trust-logo-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--bd-ink);
    letter-spacing: -0.01em;
}

@keyframes bd-trust-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.bd-logo-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.bd-logo-mark {
    display: block;
    width: auto;
    max-width: 150px;
    height: 40px;
    object-fit: contain;
    object-position: center;
}

.bd-logo-mark--light {
    filter: brightness(0) invert(1);
}

.bd-logo-name--labeled {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    letter-spacing: 0 !important;
}

.bd-logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-start;
}

.bd-logo-name {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: #374151;
    letter-spacing: -0.03em;
}

.bd-logo-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--bd-accent);
    border-bottom: 1px solid transparent;
}

.bd-logo-link:hover {
    border-bottom-color: var(--bd-accent);
}

.bd-trust-dark {
    background: var(--bd-dark);
    padding: 2.5rem 0;
}

.bd-logo-row-dark {
    max-width: var(--bd-container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 1.5rem;
    text-align: center;
}

.bd-logo-row-dark .bd-logo-name {
    color: #fff;
    font-size: 1.75rem;
}

.bd-logo-row-dark .bd-logo-name--labeled {
    color: rgba(255, 255, 255, 0.72) !important;
}

/* Services */
.bd-services {
    padding: 5rem 0;
    background: var(--bd-white);
}

.bd-section-head {
    max-width: var(--bd-container);
    margin: 0 auto 3rem;
    padding: 0 24px;
}

.bd-section-head h2 {
    font-size: clamp(1.75rem, 3vw, 2.75rem);
    line-height: 1.15;
    font-weight: 700;
    color: var(--bd-ink);
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    max-width: 20ch;
}

.bd-section-head .bd-kicker {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bd-muted);
}

.bd-section-head .bd-kicker a {
    color: var(--bd-muted);
}

.bd-section-head .bd-kicker a:hover {
    color: var(--bd-accent);
}

.bd-services-grid {
    max-width: var(--bd-container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.bd-service-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    background: var(--color-bg-light);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.bd-service-icon {
    color: var(--color-primary);
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bd-service-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
}

.bd-service-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--bd-ink);
}

.bd-service-card h3 a {
    color: inherit;
    text-decoration: none;
}

.bd-service-card h3 a:hover {
    color: var(--bd-accent);
}

.bd-service-card p {
    color: var(--bd-muted);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.bd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.bd-tags li {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--bd-ink);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.bd-tags a {
    display: inline-block;
    color: inherit;
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.bd-tags a:hover {
    border-color: var(--bd-accent);
    color: var(--bd-accent);
}

/* Featured in */
.bd-featured {
    padding: 4rem 0;
    border-top: 1px solid #eceff3;
    border-bottom: 1px solid #eceff3;
    background: #fafbfc;
    text-align: center;
}

.bd-featured p {
    font-weight: 600;
    color: var(--bd-muted);
    margin-bottom: 1.5rem;
}

.bd-featured-logos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2.5rem;
}

.bd-featured-logos span {
    font-size: 1.125rem;
    font-weight: 800;
    color: #9ca3af;
    letter-spacing: 0.02em;
}

/* Press */
.bd-press {
    padding: 4rem 0;
    background: var(--bd-white);
}

.bd-press-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
    text-align: center;
    position: relative;
}

.bd-press-slide {
    display: none;
}

.bd-press-slide.is-active {
    display: block;
}

.bd-press-slide p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--bd-ink);
    margin-bottom: 1rem;
}

.bd-press-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.bd-press-nav button {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    font-size: 1rem;
}

/* Tech marquee */
.bd-tech {
    padding: 4rem 0;
    background: #fafbfc;
    border-top: 1px solid #eceff3;
    border-bottom: 1px solid #eceff3;
    overflow: hidden;
}

.bd-tech .bd-section-head {
    text-align: center;
}

.bd-tech .bd-section-head h2 {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
}

.bd-tech .bd-section-head p {
    color: var(--bd-muted);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

.bd-marquee {
    margin-top: 2.5rem;
}

.bd-marquee-row {
    overflow: hidden;
    margin-bottom: 0.75rem;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.bd-marquee-track {
    display: flex;
    gap: 0.75rem;
    width: max-content;
    animation: bd-scroll-left 40s linear infinite;
}

.bd-marquee-row.reverse .bd-marquee-track {
    animation-name: bd-scroll-right;
}

.bd-chip {
    padding: 0.85rem 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--bd-ink);
}

@keyframes bd-scroll-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes bd-scroll-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* Testimonials */
.bd-testimonials {
    padding: 5rem 0;
    background: var(--bd-white);
}

.bd-testimonials .bd-section-head h2 {
    max-width: none;
}

.bd-testimonials-marquee {
    overflow: hidden;
    padding: 0.25rem 0;
}

.bd-trust-logo-item--name-only {
    justify-content: center;
    min-width: 5.5rem;
}

.bd-trust-logo-item--name-only .bd-trust-logo-name {
    font-size: 1rem;
}

.bd-testimonials-track {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    animation: bd-testimonials-scroll 36s linear infinite;
    will-change: transform;
}

.bd-testimonials-marquee:hover .bd-testimonials-track {
    animation-play-state: paused;
}

@keyframes bd-testimonials-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-100% / 3)); }
}

.bd-quote-card {
    flex: 0 0 380px;
    width: 380px;
    max-width: 88vw;
    flex-shrink: 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.bd-quote-brand {
    min-height: 40px;
    display: flex;
    align-items: center;
    margin-bottom: 1.25rem;
}

.bd-quote-logo {
    display: block;
    height: 32px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
}

.bd-quote-company {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.bd-quote-card blockquote {
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--bd-ink);
    margin: 0 0 auto;
    flex: 1;
}

.bd-quote-card figcaption {
    margin-top: 1.5rem;
}

.bd-quote-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    color: #f59e0b;
}

/* Awards */
.bd-awards {
    padding: 5rem 0;
    background: var(--bd-surface);
}

.bd-awards .bd-section-head {
    text-align: center;
}

.bd-awards .bd-section-head h2 {
    max-width: none;
    margin: 0 auto 0.5rem;
}

.bd-stats-row {
    max-width: var(--bd-container);
    margin: 0 auto 2rem;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.bd-stat-box {
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.5rem;
}

.bd-stat-box strong {
    display: block;
    font-size: 2rem;
    color: var(--bd-ink);
    margin-bottom: 0.25rem;
}

.bd-stat-box span {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bd-muted);
}

.bd-awards-pills {
    max-width: var(--bd-container);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.bd-award-pill {
    padding: 0.85rem 1.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
}

/* Value props */
.bd-values {
    padding: 5rem 0;
    background: var(--bd-white);
}

.bd-values .bd-section-head {
    text-align: center;
}

.bd-values .bd-section-head h2 {
    max-width: none;
}

.bd-values-grid {
    max-width: var(--bd-container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.bd-value-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.bd-value-card p {
    color: var(--bd-muted);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.bd-roles {
    max-width: var(--bd-container);
    margin: 2.5rem auto 0;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
}

.bd-role {
    padding: 0.55rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    background: #fafbfc;
}

.bd-values-cta {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid #eceff3;
}

.bd-values-cta h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

/* Process */
.bd-process {
    padding: 5rem 0;
    background: var(--bd-surface);
}

.bd-process .bd-section-head {
    text-align: center;
}

.bd-process .bd-section-head h2 {
    max-width: none;
    margin: 0 auto;
}

.bd-steps {
    max-width: var(--bd-container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.bd-step {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
}

.bd-step-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bd-accent);
    margin-bottom: 0.75rem;
}

.bd-step h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.bd-step p {
    color: var(--bd-muted);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.bd-process-cta {
    text-align: center;
    margin-top: 2.5rem;
}

/* Final CTA */
.bd-final {
    padding: 5rem 0;
    background: var(--bd-dark);
    color: #fff;
    text-align: center;
}

.bd-final h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.bd-final p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

/* Footer on home */
.home .site-footer {
    margin-top: 0;
    background: #050505;
}

@media (max-width: 1024px) {
    .bd-hero-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        text-align: center;
    }

    .bd-hero-copy {
        max-width: none;
    }

    .bd-lead {
        margin-left: auto;
        margin-right: auto;
    }

    .bd-services-grid,
    .bd-values-grid,
    .bd-steps {
        grid-template-columns: 1fr;
    }

    .bd-logo-grid,
    .bd-logo-row-dark {
        grid-template-columns: repeat(2, 1fr);
    }

    .bd-stats-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .home .header-cta {
        display: none;
    }

    .bd-hero {
        padding-top: 2.5rem;
    }

    .bd-hero-media img {
        min-height: 260px;
        max-height: 320px;
        object-position: center 35%;
    }
}
