/*
Theme Name: Lost Almanac
Theme URI: https://lostalmanac.com
Description: Custom theme for Lost Almanac
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400;700&display=swap');

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Lato', sans-serif; background: #fdf6e9; color: #2d1f0a; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: #c8860a; text-decoration: none; }
a:hover { color: #e6a020; }
h1,h2,h3,h4,h5,h6 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.2; color: #1a0e00; }

/* ── NAV ─────────────────────────────────────────────────── */
.la-nav {
    position: sticky;
    top: 0;
    z-index: 9999;
    height: 68px;
    background: #0d0600;
    border-bottom: 2px solid #c8860a;
    box-shadow: 0 4px 24px rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
}
.la-nav__inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.la-nav__logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #f5e6c8;
    letter-spacing: 0.22em;
    text-decoration: none;
    flex-shrink: 0;
}
.la-nav__logo:hover { color: #c8860a; text-decoration: none; }

/* Desktop menu links */
.la-nav__menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}
.la-nav__menu a {
    font-family: 'Lato', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: #b0966a;
    text-decoration: none;
    position: relative;
    padding-bottom: 3px;
}
.la-nav__menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: #c8860a;
    transition: width 0.25s ease;
}
.la-nav__menu a:hover,
.la-nav__menu .current-menu-item > a { color: #c8860a; }
.la-nav__menu a:hover::after,
.la-nav__menu .current-menu-item > a::after { width: 100%; }

/* Hamburger */
.la-nav__hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.la-nav__hamburger span {
    display: block;
    height: 2px;
    background: #b0966a;
    border-radius: 2px;
    transition: all 0.28s ease;
    transform-origin: center;
}
.la-nav__hamburger:hover span { background: #c8860a; }
.la-nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.la-nav__hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.la-nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown */
.la-nav__drawer {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #0d0600;
    border-bottom: 2px solid #c8860a;
    padding: 1.2rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 9998;
}
.la-nav__drawer.is-open { display: block; }
.la-nav__drawer ul { list-style: none; }
.la-nav__drawer ul li a {
    display: block;
    padding: 0.75rem 32px;
    font-family: 'Lato', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #b0966a;
    text-decoration: none;
}
.la-nav__drawer ul li a:hover { color: #c8860a; background: rgba(200,134,10,0.06); }

@media (max-width: 768px) {
    .la-nav__menu { display: none; }
    .la-nav__hamburger { display: flex; }
}

/* ── HERO ────────────────────────────────────────────────── */
.la-hero {
    position: relative;
    width: 100%;
    min-height: 480px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.la-hero__bg {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    filter: brightness(0.55);
}
.la-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(10,5,0,0.6) 100%);
}
.la-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 80px 24px;
}
.la-hero__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.6rem, 8vw, 6rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 40px rgba(0,0,0,0.9);
    letter-spacing: 0.1em;
    margin-bottom: 0.6rem;
}
.la-hero__sub {
    font-family: 'Lato', sans-serif;
    font-size: clamp(0.68rem, 2vw, 0.9rem);
    letter-spacing: 0.55em;
    text-transform: uppercase;
    color: #ddc990;
    text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}

/* ── INTRO ───────────────────────────────────────────────── */
.la-intro {
    max-width: 680px;
    margin: 3.5rem auto;
    padding: 0 24px;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.85;
    color: #4a3520;
    font-style: italic;
}

/* ── SECTION HEADING ─────────────────────────────────────── */
.la-section-heading {
    text-align: center;
    font-size: 1.5rem;
    color: #1a0e00;
    letter-spacing: 0.06em;
    margin: 0 0 0.8rem;
}
.la-section-rule {
    display: block;
    width: 56px;
    height: 2px;
    background: #c8860a;
    margin: 0 auto 3rem;
}

