@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* ==========================================
   CSS CUSTOM PROPERTIES (DESIGN SYSTEM)
   ========================================== */
:root {
    /* Color Palette */
    --primary-color: #0f172a;       /* Slate 900 - Deep Trustworthy Navy */
    --primary-light: #1e293b;       /* Slate 800 - Secondary dark block */
    --accent-color: #1e40af;        /* Blue 800 - Professional Engineering */
    --accent-light: #3b82f6;        /* Blue 500 - Interactive Elements */
    --accent-hover: #1d4ed8;        /* Blue 700 */
    --highlight-color: #f97316;     /* Orange 500 - Safety / Action */
    --highlight-hover: #ea580c;     /* Orange 600 - Action Hover */
    --success-color: #10b981;       /* Green 500 */
    
    /* Neutral Colors */
    --text-main: #334155;           /* Slate 700 - Body Text */
    --text-muted: #64748b;          /* Slate 500 - Secondary Text */
    --text-light: #94a3b8;          /* Slate 400 - Muted Light Text */
    --bg-light: #f8fafc;            /* Slate 50 - Background Alternate */
    --bg-white: #ffffff;            /* White Background */
    --border-color: #e2e8f0;        /* Slate 200 - Borders */
    
    /* Layout & Styling Tokens */
    --font-family: 'Inter', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    
    /* Max Widths */
    --container-width: 1280px;
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--accent-hover);
}

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

ul, ol {
    list-style: none;
}

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

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--bg-light);
    padding: 5rem 0;
}

.section-title-wrapper {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem auto;
}

.section-title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--highlight-color);
    border-radius: var(--radius-full);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

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

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background-color: var(--bg-light);
    color: var(--text-muted);
}

.badge-primary {
    background-color: rgba(30, 64, 175, 0.1);
    color: var(--accent-color);
}

.badge-highlight {
    background-color: rgba(249, 115, 22, 0.1);
    color: var(--highlight-color);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.animate-fade-in {
    animation: fadeIn var(--transition-normal) forwards;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1024px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .section { padding: 3.5rem 0; }
    .section-alt { padding: 3.5rem 0; }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
