/* ==========================================================================
   Elvessora — "Fragrance Journal" blog list.
   Editorial magazine layout: masthead over a dark photo, text tabs, a lead
   story, centred story cards, photo tiles for fragrance education.
   Loaded after maison-theme.css (page_css block) so it wins over the base
   blog styles without !important.
   ========================================================================== */
.journal {
    --jr-ink: var(--vx-ink, #061022);
    --jr-panel: var(--vx-ink-2, #0b1830);
    --jr-gold: var(--vx-gold, #d4b26a);
    --jr-cream: var(--vx-cream, #f4ecdc);
    --jr-muted: var(--vx-muted, #a7b2c6);
    --jr-line: rgba(255, 255, 255, .1);
    background: var(--jr-ink);
    color: var(--jr-cream);
}
.journal a { color: inherit; text-decoration: none; }
.journal a:focus-visible { outline: 2px solid var(--jr-gold); outline-offset: 4px; }

.jr-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-ui, var(--font-body));
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--jr-gold);
}

/* ---------- Masthead ---------- */
.jr-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    /* minmax(0, 1fr): an auto column grows to fit the whole row of category
       tabs, which on phones pushed the centred masthead off-screen. The tabs
       scroll sideways instead. */
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    min-height: clamp(520px, 74svh, 760px);
    overflow: hidden;
    background: #000;
    text-align: center;
}
.jr-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 62% 50%;
    animation: jr-settle 2.4s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes jr-settle { from { transform: scale(1.06); opacity: 0; } to { transform: none; opacity: 1; } }
.jr-hero__veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 70% 60% at 50% 48%, rgba(6, 16, 34, .2), rgba(6, 16, 34, .7) 100%),
        linear-gradient(180deg, rgba(6, 16, 34, .35) 0%, transparent 30%, transparent 60%, var(--jr-ink) 100%);
}
.jr-hero__inner {
    align-self: center;
    display: grid;
    justify-items: center;
    gap: 22px;
    padding-block: clamp(64px, 9vw, 120px) 40px;
}
.jr-hero .jr-kicker::before,
.jr-hero .jr-kicker::after { content: ""; width: 36px; height: 1px; background: currentColor; opacity: .6; }
.jr-hero__title {
    margin: 0;
    max-width: 14ch;
    font-family: var(--font-display);
    font-size: clamp(3rem, 7.4vw, 6.6rem);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.015em;
    color: var(--jr-cream);
    text-wrap: balance;
}
.jr-hero__title em, .jr-head h2 em { font-style: italic; color: var(--jr-gold); }
.jr-hero__lead {
    max-width: 560px;
    margin: 0;
    font-size: 1.08rem;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(244, 236, 220, .82);
}

/* Search: a single underline, no box */
.jr-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(440px, 100%);
    margin-top: 6px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(244, 236, 220, .35);
    transition: border-color .3s ease;
}
.jr-search:focus-within { border-color: var(--jr-gold); }
.jr-search i { color: rgba(244, 236, 220, .6); }
.jr-search input {
    flex: 1;
    min-width: 0;
    padding: 8px 0;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--jr-cream);
    font-size: .95rem;
    letter-spacing: .02em;
    outline: none;
}
.jr-search input::placeholder { color: rgba(244, 236, 220, .5); }
.jr-search button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--jr-gold);
    transition: background .2s ease, color .2s ease;
}
.jr-search button:hover { background: var(--jr-gold); color: var(--jr-ink); }
.jr-clear { font-size: .8rem; color: rgba(244, 236, 220, .7); }
.jr-clear:hover { color: var(--jr-gold); }

/* Category tabs along the bottom of the masthead */
.jr-tabs { border-top: 1px solid var(--jr-line); background: rgba(6, 16, 34, .55); backdrop-filter: blur(8px); }
.jr-tabs .container {
    display: flex;
    justify-content: center;
    gap: clamp(18px, 4vw, 48px);
    overflow-x: auto;
    scrollbar-width: none;
}
.jr-tabs .container::-webkit-scrollbar { display: none; }
.jr-tabs a {
    position: relative;
    flex: none;
    padding: 20px 0 18px;
    font-family: var(--font-ui, var(--font-body));
    font-size: .74rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(244, 236, 220, .62);
    transition: color .2s ease;
}
.jr-tabs a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: var(--jr-gold);
    transform: scaleX(0);
    transition: transform .3s ease;
}
.jr-tabs a:hover, .jr-tabs a.is-active { color: var(--jr-cream); }
.jr-tabs a.is-active::after, .jr-tabs a:hover::after { transform: scaleX(1); }

/* ---------- Body ---------- */
.jr-body { padding: clamp(64px, 8vw, 110px) 0 clamp(48px, 6vw, 80px); }
.jr-results { margin-bottom: 48px; text-align: center; }
.jr-results h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 500; }
.jr-results p { color: var(--jr-muted); }

/* Lead story */
.jr-lead {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(32px, 5vw, 80px);
    margin-bottom: clamp(72px, 9vw, 120px);
}
.jr-lead__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 5 / 4;
    border-radius: 18px;
    background: var(--jr-panel);
}
.jr-lead__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.jr-lead:hover .jr-lead__media img { transform: scale(1.04); }
.jr-lead__copy { display: grid; justify-items: start; gap: 20px; }
.jr-lead__title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 3.8vw, 3.6rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.jr-lead__title a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s ease, color .2s ease; }
.jr-lead__title a:hover { color: var(--jr-gold); background-size: 100% 1px; }
.jr-lead__excerpt { margin: 0; max-width: 46ch; font-size: 1.05rem; font-weight: 300; line-height: 1.75; color: rgba(244, 236, 220, .78); }
.jr-meta { margin: 0; font-size: .82rem; letter-spacing: .04em; color: var(--jr-muted); }
.jr-meta span { margin-inline: 6px; color: var(--jr-gold); }

