/* =========================================================
   GLOBAL RESET & BASE
   ========================================================= */

:root {
    scroll-behavior: smooth;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.6;
    color: #0f172a; /* slate-900 */
    background-color: #f9fafb;
}

::selection {
    background: rgba(59, 130, 246, 0.25); /* blue-500/25 */
    color: #0f172a; /* slate-900 */
}

h1, h2, h3, h4 {
    letter-spacing: 0.01em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Dark mode body background override */
.dark body {
    background-color: #020617;
    color: #e5e7eb;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav-link {
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #4b5563; /* gray-700 */
    padding-bottom: 0.35rem;
    border-bottom: 2px solid transparent;
    text-decoration: none;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        opacity 0.2s ease,
        transform 0.2s ease;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -110%;
    width: 110%;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #6366f1, #a855f7);
    transition: left 0.25s ease-out;
}

.nav-link:hover {
    color: #1d4ed8;           /* blue-700 */
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-link:hover::before {
    left: 0;
}

/* dark mode nav */
.dark .nav-link {
    color: #e5e7eb; /* gray-200 */
}

.dark .nav-link:hover {
    color: #bfdbfe; /* blue-200 */
}

/* active nav */
.nav-link-active {
    color: #1d4ed8;
    border-color: transparent;
}

.nav-link-active::before {
    left: 0;
}

.dark .nav-link-active {
    color: #93c5fd; /* blue-300 */
}

/* =========================================================
   THEME TOGGLE BUTTON
   ========================================================= */

.theme-toggle {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 9999px;
    box-shadow:
        0 10px 15px -3px rgba(15, 23, 42, 0.15),
        0 4px 6px -4px rgba(15, 23, 42, 0.1);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px) rotate(15deg);
    box-shadow:
        0 18px 25px -5px rgba(15, 23, 42, 0.25),
        0 10px 10px -5px rgba(15, 23, 42, 0.15);
}

.dark .theme-toggle {
    background-color: rgba(15, 23, 42, 0.95);
    box-shadow:
        0 10px 15px -3px rgba(15, 23, 42, 0.6),
        0 4px 6px -4px rgba(15, 23, 42, 0.4);
    border-color: #4b5563;
}

/* icon switching */
.theme-toggle .sun-icon {
    display: block;
}

.theme-toggle .moon-icon {
    display: none;
}

.dark .theme-toggle .sun-icon {
    display: none;
}

.dark .theme-toggle .moon-icon {
    display: block;
}

/* =========================================================
   HERO / GRADIENT BACKGROUND
   ========================================================= */

/* Force hero to be properly dark so white text is readable */
.gradient-bg {
    background: radial-gradient(circle at top left, #020617 0%, #020617 45%, #000000 100%) !important;
    color: #f9fafb;
}

/* Dark mode hero – slightly deeper but same feel */
.dark .gradient-bg {
    background: radial-gradient(circle at top left, #020617 0%, #020617 55%, #000000 100%) !important;
    color: #f9fafb;
}

/* Just in case any parent sets opacity, keep hero content solid */
.gradient-bg * {
    color: inherit;
}

/* 🔥 HERO OVERLAY FIX – remove light overlays & opacity inside hero */
.gradient-bg [class*="bg-white"],
.gradient-bg [class*="bg-gray-50"],
.gradient-bg [class*="bg-gray-100"],
.gradient-bg [class*="bg-slate-50"],
.gradient-bg [class*="bg-slate-100"] {
    background-color: transparent !important;
}

.gradient-bg [class*="opacity-"] {
    opacity: 1 !important;
}

/* Optional helpers if you use them */
.hero-title {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hero-subtitle {
    max-width: 40rem;
    margin-inline: auto;
}

/* =========================================================
   BADGES / CHIPS
   ========================================================= */

.badge-pill {
    border-radius: 9999px;
    padding: 0.3rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(37, 99, 235, 0.95));
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.chip {
    border-radius: 9999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 500;
    background-color: rgba(15, 23, 42, 0.06);
    color: #374151;
}

.dark .chip {
    background-color: rgba(148, 163, 184, 0.12);
    color: #e5e7eb;
}

/* =========================================================
   CARDS / SECTIONS
   ========================================================= */

.section-card {
    border-radius: 1.5rem;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
    box-shadow:
        0 18px 45px -20px rgba(15, 23, 42, 0.35),
        0 6px 15px -8px rgba(15, 23, 42, 0.25);
}

.dark .section-card {
    background-color: #020617;
}

.section-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(148, 163, 184, 0.35); /* slate-400/35 */
    pointer-events: none;
}

.section-card > * {
    position: relative;
    z-index: 1;
}

/* cards that are <a class="block"> inside */
.section-card a.block {
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.section-card a.block:hover {
    transform: translateY(-2px);
    box-shadow:
        0 16px 35px -18px rgba(15, 23, 42, 0.4),
        0 8px 16px -10px rgba(15, 23, 42, 0.3);
}

/* =========================================================
   FAQ DROPDOWN (details/summary)
   ========================================================= */

.summary-chevron summary span:last-child {
    transition: transform 0.2s ease;
}

details[open].summary-chevron summary span:last-child {
    transform: rotate(180deg);
}

/* =========================================================
   LIGHT CARDS / UTILITIES
   ========================================================= */

.light-card {
    border-radius: 1.25rem;
    border: 1px solid rgba(209, 213, 219, 0.8); /* gray-300 */
    background-color: #ffffff;
    padding: 1.25rem;
}

.dark .light-card {
    border-color: rgba(55, 65, 81, 0.9);
    background-color: #020617;
}

/* Progress bar gradient if Tailwind classes not enough */
.composite-bar-gradient {
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
}

/* Simple link style override if needed */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* =========================================================
   RESPONSIVE TWEAKS
   ========================================================= */

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.9rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-card {
        border-radius: 1.25rem;
    }
}
