/**
 * CachePilot Brutalist Theme Styles
 *
 * Custom CSS for brutalist design elements not covered by theme.json
 */

/* ============================================
   Base Resets & Global Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary-foreground);
}

/* ============================================
   Tailwind v4 Compatible CSS Variables
   ============================================ */

:root {
    /* Base spacing unit (Tailwind default) */
    --spacing: 0.25rem;

    /* Typography scale */
    --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;

    /* Letter spacing */
    --tracking-tighter: -0.05em;
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --tracking-widest: 0.1em;

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

/* ============================================
   Container
   ============================================ */

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ============================================
   Typography Enhancements
   ============================================ */

/* Force uppercase on all headings */
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* ============================================
   Brutalist Button Component (Tailwind Match)
   ============================================ */

.btn-brutal {
    border-style: solid;
    border-width: 2px;
    border-color: var(--wp--preset--color--primary, #000);
    background-color: var(--wp--preset--color--background, #fff);
    padding: calc(var(--spacing) * 3) calc(var(--spacing) * 6); /* 12px 24px */
    font-weight: 700;
    color: var(--wp--preset--color--primary, #000);
    text-transform: uppercase;
    font-family: var(--wp--preset--font-family--mono, 'IBM Plex Mono', monospace);
    font-size: var(--text-sm);
    letter-spacing: var(--tracking-wider);
    transition: color 0.15s ease, background-color 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.43;
}

.btn-brutal:hover {
    background-color: var(--wp--preset--color--primary, #000);
    color: var(--wp--preset--color--primary-foreground, #fff);
}

/* Filled variant (primary background) */
.btn-brutal-filled,
.btn-brutal.is-filled {
    background-color: var(--wp--preset--color--primary, #000);
    color: var(--wp--preset--color--primary-foreground, #fff);
}

.btn-brutal-filled:hover,
.btn-brutal.is-filled:hover {
    background-color: var(--wp--preset--color--background, #fff);
    color: var(--wp--preset--color--primary, #000);
}

/* Large button (h-14 = 3.5rem = 56px) */
.btn-brutal-lg,
.btn-brutal.is-large {
    padding: calc(var(--spacing) * 4) calc(var(--spacing) * 8); /* 16px 32px */
    min-height: calc(var(--spacing) * 14); /* 3.5rem = 56px */
    font-size: var(--text-base);
}

/* Standard size (h-12 = 3rem = 48px) */
.btn-brutal-md,
.btn-brutal.is-medium {
    min-height: calc(var(--spacing) * 12); /* 3rem = 48px */
}

/* Small button */
.btn-brutal-sm,
.btn-brutal.is-small {
    padding: calc(var(--spacing) * 2) calc(var(--spacing) * 4); /* 8px 16px */
    font-size: var(--text-xs);
}

/* White variant for dark backgrounds */
.btn-brutal-white,
.btn-brutal.is-white {
    border-color: #fff;
    background-color: transparent;
    color: #fff;
}

.btn-brutal-white:hover,
.btn-brutal.is-white:hover {
    background-color: #fff;
    color: #000;
}

/* ============================================
   Brutalist Shadows
   ============================================ */

.brutal-shadow {
    box-shadow: 8px 8px 0px 0px rgba(0,0,0,1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.brutal-shadow:hover {
    transform: translate(2px, 2px);
    box-shadow: 6px 6px 0px 0px rgba(0,0,0,1);
}

.brutal-shadow-sm {
    box-shadow: 4px 4px 0px 0px rgba(0,0,0,1);
}

.brutal-shadow-sm:hover {
    transform: translate(1px, 1px);
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
}

.brutal-shadow-lg {
    box-shadow: 12px 12px 0px 0px rgba(0,0,0,0.2);
}

/* ============================================
   Grid Background Pattern
   ============================================ */

.brutalist-grid-bg {
    position: relative;
}

.brutalist-grid-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,0,0,0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,0,0,0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.brutalist-grid-bg > * {
    position: relative;
    z-index: 1;
}

/* Dark version */
.brutalist-grid-bg-dark::before {
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
}

/* ============================================
   Terminal Styles
   ============================================ */

.terminal-box {
    background: #000;
    color: #fff;
    font-family: var(--wp--preset--font-family--mono);
    border: 2px solid #000;
    padding: 1.5rem;
    position: relative;
}

.terminal-header {
    position: absolute;
    top: -0.75rem;
    left: 1rem;
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--foreground);
    padding: 0.125rem 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    border: 1px solid var(--wp--preset--color--primary);
}

.terminal-content {
    font-size: 0.875rem;
    line-height: 1.6;
}

.terminal-line {
    margin: 0;
    padding: 0.125rem 0;
}

.terminal-line.terminal-command {
    color: #fff;
}

.terminal-line.terminal-info {
    color: #9ca3af;
}

.terminal-line.terminal-success {
    color: #4ade80;
}

.terminal-line.terminal-warning {
    color: #facc15;
}

.terminal-line.terminal-error {
    color: #f87171;
}

/* Blinking Cursor */
.terminal-cursor,
.cursor-blink::after {
    animation: blink 1s step-end infinite;
}

.cursor-blink::after {
    content: "\2588";
    margin-left: 4px;
    color: var(--wp--preset--color--primary);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ============================================
   Decorative Corner Elements
   ============================================ */

.brutalist-corner-tl {
    position: relative;
}

.brutalist-corner-tl::before {
    content: '';
    position: absolute;
    top: -24px;
    left: -24px;
    width: 96px;
    height: 96px;
    border-left: 2px solid var(--wp--preset--color--primary);
    border-top: 2px solid var(--wp--preset--color--primary);
    pointer-events: none;
}

.brutalist-corner-br {
    position: relative;
}

.brutalist-corner-br::after {
    content: '';
    position: absolute;
    bottom: -24px;
    right: -24px;
    width: 96px;
    height: 96px;
    border-right: 2px solid var(--wp--preset--color--primary);
    border-bottom: 2px solid var(--wp--preset--color--primary);
    pointer-events: none;
}

/* White version for dark backgrounds */
.brutalist-corner-tl-white::before {
    border-color: #fff;
}

.brutalist-corner-br-white::after {
    border-color: #fff;
}

/* ============================================
   Mobile Menu
   ============================================ */

[data-mobile-menu] {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--wp--preset--color--background);
    border-top: 2px solid var(--wp--preset--color--primary);
    z-index: 40;
    padding: 1.5rem;
    flex-direction: column;
    overflow-y: auto;
}

[data-mobile-menu].is-open {
    display: flex;
    animation: slideInFromTop 0.2s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-mobile-menu-toggle] {
    display: none;
}

@media (max-width: 767px) {
    [data-mobile-menu-toggle] {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .desktop-nav {
        display: none !important;
    }
}

@media (min-width: 768px) {
    [data-mobile-menu] {
        display: none !important;
    }
}

/* ============================================
   Pricing Card Styles
   ============================================ */

.pricing-card {
    position: relative;
    border: 2px solid var(--wp--preset--color--primary);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    background: var(--wp--preset--color--background);
    transition: box-shadow 0.2s ease;
}

.pricing-card:hover {
    box-shadow: 8px 8px 0px 0px rgba(0,0,0,1);
}

.pricing-card.is-highlighted {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--primary-foreground);
    box-shadow: 12px 12px 0px 0px rgba(0,0,0,0.2);
    scale: 1.05; /* Modern CSS scale property instead of transform */
    z-index: 10;
}

/* Reset scale on mobile to prevent overflow */
@media (max-width: 767px) {
    .pricing-card.is-highlighted {
        scale: 1;
    }
}

.pricing-highlight-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--primary);
    border: 2px solid var(--wp--preset--color--primary);
    padding: 0.25rem 1rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    white-space: nowrap;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.pricing-features li svg {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
}

/* ============================================
   Status Badge (Pulse Animation)
   ============================================ */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--wp--preset--color--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: var(--wp--preset--color--primary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================
   Feature Cards
   ============================================ */

.feature-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 2px solid var(--wp--preset--color--primary);
    background: var(--wp--preset--color--background);
    transition: background-color 0.2s ease;
}

.feature-card:hover {
    background: var(--wp--preset--color--muted);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--wp--preset--color--primary);
    margin-bottom: 1rem;
    box-shadow: 4px 4px 0px 0px rgba(0,0,0,1);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.feature-card:hover .feature-icon {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
}

/* ============================================
   Dark Section Utilities
   ============================================ */

.dark-section {
    background: #000;
    color: #fff;
}

.dark-section .status-indicator {
    background: #fff;
}

.dark-section .pricing-card.is-highlighted {
    background: #fff;
    color: #000;
}

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

.hide-on-mobile {
    display: block;
}

.show-on-mobile {
    display: none;
}

@media (max-width: 767px) {
    .hide-on-mobile {
        display: none !important;
    }

    .show-on-mobile {
        display: block !important;
    }
}

/* Stack columns on mobile */
@media (max-width: 767px) {
    .wp-block-columns {
        flex-direction: column !important;
    }

    .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
    }
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--wp--preset--color--background);
    border-bottom: 2px solid var(--wp--preset--color--primary);
}

/* ============================================
   Navigation Link Styles
   ============================================ */

.nav-link {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    text-decoration: none;
    position: relative;
}

.nav-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.nav-link.is-active {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* ============================================
   SVG Icons
   ============================================ */

.icon {
    display: inline-flex;
    width: 1.5rem;
    height: 1.5rem;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

.icon-lg {
    width: 2rem;
    height: 2rem;
}

/* ============================================
   Border Utilities
   ============================================ */

.border-b-2 {
    border-bottom: 2px solid var(--wp--preset--color--primary);
}

.border-t-2 {
    border-top: 2px solid var(--wp--preset--color--primary);
}

.border-l-4 {
    border-left: 4px solid var(--wp--preset--color--primary);
    padding-left: 1.5rem;
}

/* ============================================
   Section Spacing
   ============================================ */

.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.section-sm {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.section-lg {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

/* ============================================
   Tailwind-Compatible Animations
   ============================================ */

/* Pulse Animation */
.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Bounce Animation */
.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Spin Animation */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

/* Ping Animation */
.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Animate In (tw-animate-css) */
.animate-in {
    animation-duration: 0.2s;
    animation-fill-mode: both;
}

.slide-in-from-top {
    animation-name: slideInFromTop;
}

.slide-in-from-top-5 {
    animation-name: slideInFromTop5;
}

.slide-in-from-bottom {
    animation-name: slideInFromBottom;
}

.fade-in {
    animation-name: fadeIn;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromTop5 {
    from {
        transform: translateY(-1.25rem);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Duration utilities */
.duration-150 { animation-duration: 150ms; }
.duration-200 { animation-duration: 200ms; }
.duration-300 { animation-duration: 300ms; }
.duration-500 { animation-duration: 500ms; }

/* ============================================
   Typography Utilities (Tailwind-compatible)
   ============================================ */

/* Letter Spacing */
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }

/* Text Decoration */
.underline { text-decoration: underline; }
.no-underline { text-decoration: none; }
.decoration-2 { text-decoration-thickness: 2px; }
.decoration-4 { text-decoration-thickness: 4px; }
.underline-offset-2 { text-underline-offset: 2px; }
.underline-offset-4 { text-underline-offset: 4px; }
.underline-offset-8 { text-underline-offset: 8px; }

/* Font Weight */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Leading / Line Height */
.leading-none { line-height: 1; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }

/* ============================================
   Transform Utilities
   ============================================ */

.scale-100 { transform: scale(1); }
.scale-105 { transform: scale(1.05); }
.scale-110 { transform: scale(1.1); }
.scale-95 { transform: scale(0.95); }
.scale-90 { transform: scale(0.9); }

.translate-x-0 { transform: translateX(0); }
.translate-y-0 { transform: translateY(0); }
.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }

.rotate-0 { transform: rotate(0deg); }
.rotate-45 { transform: rotate(45deg); }
.rotate-90 { transform: rotate(90deg); }
.rotate-180 { transform: rotate(180deg); }

/* ============================================
   Transition Utilities
   ============================================ */

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-shadow {
    transition-property: box-shadow;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-none { transition-property: none; }

/* ============================================
   Opacity Utilities
   ============================================ */

.opacity-0 { opacity: 0; }
.opacity-5 { opacity: 0.05; }
.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }
.opacity-25 { opacity: 0.25; }
.opacity-30 { opacity: 0.3; }
.opacity-40 { opacity: 0.4; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-70 { opacity: 0.7; }
.opacity-75 { opacity: 0.75; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* ============================================
   Gap Utilities
   ============================================ */

.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

/* ============================================
   Sizing Utilities
   ============================================ */

.h-10 { height: 2.5rem; min-height: 2.5rem; }
.h-12 { height: 3rem; min-height: 3rem; }
.h-14 { height: 3.5rem; min-height: 3.5rem; }
.h-16 { height: 4rem; min-height: 4rem; }
.h-20 { height: 5rem; min-height: 5rem; }
.h-24 { height: 6rem; min-height: 6rem; }
.h-32 { height: 8rem; min-height: 8rem; }
.h-48 { height: 12rem; min-height: 12rem; }
.h-64 { height: 16rem; min-height: 16rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ============================================
   Flex Utilities
   ============================================ */

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1 1 0%; }
.flex-auto { flex: 1 1 auto; }
.flex-initial { flex: 0 1 auto; }
.flex-none { flex: none; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

/* ============================================
   Text Colors (Terminal colors)
   ============================================ */

.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-700 { color: #374151; }
.text-green-400 { color: #4ade80; }
.text-green-500 { color: #22c55e; }
.text-yellow-400 { color: #facc15; }
.text-blue-400 { color: #60a5fa; }
.text-red-400 { color: #f87171; }

/* ============================================
   Background Colors
   ============================================ */

.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }
.bg-transparent { background-color: transparent; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }

/* ============================================
   Border Colors
   ============================================ */

.border-white { border-color: #ffffff; }
.border-black { border-color: #000000; }
.border-gray-700 { border-color: #374151; }
.border-gray-800 { border-color: #1f2937; }

/* ============================================
   Text Gradient (for Autopilot heading)
   ============================================ */

.text-transparent {
    color: transparent;
}

.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops));
}

.from-white {
    --tw-gradient-from: #fff;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0));
}

.to-gray-500 {
    --tw-gradient-to: #6b7280;
}

/* ============================================
   Z-Index Utilities
   ============================================ */

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.-z-10 { z-index: -10; }

/* ============================================
   Position Utilities
   ============================================ */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* ============================================
   Overflow Utilities
   ============================================ */

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }

/* ============================================
   Pointer Events
   ============================================ */

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ============================================
   Cursor
   ============================================ */

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

/* ============================================
   User Select
   ============================================ */

.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* ============================================
   Spacing Utilities (Tailwind Compatible)
   ============================================ */

/* Padding X (horizontal) */
.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }

/* Padding Y (vertical) */
.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }

/* Padding all sides */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }

/* Padding individual sides */
.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pt-12 { padding-top: 3rem; }
.pt-16 { padding-top: 4rem; }
.pt-20 { padding-top: 5rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-20 { padding-bottom: 5rem; }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 0.25rem; }
.pl-2 { padding-left: 0.5rem; }
.pl-4 { padding-left: 1rem; }
.pl-6 { padding-left: 1.5rem; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 0.25rem; }
.pr-2 { padding-right: 0.5rem; }
.pr-4 { padding-right: 1rem; }
.pr-6 { padding-right: 1.5rem; }

/* Margin bottom */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-20 { margin-bottom: 5rem; }

/* Margin top */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.mt-auto { margin-top: auto; }

/* Margin left/right */
.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-4 { margin-left: 1rem; }
.ml-auto { margin-left: auto; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-4 { margin-right: 1rem; }
.mr-auto { margin-right: auto; }

/* Margin X (horizontal) */
.mx-auto { margin-left: auto; margin-right: auto; }
.mx-0 { margin-left: 0; margin-right: 0; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }

/* Margin Y (vertical) */
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }

/* Space utilities (vertical spacing between children) */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

/* Space utilities (horizontal spacing between children) */
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-x-8 > * + * { margin-left: 2rem; }

/* ============================================
   Max-Width Utilities
   ============================================ */

.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-full { max-width: 100%; }
.max-w-screen-sm { max-width: 640px; }
.max-w-screen-md { max-width: 768px; }
.max-w-screen-lg { max-width: 1024px; }
.max-w-screen-xl { max-width: 1280px; }

/* ============================================
   Text Size Utilities (with line-height)
   ============================================ */

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.text-8xl { font-size: 6rem; line-height: 1; }
.text-9xl { font-size: 8rem; line-height: 1; }

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Text transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* ============================================
   Width Utilities
   ============================================ */

.w-0 { width: 0; }
.w-1 { width: 0.25rem; }
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.w-1\/2 { width: 50%; }
.w-1\/3 { width: 33.333333%; }
.w-2\/3 { width: 66.666667%; }
.w-1\/4 { width: 25%; }
.w-3\/4 { width: 75%; }
.w-auto { width: auto; }

/* ============================================
   WordPress Block Wrapper Fixes
   ============================================ */

/* Ensure proper layout in nested WordPress blocks */
.wp-block-group:where(:not([class*="is-layout-"])) {
    display: block;
}

/* Fix alignment for columns */
.wp-block-columns.alignwide,
.wp-block-columns.alignfull {
    max-width: var(--wp--style--global--wide-size, 1400px);
    margin-left: auto;
    margin-right: auto;
}

/* Ensure proper content width in full-width sections */
.alignfull > .wp-block-group__inner-container,
.alignfull > .wp-block-columns {
    max-width: var(--wp--style--global--content-size, 1280px);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .alignfull > .wp-block-group__inner-container,
    .alignfull > .wp-block-columns {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .alignfull > .wp-block-group__inner-container,
    .alignfull > .wp-block-columns {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Grid layout for feature cards (1px gap simulation) */
.features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1px;
    background-color: var(--wp--preset--color--primary, #000);
    border: 2px solid var(--wp--preset--color--primary, #000);
}

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

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.features-grid > * {
    background-color: var(--wp--preset--color--background, #fff);
}

/* Autopilot Matrix Background Pattern */
.autopilot-matrix-bg {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Responsive text sizes */
@media (min-width: 768px) {
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

@media (min-width: 1024px) {
    .lg\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .lg\:text-5xl { font-size: 3rem; line-height: 1; }
    .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
    .lg\:text-7xl { font-size: 4.5rem; line-height: 1; }
}

/* Responsive grid columns */
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Grid display */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.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); }

/* Inline block */
.inline-block { display: inline-block; }
.block { display: block; }
.hidden { display: none; }

/* Visibility on breakpoints */
@media (min-width: 768px) {
    .md\:block { display: block; }
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:inline-flex { display: inline-flex; }
}

@media (min-width: 1024px) {
    .lg\:block { display: block; }
    .lg\:hidden { display: none; }
    .lg\:flex { display: flex; }
    .lg\:inline-flex { display: inline-flex; }
}