/* Section heads */
.jr-head { display: grid; gap: 12px; margin-bottom: 44px; padding-top: 28px; border-top: 1px solid var(--jr-line); }
.jr-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 500; line-height: 1.05; }
.jr-head p { margin: 0; color: var(--jr-muted); font-weight: 300; }
.jr-head--center { justify-items: center; text-align: center; border-top: 0; padding-top: 0; }
.jr-head--rule { padding-top: 56px; border-top: 1px solid var(--jr-line); }
.jr-link { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: var(--jr-gold) !important; }

/* Story cards — centred, so one or two stories never sit lopsided */
.jr-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 48px 36px; }
.jr-card { flex: 0 1 360px; display: grid; align-content: start; gap: 12px; }
.jr-card__media { overflow: hidden; aspect-ratio: 4 / 5; margin-bottom: 8px; border-radius: 14px; background: var(--jr-panel); }
.jr-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.jr-card:hover .jr-card__media img { transform: scale(1.05); }
.jr-card__cat { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--jr-gold); }
.jr-card__title { margin: 0; font-family: var(--font-display); font-size: 1.65rem; font-weight: 500; line-height: 1.15; transition: color .2s ease; }
.jr-card:hover .jr-card__title { color: var(--jr-gold); }
.jr-card__excerpt { margin: 0; font-size: .92rem; font-weight: 300; line-height: 1.7; color: var(--jr-muted); }
.jr-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--jr-cream); }
.jr-card__more i { transition: transform .3s ease; }
.jr-card:hover .jr-card__more i, .jr-product:hover .jr-card__more i { transform: translateX(5px); }

.jr-pages { display: flex; justify-content: center; gap: 8px; margin-top: 64px; }
.jr-pages a, .jr-pages span {
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border: 1px solid var(--jr-line);
    border-radius: 999px;
    font-size: .85rem;
    color: var(--jr-cream);
}
.jr-pages a:hover { border-color: var(--jr-gold); color: var(--jr-gold); }
.jr-pages .is-active { background: var(--jr-gold); border-color: var(--jr-gold); color: var(--jr-ink); }

.jr-empty { display: grid; justify-items: center; gap: 12px; padding: 60px 0; text-align: center; color: var(--jr-muted); }
.jr-empty i { font-size: 2.6rem; color: var(--jr-gold); }
.jr-empty h2 { font-family: var(--font-display); font-weight: 500; color: var(--jr-cream); }

/* ---------- Fragrance education: photo tiles with text on the image ---------- */
.jr-learn { padding: clamp(72px, 9vw, 120px) 0; background: var(--jr-panel); }
.jr-learn__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.jr-tile {
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: end;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 16px;
    padding: 24px;
}
.jr-tile img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.jr-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 16, 34, .05) 30%, rgba(6, 16, 34, .92) 100%); }
.jr-tile:hover img { transform: scale(1.06); }
.jr-tile__num {
    position: absolute;
    top: 20px; left: 24px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-style: italic;
    color: var(--jr-gold);
}
.jr-tile h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; color: var(--jr-cream); }
.jr-tile p { margin: 0; font-size: .85rem; font-weight: 300; line-height: 1.6; color: rgba(244, 236, 220, .75); }

/* ---------- Shop the stories ---------- */
.jr-shop { padding: clamp(72px, 9vw, 120px) 0; }
.jr-shop__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.jr-product { display: grid; justify-items: center; gap: 8px; text-align: center; }
.jr-product__media { width: 100%; overflow: hidden; aspect-ratio: 4 / 5; margin-bottom: 10px; border-radius: 14px; background: var(--jr-panel); }
.jr-product__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2, .7, .2, 1); }
.jr-product:hover .jr-product__media img { transform: scale(1.05); }
.jr-product h3 { margin: 0; font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.jr-product__rating { font-size: .75rem; color: var(--jr-gold); }
.jr-product__price { font-size: .95rem; letter-spacing: .04em; color: var(--jr-gold); }

/* ---------- Newsletter band (shared include) ---------- */
/* The theme flattens this band to a plain panel; the journal keeps its photo */
.journal .blog-newsletter {
    margin-top: 0;
    padding: clamp(72px, 9vw, 110px) 0;
    border-radius: 0 !important;
    background: var(--jr-ink) url("../images/lifestyle/elvessora-candlelit-toast.7cd0f535578a.jpg") center 45% / cover no-repeat !important;
}
.journal .blog-newsletter h3 { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 500; }
.journal .nl-input { border-radius: 999px; padding-inline: 22px; }
.journal .nl-btn { border-radius: 999px; padding-inline: 30px; letter-spacing: .16em; font-weight: 500; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .jr-lead { grid-template-columns: 1fr; }
    .jr-learn__grid, .jr-shop__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .jr-hero { min-height: 560px; }
    .jr-hero__title { font-size: clamp(2.6rem, 12vw, 3.4rem); }
    .jr-hero__lead { font-size: 1rem; }
    .jr-tabs .container { justify-content: flex-start; }
    .jr-card { flex-basis: 100%; }
    .jr-learn__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .jr-tile { padding: 16px; aspect-ratio: 3 / 4.4; }
    .jr-tile h3 { font-size: 1.15rem; }
    .jr-tile p { display: none; }
    .jr-shop__grid { gap: 28px 14px; }
    .jr-product h3 { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .jr-hero__bg { animation: none; }
}