/* ── POSTS GRID (homepage + archive) ────────────────────── */
.la-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 5rem;
    padding: 0 24px;
}
.la-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border-bottom: 3px solid #c8860a;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.la-card:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(0,0,0,0.14); }
.la-card__img { width: 100%; height: 200px; object-fit: cover; }
.la-card__body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.la-card__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a0e00;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}
.la-card__title a { color: inherit; text-decoration: none; }
.la-card__title a:hover { color: #c8860a; }
.la-card__excerpt {
    font-size: 0.9rem;
    color: #5a4030;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1rem;
}
.la-card__link {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c8860a;
    border-bottom: 1px solid #c8860a;
    padding-bottom: 1px;
    align-self: flex-start;
}
.la-card__link:hover { color: #e6a020; border-color: #e6a020; text-decoration: none; }

/* ── SINGLE POST ─────────────────────────────────────────── */
.la-single { max-width: 860px; margin: 0 auto; padding: 3rem 24px 5rem; }
.la-single__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #1a0e00;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}
.la-single__meta {
    font-size: 0.8rem;
    color: #9a7a50;
    letter-spacing: 0.08em;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e8d8b0;
}
.la-single__content { font-size: 1.05rem; line-height: 1.85; color: #2d1f0a; }
.la-single__content p { margin-bottom: 1.4rem; }
.la-single__content h2 { margin: 2rem 0 0.8rem; font-size: 1.5rem; }
.la-single__content h3 { margin: 1.6rem 0 0.6rem; font-size: 1.2rem; }

/* ── ARCHIVE ─────────────────────────────────────────────── */
.la-archive { padding: 3rem 0 0; }
.la-archive__heading {
    text-align: center;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: #1a0e00;
    margin-bottom: 0.6rem;
}
.la-archive__rule { display: block; width: 56px; height: 2px; background: #c8860a; margin: 0 auto 3rem; }

/* ── FOOTER ──────────────────────────────────────────────── */
.la-footer {
    background: #0d0600;
    border-top: 2px solid #c8860a;
    padding: 3.5rem 24px 2rem;
    text-align: center;
}
.la-footer__brand-name {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f5e6c8;
    letter-spacing: 0.25em;
    margin-bottom: 0.3rem;
}
.la-footer__tagline {
    display: block;
    font-family: 'Lato', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #6a4e2a;
    margin-bottom: 2.4rem;
}

/* Social icons */
.la-footer__social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2.4rem;
}
.la-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #7a5c38;
    transition: color 0.2s, transform 0.2s;
}
.la-social:hover { transform: translateY(-4px); text-decoration: none; }
.la-social__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(200,134,10,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}
.la-social:hover .la-social__icon { border-color: currentColor; background: rgba(255,255,255,0.12); }
.la-social__icon svg { width: 22px; height: 22px; fill: currentColor; }
.la-social__label {
    font-family: 'Lato', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 700;
}
.la-social--yt:hover  { color: #ff0000; }
.la-social--tt:hover  { color: #e0e0e0; }
.la-social--ig:hover  { color: #e1306c; }

.la-footer__divider {
    width: 100%;
    max-width: 400px;
    height: 1px;
    background: rgba(200,134,10,0.2);
    margin: 0 auto 1.6rem;
}
.la-footer__copy {
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    color: #4a3520;
    letter-spacing: 0.06em;
}

/* ── BLOCK EDITOR COMPAT ─────────────────────────────────── */
.wp-block-latest-posts {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 4rem;
    padding: 0 24px;
}
.wp-block-latest-posts li {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border-bottom: 3px solid #c8860a;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.wp-block-latest-posts li:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(0,0,0,0.14); }
.wp-block-latest-posts__list li a {
    display: block;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.12rem;
    font-weight: 700;
    color: #1a0e00;
    padding: 1.4rem 1.5rem 0.4rem;
    line-height: 1.3;
    text-decoration: none;
}
.wp-block-latest-posts__list li a:hover { color: #c8860a; }
.wp-block-latest-posts__post-excerpt {
    padding: 0.2rem 1.5rem 1.5rem;
    font-size: 0.9rem;
    color: #5a4030;
    line-height: 1.65;
}

/* Page/post content area wrapper */
.la-page-body { padding: 0; }
.la-page-body .wp-block-cover {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

@media (max-width: 600px) {
    .la-posts-grid { grid-template-columns: 1fr; }
    .la-footer__social { gap: 1.4rem; }
}
