/*
Theme Name: Terrier Agency
Theme URI: https://terrieragency.com
Author: Terrier Agency
Author URI: https://terrieragency.com
Description: Custom theme for Terrier Agency - SEO, GEO & Influencer Marketing
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: terrier
*/

/* ==========================================================================
   CSS Variables / Design Tokens
   ========================================================================== */

:root {
    /* Colors — Dark Theme */
    --color-primary: #00FF88;
    --color-primary-dark: #00CC6A;
    --color-primary-light: #33FF9F;
    --color-dark: #0A0A0F;
    --color-secondary: #121218;
    --color-light: #0F0F17;
    --color-white: #FFFFFF;
    --color-surface: #16161F;
    --color-border: #2A2A3A;
    --color-gray-100: #1A1A24;
    --color-gray-200: #22222E;
    --color-gray-300: #2E2E3C;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #A0A8B4;
    --color-gray-600: #C0C7D0;
    --color-gray-700: #3A3A4A;
    --color-gray-800: #E0E0E8;
    --color-gray-900: #F0F0F5;

    /* Typography */
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;
    --text-8xl: 6rem;
    --text-9xl: 8rem;

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    /* Container */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --container-2xl: 1440px;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--color-gray-400);
    background-color: var(--color-dark);
}

.site-main,
.site-footer {
    overflow-x: clip;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-top: 0;
    margin-bottom: var(--space-4);
    color: var(--color-white);
}

h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-top: 0;
    margin-bottom: var(--space-4);
}

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

a:hover {
    color: var(--color-primary-dark);
}

/* ==========================================================================
   Focus & Accessibility
   ========================================================================== */

:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.skip-link:focus {
    position: fixed;
    top: var(--space-4);
    left: var(--space-4);
    z-index: 10000;
    padding: var(--space-3) var(--space-6);
    background: var(--color-primary);
    color: var(--color-dark);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-lg);
    clip: auto;
    width: auto;
    height: auto;
}

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

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.container--narrow {
    max-width: var(--container-lg);
}

.container--wide {
    max-width: var(--container-2xl);
}

/* Sections */
.section {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
}

.section--sm {
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
}

.section--lg {
    padding-top: var(--space-24);
    padding-bottom: var(--space-24);
}

.section--dark {
    background-color: var(--color-dark);
    color: var(--color-white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4,
.section--dark h5,
.section--dark h6 {
    color: var(--color-white);
}

.section--light {
    background-color: var(--color-secondary);
}

.section--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.section--primary h1,
.section--primary h2,
.section--primary h3,
.section--primary h4,
.section--primary h5,
.section--primary h6 {
    color: var(--color-white);
}

.section--primary-dark {
    background-color: #0A4D2E;
    color: var(--color-white);
}

.section--primary-dark h1,
.section--primary-dark h2,
.section--primary-dark h3,
.section--primary-dark h4,
.section--primary-dark h5,
.section--primary-dark h6 {
    color: var(--color-white);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: var(--leading-normal);
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-dark);
    border-color: var(--color-primary);
}

.btn--primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-dark);
}

.btn--primary:focus {
    outline-color: var(--color-primary-dark);
}

.btn--secondary {
    background-color: var(--color-dark);
    color: var(--color-white);
    border-color: var(--color-dark);
}

.btn--secondary:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-white);
}

.btn--secondary:focus {
    outline-color: var(--color-dark);
}

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

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

.btn--outline-white {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

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

.btn--outline-white:focus {
    outline-color: var(--color-white);
}

.btn--white {
    background-color: var(--color-white);
    color: var(--color-dark);
    border-color: var(--color-white);
}

.btn--white:hover {
    background-color: var(--color-light);
    border-color: var(--color-light);
}

.btn--lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

.btn--sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

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

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

.text-primary { color: var(--color-primary); }
.text-dark { color: var(--color-dark); }
.text-white { color: var(--color-white); }
.text-gray { color: var(--color-gray-500); }

.bg-primary { background-color: var(--color-primary); }
.bg-dark { background-color: var(--color-dark); }
.bg-light { background-color: var(--color-light); }
.bg-white { background-color: var(--color-white); }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Visibility */
.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;
}

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

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
}

.nav-links a,
.nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    color: var(--color-gray-400);
    transition: all var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-white);
    border-color: var(--color-primary);
    background: rgba(0, 255, 136, 0.05);
}

.nav-links .current {
    background: var(--color-primary);
    color: var(--color-dark);
    border-color: var(--color-primary);
}

.nav-links .dots {
    border: none;
    color: var(--color-gray-500);
}

/* ==========================================================================
   CSS Containment for Performance
   ========================================================================== */

/* NOTE: contain: layout is intentionally NOT applied to .site-header or any
   element that is an ancestor of .nav-menu-wrapper. CSS containment with the
   layout keyword causes the element to act as the containing block for any
   position:fixed descendants, trapping the mobile menu panel inside the
   header's 80px box instead of letting it cover the full viewport. */

.site-footer {
    contain: layout style;
}

.trusted-by {
    contain: layout style;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    h1 { font-size: var(--text-4xl); }
    h2 { font-size: var(--text-3xl); }
    h3 { font-size: var(--text-2xl); }

    .section {
        padding-top: var(--space-12);
        padding-bottom: var(--space-12);
    }
}

@media (max-width: 768px) {
    h1 { font-size: var(--text-3xl); }
    h2 { font-size: var(--text-2xl); }
    h3 { font-size: var(--text-xl); }

    .container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }

    .section {
        padding-top: var(--space-10);
        padding-bottom: var(--space-10);
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    *,
    *::before,
    *::after {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited { text-decoration: underline; }

    a[href]::after { content: " (" attr(href) ")"; font-size: 0.875em; }

    a[href^="#"]::after,
    a[href^="javascript:"]::after { content: ""; }

    .site-header,
    .site-footer,
    .mega-menu,
    .menu-toggle,
    .scroll-to-top,
    .search-modal,
    .footer-cta-section,
    .cta-banner,
    .book-call,
    .newsletter-section,
    .lets-talk,
    .region-selector,
    .header-cta,
    .header-search,
    .scroll-progress { display: none !important; }

    body { font-size: 12pt; line-height: 1.5; }

    .container { max-width: 100%; padding: 0; }

    img { max-width: 100% !important; page-break-inside: avoid; }

    h1, h2, h3 { page-break-after: avoid; }

    p, h2, h3 { orphans: 3; widows: 3; }
}
