/* ORZATTY™ HOLDINGS - MAIN STYLES */
/* Material Design 3 Base with Orzatty Branding */

/* CSS RESET AND BASE */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--md-sys-color-on-surface);
    background-color: var(--md-sys-color-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ACCESSIBILITY */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* FOCUS MANAGEMENT */
:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* TYPOGRAPHY SCALE - MATERIAL DESIGN 3 */
.display-large {
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -0.25px;
}

.display-medium {
    font-size: 2.8125rem;
    font-weight: 400;
    line-height: 1.16;
    letter-spacing: 0;
}

.display-small {
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.22;
    letter-spacing: 0;
}

.headline-large {
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0;
}

.headline-medium {
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1.29;
    letter-spacing: 0;
}

.headline-small {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.33;
    letter-spacing: 0;
}

.title-large {
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1.27;
    letter-spacing: 0;
}

.title-medium {
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.15px;
}

.title-small {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.43;
    letter-spacing: 0.1px;
}

.body-large {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.5px;
}

.body-medium {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.43;
    letter-spacing: 0.25px;
}

.body-small {
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.33;
    letter-spacing: 0.4px;
}

.label-large {
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.43;
    letter-spacing: 0.1px;
}

.label-medium {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.33;
    letter-spacing: 0.5px;
}

.label-small {
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.5px;
}

/* LAYOUT CONTAINERS */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.container-fluid {
    width: 100%;
    padding: 0 16px;
}

/* GRID SYSTEM */
.grid {
    display: grid;
    gap: 16px;
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* FLEXBOX UTILITIES */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 1rem;
}

.gap-8 {
    gap: 2rem;
}

/* SPACING UTILITIES */
.p-4 { padding: 1rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.m-4 { margin: 1rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-8 { margin-top: 2rem; }
.mb-8 { margin-bottom: 2rem; }

/* HEADER STYLES */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--md-sys-color-surface);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.navigation {
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    font-weight: 500;
    font-size: 1.25rem;
}

.brand-logo {
    height: 32px;
    width: auto;
    margin-right: 8px;
}

.brand-text {
    font-weight: 700;
    color: var(--orzatty-primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    color: var(--md-sys-color-on-surface);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover,
.nav-link:focus {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.nav-link.active {
    background-color: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

/* MAIN CONTENT */
.main-content {
    min-height: calc(100vh - 64px - 200px); /* Header height - Footer height */
    padding: 24px 0;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* FOOTER */
.footer {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 32px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 16px;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
}

.footer-section p,
.footer-section li {
    margin-bottom: 8px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section a {
    color: var(--orzatty-accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-section a:hover,
.footer-section a:focus {
    color: var(--orzatty-accent-light-blue);
    text-decoration: underline;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--md-sys-color-surface);
        border-top: 1px solid var(--md-sys-color-outline-variant);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .container {
        padding: 0 12px;
    }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* Typography adjustments for mobile */
    .display-large { font-size: 2.5rem; }
    .display-medium { font-size: 2rem; }
    .display-small { font-size: 1.75rem; }
    .headline-large { font-size: 1.75rem; }
    .headline-medium { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }
    
    .app-container {
        padding: 0 12px;
    }
    
    .footer-container {
        padding: 0 12px;
    }
    
    /* Further typography adjustments for small screens */
    .display-large { font-size: 2rem; }
    .display-medium { font-size: 1.75rem; }
    .display-small { font-size: 1.5rem; }
}

/* PRINT STYLES */
@media print {
    .header,
    .footer,
    .nav-toggle {
        display: none;
    }
    
    .main-content {
        min-height: auto;
        padding: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        text-decoration: none;
        color: inherit;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        color: #666;
    }
}

/* HIGH CONTRAST MODE SUPPORT */
@media (prefers-contrast: high) {
    :focus-visible {
        outline: 3px solid;
        outline-offset: 3px;
    }
    
    .nav-link:hover,
    .nav-link:focus {
        outline: 2px solid;
    }
}

/* REDUCED MOTION SUPPORT */
@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;
    }
}

/* DARK MODE SUPPORT (will be enhanced with theme variables) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles will be applied via CSS custom properties */
}