/* ============================================
   Books and Beans Cafe — Stylesheet
   Bold editorial · Deep navy + warm gold
   ============================================ */

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

:root {
    --navy-950: #0a1628;
    --navy-900: #0f1f3d;
    --navy-800: #162a4a;
    --navy-700: #1e3a5c;
    --navy-600: #264a6e;
    
    --gold-500: #c8963e;
    --gold-400: #d4a84b;
    --gold-300: #e0bc6a;
    --gold-200: #f0d89a;
    
    --cream-50: #faf8f5;
    --cream-100: #f5f0e8;
    --cream-200: #ebe3d5;
    
    --text-dark: #1a1a1a;
    --text-mid: #4a4a4a;
    --text-light: #7a7a7a;
    
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    --transition: 0.3s ease;
}

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

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--cream-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ---------- Typography ---------- */
.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: var(--space-sm);
}

.section-eyebrow--light {
    color: var(--gold-300);
}

.section-headline {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--navy-900);
    margin-bottom: var(--space-md);
}

.section-headline--light {
    color: #ffffff;
}

.section {
    padding: var(--space-3xl) 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.875rem 2rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background-color: var(--gold-500);
    color: var(--navy-950);
    border-color: var(--gold-500);
}

.btn--primary:hover {
    background-color: var(--gold-400);
    border-color: var(--gold-400);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 150, 62, 0.3);
}

.btn--ghost {
    background-color: transparent;
    color: var(--navy-900);
    border-color: var(--navy-900);
}

.btn--ghost:hover {
    background-color: var(--navy-900);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn--gold {
    background-color: var(--gold-500);
    color: var(--navy-950);
    border-color: var(--gold-500);
}

.btn--gold:hover {
    background-color: var(--gold-400);
    border-color: var(--gold-400);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(200, 150, 62, 0.3);
}

.btn--outline-light {
    background-color: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn--outline-light:hover {
    background-color: #ffffff;
    color: var(--navy-900);
    border-color: #ffffff;
}

.btn--full {
    width: 100%;
}

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow var(--transition);
}

.nav.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy-900);
}

.nav__logo-icon {
    color: var(--gold-500);
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.nav__link {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-mid);
    transition: color var(--transition);
    position: relative;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--gold-500);
    transition: width var(--transition);
}

.nav__link:hover {
    color: var(--navy-900);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__link--cta {
    padding: 0.5rem 1.25rem;
    background-color: var(--navy-900);
    color: #ffffff !important;
    border-radius: var(--radius-sm);
    font-weight: 500;
}

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

.nav__link--cta:hover {
    background-color: var(--navy-800);
}

.nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    color: var(--navy-900);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--cream-50);
    padding-top: 72px;
    position: relative;
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    align-items: center;
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
}

.hero__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: var(--space-md);
}

.hero__headline {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--navy-900);
    margin-bottom: var(--space-md);
    max-width: 540px;
}

.hero__subheadline {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-mid);
    margin-bottom: var(--space-lg);
    max-width: 480px;
}

.hero__actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero__image-wrapper {
    position: relative;
}

.hero__image-accent {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--gold-500);
    border-radius: var(--radius-lg);
    z-index: -1;
}

.hero__image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 64px rgba(10, 22, 40, 0.15);
}

.hero__scroll-hint {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-light);
    animation: float 2s ease-in-out infinite;
}

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

/* ---------- About ---------- */
.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about__image-stack {
    position: relative;
    height: 560px;
}

.about__image-primary {
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 80%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(10, 22, 40, 0.12);
}

.about__image-secondary {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 60%;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 4px solid var(--cream-50);
    box-shadow: 0 16px 48px rgba(10, 22, 40, 0.12);
}

.about__text-col {
    max-width: 520px;
}

.about__body {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-mid);
    margin-bottom: var(--space-md);
}

.about__stats {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--cream-200);
}

.stat {
    flex: 1;
}

.stat--divider::before {
    content: '';
    position: absolute;
    left: calc(var(--space-lg) / -2);
    top: 10%;
    height: 80%;
    width: 1px;
    background-color: var(--cream-200);
}

.stat__number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy-900);
    line-height: 1;
    margin-bottom: 0.375rem;
}

.stat__label {
    font-size: 0.8125rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* ---------- Menu ---------- */
.menu--dark {
    background-color: var(--navy-900);
}

.menu__header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto var(--space-2xl);
}

.menu__lead {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.65);
}

.menu__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 900px;
    margin: 0 auto;
}

.menu__category {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu__category svg {
    color: var(--gold-400);
}

.menu__list {
    list-style: none;
}

.menu__item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    gap: var(--space-sm);
}

.menu__item-name {
    font-weight: 500;
    color: #ffffff;
    font-size: 1rem;
}

.menu__item-desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
    flex-shrink: 0;
}

.menu__note {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: var(--space-xl);
    font-style: italic;
}

/* ---------- Library ---------- */
.library__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

.library__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.library__card {
    background-color: #ffffff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(10, 22, 40, 0.06);
    transition: transform var(--transition), box-shadow var(--transition);
}

.library__card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(10, 22, 40, 0.12);
}

