/* ==========================================
   The Cove NC — Custom Styles
   Classic & Elegant Real Estate Website
   ========================================== */

/* --- CSS Custom Properties --- */
:root {
    --color-teal-500: #0d7377;
    --color-teal-600: #0a5c5f;
    --color-slate-900: #0f172a;
    --color-slate-800: #1e293b;
    --color-slate-700: #334155;
    --color-slate-600: #475569;
    --color-slate-500: #64748b;
    --color-slate-100: #f1f5f9;
    --color-slate-50: #f8fafc;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    color: var(--color-slate-800);
    background-color: #ffffff;
    overflow-x: hidden;
}

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

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

/* --- Keyframe Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Reveal System --- */
.reveal-section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-section[data-revealed="false"] {
    opacity: 0;
    transform: translateY(40px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-section {
        opacity: 0;
        transform: translateY(40px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal-section,
    .reveal-section[data-revealed="false"] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* --- Navbar Transition States --- */
.navbar-scrolled #navbar {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
}

.navbar-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* --- Mobile Menu --- */
.mobile-menu-open #mobile-menu {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.mobile-menu-open #menu-icon-open {
    display: none !important;
}

.mobile-menu-open #menu-icon-close {
    display: flex !important;
}

.mobile-link {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.mobile-link:hover {
    color: #6ec8c8;
}

/* --- Selection Color --- */
::selection {
    background-color: var(--color-teal-500);
    color: #ffffff;
}

::-moz-selection {
    background-color: var(--color-teal-500);
    color: #ffffff;
}

/* --- Focus Styles --- */
:focus-visible {
    outline: 2px solid var(--color-teal-500);
    outline-offset: 2px;
}

/* --- Button Hover Effects --- */
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

button[type="submit"]:hover::after {
    opacity: 1;
}

/* --- Form Input Transitions --- */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-teal-500) !important;
    box-shadow: 0 0 0 4px rgba(13, 115, 119, 0.1) !important;
}

/* --- Smooth Image Loading --- */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-slate-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-teal-500);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal-600);
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }
}
