/* ============================================
   TECHenya Solutions — Design System
   Centralized design tokens + premium components.
   All brand colors flow from :root CSS vars.
   ============================================ */

/* ─── Design Tokens ─────────────────────────────── */
:root {
    /* Brand Colors */
    --te-blue: #0a66c2;
    --te-blue-light: #2d8bda;
    --te-blue-dark: #084e96;
    --te-blue-50: rgba(10, 102, 194, 0.06);
    --te-blue-100: rgba(10, 102, 194, 0.12);

    --te-navy: #0f172a;
    --te-navy-light: #1e293b;
    --te-navy-dark: #020617;
    --te-navy-50: rgba(15, 23, 42, 0.06);
    --te-navy-100: rgba(15, 23, 42, 0.12);

    --te-orange: #ff6b35;
    --te-orange-light: #ff8f66;
    --te-orange-dark: #e0541e;
    --te-orange-50: rgba(255, 107, 53, 0.08);

    --te-teal: #00d4aa;
    --te-teal-dark: #00b894;
    --te-teal-50: rgba(0, 212, 170, 0.08);

    /* Neutrals (slate-tinted for premium feel) */
    --te-gray-50: #f8fafc;
    --te-gray-100: #f1f5f9;
    --te-gray-200: #e2e8f0;
    --te-gray-300: #cbd5e1;
    --te-gray-400: #94a3b8;
    --te-gray-500: #64748b;
    --te-gray-600: #475569;
    --te-gray-700: #334155;
    --te-gray-800: #1e293b;
    --te-gray-900: #0f172a;

    /* Functional */
    --te-success: #00d4aa;
    --te-success-bg: #ecfdf5;
    --te-error: #ef4444;
    --te-error-bg: #fef2f2;
    --te-warning: var(--te-orange);
    --te-info: var(--te-blue);

    /* Shadows (depth system) */
    --te-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --te-shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --te-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --te-shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.04);
    --te-shadow-xl: 0 20px 50px rgba(15, 23, 42, 0.14), 0 8px 16px rgba(15, 23, 42, 0.06);
    --te-shadow-blue: 0 8px 30px rgba(10, 102, 194, 0.25);
    --te-shadow-orange: 0 8px 30px rgba(255, 107, 53, 0.25);

    /* Radius */
    --te-radius-sm: 0.5rem;
    --te-radius-md: 0.75rem;
    --te-radius-lg: 1rem;
    --te-radius-xl: 1.5rem;
    --te-radius-full: 9999px;

    /* Spacing */
    --te-section-padding: clamp(2.5rem, 5vw, 4rem);

    /* Transitions */
    --te-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --te-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --te-duration: 0.3s;
    --te-duration-slow: 0.5s;

    /* Gradients */
    --te-gradient-hero: linear-gradient(135deg, var(--te-navy) 0%, var(--te-blue) 100%);
    --te-gradient-primary: linear-gradient(135deg, var(--te-blue), var(--te-navy));
    --te-gradient-cta: linear-gradient(135deg, var(--te-orange), var(--te-orange-dark));
    --te-gradient-dark: linear-gradient(135deg, var(--te-navy), var(--te-navy-dark));
    --te-gradient-surface: linear-gradient(135deg, var(--te-gray-50) 0%, var(--te-gray-100) 100%);
}

/* ─── Typography ────────────────────────────────── */
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--te-gray-700);
    background: #fff;
    font-size: 1rem;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-heading {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: var(--te-navy);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 700;
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.375rem);
    font-weight: 600;
}

h5 {
    font-size: 1.125rem;
    font-weight: 600;
}

h6 {
    font-size: 1rem;
    font-weight: 600;
}

a {
    transition: color var(--te-duration) var(--te-ease);
}

/* ─── Buttons ───────────────────────────────────── */
.te-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8125rem 2rem;
    border-radius: var(--te-radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
    cursor: pointer;
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: all var(--te-duration) var(--te-ease);
}

.te-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--te-duration) var(--te-ease);
    z-index: -1;
}

.te-btn:hover {
    transform: translateY(-2px);
}

.te-btn:active {
    transform: translateY(0);
}

/* Primary — blue→navy gradient */
.te-btn-primary {
    background: var(--te-gradient-primary);
    color: #fff;
    box-shadow: var(--te-shadow-blue);
}

.te-btn-primary::after {
    background: rgba(255, 255, 255, 0.1);
}

.te-btn-primary:hover::after {
    opacity: 1;
}

