/* ═══════════════════════════════════════════════════════════
   Life-Guard.be v2 — Design System (Jeton.com-inspired)
   Tailwind CSS 3.4 CDN + Custom Properties + Animations
   ═══════════════════════════════════════════════════════════ */

/* ─── Self-hosted Inter Font (variable, wght 400-800) ───── */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1D7F, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('/assets/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── CSS Custom Properties ──────────────────────────────── */
:root {
    --navy: #0A1428;
    --navy-light: #0F172A;
    --navy-mid: #1E293B;
    --navy-border: #334155;
    --green: #10B981;
    --green-dark: #059669;
    --green-light: #D1FAE5;
    --bg-light: #F8FAFC;
    --bg-alt: #F1F5F9;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --white: #FFFFFF;
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Base ───────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--white);
    background: var(--navy);
    line-height: 1.6;
}

::selection {
    background: var(--green);
    color: var(--white);
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.text-balance { text-wrap: balance; }

/* ─── Hero Section ───────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #0B1D3A 100%);
    position: relative;
    overflow: hidden;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.3), transparent);
}

/* ─── Glass Effect ───────────────────────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-light {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
}

/* ─── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--green);
    transform: translateY(-2px);
}

.card-dark {
    background: var(--navy-light);
    border: 1px solid var(--navy-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}

.card-dark:hover {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
    background: var(--green);
    color: var(--white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--green);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--green);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.5;
}

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

.btn-white {
    background: var(--white);
    color: var(--navy);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-white:hover {
    background: var(--bg-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

/* ─── Form Inputs ────────────────────────────────────────── */
.input-glass {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--white);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition);
    width: 100%;
}

.input-glass::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-glass:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

/* Select dropdown fix — native options need dark text on light bg */
select.input-glass {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.input-glass option {
    background: #1a2332;
    color: #fff;
    padding: 0.5rem;
}

select.input-glass option:checked {
    background: var(--green);
    color: #fff;
}

.input-light {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition);
    width: 100%;
}

.input-light:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
    transition: all var(--transition);
}

.navbar-scrolled {
    background: rgba(10, 20, 40, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* ─── Accordion / FAQ ────────────────────────────────────── */
.accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
}

/* ─── Stats Counter Animation ────────────────────────────── */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* ─── Trust Badges ───────────────────────────────────────── */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--green);
    white-space: nowrap;
}

/* ─── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumb a {
    color: var(--green);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumb a:hover {
    color: var(--green-dark);
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ─── Province/City Grid ─────────────────────────────────── */
.geo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

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

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

/* ─── Section Dividers ───────────────────────────────────── */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--navy-border), transparent);
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.animate-pulse-green {
    animation: pulse-green 2s infinite;
}

/* Staggered delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* ─── Scroll Reveal (Alpine.js intersect) ────────────────── */
[x-intersect] {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

[x-intersect].visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Progress Bar (lead form) ───────────────────────────── */
.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--green);
    border-radius: 2px;
    transition: width 0.4s ease-out;
}

/* ─── Tooltip ────────────────────────────────────────────── */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 0.75rem;
    background: var(--navy);
    color: var(--white);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    margin-bottom: 0.5rem;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer-gradient {
    background: linear-gradient(180deg, var(--navy-light) 0%, var(--navy) 100%);
}

/* ─── Constellation Links ────────────────────────────────── */
.constellation-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--navy-border);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    transition: all var(--transition);
    text-decoration: none;
}

.constellation-link:hover {
    border-color: var(--green);
    color: var(--white);
    background: rgba(16, 185, 129, 0.1);
}

/* ─── Responsive Utilities ───────────────────────────────── */
.container-narrow {
    max-width: 48rem;
    margin: 0 auto;
}

/* ─── Prose Overrides (Article/Guide/FAQ content) ────────── */
.prose {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}

.prose h2 {
    scroll-margin-top: 5rem;
}

.prose img {
    border-radius: var(--radius-xl);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.prose table {
    font-size: 0.9375rem;
    border-collapse: collapse;
}

.prose table th {
    background: #F8FAFC;
    font-weight: 600;
}

.prose table td,
.prose table th {
    padding: 0.625rem 0.75rem;
    border: 1px solid #E5E7EB;
}

.prose blockquote {
    border-left-color: var(--green);
    background: #F0FDF4;
    padding: 1rem 1.25rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.prose a {
    color: var(--green-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: var(--green);
}

@media (max-width: 640px) {
    .prose {
        font-size: 1rem;
        line-height: 1.75;
    }
    .prose h2 {
        font-size: 1.375rem;
    }
    .prose h3 {
        font-size: 1.125rem;
    }
    .prose table {
        font-size: 0.8125rem;
    }
    .prose table td,
    .prose table th {
        padding: 0.5rem;
    }
}

/* ─── SEO Content Styling ────────────────────────────────── */
.seo-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.seo-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.seo-content p {
    margin-bottom: 1rem;
    color: #94A3B8;
    line-height: 1.75;
}

.seo-content ul, .seo-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
    color: #94A3B8;
    line-height: 1.6;
}

.seo-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.seo-content table th {
    background: var(--navy-mid);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--navy-border);
    color: var(--white);
}

.seo-content table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--navy-border);
    color: #94A3B8;
}

.seo-content table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.seo-content strong {
    color: var(--white);
    font-weight: 600;
}

/* ─── Print ──────────────────────────────────────────────── */
@media print {
    .no-print { display: none !important; }
    body { color: #000; background: #fff; }
}
