/* ==========================================================================
   Base Styles - Prime Italy Property
   Old Money Luxury Aesthetic
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-regular);
    line-height: 1.8;
    color: var(--color-charcoal);
    background-color: var(--color-ivory);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-regular);
    line-height: 1.15;
    letter-spacing: var(--tracking-tight);
    color: var(--color-primary);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

p {
    margin-bottom: var(--space-4);
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-accent-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

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

ul,
ol {
    list-style: none;
}

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

/* Container */
.container {
    width: 100%;
    max-width: var(--container-xl);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: var(--container-lg);
}

/* Section Spacing */
.section {
    padding: var(--space-24) 0;
    position: relative;
}

.section-sm {
    padding: var(--space-16) 0;
}

.section-lg {
    padding: var(--space-32) 0;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
}

.text-accent {
    color: var(--color-accent);
}

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

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

.text-silver {
    color: var(--color-silver);
}

/* Background Utilities */
.bg-primary {
    background-color: var(--color-primary);
}

.bg-cream {
    background-color: var(--color-cream);
}

.bg-white {
    background-color: var(--color-white);
}

.bg-ivory {
    background-color: var(--color-ivory);
}

/* Decorative Elements */
.gold-line {
    width: 50px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: var(--space-6) auto;
}

.gold-line-left {
    margin-left: 0;
    background: linear-gradient(90deg, var(--color-accent), transparent);
}

/* Responsive Typography */
@media (max-width: 1024px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    html,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    h1 {
        font-size: var(--text-4xl);
    }

    h2 {
        font-size: var(--text-3xl);
    }

    h3 {
        font-size: var(--text-2xl);
    }

    .section {
        padding: var(--space-16) 0;
        overflow-x: hidden;
    }

    .container {
        padding: 0 var(--space-4);
        overflow-x: hidden;
    }
}

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

    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    .section {
        padding: var(--space-12) 0;
    }
}