/*
 * Church Street Inn — Custom Styles
 * Classic & elegant · Midnight blue + mint palette
 */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Lato', system-ui, sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #060D1A;
    background-color: #F4FBF9;
    overflow-x: hidden;
}

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

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

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

/* ---------- Selection ---------- */
::selection {
    background: #4A9B76;
    color: #fff;
}

/* ---------- Focus visible ---------- */
:focus-visible {
    outline: 2px solid #4A9B76;
    outline-offset: 2px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    line-height: 1.15;
    color: #060D1A;
}

/* ---------- Utility ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- Navbar ---------- */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.nav-scrolled {
    background-color: rgba(3, 8, 18, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 24px rgba(0, 0, 0, 0.25);
}

/* ---------- Mobile menu ---------- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu.open {
    max-height: 420px;
}

.mobile-link {
    display: block;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: color 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:hover {
    color: #9FD3B8;
}

/* ---------- Scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.12s; }
    .reveal-delay-2 { transition-delay: 0.24s; }
    .reveal-delay-3 { transition-delay: 0.36s; }
    .reveal-delay-4 { transition-delay: 0.48s; }
}

/* ---------- Accent line ---------- */
.accent-line {
    width: 0;
    transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.accent-line.visible {
    width: 64px;
}

/* ---------- Service cards ---------- */
.service-card {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(6, 13, 26, 0.12);
}

.service-card .parallax-img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .parallax-img {
    transform: scale(1.05);
}

/* ---------- Link underline ---------- */
.link-underline {
    position: relative;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

/* ---------- Gallery ---------- */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* ---------- Form ---------- */
input, textarea {
    font-family: 'Lato', system-ui, sans-serif;
    font-size: 0.875rem;
    color: #060D1A;
    background: transparent;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input::placeholder, textarea::placeholder {
    color: rgba(6, 13, 26, 0.2);
}

input:focus, textarea:focus {
    outline: none;
    border-color: #4A9B76;
    box-shadow: 0 0 0 3px rgba(74, 155, 118, 0.12);
}

/* ---------- Form success ---------- */
#form-success {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    html {
        font-size: 15px;
    }

    #navbar .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ---------- Print ---------- */
@media print {
    #navbar, .gallery-item, #contact-form, #mobile-menu {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a[href]::after {
        content: ' (' attr(href) ')';
        font-size: 0.75rem;
        color: #666;
    }
}
