/* =============================================
   MOBIX Presentation - Base Styles
   ============================================= */

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

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

body {
    font-family: var(--font-family);
    background: var(--gray-900);
    color: var(--white);
    min-height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

/* Selection */
::selection {
    background: var(--primary-500);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-800);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-600);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

/* Focus Styles */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
}

/* Links */
a {
    color: var(--primary-400);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

/* Buttons Reset */
button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

/* Input Reset */
input {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

input::placeholder {
    color: var(--gray-500);
}

/* =============================================
   MOBILE OPTIMIZATIONS
   ============================================= */

/* Prevent zoom on input focus in iOS */
@media (max-width: 480px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Touch optimization */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    a, button {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Larger touch targets */
    button, .nav-btn, .logout-btn, .contact-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Safe area insets for iPhone X and newer */
@supports (padding-top: env(safe-area-inset-top)) {
    body {
        /* Don't add padding to body - handle in individual components */
    }
    
    /* Root element safe area handling */
    .presentation-screen,
    .login-screen {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* iPhone 16 viewport meta handling */
@media (max-width: 430px) and (min-height: 800px) {
    html, body {
        overflow-x: hidden;
    }
}
