/* ============================================
   BASE STYLES & RESET
   Global styles, typography, and foundational elements
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-dark-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ===== ACCESSIBILITY & 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;
    }
}

/* ===== FOCUS STATES ===== */
:focus {
    outline: 2px solid var(--color-accent-purple);
    outline-offset: 2px;
}

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

:focus-visible {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 2px;
}

/* ===== SELECTION STYLES ===== */
::selection {
    background-color: var(--color-accent-purple);
    color: var(--color-text-primary);
}

::-moz-selection {
    background-color: var(--color-accent-purple);
    color: var(--color-text-primary);
}

/* ===== TYPOGRAPHY HIERARCHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    line-height: 1.2;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-black);
    letter-spacing: 0.08em;
    line-height: 1.05;
    text-transform: uppercase;
}

h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-extrabold);
    letter-spacing: 0.04em;
    line-height: 1.15;
    text-transform: uppercase;
    background: var(--gradient-text);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.02em;
}

h4 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
}

p {
    font-size: var(--font-size-base);
    line-height: 1.75;
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-normal);
}

.lead {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: 1.7;
    color: var(--color-text-primary);
}

/* ===== LINKS ===== */
a {
    color: inherit;
    text-decoration: none;
    transition: all var(--transition-standard);
}

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

/* ===== LISTS ===== */
ul, ol {
    list-style: none;
}

/* ===== IMAGES & MEDIA ===== */
img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== BUTTONS & INPUTS RESET ===== */
button, input, textarea, select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
}

button {
    cursor: pointer;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--color-accent-blue);
    outline-offset: 2px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: var(--max-width-container);
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
}

/* ===== SECTION PADDING ===== */
.section-padding {
    padding: var(--spacing-3xl) 0;
}

@media (max-width: 1024px) {
    .section-padding {
        padding: calc(var(--spacing-3xl) * 0.75) 0;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: calc(var(--spacing-3xl) * 0.6) 0;
    }
}

@media (max-width: 480px) {
    .section-padding {
        padding: calc(var(--spacing-3xl) * 0.42) 0;
    }
}

/* ===== SECTION HEADER ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-header h2 {
    margin-bottom: var(--spacing-md);
}

.section-divider {
    width: 80px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 0 auto;
    border-radius: var(--border-radius-full);
    animation: pulse 2s ease-in-out infinite;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--color-dark-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
    border: 2px solid var(--color-dark-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-accent-blue), var(--color-accent-purple));
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-purple) var(--color-dark-secondary);
}

/* ===== LOADING STATES ===== */
.loading {
    opacity: 0.5;
    pointer-events: none;
    cursor: wait;
}

/* ===== BACKDROP BLUR SUPPORT ===== */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .blur-bg {
        backdrop-filter: blur(var(--blur-md));
        -webkit-backdrop-filter: blur(var(--blur-md));
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    header, nav, .booking-cta, footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        text-decoration: underline;
    }

    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}

/* ===== SAFE AREA INSETS (for mobile) ===== */
@supports (padding: max(0px)) {
    body {
        padding-left: var(--safe-area-left);
        padding-right: var(--safe-area-right);
    }

    .hero {
        padding-top: max(var(--header-height), calc(var(--header-height-mobile) + var(--safe-area-top)));
        padding-bottom: max(var(--spacing-lg), var(--safe-area-bottom));
    }

    header {
        padding-top: var(--safe-area-top);
    }

    footer {
        padding-bottom: var(--safe-area-bottom);
    }
}

/* ===== TOUCH DEVICE OPTIMIZATIONS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        padding: 1rem 2.5rem;
        min-height: var(--touch-target-min);
        min-width: var(--touch-target-min);
    }

    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
        box-shadow: inherit;
    }

    /* Keep active states */
    .btn:active {
        transform: scale(0.98);
    }

    /* Remove hover/pointer effects on cards */
    .card:hover {
        transform: none;
        box-shadow: inherit;
    }

    .service-card:hover {
        transform: none;
        border-color: inherit;
    }

    .social-icon:hover {
        transform: none;
        box-shadow: inherit;
    }

    /* Remove tooltips on touch devices */
    .social-tooltip {
        display: none;
    }
}

/* ===== IPHONE VIEWPORT OPTIMIZATIONS ===== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    body {
        font-size: 14px;
    }
}

/* Small iPhones (375px - SE) */
@media (max-width: 425px) {
    html {
        font-size: 13px;
    }
}
