/* ==========================================
   GESTIONALE SMART 2.0 - BASE STYLES
   Reset + Typography + Utilities
   ========================================== */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: var(--navbar-height);
}

body {
    font-family: var(--font-family);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

ul, ol {
    list-style: none;
}

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    z-index: 99999;
    font-weight: 600;
    border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
    top: 0;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.container-sm {
    max-width: 960px;
}

.container-lg {
    max-width: 1440px;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--leading-snug);
    color: var(--text-primary);
    letter-spacing: var(--tracking-tight);
}

h1 {
    font-size: clamp(var(--text-4xl), 5vw, var(--text-5xl));
    font-weight: 800;
    line-height: var(--leading-tight);
}

h2 {
    font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
    line-height: 1.15;
}

h3 {
    font-size: clamp(var(--text-xl), 2vw, var(--text-2xl));
}

h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p, li {
    max-width: var(--prose-width);
}

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-muted { color: var(--text-tertiary); }
.text-center { text-align: center; }

.section-label {
    display: inline-block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-3);
}

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

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--text-tertiary);
    max-width: 700px;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.section-header .section-subtitle {
    margin: 0 auto;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

.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;
}

/* Section spacing */
section {
    padding: var(--section-py) 0;
    position: relative;
}

section.bg-alt {
    background: var(--bg-secondary);
}

section.bg-dark {
    background: var(--gray-800);
    color: var(--white);
}

section.bg-dark h2,
section.bg-dark h3,
section.bg-dark h4 {
    color: var(--white);
}

section.bg-dark .section-subtitle {
    color: var(--gray-400);
}
