@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --color-primary: #0d9488;
    --color-primary-dark: #0f766e;
    --color-hover: #14b8a6;
    --color-accent: #ccfbf1;
    --color-bg: #f0fdfa;
    --font-main: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', 'Figtree', system-ui, sans-serif;
    --border-radius: 12px;
    --card-radius: 16px;
    --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.06);
    --shadow: 0 10px 25px -3px rgba(13, 148, 136, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 20px 35px -5px rgba(13, 148, 136, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
}

body {
    font-family: var(--font-main);
    color: #1f2937;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

/* Primary color utilities */
.bg-primary { background-color: var(--color-primary) !important; }
.text-primary { color: var(--color-primary) !important; }
.border-primary { border-color: var(--color-primary) !important; }
.hover-bg-primary:hover { background-color: var(--color-hover) !important; }

/* Interactive element transitions */
a, button {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header brand clamp */
header a[href*="index"] {
    min-width: 0;
}
header a[href*="index"] > span {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}
@media (min-width: 1024px) {
    header a[href*="index"] > span {
        max-width: 320px;
    }
}

/* Contrast Guard: Fix light text on light backgrounds and dark text on dark backgrounds */
.bg-white, .bg-gray-50, .bg-slate-50, .bg-neutral-50, .bg-amber-50, .bg-blue-50 {
    color: #1f2937;
}

/* Light cards inside dark gradient sections */
[style*="linear-gradient"] .bg-white,
[style*="linear-gradient"] .bg-gray-50,
[style*="linear-gradient"] .bg-slate-50 {
    color: #1f2937;
}

[style*="linear-gradient"] .bg-white h2,
[style*="linear-gradient"] .bg-white h3,
[style*="linear-gradient"] .bg-white h4,
[style*="linear-gradient"] .bg-gray-50 h2,
[style*="linear-gradient"] .bg-gray-50 h3,
[style*="linear-gradient"] .bg-gray-50 h4 {
    color: #111827 !important;
}

[style*="linear-gradient"] .bg-white p,
[style*="linear-gradient"] .bg-white li,
[style*="linear-gradient"] .bg-gray-50 p,
[style*="linear-gradient"] .bg-gray-50 li {
    color: #4b5563 !important;
}

/* Direct text in dark gradient sections */
section[style*="var(--color-primary)"] > div > h1,
section[style*="var(--color-primary)"] > div > h2,
section[style*="var(--color-primary)"] > div > .max-w-3xl > h1,
section[style*="var(--color-primary)"] > div > .max-w-3xl > h2,
section[style*="var(--color-primary)"] > div > .grid > div:not([class*="bg-"]) > h2,
section[style*="var(--color-primary)"] > div > .grid > div:not([class*="bg-"]) > h3 {
    color: #ffffff !important;
}

section[style*="var(--color-primary)"] > div > p,
section[style*="var(--color-primary)"] > div > .max-w-3xl > p,
section[style*="var(--color-primary)"] > div > .grid > div:not([class*="bg-"]) > p {
    color: #ccfbf1 !important;
}

/* Card hover elevations */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
