/* ============================================
   The Bookstore — Patchogue
   Bold editorial café & bar website
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0d7377;
    --teal-800: #115e59;
    --teal-900: #134e4a;
    --teal-950: #042f2e;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    --cream: #faf9f6;
    --warm-white: #fefdfb;

    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--slate-800);
    background-color: var(--cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

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

ul, ol {
    list-style: none;
}

label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--slate-600);
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 48px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 64px;
    }
}

/* --- Section Labels --- */
.section-label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--teal-700);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--slate-900);
    margin-bottom: 24px;
}

.section-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--slate-600);
    max-width: 560px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 14px 32px;
    border-radius: 4px;
    transition: all 0.3s var(--ease-out);
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--teal-700);
    color: #fff;
    border: 2px solid var(--teal-700);
}

.btn-primary:hover {
    background-color: var(--teal-800);
    border-color: var(--teal-800);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(13, 115, 119, 0.25);
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.btn-full {
    width: 100%;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    transition: all 0.4s var(--ease-out);
}

.navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.navbar.scrolled .nav-logo .logo-text {
    color: var(--slate-900);
}

.navbar.scrolled .nav-links a {
    color: var(--slate-700);
}

.navbar.scrolled .nav-links a:hover {
    color: var(--teal-700);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--teal-700);
    color: #fff;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.navbar.scrolled .logo-mark {
    background-color: var(--teal-700);
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    transition: color 0.3s ease;
}

.nav-links {
    display: none;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.02em;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--teal-400);
    transition: width 0.3s var(--ease-out);
}

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

.nav-links a:hover {
    color: #fff;
}

.nav-cta {
    padding: 10px 24px;
    background-color: var(--teal-700);
    color: #fff !important;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.3s ease !important;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background-color: var(--teal-800);
    transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    z-index: 1001;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

.nav-toggle[aria-expanded="true"] .hamburger {
    background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background-color: var(--slate-900);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-out), visibility 0.4s var(--ease-out);
}

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

.mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: #fff;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.mobile-link {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    padding: 12px 24px;
    transition: color 0.3s ease;
}

.mobile-link:hover {
    color: var(--teal-400);
}

.mobile-cta {
    margin-top: 16px;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--teal-400) !important;
    border: 1.5px solid var(--teal-600);
    border-radius: 4px;
    padding: 14px 32px;
}

.mobile-contact {
    margin-top: 40px;
    text-align: center;
    color: var(--slate-400);
    font-size: 0.875rem;
    line-height: 1.8;
}

.mobile-contact a {
    color: var(--slate-300);
    transition: color 0.3s ease;
}

.mobile-contact a:hover {
    color: var(--teal-400);
}

/* --- Hero --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(2, 6, 23, 0.55) 0%,
        rgba(2, 6, 23, 0.45) 50%,
        rgba(2, 6, 23, 0.70) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    max-width: 720px;
}

.hero-eyebrow {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--teal-300);
    margin-bottom: 24px;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.75rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.05;
    color: #fff;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-headline em {
    font-style: italic;
    color: var(--teal-300);
}

.hero-sub {
    font-size: clamp(1.0625rem, 2vw, 1.3125rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.6);
    animation: float 2.5s ease-in-out infinite;
    transition: color 0.3s ease;
}

.scroll-indicator:hover {
    color: #fff;
}

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

/* --- About --- */
.about {
    padding: 120px 0;
    background-color: var(--cream);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.about-image-wrap {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.1);
}

.about-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/5;
}

.about-content {
    padding: 16px 0;
}

.about-content .lead {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    line-height: 1.6;
    color: var(--slate-700);
    margin-bottom: 20px;
    font-style: italic;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--slate-600);
    margin-bottom: 16px;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--slate-200);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--slate-700);
}

.feature-item svg {
    color: var(--teal-600);
    flex-shrink: 0;
}

/* --- Menu --- */
.menu {
    padding: 120px 0;
    background-color: var(--slate-900);
}

.menu-header {
    text-align: center;
    margin-bottom: 56px;
}

.menu-header .section-label {
    color: var(--teal-400);
}

.menu-header .section-title {
    color: #fff;
}

.menu-header .section-subtitle {
    color: var(--slate-400);
    margin: 0 auto;
}

.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.menu-tab {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 100px;
    color: var(--slate-400);
    border: 1.5px solid var(--slate-700);
    transition: all 0.3s var(--ease-out);
}

