/* ── Base styles loaded before Tailwind CDN ─────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #111827;
    background-color: #f9fafb;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { cursor: pointer; font-family: inherit; }

/* ── Prevent FOUC: hide Alpine x-cloak elements ─────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Smooth page transitions ─────────────────────────────────────────────── */
main { min-height: 60vh; }

/* ── Custom scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Focus ring ──────────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ── Hero slideshow height fix ───────────────────────────────────────────── */
.hero-slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── Prose content (blog posts) ──────────────────────────────────────────── */
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 1rem; color: #111827; }
.prose h3 { font-size: 1.25rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: #1f2937; }
.prose p  { margin: 0 0 1.25rem; color: #374151; line-height: 1.75; }
.prose ul { margin: 0 0 1.25rem 1.5rem; list-style: disc; color: #374151; }
.prose ol { margin: 0 0 1.25rem 1.5rem; list-style: decimal; color: #374151; }
.prose li { margin-bottom: 0.5rem; line-height: 1.7; }
.prose a  { color: #1d4ed8; text-decoration: underline; }
.prose blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1rem;
    color: #6b7280;
    font-style: italic;
    margin: 1.5rem 0;
}
.prose img { border-radius: 0.75rem; margin: 1.5rem 0; }
.prose strong { font-weight: 600; color: #111827; }

/* ── Card hover lift ─────────────────────────────────────────────────────── */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.10);
}

/* ── Gradient text ───────────────────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, #1d4ed8, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Section divider ─────────────────────────────────────────────────────── */
.section-divider {
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8 0%, #f97316 50%, #1d4ed8 100%);
    border: none;
    margin: 0;
}

/* ── Page header hero ────────────────────────────────────────────────────── */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: 4rem 0 5rem;
}
@media (min-width: 768px) {
    .page-hero { padding: 5.5rem 0 6.5rem; }
}

/* Diagonal bottom clip */
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: #f9fafb;
    clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

/* Decorative blobs */
.page-hero-blob-1 {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.page-hero-blob-2 {
    position: absolute;
    bottom: 20px;
    left: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(249,115,22,0.12);
    pointer-events: none;
}
.page-hero-blob-3 {
    position: absolute;
    top: 40px;
    right: 30%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

/* Dot grid overlay */
.page-hero-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 10;
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 640px)  { .page-hero-content { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .page-hero-content { padding: 0 2rem; } }

/* Eyebrow label */
.page-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fed7aa;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    backdrop-filter: blur(4px);
}

/* Breadcrumb back link */
.page-hero-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: rgba(191,219,254,0.85);
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: color 0.15s;
}
.page-hero-back:hover { color: #fff; }

/* Title */
.page-hero h1 {
    font-size: clamp(1.875rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

/* Subtitle */
.page-hero-sub {
    font-size: 1.0625rem;
    color: rgba(219,234,254,0.9);
    line-height: 1.7;
    max-width: 36rem;
    margin: 0 0 2rem;
}

/* Orange accent underline on title */
.page-hero h1 span.accent {
    position: relative;
    display: inline-block;
}
.page-hero h1 span.accent::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 3px;
    background: #f97316;
    border-radius: 2px;
}

/* ── Respect reduced motion ──────────────────────────────────────────────── */
/* (handled inline in base.php after Tailwind loads) */
