/* ==========================================================================
   MULTISITE TEMPLATE — Design System
   CSS variables are injected per-site via TemplateLayout.astro
   ========================================================================== */

/* ---------- Static tokens (not per-site) ---------- */
:root {
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-xl: 24px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-muted);
    background: var(--white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ---------- Shared Typography ---------- */
.tech-heading {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--color-primary);
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
    text-transform: uppercase;
}

.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, #00d2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Buttons (Pill Shaped) ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 12px 28px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 500;
    padding: 12px 28px;
    background: transparent;
    transition: var(--transition);
}

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

.btn-pill {
    border-radius: var(--pill);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 34px;
    z-index: 1000;
}

.nav-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links li>a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition);
}

.nav-links li>a:hover {
    color: var(--color-primary);
}

.nav-links svg {
    color: var(--gray-400);
    transition: transform var(--transition);
}

.nav-links li:hover>a svg {
    transform: rotate(180deg);
    color: var(--color-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: var(--transition);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-tech.hero-video-section {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    background: #000000;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 180%;
    height: 180%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    object-position: 70% center;
    z-index: 0;
}

@media (max-width: 768px) {
    .hero-video {
        width: 300%;
        height: 300%;
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    z-index: 1;
}

.hero-content-centered {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 40px;
}

.hero-video-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
    color: var(--white);
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

.hero-video-title span {
    margin-top: 0.15em !important;
}

.hero-video-tagline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   AWARDS SECTION
   ========================================================================== */
.awards-section {
    padding: 60px 0;
    background: var(--white);
}

.awards-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.award-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.award-logo-placeholder {
    width: 200px;
    height: 100px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.award-logo-placeholder.purina {
    color: #e3000f;
}

.award-logo-placeholder.hb {
    color: #1a4f8b;
    font-size: 0.85rem;
}

.award-card h4 {
    font-size: 0.95rem;
    color: var(--color-text);
    font-weight: 600;
}

/* ==========================================================================
   WHAT WE DO (FEATURE ROWS)
   ========================================================================== */
.features-section {
    padding: 100px 0;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
    font-size: 1.05rem;
}

.feature-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 120px;
}

.feature-row.reverse .feature-text {
    order: 2;
}

.feature-row.reverse .feature-image {
    order: 1;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 24px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.feature-text p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
}

.image-wrapper.shadow-lift {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.image-wrapper.shadow-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
}

/* ==========================================================================
   HOW IT WORKS (AUDIENCE CARDS)
   ========================================================================== */
.bg-gradient-light {
    background: linear-gradient(180deg, #f8fafc 0%, var(--white) 100%);
    padding: 100px 0;
}

.audiences-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.audience-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
    border: 1px solid var(--gray-200);
}

.audience-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow);
    border-color: var(--color-primary);
}

.audience-img-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    margin: 0 auto 32px;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
}

.audience-img-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.audience-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.audience-card p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ==========================================================================
   PROCESS GRID
   ========================================================================== */
.process-section {
    padding: 100px 0;
}

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

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 60px;
    margin-top: 60px;
}

.process-item {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tech-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--color-primary);
    transition: var(--transition);
}

.process-item:hover .tech-icon-wrapper {
    background: var(--color-primary);
    color: var(--white);
    transform: scale(1.05);
}

.process-item:hover .tech-icon-wrapper svg {
    stroke: var(--white);
}

.process-item h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 8px;
}

.process-item p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.mt-40 {
    margin-top: 60px;
}

/* ==========================================================================
   REVIEWS SECTION
   ========================================================================== */
.reviews-section {
    padding: 80px 0 100px;
    background: linear-gradient(180deg, #f8fafc 0%, #e8eff5 60%, #d4e3ee 100%);
    position: relative;
}

.reviews-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), #1F6889);
}

.reviews-header {
    text-align: center;
    margin-bottom: 48px;
}

