/* ============================================
   San's Touch — Premium Dark Luxury Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #F5F0E8;
}

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

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

/* --- Preloader --- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #071F16;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 24px;
}

.preloader-letter {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 300;
    color: #F5F0E8;
    opacity: 0;
    animation: preloaderFade 0.5s ease forwards;
}

.preloader-letter:nth-child(1) { animation-delay: 0.1s; }
.preloader-letter:nth-child(2) { animation-delay: 0.15s; }
.preloader-letter:nth-child(3) { animation-delay: 0.2s; }
.preloader-letter:nth-child(4) { animation-delay: 0.25s; }
.preloader-letter:nth-child(5) { animation-delay: 0.3s; }
.preloader-dot {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 300;
    color: #C9A84C;
    opacity: 0;
    animation: preloaderFade 0.5s ease forwards;
    animation-delay: 0.35s;
}
.preloader-letter:nth-child(7) { animation-delay: 0.4s; }
.preloader-letter:nth-child(8) { animation-delay: 0.45s; }
.preloader-letter:nth-child(9) { animation-delay: 0.5s; }
.preloader-letter:nth-child(10) { animation-delay: 0.55s; }
.preloader-letter:nth-child(11) { animation-delay: 0.6s; }

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

.preloader-line {
    width: 120px;
    height: 1px;
    background: rgba(201, 168, 76, 0.2);
    position: relative;
    overflow: hidden;
}

.preloader-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #C9A84C, transparent);
    animation: preloaderLine 1.2s ease-in-out infinite;
}

@keyframes preloaderLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* --- Navigation --- */
.nav {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

.nav.scrolled {
    background: rgba(7, 31, 22, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 168, 76, 0.1);
}

.nav-logo {
    position: relative;
}

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

.nav-logo:hover::after {
    width: 100%;
}

.nav-link {
    position: relative;
}

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

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

.nav-cta-btn {
    position: relative;
    overflow: hidden;
}

.nav-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.nav-cta-btn:hover::before {
    left: 100%;
}

/* Mobile Menu */
.mobile-menu-link {
    font-family: 'Cormorant Garamond', Georgia, serif;
}

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

.menu-line {
    width: 100%;
    transition: all 0.3s ease;
}

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

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

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

/* --- Hero Section --- */
.hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.12); }
}

.hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(7, 31, 22, 0.4) 0%,
        rgba(7, 31, 22, 0.2) 40%,
        rgba(7, 31, 22, 0.5) 70%,
        rgba(7, 31, 22, 0.95) 100%
    );
}

.hero-content {
    padding-top: 80px;
}

.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroTitleIn 1s ease 0.8s forwards;
}

@keyframes heroTitleIn {
    to { opacity: 1; transform: translateY(0); }
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(20px);
    animation: heroSubIn 1s ease 1.1s forwards;
}

@keyframes heroSubIn {
    to { opacity: 1; transform: translateY(0); }
}

.hero-ctas {
    opacity: 0;
    transform: translateY(20px);
    animation: heroCtasIn 1s ease 1.4s forwards;
}

@keyframes heroCtasIn {
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
    opacity: 0;
    animation: heroBadgeIn 0.8s ease 0.5s forwards;
}

@keyframes heroBadgeIn {
    to { opacity: 1; }
}

.hero-scroll {
    opacity: 0;
    animation: heroScrollIn 0.8s ease 1.8s forwards;
}

@keyframes heroScrollIn {
    to { opacity: 1; }
}

.scroll-dot {
    animation: scrollDotMove 2s ease-in-out infinite;
}

@keyframes scrollDotMove {
    0%, 100% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* --- Buttons --- */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(201, 168, 76, 0.3);
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(201, 168, 76, 0.1);
}

/* --- Section Styles --- */
.section {
    position: relative;
}

.section-eyebrow {
    opacity: 0;
    transform: translateY(15px);
}

.section-title {
    opacity: 0;
    transform: translateY(25px);
}

.section-desc {
    opacity: 0;
    transform: translateY(20px);
}