.te-btn-primary:hover {
    box-shadow: 0 12px 35px rgba(31, 116, 172, 0.35);
}

/* Secondary — orange gradient */
.te-btn-secondary {
    background: var(--te-gradient-cta);
    color: #fff;
    box-shadow: var(--te-shadow-orange);
}

.te-btn-secondary::after {
    background: rgba(255, 255, 255, 0.12);
}

.te-btn-secondary:hover::after {
    opacity: 1;
}

.te-btn-secondary:hover {
    box-shadow: 0 12px 35px rgba(244, 160, 64, 0.35);
}

/* Outline — blue border */
.te-btn-outline {
    background: transparent;
    color: var(--te-blue);
    border: 2px solid var(--te-blue);
}

.te-btn-outline:hover {
    background: var(--te-blue);
    color: #fff;
    box-shadow: var(--te-shadow-blue);
}

/* White — glass */
.te-btn-white {
    background: #fff;
    color: var(--te-navy);
    box-shadow: var(--te-shadow-md);
}

.te-btn-white:hover {
    box-shadow: var(--te-shadow-lg);
}

/* ─── Inline Lead Capture Form ─── */
.te-inline-lead-form .flex {
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: var(--te-shadow-lg);
    background: #fff;
}

.te-inline-lead-input {
    flex: 1;
    min-width: 180px;
    padding: 0.85rem 1.25rem;
    border: 2px solid rgba(15, 23, 42, 0.15);
    outline: none;
    font-size: 0.95rem;
    color: var(--te-navy);
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s ease;
}

.te-inline-lead-input:focus {
    border-color: var(--te-blue);
}

.te-inline-lead-input::placeholder {
    color: #a0aec0;
    font-size: 0.875rem;
}

.te-inline-lead-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    background: var(--te-orange);
    color: #fff;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.te-inline-lead-btn:hover {
    background: #c65d1a;
}

.te-inline-lead-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.te-inline-lead-msg {
    font-size: 0.75rem;
    padding-left: 1.25rem;
}

.te-inline-lead-msg.text-green-500 {
    color: #48bb78;
}

.te-inline-lead-msg.text-red-400 {
    color: #fc8181;
}

/* Dark variant — on navy background */
.te-inline-lead-form--dark .flex {
    background: transparent;
    border: none;
}

.te-inline-lead-form--dark .te-inline-lead-input {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.25);
}

.te-inline-lead-form--dark .te-inline-lead-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
}

.te-inline-lead-form--dark .te-inline-lead-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Ghost — text button */
.te-btn-ghost {
    background: transparent;
    color: var(--te-blue);
    padding: 0.5rem 1rem;
}

.te-btn-ghost:hover {
    background: var(--te-blue-50);
    transform: none;
}

/* ─── Cards ─────────────────────────────────────── */
.te-card {
    background: #fff;
    border-radius: var(--te-radius-lg);
    box-shadow: var(--te-shadow-sm);
    border: 1px solid var(--te-gray-100);
    overflow: hidden;
    transition: all var(--te-duration) var(--te-ease);
}

.te-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--te-shadow-xl);
    border-color: var(--te-gray-200);
}

.te-card-glass {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--te-radius-lg);
}

.te-card-flat {
    background: var(--te-gray-50);
    border-radius: var(--te-radius-lg);
    border: 1px solid var(--te-gray-100);
    transition: all var(--te-duration) var(--te-ease);
}

.te-card-flat:hover {
    background: #fff;
    box-shadow: var(--te-shadow-md);
}

/* ─── Sections ──────────────────────────────────── */
.te-section {
    position: relative;
    overflow: hidden;
}

.te-section-dark {
    background: var(--te-gradient-dark);
    color: #fff;
}

.te-section-blue {
    background: linear-gradient(135deg, var(--te-blue), var(--te-blue-dark));
    color: #fff;
}

.te-section-light {
    background: #eef1f8;
}

.te-section-gradient {
    background: var(--te-gradient-surface);
}

/* ─── Container ─────────────────────────────────── */
.te-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .te-container {
        padding: 0 2rem;
    }
}

/* ─── Forms ─────────────────────────────────────── */
.te-input,
.te-textarea,
.te-select {
    width: 100%;
    padding: 0.8125rem 1.125rem;
    border: 2px solid var(--te-gray-200);
    border-radius: var(--te-radius-md);
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: var(--te-gray-800);
    transition: border-color var(--te-duration) var(--te-ease),
        box-shadow var(--te-duration) var(--te-ease);
}

