/**
 * Komal Texfab - Main CSS
 * Design system: tokens, reset, typography, utilities
 */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root {
    /* Colors */
    --primary: #0A1628;
    --primary-light: #1B2D4A;
    --primary-rgb: 10, 22, 40;
    --accent: #C8962E;
    --accent-light: #E8B94A;
    --accent-rgb: 200, 150, 46;
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --textile-blue: #2563EB;
    --textile-blue-light: #3B82F6;
    --success: #10B981;
    --danger: #EF4444;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Font Sizes - Fluid */
    --fs-xs: clamp(0.7rem, 0.66rem + 0.2vw, 0.8rem);
    --fs-sm: clamp(0.8rem, 0.74rem + 0.3vw, 0.9rem);
    --fs-base: clamp(0.9rem, 0.84rem + 0.3vw, 1rem);
    --fs-md: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
    --fs-lg: clamp(1.1rem, 0.96rem + 0.7vw, 1.35rem);
    --fs-xl: clamp(1.25rem, 1.05rem + 1vw, 1.6rem);
    --fs-2xl: clamp(1.5rem, 1.15rem + 1.75vw, 2.1rem);
    --fs-3xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.75rem);
    --fs-4xl: clamp(2.2rem, 1.5rem + 3.5vw, 3.5rem);
    --fs-hero: clamp(2.5rem, 1.6rem + 4.5vw, 4.5rem);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-section: clamp(4rem, 3rem + 5vw, 7rem);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);
    --shadow-card: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-card-hover: 0 12px 40px rgba(0,0,0,0.12);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
    --z-loader: 1000;

    /* Container */
    --container-max: 1280px;
    --container-padding: clamp(1rem, 2vw, 2rem);
}


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

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

body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--gray-900);
    background-color: var(--white);
    overflow-x: hidden;
    min-height: 100vh;
}

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

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

ul, ol {
    list-style: none;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
    color: var(--primary);
}


/* ============================================
   Typography
   ============================================ */
h1 { font-size: var(--fs-hero); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.015em; }
h3 { font-size: var(--fs-2xl); font-weight: 600; }
h4 { font-size: var(--fs-xl); font-weight: 600; }
h5 { font-size: var(--fs-lg); font-weight: 600; }
h6 { font-size: var(--fs-md); font-weight: 600; }

p {
    margin-bottom: var(--space-md);
    color: var(--gray-700);
    line-height: 1.8;
}

.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-white { color: var(--white); }
.text-gray { color: var(--gray-600); }
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.08em; }

.lead {
    font-size: var(--fs-lg);
    line-height: 1.7;
    color: var(--gray-600);
}

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

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


/* ============================================
   Section
   ============================================ */
.section {
    padding-top: var(--space-section);
    padding-bottom: var(--space-section);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-3xl);
}

.section-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: var(--space-sm);
    padding: 6px 16px;
    background: rgba(var(--accent-rgb), 0.08);
    border-radius: 50px;
}

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

.section-title span { color: var(--accent); }

.section-desc {
    font-size: var(--fs-md);
    color: var(--gray-600);
    line-height: 1.8;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    margin: var(--space-lg) auto 0;
    border-radius: 2px;
}

.bg-gray { background-color: var(--gray-50); }
.bg-primary { background-color: var(--primary); }
.bg-dark { background-color: var(--primary); color: var(--white); }


/* ============================================
   Utility Classes
   ============================================ */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

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

.mt-0 { margin-top: 0; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-0 { margin-bottom: 0; }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Selection color */
::selection {
    background: rgba(var(--accent-rgb), 0.3);
    color: var(--primary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}
