/* ====================================
   CSS RESET & BASE STYLES
   ==================================== */

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

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

/* ====================================
   COLOR VARIABLES
   ==================================== */

:root {
    /* Primary Colors */
    --primary-red: #D32F2F;
    --primary-red-hover: #B71C1C;
    --primary-red-light: #FFEBEE;
    
    /* Background Colors */
    --background-primary: #FFFFFF;
    --background-secondary: #F8F9FB;
    --background-accent: #FFF4E5;
    
    /* Text Colors */
    --text-primary: #212121;
    --text-secondary: #666666;
    --text-light: #9E9E9E;
    --text-white: #FFFFFF;
    
    /* Lab Colors */
    --lab-email: #1976D2;
    --lab-sms: #388E3C;
    --lab-social: #7B1FA2;
    
    /* Prevention Colors */
    --prevention-verify: #388E3C;
    --prevention-flags: #1976D2;
    --prevention-education: #7B1FA2;
    
    /* Utility Colors */
    --border-light: #E0E0E0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --gradient-red: linear-gradient(135deg, var(--primary-red), #E57373);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-tooltip: 1070;
}

/* ====================================
   TYPOGRAPHY SCALE
   ==================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

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

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

.text-large { font-size: 1.25rem; }
.text-small { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-light { color: var(--text-light); }
.text-white { color: var(--text-white); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ====================================
   LAYOUT UTILITIES
   ==================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-sm {
    max-width: 800px;
}

.container-lg {
    max-width: 1400px;
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-none { flex: none; }

/* Grid Utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 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); }

.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* Spacing Utilities */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mr-0 { margin-right: 0; }
.mb-0 { margin-bottom: 0; }
.ml-0 { margin-left: 0; }

.p-0 { padding: 0; }
.pt-0 { padding-top: 0; }
.pr-0 { padding-right: 0; }
.pb-0 { padding-bottom: 0; }
.pl-0 { padding-left: 0; }

/* Generate spacing classes */
.m-sm { margin: var(--spacing-sm); }
.mt-sm { margin-top: var(--spacing-sm); }
.mr-sm { margin-right: var(--spacing-sm); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.ml-sm { margin-left: var(--spacing-sm); }

.p-sm { padding: var(--spacing-sm); }
.pt-sm { padding-top: var(--spacing-sm); }
.pr-sm { padding-right: var(--spacing-sm); }
.pb-sm { padding-bottom: var(--spacing-sm); }
.pl-sm { padding-left: var(--spacing-sm); }

.m-md { margin: var(--spacing-md); }
.mt-md { margin-top: var(--spacing-md); }
.mr-md { margin-right: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }
.ml-md { margin-left: var(--spacing-md); }

.p-md { padding: var(--spacing-md); }
.pt-md { padding-top: var(--spacing-md); }
.pr-md { padding-right: var(--spacing-md); }
.pb-md { padding-bottom: var(--spacing-md); }
.pl-md { padding-left: var(--spacing-md); }

.m-lg { margin: var(--spacing-lg); }
.mt-lg { margin-top: var(--spacing-lg); }
.mr-lg { margin-right: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.ml-lg { margin-left: var(--spacing-lg); }

.p-lg { padding: var(--spacing-lg); }
.pt-lg { padding-top: var(--spacing-lg); }
.pr-lg { padding-right: var(--spacing-lg); }
.pb-lg { padding-bottom: var(--spacing-lg); }
.pl-lg { padding-left: var(--spacing-lg); }

/* Display Utilities */
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Position Utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Border Utilities */
.border { border: 1px solid var(--border-light); }
.border-t { border-top: 1px solid var(--border-light); }
.border-r { border-right: 1px solid var(--border-light); }
.border-b { border-bottom: 1px solid var(--border-light); }
.border-l { border-left: 1px solid var(--border-light); }

.rounded { border-radius: var(--radius-md); }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 1px 2px 0 var(--shadow-light);
}

.shadow {
    box-shadow: 0 1px 3px 0 var(--shadow-light), 0 1px 2px 0 var(--shadow-light);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px var(--shadow-light), 0 2px 4px -1px var(--shadow-light);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px var(--shadow-light), 0 4px 6px -2px var(--shadow-light);
}

/* ====================================
   RESPONSIVE BREAKPOINTS
   ==================================== */

/* Mobile First Approach */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .sm\:flex-row { flex-direction: row; }
    .sm\:text-left { text-align: left; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .md\:flex-row { flex-direction: row; }
    .md\:text-left { text-align: left; }
    .md\:block { display: block; }
    .md\:hidden { display: none; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
    .lg\:flex-row { flex-direction: row; }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ====================================
   ACCESSIBILITY
   ==================================== */

/* Focus styles */
:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Reduced motion */
@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;
    }
}

/* Screen reader only */
.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;
}

/* ====================================
   10/03 BASE.CSS UPDATES - ADD THESE TO YOUR EXISTING base.css
   ==================================== */

/* Update the img, picture, video rule to allow inline display for logos */
img.brand-logo,
img.footer-logo,
.lab-screenshot {
    display: inline-block;
    max-width: 100%;
}

/* Ensure images in labs can be properly sized */
.lab-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Logo specific sizing */
.brand-logo {
    height: 40px;
    width: auto;
}

.footer-logo {
    height: 50px;
    width: auto;
}

/* ====================================
   ABOVE -> 10/03 BASE.CSS UPDATES - ADD THESE TO YOUR EXISTING base.css
   ==================================== */