/* ============================================================
   RESET & BASE — Spaces & Beyond Real Estate
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 17px; /* ← INCREASED from 16px — scales everything */
    overflow-x: hidden; /* the actual document scrolling context — body's
                            overflow-x:hidden alone doesn't stop page-wide
                            horizontal scroll caused by an overflowing child */
}

body {
    background-color: var(--color-black);
    color: var(--color-white);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7; /* ← INCREASED from 1.6 — more breathing room */
    overflow-x: hidden;
    cursor: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Remove cursor:none on touch devices */
@media (hover: none) {
    body {
        cursor: auto;
    }
    .cursor,
    .cursor-ring {
        display: none;
    }
}

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

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

ul,
ol {
    list-style: none;
}

input,
textarea,
select {
    font-family: inherit;
}

/* ============================================================
   SHARED LAYOUT
   ============================================================ */

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--section-x);
}

.section {
    padding: var(--section-y) var(--section-x);
}

.section--alt {
    background: var(--color-black-soft);
}

/* Light-theme section variant (About, Team) — Luxhabitat-style cream */
.section--light {
    background: var(--color-cream);
    color: var(--color-ink);
}
.section--light .section-title {
    color: var(--color-ink);
}
.section--light .section-title em {
    color: var(--color-gold-dark);
}

/* ============================================================
   SHARED TYPOGRAPHY
   ============================================================ */

.eyebrow {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-body);
    font-size: 0.75rem; /* ← INCREASED from var(--text-xs) ~0.6rem */
    font-weight: 400;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: var(--color-gold);
}

.eyebrow::before {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--color-gold);
    flex-shrink: 0;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(
        2.6rem,
        4.5vw,
        4.2rem
    ); /* ← INCREASED from clamp(2.2rem, 4vw, 3.8rem) */
    font-weight: 400;
    line-height: 1.1;
    color: var(--color-white);
    margin-top: var(--space-md);
}

.section-title em {
    font-style: italic;
    color: var(--color-gold);
}

.section-header {
    margin-bottom: clamp(40px, 6vw, 70px);
}

.section-header--split {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

/* ============================================================
   LIQUID GLASS — translucent gradient-bordered panel effect
   ============================================================ */
.liquid-glass {
    background: rgba(255, 255, 255, 0.03);
    background-blend-mode: luminosity;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}
.liquid-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.45) 0%,
        rgba(255, 255, 255, 0.14) 20%,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0) 60%,
        rgba(255, 255, 255, 0.14) 80%,
        rgba(255, 255, 255, 0.45) 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================================
   SHARED BUTTONS
   ============================================================ */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.72rem; /* ← INCREASED from var(--text-xs) ~0.6rem */
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    padding: 16px 38px; /* ← INCREASED padding */
    transition: all var(--duration-base) var(--ease-smooth);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-gold);
    color: var(--color-black);
}

.btn--primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-gold-light);
    transform: translateX(-100%);
    transition: transform var(--duration-base) var(--ease-smooth);
}

.btn--primary:hover::before {
    transform: translateX(0);
}

.btn--primary span {
    position: relative;
    z-index: 1;
}

.btn--outline {
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
}

.btn--outline:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn--outline-gold {
    border: 1px solid var(--color-gold-border);
    color: var(--color-gold);
}

.btn--outline-gold:hover {
    background: var(--color-gold);
    color: var(--color-black);
}

/* ============================================================
   GOLD DIVIDER
   ============================================================ */

.gold-line {
    width: 50px;
    height: 1px;
    background: var(--color-gold);
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */

/* ============================================================
   IMAGE / VIDEO FADE-IN — smooths the "download then pop in"
   effect. Images start slightly faded and blurred, then ease in
   cleanly once actually loaded, instead of snapping in abruptly.
   ============================================================ */
img[loading="lazy"] {
    opacity: 0;
    filter: blur(8px);
    transition:
        opacity 0.5s ease,
        filter 0.5s ease;
}
/* Safety net: if JS never runs (blocked/failed), these rules never
   apply in the first place — html.js-fade-ready is set by an inline
   script at the very top of <head>, before anything else loads. */
html:not(.js-fade-ready) img[loading="lazy"] {
    opacity: 1 !important;
    filter: none !important;
}
img[loading="lazy"].is-loaded {
    opacity: 1;
    filter: blur(0);
}
.hero__video {
    opacity: 0;
    transition: opacity 0.6s ease;
}
html:not(.js-fade-ready) .hero__video {
    opacity: 1 !important;
}
.hero__video.is-loaded {
    opacity: 1;
}

.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity var(--duration-slower) var(--ease-smooth),
        transform var(--duration-slower) var(--ease-smooth);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 {
    transition-delay: 0.1s;
}
.reveal--delay-2 {
    transition-delay: 0.2s;
}
.reveal--delay-3 {
    transition-delay: 0.3s;
}
.reveal--delay-4 {
    transition-delay: 0.4s;
}
.reveal--delay-5 {
    transition-delay: 0.5s;
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */

.hide-mobile {
    display: block;
}
.show-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    .show-mobile {
        display: block;
    }
}

/* ── Custom Cursor — add to bottom of base.css ── */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--color-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition:
        width 0.2s ease,
        height 0.2s ease,
        background 0.2s ease;
    will-change: left, top;
}

.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(201, 168, 76, 0.55);
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transform: translate(-50%, -50%);
    transition:
        width 0.2s ease,
        height 0.2s ease,
        border-color 0.2s ease;
    will-change: left, top;
}

.cursor.is-hovering {
    width: 14px;
    height: 14px;
    background: var(--color-gold);
}

.cursor-ring.is-hovering {
    width: 46px;
    height: 46px;
    border-color: rgba(201, 168, 76, 0.9);
}

/* Hide default cursor on desktop */
@media (hover: hover) {
    * {
        cursor: none !important;
    }
}
