/* ========================================
   GrayStone Vault — Custom Styles
   Clean Minimalist | Terracotta + Sand
======================================== */

/* ─── Base & Reset ─── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(196, 114, 82, 0.2);
    color: #2a2522;
}

/* ─── Hero Background Pattern ─── */
.hero-bg-pattern {
    background-image: 
        linear-gradient(rgba(196, 114, 82, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(196, 114, 82, 0.1) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ─── Hero Section ─── */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #fdfbf7 0%, #faf6ed 50%, #f5ebe4 100%);
}

.hero-image-grid {
    position: relative;
    padding-bottom: 2rem;
}

.hero-img-main {
    position: relative;
    overflow: hidden;
}

.hero-img-main::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(42, 37, 34, 0.08));
    pointer-events: none;
}

.hero-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42, 37, 34, 0.05), transparent 40%);
    pointer-events: none;
}

.hero-float-card {
    position: absolute;
    bottom: 0;
    left: -2rem;
    z-index: 10;
    max-width: 220px;
}

/* Hero content animation */
.hero-content {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-content {
        animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    
    .hero-img-main {
        animation: heroImgReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    }
    
    .hero-float-card {
        animation: heroFloatIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
    }
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroImgReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroFloatIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Scroll Indicator ─── */
.scroll-indicator {
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-indicator {
        animation: scrollFade 2s ease-in-out infinite;
    }
}

@keyframes scrollFade {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { top: -16px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* ─── Navigation ─── */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(138, 126, 120, 0.1);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-fixed.scrolled {
    background: rgba(253, 251, 247, 0.95);
    box-shadow: 0 1px 0 rgba(138, 126, 120, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #c47252;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

/* ─── Mobile Menu ─── */
.mobile-menu {
    z-index: 200;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu.open .mobile-menu-link {
    animation: mobileLinkIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-menu.open .mobile-menu-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.open .mobile-menu-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.open .mobile-menu-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.open .mobile-menu-link:nth-child(4) { animation-delay: 0.25s; }

@keyframes mobileLinkIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ─── Section Headers ─── */
.section-header {
    opacity: 1;
}

/* ─── Product Grid ─── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.product-card {
    cursor: pointer;
}

.product-img-wrapper {
    position: relative;
    overflow: hidden;
    background: #f3e9d0;
}

.product-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(42, 37, 34, 0.08), transparent 30%);
    pointer-events: none;
}

.product-quick-view {
    z-index: 2;
}

@media (prefers-reduced-motion: no-preference) {
    .product-card {
        opacity: 1;
    }
}

/* ─── Philosophy Section ─── */
.philosophy-pattern {
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(196, 114, 82, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(207, 171, 97, 0.2) 0%, transparent 50%);
}

/* ─── Visit Card ─── */
.visit-card {
    background: white;
    box-shadow: 0 1px 3px rgba(42, 37, 34, 0.06), 0 8px 40px rgba(42, 37, 34, 0.04);
}

.visit-info {
    border-right: 1px solid rgba(138, 126, 120, 0.15);
}

@media (max-width: 767px) {
    .visit-info {
        border-right: none;
        border-bottom: 1px solid rgba(138, 126, 120, 0.15);
    }
}

/* ─── Contact Form ─── */
.contact-form {
    opacity: 1;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    font-family: 'Manrope', system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8a7e78;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    font-family: 'Manrope', system-ui, sans-serif;
    font-weight: 300;
    font-size: 15px;
    color: #2a2522;
    background: white;
    border: 1px solid rgba(138, 126, 120, 0.25);
    border-radius: 0;
    padding: 0.875rem 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: #8a7e78;
    opacity: 0.6;
}

.form-input:focus {
    border-color: #c47252;
    box-shadow: 0 0 0 3px rgba(196, 114, 82, 0.1);
}

/* ─── Buttons ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #2a2522;
    color: #fdfbf7;
    padding: 1rem 2rem;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background: #c47252;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ─── Map Wrapper ─── */
.map-wrapper {
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(42, 37, 34, 0.06);
}

.map-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c47252, #dbbf7e, #c47252);
    z-index: 1;
}

/* ─── Scroll Reveal (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .reveal.revealed {
        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; }
}

/* ─── Focus Styles ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c47252;
    outline-offset: 2px;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