.library__card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.library__card-content {
    padding: var(--space-md);
}

.library__card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-900);
    margin-bottom: 0.5rem;
}

.library__card-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text-mid);
}

/* ---------- Testimonial ---------- */
.testimonial--dark {
    background-color: var(--navy-900);
}

.testimonial__inner {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

.testimonial__quote-icon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--gold-400);
}

.testimonial__text {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-md);
}

.testimonial__attribution {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gold-400);
    letter-spacing: 0.05em;
}

/* ---------- Visit ---------- */
.visit__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.visit__info {
    max-width: 480px;
}

.visit__details {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.visit__detail {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.visit__icon {
    color: var(--gold-500);
    flex-shrink: 0;
    margin-top: 2px;
}

.visit__detail strong {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-500);
    margin-bottom: 0.25rem;
}

.visit__detail p {
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.6;
}

.visit__detail a {
    color: var(--navy-900);
    text-decoration: underline;
    text-decoration-color: var(--gold-500);
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.visit__detail a:hover {
    color: var(--gold-500);
}

.visit__hours {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--cream-200);
}

.visit__hours-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--navy-900);
    margin-bottom: var(--space-sm);
}

.visit__hours-list {
    list-style: none;
}

.visit__hours-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--cream-200);
    font-size: 0.9375rem;
}

.visit__hours-row span:first-child {
    color: var(--text-mid);
}

.visit__hours-row span:last-child {
    font-weight: 500;
    color: var(--navy-900);
}

.visit__map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(10, 22, 40, 0.1);
}

.visit__map-placeholder {
    background-color: var(--navy-800);
    padding: var(--space-2xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
    min-height: 320px;
    justify-content: center;
}

.visit__map-icon {
    color: var(--gold-400);
    opacity: 0.6;
}

.visit__map-placeholder p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

/* ---------- Contact ---------- */
.contact--dark {
    background-color: var(--navy-900);
}

.contact__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.contact__text {
    max-width: 440px;
}

.contact__lead {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.65);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact__field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.contact__label {
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.contact__input,
.contact__textarea {
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 0.875rem 1rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #ffffff;
    transition: border-color var(--transition), background-color var(--transition);
    outline: none;
}

.contact__input::placeholder,
.contact__textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.contact__input:focus,
.contact__textarea:focus {
    border-color: var(--gold-500);
    background-color: rgba(255, 255, 255, 0.1);
}

.contact__textarea {
    min-height: 140px;
    resize: vertical;
}

.contact__success {
    text-align: center;
    padding: var(--space-md);
    background-color: rgba(200, 150, 62, 0.15);
    border: 1px solid rgba(200, 150, 62, 0.3);
    border-radius: var(--radius-sm);
    color: var(--gold-300);
    font-size: 0.9375rem;
}

/* ---------- Footer ---------- */
.footer {
    background-color: var(--navy-950);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-serif);
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
}

.footer__tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.375rem;
    margin-bottom: 0;
}

.footer__links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.footer__links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

.footer__links a:hover {
    color: var(--gold-400);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.footer__bottom p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .hero__container {
        gap: var(--space-lg);
    }
    
    .hero__headline {
        font-size: clamp(2rem, 4vw, 3rem);
    }
}

@media (max-width: 768px) {
    :root {
        --space-3xl: 5rem;
        --space-2xl: 3.5rem;
    }
    
    .nav__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav__menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background-color: rgba(250, 248, 245, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-sm);
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform var(--transition), opacity var(--transition);
        pointer-events: none;
    }
    
    .nav__menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav__link {
        font-size: 1rem;
        padding: 0.5rem 0;
    }
    
    .nav__link--cta {
        margin-top: var(--space-sm);
    }
    
    /* Hero mobile */
    .hero {
        min-height: auto;
        padding-top: 72px;
    }
    
    .hero__container {
        grid-template-columns: 1fr;
        padding-top: var(--space-lg);
        padding-bottom: var(--space-xl);
    }
    
    .hero__content {
        order: 2;
    }
    
    .hero__image-wrapper {
        order: 1;
    }
    
    .hero__headline {
        font-size: clamp(2rem, 7vw, 2.75rem);
    }
    
    .hero__image-accent {
        top: -10px;
        right: -10px;
    }
    
    .hero__scroll-hint {
        display: none;
    }
    
    /* About mobile */
    .about__grid {
        grid-template-columns: 1fr;
    }
    
    .about__image-stack {
        height: 400px;
        order: -1;
    }
    
    /* Menu mobile */
    .menu__columns {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    /* Library mobile */
    .library__grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Visit mobile */
    .visit__grid {
        grid-template-columns: 1fr;
    }
    
    .visit__map {
        order: -1;
    }
    
    /* Contact mobile */
    .contact__inner {
        grid-template-columns: 1fr;
    }
    
    .contact__text {
        max-width: 100%;
    }
    
    /* Footer mobile */
    .footer__top {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .footer__links {
        gap: var(--space-sm);
    }
    
    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero__actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    .about__stats {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .stat--divider::before {
        display: none;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero__scroll-hint {
        animation: none;
    }
}