.reviews-label {
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.reviews-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.reviews-subtitle {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   TECH FOOTER
   ========================================================================== */
.tech-footer {
    background: #ffffff;
    color: var(--color-text);
    padding: 80px 0 20px;
    border-top: 1px solid #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    margin-bottom: 24px;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-list a {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.footer-links-list a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

.mt-80 {
    margin-top: 80px;
}

.footer-heading {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: #1e3a8a;
}

.footer-awards-flex {
    display: flex;
    gap: 16px;
}

.footer-award-box {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 16px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.2;
    color: var(--color-text);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.social-links-tech {
    display: flex;
    gap: 16px;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--white);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>a {
    display: flex;
    align-items: center;
}

.nav-dropdown-menu {
    display: block !important;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    min-width: 200px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    list-style: none !important;
    padding: 12px 0 8px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 1000;
    border: 1px solid #e2e8f0;
    flex-direction: column !important;
    gap: 0 !important;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.nav-dropdown:hover>.nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-dropdown-menu li {
    display: block !important;
}

.nav-dropdown-menu li a {
    display: block !important;
    padding: 10px 20px;
    color: #334155 !important;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav-dropdown-menu li a:hover {
    background: #f1f5f9;
    color: var(--color-primary) !important;
}

/* Nav Dropdown items */
.nav-dd-item {
    display: block;
    padding: 10px 20px;
    color: #334155;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.nav-dd-item:hover {
    background: #f1f5f9;
    color: var(--color-primary);
}

/* Vimeo embed */
.vimeo-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Contact action cards */
.contact-action-card:hover {
    background: #e2e8f0 !important;
    transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 8px 32px rgba(0,0,0,0.1);
        padding: 16px 0;
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links li a {
        display: block;
        padding: 12px 24px;
        font-size: 1rem;
    }

    .chewy-lang-selector {
        position: static !important;
        transform: none !important;
        justify-content: center !important;
        padding: 4px 0;
        background: #0f1d3a;
    }

    .btn-primary.btn-pill {
        display: none;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-video-title {
        font-size: 3rem;
    }

    .hero-content-centered {
        padding: 80px 24px;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature-row.reverse .feature-text {
        order: 1;
    }

    .feature-row.reverse .feature-image {
        order: 2;
    }

    .audiences-grid,
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-contact-col {
        text-align: center;
    }
    .footer-contact-col .footer-logo {
        margin: 0 auto !important;
    }
    .footer-contact-col > div {
        margin-top: 12px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .footer-hours-col {
        text-align: center !important;
    }
    .footer-hours-col .footer-heading { font-size: 0.8rem; margin-bottom: 4px !important; }
    .footer-hours-col p { margin-bottom: 12px !important; }

    .footer-awards-col {
        gap: 10px !important;
    }
    .footer-awards-col img {
        height: 50px !important;
    }

    .mt-80 {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .hero-tech.hero-video-section {
        min-height: 27vh;
        max-height: 280px;
    }

    .hero-content-centered {
        padding: 40px 20px;
    }

    .hero-video-title {
        font-size: 2rem;
    }

    .hero-video-tagline {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }

    .hero-cta .btn-primary {
        padding: 10px 28px;
        font-size: 0.85rem;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column !important;
        gap: 24px;
    }

    .feature-image,
    .feature-text {
        width: 100% !important;
        max-width: 100% !important;
    }

    .feature-title {
        font-size: 1.8rem !important;
    }

    .grid-services {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .memorial-heading {
        font-size: 1.6rem !important;
        line-height: 1.4 !important;
    }

    .contact-strip {
        flex-direction: column !important;
        gap: 0 !important;
    }

    .contact-strip .contact-action-card:first-child {
        border-radius: 12px 12px 0 0 !important;
        border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-bottom: none !important;
    }

    .contact-strip .contact-action-card:last-child {
        border-radius: 0 0 12px 12px !important;
    }

    .grid-videos {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .grid-steps {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 24px !important;
    }

    .grid-interviews {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .grid-blog {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }

    .blog-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 16px !important;
    }

    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .audiences-grid,
    .process-grid {
        grid-template-columns: 1fr;
    }

    .awards-grid {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .section-heading,
    .tech-heading {
        font-size: 1.8rem !important;
    }
}

/* ==========================================================================
   CHAT WIDGET
   ========================================================================== */
@keyframes chatPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
    }
    50% {
        box-shadow: 0 4px 28px rgba(14, 165, 233, 0.6);
    }
}

#chatToggle:hover {
    transform: scale(1.08) !important;
    box-shadow: 0 6px 28px rgba(14, 165, 233, 0.5) !important;
}

#chatBubble.show {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
}

#chatInput:focus {
    border-color: var(--color-primary) !important;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
    animation: msgIn 0.3s ease;
}

.chat-msg.agent {
    background: white;
    color: #334155;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.chat-msg.user {
    background: var(--color-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navScrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}