.menu-tab:hover {
    color: var(--slate-200);
    border-color: var(--slate-500);
}

.menu-tab.active {
    background-color: var(--teal-700);
    color: #fff;
    border-color: var(--teal-700);
}

.menu-panel {
    display: none;
}

.menu-panel.active {
    display: block;
    animation: fadeIn 0.4s var(--ease-out);
}

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

.menu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
}

.menu-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 20px 0;
    border-bottom: 1px solid var(--slate-800);
    transition: padding-left 0.3s ease;
}

.menu-item:hover {
    padding-left: 12px;
}

.menu-item-header h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.menu-item-desc {
    font-size: 0.875rem;
    color: var(--slate-500);
    font-style: italic;
}

.menu-note {
    text-align: center;
    margin-top: 48px;
    font-size: 0.875rem;
    color: var(--slate-500);
    font-style: italic;
}

/* --- Events --- */
.events {
    padding: 120px 0;
    background-color: var(--cream);
}

.events-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

.events-content .section-subtitle {
    margin-bottom: 40px;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-card {
    display: flex;
    gap: 24px;
    padding: 28px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid var(--slate-200);
    transition: all 0.3s var(--ease-out);
}

.event-card:hover {
    border-color: var(--teal-300);
    box-shadow: 0 8px 32px rgba(13, 115, 119, 0.08);
    transform: translateY(-2px);
}

.event-day {
    flex-shrink: 0;
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--teal-700);
    background-color: var(--teal-50);
    padding: 8px 16px;
    border-radius: 4px;
    white-space: nowrap;
    align-self: flex-start;
}

.event-details h3 {
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 6px;
}

.event-details p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--slate-600);
}

.events-image-wrap {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.1);
}

.events-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3/4;
}

/* --- Visit --- */
.visit {
    padding: 120px 0;
    background-color: var(--slate-50);
}

.visit-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

.visit-info {
    padding: 16px 0;
}

.visit-info .section-subtitle {
    margin-bottom: 40px;
}

.info-block {
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--slate-200);
}

.info-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-block h3 {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 10px;
}

.info-block p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--slate-600);
}

.info-block a {
    color: var(--teal-700);
    transition: color 0.3s ease;
}

.info-block a:hover {
    color: var(--teal-500);
    text-decoration: underline;
}

.hours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 24px;
    max-width: 320px;
}

.hours-grid span:first-child {
    font-weight: 500;
    color: var(--slate-700);
}

.hours-grid span:last-child {
    color: var(--slate-500);
    text-align: right;
}

.visit-map {
    border-radius: 8px;
    overflow: hidden;
    min-height: 360px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* --- Contact --- */
.contact {
    padding: 120px 0;
    background-color: var(--cream);
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    align-items: start;
}

.contact-content .section-subtitle {
    margin-bottom: 0;
}

.contact-form-wrap {
    background-color: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--slate-100);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--slate-800);
    background-color: var(--slate-50);
    border: 1.5px solid var(--slate-200);
    border-radius: 6px;
    padding: 14px 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--slate-400);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

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

.form-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success svg {
    color: var(--teal-600);
}

.form-success h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
}

.form-success p {
    font-size: 1rem;
    color: var(--slate-600);
    line-height: 1.6;
}

/* --- Footer --- */
.footer {
    background-color: var(--slate-900);
    color: var(--slate-400);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding-bottom: 64px;
}

.footer-brand .footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.footer-brand .logo-mark {
    background-color: var(--teal-600);
}

.footer-brand .logo-text {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--slate-500);
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.9375rem;
    color: var(--slate-500);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--teal-400);
}

.footer-contact p {
    font-size: 0.9375rem;
    line-height: 1.8;
    margin-bottom: 4px;
}

.footer-contact a {
    color: var(--slate-500);
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: var(--teal-400);
}

.footer-bottom {
    border-top: 1px solid var(--slate-800);
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--slate-600);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    }

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

/* --- Responsive --- */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .nav-toggle {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .menu-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0 48px;
    }

    .events-layout {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .visit-grid {
        grid-template-columns: 1fr 1fr;
        gap: 64px;
    }

    .contact-layout {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1.5fr;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (min-width: 1024px) {
    .menu-grid {
        gap: 0 64px;
    }

    .event-card {
        padding: 32px;
    }
}
