/* =================================
   Last Looks - Custom Styles
   Cinematic Intimate Design
   ================================= */

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Prevent orphaned words in headlines */
h1, h2, h3 {
    text-wrap: balance;
}

/* Prevent orphaned words in body text */
p {
    text-wrap: pretty;
}

/* Selection color */
::selection {
    background-color: #C9A87C;
    color: #1A1816;
}

/* =================================
   Skip to Content (Accessibility)
   ================================= */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: #C9A87C;
    color: #1A1816;
    padding: 0.75rem 1.5rem;
    z-index: 100;
    transition: top 0.3s ease;
    font-size: 0.875rem;
}

.skip-to-content:focus {
    top: 1rem;
    outline: 2px solid #E5C9A0;
    outline-offset: 2px;
}

/* =================================
   Grain Overlay
   ================================= */
.grain-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    z-index: 1;
}

/* =================================
   Hero Section
   ================================= */
.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        #1A1816 0%,
        #221F1C 50%,
        #1A1816 100%
    );
    z-index: 0;
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        ellipse at center,
        transparent 30%,
        rgba(26, 24, 22, 0.4) 100%
    );
    pointer-events: none;
    z-index: 2;
}

/* Hero headline line-height */
#hero h1 {
    letter-spacing: -0.02em;
}

/* =================================
   Image Placeholders
   ================================= */
.image-placeholder {
    border: 1px dashed rgba(201, 168, 124, 0.3);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        rgba(61, 56, 53, 0.3) 0%,
        rgba(45, 41, 38, 0.3) 100%
    );
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.image-placeholder:hover {
    border-color: rgba(201, 168, 124, 0.5);
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.placeholder-content span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* =================================
   Navigation Styles
   ================================= */
#navbar {
    background-color: transparent;
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(26, 24, 22, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Nav link underline animation */
.nav-link {
    position: relative;
}

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

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

.nav-link.active {
    color: #F5F0E8;
}

/* Mobile Menu */
#mobile-menu {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.active .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.active .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }
#mobile-menu.active .mobile-nav-link:nth-child(6) { transition-delay: 0.35s; }

/* =================================
   Section Dividers
   ================================= */
.section-divider {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 168, 124, 0.4) 50%,
        transparent 100%
    );
}

/* =================================
   Initial Fade-In Animations (Hero)
   ================================= */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1.2s ease-out forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.3s;
}

.fade-in-delay-2 {
    animation-delay: 0.6s;
}

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

/* =================================
   Scroll-Triggered Fade-In
   ================================= */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =================================
   About Photo Feather Effect
   ================================= */
.about-photo {
    mask-image: linear-gradient(to right, transparent 0%, black 15%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%);
}

/* =================================
   Format Cards (How Section)
   ================================= */
.format-card {
    transition: border-color 0.3s ease;
}

.format-card:hover {
    border-color: rgba(201, 168, 124, 0.5);
}

/* =================================
   Form Styles
   ================================= */
.form-group {
    position: relative;
}

.form-input {
    transition: border-color 0.3s ease;
    font-family: 'Source Serif 4', Georgia, serif;
}

.form-input:focus {
    box-shadow: none;
}

.form-input.error {
    border-color: #C9564B;
}

.form-error {
    display: block;
    font-size: 0.75rem;
    color: #C9564B;
    margin-top: 0.5rem;
    min-height: 1rem;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.form-error.visible {
    opacity: 1;
    transform: translateY(0);
}

.form-status {
    border-radius: 2px;
    font-size: 0.875rem;
}

.form-status.success {
    background: rgba(72, 156, 105, 0.15);
    color: #6BBF8A;
    border: 1px solid rgba(72, 156, 105, 0.3);
}

.form-status.error {
    background: rgba(201, 86, 75, 0.15);
    color: #E07A70;
    border: 1px solid rgba(201, 86, 75, 0.3);
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Success State */
.form-fields {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-fields.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 0.5s ease forwards;
}

.form-success.visible {
    display: block;
}

.form-success-message {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #6BBF8A;
    background: rgba(72, 156, 105, 0.1);
    border-left: 3px solid #6BBF8A;
    padding: 1.25rem 1.5rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.form-success-reset {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 0.875rem;
    color: #9A938B;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-success-reset:hover {
    color: #C9A87C;
}

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

/* =================================
   Focus States for Accessibility
   ================================= */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C9A87C;
    outline-offset: 2px;
}

/* =================================
   Responsive Adjustments
   ================================= */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.5rem;
        letter-spacing: -0.01em;
    }

    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* Mobile hero centered */
    #hero main {
        text-align: center;
    }

    #hero .max-w-2xl {
        max-width: none;
    }

    /* Mobile scroll indicator */
    #hero > div:last-child {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* =================================
   Reduced Motion Support
   ================================= */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .fade-in-scroll {
        opacity: 1;
        transform: none;
        animation: none;
        transition: none;
    }

    .nav-link::after {
        transition: none;
    }

    .format-card,
    .image-placeholder {
        transition: none;
    }

    #mobile-menu,
    .mobile-nav-link {
        transition: none;
    }
}

/* =================================
   Print Styles
   ================================= */
@media print {
    .grain-overlay,
    .hero-gradient,
    .hero-vignette,
    .image-placeholder,
    #navbar,
    #mobile-menu-btn,
    #mobile-menu,
    .skip-to-content {
        display: none !important;
    }

    body {
        background: white;
        color: #1A1816;
    }

    section {
        break-inside: avoid;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #6B6560;
    }
}