.te-input:focus,
.te-textarea:focus,
.te-select:focus {
    outline: none;
    border-color: var(--te-blue);
    box-shadow: 0 0 0 4px var(--te-blue-50);
}

.te-input::placeholder,
.te-textarea::placeholder {
    color: var(--te-gray-400);
}

.te-textarea {
    min-height: 120px;
    resize: vertical;
}

/* ─── Select dropdown fix ─── */
select.te-input option {
    color: #1a1a2e;
    background: #fff;
}

/* ─── Dark form theme (on navy/gradient backgrounds) ─── */
.te-form-dark .te-input,
.te-form-dark .te-textarea,
.te-form-dark select.te-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.te-form-dark .te-input::placeholder,
.te-form-dark .te-textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.te-form-dark .te-input:focus,
.te-form-dark .te-textarea:focus,
.te-form-dark select.te-input:focus {
    border-color: var(--te-teal);
    box-shadow: 0 0 0 4px rgba(56, 178, 172, 0.15);
}

/* ─── SVG icon wrapper for cards ─── */
.te-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--te-radius-md);
    background: var(--te-blue-50);
    margin-bottom: 0.75rem;
    flex-shrink: 0;
}

.te-icon-wrap svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 1.75;
}

.te-icon-wrap--dark {
    background: rgba(255, 255, 255, 0.1);
}

.te-icon-wrap--orange {
    background: rgba(231, 111, 36, 0.1);
}

.te-icon-wrap--teal {
    background: rgba(56, 178, 172, 0.1);
}

.te-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--te-gray-700);
    margin-bottom: 0.375rem;
}

/* ─── Hero Sections ─────────────────────────────── */
.te-hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.te-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(35, 44, 101, 0.92) 0%, rgba(31, 116, 172, 0.85) 100%);
    z-index: 1;
}

.te-hero-content {
    position: relative;
    z-index: 2;
}

