/**
 * Cinematic Ivory — CSS Resets & Base Elements
 * 
 * Purpose: Prepares HTML body setups, overrides default margins, 
 * formats typography weights, and structures the custom cursor container.
 */

/* --------------------------------------------------
   1. GLOBAL SYSTEM RESETS
   -------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: initial; /* Controlled via Lenis scroll script on desktop */
    background-color: var(--ivory);
    color: var(--ink);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    background-color: var(--ivory);
    min-height: 100vh;
}

/* --------------------------------------------------
   2. TEXT SELECTION & CUSTOM SCROLLBARS
   -------------------------------------------------- */
::selection {
    background-color: var(--ink);
    color: var(--ivory);
}

/* Clean, modern scrollbar line (thin, minimal luxury look) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--ivory);
}
::-webkit-scrollbar-thumb {
    background: var(--sand);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
}

/* --------------------------------------------------
   3. TYPOGRAPHY FLOW & INHERITANCES
   -------------------------------------------------- */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

iframe {
    border: none;
}

/* Serif Display Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

/* Sans-Serif Body Copy */
p {
    font-family: var(--font-sans);
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--muted);
    font-weight: 300;
}

/* --------------------------------------------------
   4. LAYOUT HELPER UTILITIES
   -------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

.section-padding {
    padding-top: var(--section-gap);
    padding-bottom: var(--section-gap);
}

.text-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
}

.uppercase-label {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    display: inline-block;
    margin-bottom: 0.75rem;
}

/* --------------------------------------------------
   5. CUSTOM CURSOR OVERLAY (Desktop Only)
   -------------------------------------------------- */
.custom-cursor {
    width: 8px;
    height: 8px;
    background-color: var(--gold); /* Premium gold dot */
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 99999; /* Stay on top of all content */
    transform: translate(-50%, -50%);
    /* Smooth scaling when hovering over links/buttons */
    transition: width 0.3s var(--ease-smooth), height 0.3s var(--ease-smooth), background-color 0.3s var(--ease-smooth), border 0.3s var(--ease-smooth);
    border: 1px solid transparent;
}

.custom-cursor.hovered {
    width: 48px;
    height: 48px;
    background-color: transparent; /* Hollow center to prevent blocking text */
    border: 1px solid var(--gold); /* Gold outer border ring */
}

/* Physically hidden on mobile/touch layout */
@media (max-width: 1024px) {
    .custom-cursor {
        display: none !important;
    }
}
