/* ============================================
   Upstairs @ the Cafe — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    z-index: 9999;
    padding: 0.75rem 1rem;
    background: #0a1628;
    color: #bbf7d0;
    border-radius: 0.25rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.skip-link:focus {
    outline: 2px solid #4ade80;
    outline-offset: 2px;
}

/* --- Navigation --- */
.nav {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(10, 22, 40, 0.06);
}

.nav.scrolled {
    background: rgba(254, 253, 248, 0.95);
    box-shadow: 0 1px 20px rgba(10, 22, 40, 0.08);
}

.nav.scrolled .nav-logo-text {
    color: #0a1628;
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: translateY(2.5px) rotate(45deg);
}
.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
    transform: translateY(-2.5px) rotate(-45deg);
    width: 1.25rem;
}

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

.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(10, 22, 40, 0.06);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* --- CTA Button --- */
.cta-btn {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-btn:hover::before {
    opacity: 1;
}

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

.hero-img-wrap {
    position: absolute;
    inset: 0;
}

.hero-img {
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.hero-accent {
    animation: float 6s ease-in-out infinite;
}

.hero-accent:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 8s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

/* --- Feature Cards --- */
.feature-card {
    transform: translateY(0);
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* --- Tags --- */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(167, 243, 208, 0.1);
    border: 1px solid rgba(167, 243, 208, 0.25);
    border-radius: 100px;
    color: #86efac;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Menu Items --- */
.menu-item {
    border-bottom: 1px solid rgba(253, 248, 232, 0.08);
    padding-bottom: 1.25rem;
}

.menu-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.menu-item:hover .font-medium {
    color: #86efac;
    transition: color 0.2s ease;
}

/* --- Info Blocks --- */
.info-block {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
}

/* --- Form Elements --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #0f2a5c;
    letter-spacing: 0.02em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fefdf8;
    color: #0a1628;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #94a3b8;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: #94a3b8;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

/* Form validation states */
.form-input:invalid:not(:placeholder-shown),
.form-textarea:invalid:not(:placeholder-shown) {
    border-color: #f87171;
}

.form-input:valid:not(:placeholder-shown),
.form-textarea:valid:not(:placeholder-shown) {
    border-color: #4ade80;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

    .hero-accent {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .feature-card:hover {
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .hero {
        min-height: auto;
    }

    .hero-left {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }

    .hero-right {
        min-h: 50vh;
        min-height: 50vh;
    }

    h1 {
        font-size: 2.75rem !important;
        line-height: 1.1 !important;
    }

    h2 {
        font-size: 2.25rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    h1 {
        font-size: 4.5rem !important;
    }
}

/* --- Print --- */
@media print {
    .nav, .mobile-menu-btn, .hero-accent {
        display: none;
    }

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

    .hero {
        min-height: auto;
        page-break-after: avoid;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