/* ─── Gradient Text ─────────────────────────────── */
.te-gradient-text {
    background: linear-gradient(135deg, var(--te-blue), var(--te-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.te-gradient-text-blue {
    background: linear-gradient(135deg, var(--te-blue-light), var(--te-navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.te-gradient-text-cta {
    background: linear-gradient(135deg, var(--te-orange), var(--te-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.te-gradient-text-teal {
    background: linear-gradient(135deg, var(--te-teal), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ─── Parallax Background ──────────────────────── */
.te-parallax-bg {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ─── Badge / Tag ───────────────────────────────── */
.te-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--te-radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: all var(--te-duration) var(--te-ease);
}

.te-badge-blue {
    background: var(--te-blue-50);
    color: var(--te-blue);
    border: 1px solid var(--te-blue-100);
}

.te-badge-orange {
    background: var(--te-orange-50);
    color: var(--te-orange-dark);
    border: 1px solid rgba(244, 160, 64, 0.15);
}

.te-badge-green {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.te-badge-gray {
    background: var(--te-gray-50);
    color: var(--te-gray-600);
    border: 1px solid var(--te-gray-200);
}

.te-badge-navy {
    background: var(--te-navy-50);
    color: var(--te-navy);
    border: 1px solid var(--te-navy-100);
}

/* ─── Dividers ──────────────────────────────────── */
.te-divider-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.te-divider-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* ─── Stretched Link ────────────────────────────── */
.stretched-link::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: '';
}

/* ─── Line Clamp ────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── WordPress Pagination ──────────────────────── */
.te-pagination {
    display: flex;
    justify-content: center;
}

.te-pagination .nav-links {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.te-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: var(--te-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--te-gray-600);
    background: var(--te-gray-50);
    border: 1px solid var(--te-gray-100);
    text-decoration: none;
    transition: all var(--te-duration) var(--te-ease);
}

.te-pagination .page-numbers:hover,
.te-pagination .page-numbers.current {
    background: var(--te-blue);
    color: #fff;
    border-color: var(--te-blue);
    box-shadow: var(--te-shadow-blue);
}

/* ─── Scrollbar ─────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--te-gray-50);
}

::-webkit-scrollbar-thumb {
    background: var(--te-gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--te-gray-400);
}

/* ─── Loading Spinner ───────────────────────────── */
.te-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: te-spin 0.6s linear infinite;
}

.te-spinner-blue {
    border-color: var(--te-blue-100);
    border-top-color: var(--te-blue);
}

@keyframes te-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Toast Notification ────────────────────────── */
.te-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    padding: 1rem 1.5rem;
    border-radius: var(--te-radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--te-shadow-xl);
    transform: translateX(120%);
    transition: transform 0.4s var(--te-ease);
    max-width: 400px;
    backdrop-filter: blur(10px);
}

.te-toast.show {
    transform: translateX(0);
}

.te-toast-success {
    background: var(--te-success-bg);
    color: #065f46;
    border-left: 4px solid var(--te-success);
}

.te-toast-error {
    background: var(--te-error-bg);
    color: #991b1b;
    border-left: 4px solid var(--te-error);
}

/* ─── Modal / Popup System ──────────────────────── */
.te-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(26, 32, 80, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--te-duration-slow) var(--te-ease),
        visibility var(--te-duration-slow) var(--te-ease);
}

.te-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.te-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 9999;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    visibility: hidden;
    transition: all var(--te-duration-slow) var(--te-ease-bounce);
}

.te-modal-content.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

/* ─── Accordion (FAQ details/summary) ───────────── */
details.te-card {
    cursor: default;
}

details.te-card summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    user-select: none;
}

details.te-card summary::-webkit-details-marker {
    display: none;
}

details.te-card summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--te-blue);
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--te-radius-full);
    background: var(--te-blue-50);
    transition: all var(--te-duration) var(--te-ease);
}

details[open].te-card summary::after {
    content: '−';
    background: var(--te-blue);
    color: #fff;
    transform: rotate(180deg);
}

details.te-card>div,
details.te-card>p {
    animation: te-accordion-open 0.3s var(--te-ease);
}

@keyframes te-accordion-open {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Counter Animation ─────────────────────────── */
.te-counter {
    font-variant-numeric: tabular-nums;
    transition: all 0.05s linear;
}

/* ─── Image Placeholder ─────────────────────────── */
.te-img-placeholder {
    background: var(--te-gradient-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--te-gray-400);
    font-size: 0.75rem;
    text-align: center;
}

/* ─── Prose Overrides (WP content) ──────────────── */
.prose a {
    color: var(--te-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--te-duration) var(--te-ease);
}

.prose a:hover {
    color: var(--te-blue-dark);
}

.prose h2,
.prose h3,
.prose h4 {
    color: var(--te-navy);
    font-family: 'Space Grotesk', sans-serif;
}

.prose blockquote {
    border-left-color: var(--te-blue);
    background: var(--te-blue-50);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--te-radius-md) var(--te-radius-md) 0;
}

.prose code {
    background: var(--te-gray-100);
    color: var(--te-navy);
    padding: 0.2em 0.4em;
    border-radius: var(--te-radius-sm);
    font-size: 0.875em;
}

/* ─── Utility Classes ───────────────────────────── */
.te-bg-dots {
    background-color: #eef1f8;
    background-image: radial-gradient(#c5c9d9 1px, transparent 1px);
    background-size: 24px 24px;
}

.te-bg-grid {
    background-image:
        linear-gradient(var(--te-gray-100) 1px, transparent 1px),
        linear-gradient(90deg, var(--te-gray-100) 1px, transparent 1px);
    background-size: 40px 40px;
}

.te-glow-blue {
    box-shadow: 0 0 40px rgba(31, 116, 172, 0.15);
}

.te-glow-orange {
    box-shadow: 0 0 40px rgba(244, 160, 64, 0.15);
}

/* ─── Selection ─────────────────────────────────── */
::selection {
    background: var(--te-blue);
    color: #fff;
}

/* ─── Focus Visible ─────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--te-blue);
    outline-offset: 2px;
}

/* ─── Smooth scroll ─────────────────────────────── */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── Hardcoded Gradients (Tailwind CDN can't compile custom te-* colors in gradients) ─── */
.bg-gradient-te-hero {
    background: linear-gradient(to bottom right, #0f172a, #0a66c2) !important;
}

.bg-gradient-te-primary {
    background: linear-gradient(to right, #0a66c2, #0f172a) !important;
}

.bg-gradient-te-cta {
    background: linear-gradient(to right, #ff6b35, #e0541e) !important;
}

.bg-gradient-te-reversed {
    background: linear-gradient(to right, #0f172a, #0a66c2) !important;
}

.bg-gradient-te-hero-nav {
    background: linear-gradient(to bottom right, #0f172a, #1e293b, #0a66c2) !important;
}

/* ─── Text Contrast Overrides ─── */
.text-gray-300 {
    color: #cbd5e1 !important;
}

.text-gray-400 {
    color: #94a3b8 !important;
}

.text-gray-500 {
    color: #64748b !important;
}

.text-gray-600 {
    color: #475569 !important;
}

.text-gray-700 {
    color: #334155 !important;
}

.text-gray-800 {
    color: #1e293b !important;
}

/* ─── Dark Section Backgrounds (CSS fallback) ──── */
/* Tailwind CDN does not reliably generate custom gradient utilities,
   so we set explicit backgrounds using the :root CSS custom properties. */
#te-hero-section {
    background: linear-gradient(135deg, var(--te-navy), var(--te-navy-dark), var(--te-blue)) !important;
}

#te-funnel-section {
    background: linear-gradient(135deg, var(--te-navy), var(--te-navy-dark), var(--te-blue)) !important;
}

#te-thought-section {
    background: linear-gradient(135deg, var(--te-navy), var(--te-navy-dark), var(--te-blue)) !important;
}

#te-cta-card {
    background: linear-gradient(135deg, var(--te-navy), var(--te-navy-dark), var(--te-blue)) !important;
}

.bg-gradient-te-hero {
    background: linear-gradient(135deg, var(--te-navy), var(--te-navy-dark), var(--te-blue)) !important;
}

#te-footer {
    background-color: var(--te-navy) !important;
    color: #fff;
}

.bg-te-navy .text-gray-300,
[class*="bg-gradient-te-"] .text-gray-300,
[class*="from-te-navy"] .text-gray-300,
#te-footer .text-gray-300 {
    color: #e2e8f0 !important;
}

[class*="bg-gradient-te-"] .text-gray-400,
[class*="from-te-navy"] .text-gray-400,
#te-footer .text-gray-400 {
    color: #cbd5e1 !important;
}

/* ─── Tool Shimmer Skeleton ─────────────────────────── */
.te-shimmer {
    background: linear-gradient(90deg, #eef1f8 25%, #dce1ef 50%, #eef1f8 75%);
    background-size: 200% 100%;
    animation: te-shimmer 1.5s infinite ease-in-out;
}

@keyframes te-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.te-pulse-text {
    animation: te-pulse-text 2s infinite ease-in-out;
}

@keyframes te-pulse-text {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ─── Payment UI Overrides ──────────────────────────── */
/* NOTE: Main modal styles are above (.te-modal-backdrop / .te-modal-content) */

/* Payment-specific modal uses display:flex approach for centering */
.te-payment-modal.te-modal-backdrop {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 1;
    visibility: visible;
}

.te-payment-modal.te-modal-backdrop.hidden {
    display: none;
    opacity: 0;
    visibility: hidden;
}

.te-payment-modal .te-modal-content {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    max-height: 90vh;
    overflow-y: auto;
    animation: te-modal-enter 0.3s ease-out;
}

@keyframes te-modal-enter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Currency toggle */
.te-currency-toggle {
    background: var(--te-gray-100);
    color: var(--te-gray-600);
    cursor: pointer;
    border: none;
}

.te-currency-toggle.te-currency-active {
    background: var(--te-navy);
    color: white;
}

/* Payment method cards */
.te-payment-method>div {
    border-color: var(--te-gray-200);
}

.te-payment-method-active>div,
.te-payment-method:has(input:checked)>div {
    border-color: var(--te-blue);
    background: var(--te-blue-50);
}

/* ─── Transparent → Sticky Header ──────────────────── */
.te-header {
    background: transparent;
    padding-bottom: 20px;
}

.te-header .te-header-logo {
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: filter 0.3s ease;
}

.te-header.te-header--scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0;
}

.te-header.te-header--scrolled #te-header-inner {
    height: 70px;
}

/* Burger lines: white with shadow → dark on scroll */
.te-header .te-burger-line {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.te-header.te-header--scrolled .te-burger-line {
    background-color: var(--te-navy);
    filter: none;
}

/* Menu label: white with shadow → dark on scroll */
.te-header .te-menu-label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.te-header.te-header--scrolled .te-menu-label {
    color: var(--te-navy);
    text-shadow: none;
}

/* Hover state for burger button when scrolled */
.te-header.te-header--scrolled .te-header--scrolled-hover:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Logo: inverted (white) → original on scroll */
.te-header.te-header--scrolled .te-header-logo {
    filter: none;
}

/* Logo container styling for transparent header - white bg with orange accents */
.te-header:not(.te-header--scrolled) .te-header-logo {
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 8px;
    border-radius: 4px;
    border-top: 2px solid var(--te-orange);
    border-bottom: 2px solid var(--te-orange);
    filter: none;
}

/* Solid header state for non-homepage pages */
.te-header.te-header--solid {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding-bottom: 0;
}

.te-header.te-header--solid #te-header-inner {
    height: 70px;
}

.te-header.te-header--solid .te-burger-line {
    background-color: var(--te-navy);
    filter: none;
}

.te-header.te-header--solid .te-menu-label {
    color: var(--te-navy);
    text-shadow: none;
}

.te-header.te-header--solid .te-header-cta {
    background: var(--te-blue);
    border-color: transparent;
    color: #fff;
    text-shadow: none;
    box-shadow: none;
}

.te-header.te-header--solid .te-header-cta:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.25);
}

.te-header.te-header--solid .te-header-logo {
    background: transparent;
    padding: 0;
    border: none;
}

/* CTA button: default state for transparent header (white outline) */
.te-header .te-header-cta {
    border: 2px solid #fff;
    color: #fff;
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.te-header .te-header-cta:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* CTA button: solid blue on scroll */
.te-header.te-header--scrolled .te-header-cta {
    background: var(--te-blue);
    border-color: transparent;
    color: #fff;
    text-shadow: none;
    box-shadow: none;
}

.te-header.te-header--scrolled .te-header-cta:hover {
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.25);
}

/* On pages with light hero backgrounds, hide spacer if header overlaps */
.te-hero+#te-header-spacer,
[data-te-fx="hero-dark"]~#te-header-spacer {
    display: none;
}