.section-header.revealed .section-eyebrow,
.section-header.revealed .section-title,
.section-header.revealed .section-desc {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-header.revealed .section-eyebrow { transition-delay: 0.1s; }
.section-header.revealed .section-title { transition-delay: 0.2s; }
.section-header.revealed .section-desc { transition-delay: 0.3s; }

/* --- Divider --- */
.divider {
    padding: 0 6px;
}

/* --- Collection Cards --- */
.collection-card {
    cursor: pointer;
}

.collection-card-img-inner {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.collection-card:hover .collection-card-img-inner {
    transform: scale(1.08);
}

.collection-card:hover .collection-card-overlay {
    opacity: 90;
}

/* --- About Section --- */
.about-image-frame {
    position: absolute;
    top: -12px;
    right: -12px;
    bottom: 12px;
    left: 12px;
    border: 1px solid rgba(201, 168, 76, 0.2);
    pointer-events: none;
    z-index: -1;
}

.about-float-card {
    animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.about-value {
    opacity: 0;
    transform: translateY(20px);
}

.about-value.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.about-value.revealed:nth-child(1) { transition-delay: 0.1s; }
.about-value.revealed:nth-child(2) { transition-delay: 0.2s; }
.about-value.revealed:nth-child(3) { transition-delay: 0.3s; }

/* --- Features --- */
.feature-card {
    opacity: 0;
    transform: translateY(25px);
}

.feature-card.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.feature-card.revealed:nth-child(1) { transition-delay: 0.1s; }
.feature-card.revealed:nth-child(2) { transition-delay: 0.2s; }
.feature-card.revealed:nth-child(3) { transition-delay: 0.3s; }
.feature-card.revealed:nth-child(4) { transition-delay: 0.4s; }

.feature-card-icon {
    transition: all 0.4s ease;
}

.feature-card:hover .feature-card-icon {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.15);
}

/* --- Photo Break --- */
.photo-break-bg {
    position: absolute;
    inset: 0;
}

.photo-break-img {
    animation: photoBreakZoom 25s ease-in-out infinite alternate;
}

@keyframes photoBreakZoom {
    from { transform: scale(1); }
    to { transform: scale(1.08); }
}

.photo-break-content {
    opacity: 0;
    transform: translateY(30px);
}

.photo-break-content.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s ease, transform 1s ease;
}

/* --- Contact Form --- */
.form-input {
    transition: all 0.3s ease;
}

.form-input:focus {
    background: rgba(11, 60, 45, 0.3);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    transition: all 0.3s ease;
}

.form-textarea:focus {
    background: rgba(11, 60, 45, 0.3);
}

/* --- Map --- */
.map-wrapper {
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* --- Footer --- */
.footer {
    position: relative;
}

.footer-heading {
    margin-bottom: 0;
}

.footer-link {
    position: relative;
}

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

.footer-link:hover::after {
    width: 100%;
}

.footer-social-icon {
    transition: all 0.3s ease;
}

.footer-social-icon:hover {
    background: rgba(201, 168, 76, 0.1);
}

/* --- Back to Top --- */
.back-to-top {
    transition: all 0.4s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.4);
}

/* --- Reveal Animations --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

[data-reveal].revealed:nth-child(1) { transition-delay: 0.1s; }
[data-reveal].revealed:nth-child(2) { transition-delay: 0.2s; }
[data-reveal].revealed:nth-child(3) { transition-delay: 0.3s; }
[data-reveal].revealed:nth-child(4) { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .about-float-card {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 24px;
        display: inline-block;
    }

    .about-image-frame {
        top: -8px;
        right: -8px;
        bottom: 8px;
        left: 8px;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .hero-title span.text-3xl {
        font-size: 1.5rem !important;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .photo-break-content blockquote {
        font-size: 1.5rem;
    }

    .collection-card {
        min-height: 400px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .hero-title span.text-3xl {
        font-size: 1.25rem !important;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-content {
        margin-top: 32px;
    }
}

/* --- 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;
    }

    .hero-img {
        animation: none;
    }

    .photo-break-img {
        animation: none;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
