/* ==========================================================================
   YourClean — Base Styles v3.0
   Modern reset + typography + global styles
   ========================================================================== */

/* ========== CSS RESET (Modern) ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text);
    background: #FFFFFF;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Subtle background pattern */
body::before {
    content: none;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

/* ========== TYPOGRAPHY ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    color: var(--color-text);
    text-wrap: balance;
}

h1,
.h1 {
    font-size: var(--text-5xl);
    font-weight: var(--font-extrabold);
    letter-spacing: -0.02em;
}

h2,
.h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    letter-spacing: -0.01em;
}

h3,
.h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
}

h4,
.h4 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
}

h5,
.h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
}

h6,
.h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
}

p {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
}

p:last-child {
    margin-bottom: 0;
}

.lead {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
}

/* ========== LINKS ========== */
.link {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    position: relative;
    font-weight: var(--font-medium);
}

.link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-cta);
    transition: width var(--transition-base);
    border-radius: var(--radius-full);
}

.link:hover {
    color: var(--color-primary-dark);
}

.link:hover::after {
    width: 100%;
}

/* ========== SELECTION ========== */
::selection {
    background-color: var(--color-primary);
    color: white;
}

/* ========== FOCUS STYLES ========== */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-cta);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ========== UTILITY CLASSES ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--color-primary);
}

.text-accent {
    color: var(--color-accent);
}

.text-muted {
    color: var(--color-text-muted);
}

.fw-regular {
    font-weight: var(--font-regular);
}

.fw-medium {
    font-weight: var(--font-medium);
}

.fw-semibold {
    font-weight: var(--font-semibold);
}

.fw-bold {
    font-weight: var(--font-bold);
}

/* Margin utilities */
.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-10 {
    margin-bottom: var(--space-10);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mt-10 {
    margin-top: var(--space-10);
}

/* Gradient text */
.text-gradient {
    background: var(--gradient-cta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes blob {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
        transform: translate(10px, -10px) rotate(120deg);
    }

    66% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
        transform: translate(-5px, 5px) rotate(240deg);
    }
}

/* Animation utility classes */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn var(--transition-slow) forwards;
}

.animate-fade-in-up {
    opacity: 0;
    transform: translateY(30px);
}

.animate-fade-in-up.is-visible {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.9);
}

.animate-scale-in.is-visible {
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Stagger children animations */
.stagger-children>*:nth-child(1) {
    animation-delay: 0ms;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 100ms;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 200ms;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 300ms;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 400ms;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 500ms;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
}