/* Reduce hero top padding on pages with solid header (non-homepage) */
/* The spacer already provides 70px, so hero only needs minimal top padding */
body:not(.home) main > section:first-child,
body:not(.home) main > article > section:first-child {
    padding-top: 2rem !important; /* 32px - consistent across all pages */
}

@media (min-width: 1024px) {
    body:not(.home) main > section:first-child,
    body:not(.home) main > article > section:first-child {
        padding-top: 2.5rem !important; /* 40px on desktop */
    }
}

/* ─── Mega Menu ─────────────────────────────────────── */
.te-mega-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--te-duration) var(--te-ease),
        visibility var(--te-duration) var(--te-ease);
}

.te-mega-overlay.active {
    opacity: 1;
    visibility: visible;
}

.te-mega-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.4s var(--te-ease);
    overflow-y: auto;
    box-shadow: var(--te-shadow-xl);
}

.te-mega-panel.active {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .te-mega-panel {
        max-width: 860px;
    }
}

/* ═══════ Animated Background Effects ═══════ */

/* Container for all particles within a section */
.te-fx-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Individual particle */
.te-fx-particle {
    position: absolute;
    will-change: transform, opacity;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

/* ─── Shape variants ─────────────────────────── */
.te-fx-particle--circle {
    border-radius: 50%;
}

.te-fx-particle--hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.te-fx-particle--triangle {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.te-fx-particle--diamond {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.te-fx-particle--ring {
    border-radius: 50%;
    background: transparent !important;
    border: 2px solid currentColor;
}

.te-fx-particle--cross {
    clip-path: polygon(35% 0%, 65% 0%, 65% 35%, 100% 35%, 100% 65%, 65% 65%, 65% 100%, 35% 100%, 35% 65%, 0% 65%, 0% 35%, 35% 35%);
}

.te-fx-particle--dot {
    border-radius: 50%;
}

/* ─── Drift path keyframes ───────────────────── */
@keyframes teFxDrift1 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    50% {
        transform: translate(60px, -80px) rotate(180deg);
    }
}

@keyframes teFxDrift2 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    50% {
        transform: translate(-40px, -120px) rotate(-90deg);
    }
}

@keyframes teFxDrift3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(0.8);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    50% {
        transform: translate(80px, -60px) rotate(120deg) scale(1.2);
    }
}

@keyframes teFxDrift4 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    15% {
        opacity: 0.6;
    }

    85% {
        opacity: 0.6;
    }

    50% {
        transform: translate(-70px, -100px) rotate(270deg);
    }
}

@keyframes teFxDrift5 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    33% {
        transform: translate(40px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-30px, -90px) scale(0.9);
    }
}

@keyframes teFxPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.7;
    }
}

@keyframes teFxSpin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes teFxFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .te-fx-particle {
        animation: none !important;
        opacity: 0.15 !important;
    }
}