/* ============================================
   Brim-O-Bay Motel — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; -webkit-font-smoothing: antialiased; }

/* --- Navbar --- */
.nav {
    background: rgba(254, 253, 248, 0);
    transition: background 0.5s ease, box-shadow 0.5s ease;
}
.nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #059669;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* Mobile menu */
#mobileMenu {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}
#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}
.menu-line { transition: transform 0.3s ease, opacity 0.3s ease; }
#menuBtn[aria-expanded="true"] .menu-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#menuBtn[aria-expanded="true"] .menu-line:nth-child(2) { opacity: 0; }
#menuBtn[aria-expanded="true"] .menu-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-link { transition: color 0.2s ease; }

/* --- Hero --- */
.hero { position: relative; }
.hero-bg { position: absolute; inset: 0; }
.hero-img { will-change: transform; }
.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(6, 78, 59, 0.55) 0%,
        rgba(6, 78, 59, 0.40) 40%,
        rgba(6, 78, 59, 0.65) 100%
    );
}
.hero-title {
    text-shadow: 0 2px 40px rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.15);
}
.hero-content { padding-top: 80px; }

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-primary {
    background: #059669;
    color: #fff;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.3);
}
.btn-primary:hover {
    background: #047857;
    box-shadow: 0 8px 30px rgba(5, 150, 105, 0.4);
    transform: translateY(-2px);
}
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: 2px solid #059669;
    color: #059669;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}
.btn-outline:hover {
    background: #059669;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(5, 150, 105, 0.25);
}

/* --- Tags & Badges --- */
.tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #059669;
    background: #d1fae5;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
}
.tag-light {
    color: #a7f3d0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}
.badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #047857;
    background: #d1fae5;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}
.badge-featured {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: #059669;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* --- Cards --- */
.card {
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(6, 78, 59, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(6, 78, 59, 0.12);
}
.card-img-wrap { position: relative; }
.card-img { transition: transform 0.7s ease; }
.card:hover .card-img { transform: scale(1.05); }
.card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(6,78,59,0.06) 100%);
    border-radius: 1.25rem;
    pointer-events: none;
}

/* --- CTA Section --- */
.cta-bg { position: absolute; inset: 0; }
.cta-img { will-change: transform; }
.cta-overlay {
    background: linear-gradient(
        135deg,
        rgba(6, 78, 59, 0.82) 0%,
        rgba(4, 120, 87, 0.72) 50%,
        rgba(5, 150, 105, 0.65) 100%
    );
}

/* --- Inputs --- */
.input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #064e3b;
    background: #faf9f6;
    border: 1.5px solid #ece8df;
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input::placeholder { color: #a8a29e; }
.input:focus {
    border-color: #6ee7b7;
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.25);
    background: #fff;
}
.input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.input-error-msg {
    display: none;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: #dc2626;
}
.input.error + .input-error-msg { display: block; }

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
    opacity: 1;
    transform: none;
}
/* Default hidden state for JS-gated reveal — only active when JS runs */
.js .reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}
.js .reveal[data-reveal].revealed {
    opacity: 1;
    transform: none;
}

/* --- 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; }
    .reveal { opacity: 1; transform: none; }
    .card:hover { transform: none; }
    .card:hover .card-img { transform: none; }
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .hero-content { padding-top: 64px; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; }
}
@media (min-width: 641px) and (max-width: 767px) {
    .hero-title { font-size: 3.25rem; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title { font-size: 4rem; }
}
