/**
 * CerdasWeb Modern Technology - Base Styles & Design Tokens
 */

:root {
    --cw-primary: #097AFF;
    --cw-primary-dark: #1062FE;
    --cw-white: #FFFFFF;
    --cw-bg-light: #F8FAFC;
    --cw-surface: #FFFFFF;
    --cw-dark-surface: #0B1220;
    --cw-dark-secondary: #111827;
    --cw-text: #111827;
    --cw-muted: #64748B;
    --cw-border: #E5E7EB;
    --cw-soft-blue: #EFF6FF;
    --cw-font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --cw-font-size-base: 16px;
    --cw-line-height-base: 1.65;
    --cw-radius-sm: 8px;
    --cw-radius-md: 12px;
    --cw-radius-lg: 16px;
    --cw-radius-pill: 9999px;
    --cw-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --cw-shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.07);
    --cw-shadow-lg: 0 10px 25px -4px rgba(15, 23, 42, 0.09);
    --cw-shadow-floating: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
    --cw-transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --cw-container-max: 1280px;
    --cw-container-narrow: 840px;
}

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

html {
    font-family: var(--cw-font-sans);
    font-size: var(--cw-font-size-base);
    line-height: var(--cw-line-height-base);
    color: var(--cw-text);
    background-color: var(--cw-bg-light);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main#primary {
    flex: 1 0 auto;
}

/* Accessibility Skip Link */
.skip-link {
    position: absolute;
    top: -9999px;
    left: 1rem;
    z-index: 10000;
    padding: 0.75rem 1.25rem;
    background: var(--cw-primary);
    color: var(--cw-white);
    font-weight: 600;
    border-radius: var(--cw-radius-md);
    text-decoration: none;
    box-shadow: var(--cw-shadow-lg);
}

.skip-link:focus {
    top: 1rem;
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--cw-primary);
    outline-offset: 3px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--cw-text);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 0.75em;
}

h1 { font-size: clamp(2rem, 3.5vw, 3rem); }
h2 { font-size: clamp(1.625rem, 2.75vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.1875rem; }

p {
    margin-bottom: 1.25em;
}

a {
    color: var(--cw-primary);
    text-decoration: none;
    transition: var(--cw-transition);
}

a:hover {
    color: var(--cw-primary-dark);
}

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

ul, ol {
    margin-bottom: 1.25em;
    padding-left: 1.5em;
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Utilities */
.cw-text-center {
    text-align: center !important;
}

.cw-text-left {
    text-align: left !important;
}

.cw-text-right {
    text-align: right !important;
}
