/* ============================================================
   OSPA Jerusalem branch (/spa-jerusalem/)
   Jerusalem-stone palette on top of the main design system.
   ============================================================ */

:root {
    --jlm-stone-1: #fbf6ec;
    --jlm-stone-2: #f1e3c8;
    --jlm-stone-3: #dcc39a;
    --jlm-stone-4: #c4a477;
    --jlm-gold:    #c8913f;
    --jlm-gold-2:  #d1834f;
    --jlm-deep:    #2b2016;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.jlm-gold-text {
    background: linear-gradient(100deg, #b8732f 0%, #d9a24f 45%, #b8732f 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    animation: jlm-shimmer 6s ease-in-out infinite;
}
@keyframes jlm-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ---------- Hero ---------- */
.jlm-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding-block: 88px clamp(150px, 15vw, 330px);
    background: linear-gradient(180deg, var(--jlm-stone-1) 0%, #f7ecd8 55%, var(--jlm-stone-2) 100%);
}
.jlm-hero > .container { position: relative; z-index: 3; }

.jlm-hero-sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.jlm-sun {
    position: absolute;
    top: 46%;
    left: 14%;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 214, 140, 0.95) 0%, rgba(240, 175, 90, 0.55) 45%, rgba(240, 175, 90, 0) 70%);
    filter: blur(2px);
    animation: jlm-sun 14s ease-in-out infinite alternate;
}
@keyframes jlm-sun {
    from { transform: translateY(0) scale(1); }
    to   { transform: translateY(26px) scale(1.06); }
}
.jlm-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
}
.jlm-glow--1 { width: 520px; height: 520px; top: -220px; right: -160px; background: #f6d9ad; }
.jlm-glow--2 { width: 420px; height: 420px; bottom: -120px; left: 30%; background: #f0c9a0; opacity: 0.35; }

.jlm-skyline {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 1;
    width: 100%;
    /* Height follows width (viewBox is 5:1), so the art is never cropped from the top */
    height: clamp(150px, 20vw, 440px);
    color: var(--jlm-stone-4);
    pointer-events: none;
}
.jlm-sk-hill   { color: var(--jlm-stone-3); }
.jlm-sk-wall   { fill: var(--jlm-stone-3); }
.jlm-sk-gate   { fill: #b8956a; }
.jlm-sk-tree   { fill: #a99470; opacity: 0.75; }
.jlm-sk-mill   { fill: #cdb187; }
.jlm-sk-tower  { fill: #c9aa7c; }
.jlm-sk-window { fill: #9d7c52; }
.jlm-sk-bridge { stroke: #c2a375; fill: none; }
.jlm-sk-birds  { stroke: #9d7c52; opacity: 0.55; }
.jlm-sk-sails {
    transform-box: fill-box;
    transform-origin: center;
    animation: jlm-sails 18s linear infinite;
}
@keyframes jlm-sails { to { transform: rotate(360deg); } }

.jlm-hero .hero-copy > :nth-child(6) { animation-delay: 0.55s; }
.jlm-hero .hero-copy h1 { max-width: none; }
.jlm-h1-sub {
    display: block;
    margin-top: 10px;
    font-size: 0.6em;
    line-height: 1.2;
    letter-spacing: -0.5px;
    font-weight: 600;
    color: #5b4a37;
}
.jlm-hero .hero-sub { color: #5b4a37; }
.jlm-hero .branch-hero-perks span { background: rgba(255, 255, 255, 0.7); border-color: rgba(160, 120, 70, 0.22); }
.jlm-hero .avatar-stack .avatar { border-color: var(--jlm-stone-1); }

.jlm-opening-card { position: relative; }
.jlm-opening-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(140deg, rgba(200, 145, 63, 0.6), rgba(255, 255, 255, 0) 60%);
}
.jlm-opening-card .opening-card-media { height: 240px; }
.jlm-opening-card .opening-card-media::after {
    background: linear-gradient(160deg, rgba(43, 32, 22, 0.05) 30%, rgba(43, 32, 22, 0.45) 100%);
}
.jlm-stamp { background: rgba(160, 104, 44, 0.85); }
.jlm-opening-list {
    list-style: none;
    display: grid;
    gap: 6px;
    margin-bottom: var(--sp-lg);
    font-size: 14px;
    color: var(--body);
}
.jlm-opening-list li { display: flex; align-items: center; gap: 8px; }
.jlm-opening-list li::before {
    content: "✦";
    color: var(--jlm-gold);
    font-size: 12px;
}

@media (max-width: 1023px) {
    .jlm-hero { padding-block: 56px clamp(150px, 18vw, 220px); }
    .jlm-sun { left: 50%; top: auto; bottom: 120px; margin-left: -130px; }
}
@media (max-width: 767px) {
    .jlm-hero { padding-block: 28px 140px; }
    .jlm-h1-sub { font-size: 0.68em; margin-top: 8px; }
    .jlm-hero .branch-hero-perks { justify-content: center; margin-top: 0; }
    .jlm-hero .branch-hero-perks span { padding: 7px 9px; font-size: 12px; }
    .jlm-hero .hero-widget-wrap { width: 100%; }
    .jlm-opening-card { max-width: 100%; }
    .jlm-opening-card .opening-card-media { height: 200px; }
}

/* ---------- Neighbourhood marquee ---------- */
.jlm-marquee {
    padding-block: var(--sp-lg) var(--sp-xxl);
    text-align: center;
}
.jlm-marquee-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.4px;
    margin-bottom: var(--sp-sm);
}
.jlm-marquee-viewport {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.jlm-marquee-track {
    display: flex;
    width: max-content;
    animation: jlm-marquee 60s linear infinite;
}
.jlm-marquee:hover .jlm-marquee-track { animation-play-state: paused; }
.jlm-marquee-list {
    display: flex;
    list-style: none;
}
.jlm-marquee-list li {
    flex: none;
    margin-inline-end: 10px;
    padding: 8px 16px;
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
    background: var(--canvas);
    font-size: 14px;
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
}
@keyframes jlm-marquee { to { transform: translateX(50%); } }
@media (prefers-reduced-motion: reduce) {
    .jlm-marquee-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
    .jlm-marquee-list[aria-hidden="true"] { display: none; }
    .jlm-marquee-list { flex-wrap: wrap; justify-content: center; row-gap: 8px; }
}

/* ---------- Intro split ---------- */
.jlm-stack-media { position: relative; overflow: visible; }
.jlm-stack-media img { box-shadow: var(--shadow-lg); }
.jlm-float-card {
    position: absolute;
    inset-block-end: -22px;
    inset-inline-end: -18px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    line-height: 1.25;
    color: var(--muted);
    animation: jlm-float 5s ease-in-out infinite;
}
.jlm-float-num {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--jlm-gold-2);
}
@keyframes jlm-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.split-text .check-list { margin-bottom: var(--sp-sm); }
@media (max-width: 767px) {
    .jlm-float-card { inset-inline-end: 12px; inset-block-end: -18px; }
}

/* ---------- Ritual timeline ---------- */
.jlm-ritual-section {
    background: linear-gradient(180deg, var(--canvas) 0%, var(--jlm-stone-1) 100%);
}
.jlm-timeline {
    position: relative;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
}
.jlm-timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}
.jlm-timeline-dot {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--jlm-deep);
    color: #f3d6a3;
    box-shadow: 0 0 0 6px rgba(200, 145, 63, 0.15);
}
.jlm-timeline-dot svg { width: 20px; height: 20px; }
.jlm-timeline-card {
    flex: 1;
    padding: var(--sp-lg);
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) ease;
}
.jlm-timeline-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.jlm-timeline-time {
    display: inline-block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--jlm-gold-2);
    direction: ltr;
    unicode-bidi: plaintext;
}
.jlm-timeline-card h3 { font-size: 17px; margin-bottom: 6px; }
.jlm-timeline-card p { font-size: 14px; color: var(--muted); line-height: 1.55; }

@media (max-width: 1023px) {
    .jlm-timeline { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .jlm-timeline { grid-template-columns: 1fr; gap: var(--sp-md); padding-inline-start: 0; }
    .jlm-timeline::before {
        content: "";
        position: absolute;
        top: 22px;
        bottom: 22px;
        inset-inline-start: 21px;
        width: 2px;
        background: linear-gradient(180deg, var(--jlm-gold), rgba(200, 145, 63, 0.1));
    }
    .jlm-timeline-item { flex-direction: row; align-items: flex-start; gap: var(--sp-md); }
    .jlm-timeline-dot { position: relative; z-index: 1; flex: none; }
    .jlm-timeline-card { padding: var(--sp-md); }
}

/* ---------- Benefits ---------- */
.jlm-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
}
.jlm-benefit .card-icon { background: var(--jlm-stone-1); color: var(--jlm-gold-2); }
@media (max-width: 1023px) { .jlm-benefits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .jlm-benefits { grid-template-columns: 1fr; gap: var(--sp-md); } }

/* ---------- Pricing ---------- */
.jlm-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-lg);
    align-items: stretch;
}
.jlm-price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: var(--sp-xl);
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-sm);
    transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) ease;
}
.jlm-price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.jlm-price-card .check-list { margin-bottom: var(--sp-xl); }
.jlm-price-card .btn { margin-top: auto; }
.jlm-price-tag {
    align-self: flex-start;
    margin-bottom: var(--sp-sm);
    padding: 4px 10px;
    border-radius: var(--r-pill);
    background: var(--surface-card);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink);
}
.jlm-price-card h3 { font-size: 20px; margin-bottom: var(--sp-xs); }
.jlm-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: var(--sp-lg);
    color: var(--ink);
}
.jlm-price strong { font-size: 48px; font-weight: 700; letter-spacing: -1.5px; line-height: 1; }
.jlm-price span { font-size: 22px; font-weight: 600; }
.jlm-price small { font-size: 14px; color: var(--muted); }

.jlm-price-card--featured {
    background: var(--jlm-deep);
    border-color: var(--jlm-deep);
    box-shadow: var(--shadow-lg);
}
.jlm-price-card--featured h3,
.jlm-price-card--featured .jlm-price { color: var(--on-dark); }
.jlm-price-card--featured .check-list li { color: #e8dcc8; }
.jlm-price-card--featured .check-list li::before { background-color: rgba(255, 255, 255, 0.12); filter: invert(1); }
.jlm-price-card--featured .jlm-price-tag { background: rgba(255, 255, 255, 0.12); color: #f3d6a3; }
.jlm-price-card--featured .btn-primary { background: linear-gradient(135deg, #d9a24f, #b8732f); color: #fff; }
.jlm-price-ribbon {
    position: absolute;
    top: -12px;
    inset-inline-end: var(--sp-lg);
    padding: 5px 12px;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, #d9a24f, #b8732f);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}
.jlm-price-card--gift { background: linear-gradient(160deg, #fffaf2, var(--jlm-stone-2)); border-color: rgba(200, 145, 63, 0.3); }

@media (max-width: 1023px) {
    .jlm-pricing { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
    .jlm-price-card--featured { order: -1; }
}

/* ---------- Occasions + mosaic ---------- */
.jlm-mosaic {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--sp-md);
    aspect-ratio: 1 / 1;
    border-radius: 0;
    overflow: visible;
}
.jlm-mosaic img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    border-radius: var(--r-xl);
}
.jlm-mosaic img:first-child { grid-row: span 2; }
.jlm-occasions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-sm);
}
.jlm-occasion {
    display: flex;
    gap: var(--sp-sm);
    align-items: flex-start;
    padding: var(--sp-md);
    background: var(--canvas);
    border: 1px solid var(--hairline);
    border-radius: var(--r-lg);
    transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) ease;
}
.jlm-occasion:hover { transform: translateY(-2px); border-color: var(--jlm-stone-3); }
.jlm-occasion-emoji {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: var(--r-md);
    background: var(--jlm-stone-1);
    font-size: 19px;
}
.jlm-occasion h3 { font-size: 15px; margin-bottom: 2px; letter-spacing: -0.1px; }
.jlm-occasion p { font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 600px) {
    .jlm-occasions { grid-template-columns: 1fr; }
    .jlm-mosaic { aspect-ratio: 4 / 3; }
}

/* ---------- Comparison table ---------- */
.jlm-table-wrap {
    max-width: 960px;
    margin-inline: auto;
    overflow-x: auto;
    border: 1px solid var(--hairline);
    border-radius: var(--r-xl);
    background: var(--canvas);
    -webkit-overflow-scrolling: touch;
}
.jlm-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    font-size: 15px;
    text-align: start;
}
.jlm-table th,
.jlm-table td {
    padding: 16px 18px;
    text-align: start;
    border-bottom: 1px solid var(--hairline-soft);
    vertical-align: top;
}
.jlm-table tbody tr:last-child th,
.jlm-table tbody tr:last-child td { border-bottom: 0; }
.jlm-table thead th { font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface-soft); }
.jlm-table tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.jlm-table td { color: var(--muted); }
.jlm-table .jlm-table-hl { background: #fdf6ea; color: var(--ink); font-weight: 600; }
.jlm-table thead .jlm-table-hl { color: #8a5a22; background: #f8ead2; }

/* ---------- Long-form guide ---------- */
.jlm-guide {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: var(--sp-xxl);
    align-items: start;
    max-width: 1040px;
    margin-inline: auto;
}
.jlm-guide-toc {
    position: sticky;
    top: calc(var(--nav-h) + 24px);
    padding: var(--sp-lg);
    background: var(--jlm-stone-1);
    border: 1px solid rgba(200, 145, 63, 0.22);
    border-radius: var(--r-xl);
}
.jlm-guide-toc-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: var(--sp-sm); }
.jlm-guide-toc ol {
    list-style: none;
    counter-reset: toc;
    display: grid;
    gap: 4px;
    margin-bottom: var(--sp-lg);
}
.jlm-guide-toc li { counter-increment: toc; }
.jlm-guide-toc a {
    display: flex;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--r-md);
    font-size: 14px;
    color: var(--body);
    transition: background-color var(--dur-fast) ease;
}
.jlm-guide-toc a::before { content: counter(toc) "."; color: var(--jlm-gold-2); font-weight: 700; }
.jlm-guide-toc a:hover { background: rgba(255, 255, 255, 0.8); color: var(--ink); }

.jlm-guide-body .badge-pill { margin-bottom: var(--sp-md); }
.jlm-guide-body h2 { margin-bottom: var(--sp-md); }
.jlm-guide-lead { font-size: 18px; line-height: 1.65; color: var(--muted); margin-bottom: var(--sp-xl); }
.jlm-guide-body h3 {
    margin: var(--sp-xl) 0 var(--sp-sm);
    font-size: 22px;
    scroll-margin-top: calc(var(--nav-h) + 24px);
}
.jlm-guide-body p { font-size: 16px; line-height: 1.8; margin-bottom: var(--sp-md); }
.jlm-guide-body .check-list { margin-bottom: var(--sp-md); }
.jlm-guide-body .check-list li { line-height: 1.65; }
.jlm-guide-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
    margin-top: var(--sp-xl);
    padding: var(--sp-lg);
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, var(--jlm-stone-1), var(--jlm-stone-2));
}
.jlm-guide-cta p { margin: 0; font-size: 15px; line-height: 1.5; }
.jlm-guide-cta .btn { flex: none; }

@media (max-width: 1023px) {
    .jlm-guide { grid-template-columns: 1fr; gap: var(--sp-xl); }
    .jlm-guide-toc { position: static; }
    .jlm-guide-toc .btn { display: none; }
    .jlm-guide-toc ol { margin-bottom: 0; }
}
@media (max-width: 600px) {
    .jlm-guide-cta { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Gallery (mosaic) ---------- */
.jlm-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 220px;
    gap: var(--sp-md);
}
.jlm-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
}
.jlm-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease-out);
}
.jlm-gallery-item:hover img { transform: scale(1.05); }
.jlm-gallery-item--tall { grid-row: span 2; }
.jlm-gallery-item--wide { grid-column: span 2; }
@media (max-width: 767px) {
    .jlm-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: var(--sp-sm); }
}

/* ---------- Other branches: four-up grid stays balanced ---------- */
.jlm-hero ~ .section .branch-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- Closing CTA ---------- */
.jlm-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 72px var(--sp-xxl) 110px;
    border-radius: 28px;
    text-align: center;
    background:
        radial-gradient(80% 120% at 85% 0%, rgba(217, 162, 79, 0.45), transparent 60%),
        radial-gradient(70% 120% at 10% 100%, rgba(209, 131, 79, 0.25), transparent 60%),
        var(--jlm-deep);
}
.jlm-cta > * { position: relative; z-index: 1; }
.jlm-cta .jlm-cta-skyline {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 0;
    width: 100%;
    height: 120px;
    fill: rgba(243, 214, 163, 0.12);
}
.jlm-cta-pill { margin-bottom: var(--sp-md); background: rgba(255, 255, 255, 0.1); color: #f3d6a3; border-color: transparent; }
.jlm-cta h2 { color: var(--on-dark); font-size: clamp(28px, 4vw, 44px); margin-bottom: var(--sp-sm); }
.jlm-cta p { color: #d9ccb8; font-size: 17px; margin-bottom: var(--sp-xl); }
.jlm-btn-gold { background: linear-gradient(135deg, #d9a24f, #b8732f); color: #fff; }
.jlm-btn-gold:hover { filter: brightness(1.06); background: linear-gradient(135deg, #d9a24f, #b8732f); }
@media (max-width: 767px) {
    .jlm-cta { padding: var(--sp-xxl) var(--sp-lg) 90px; border-radius: 22px; }
    .jlm-cta .jlm-cta-skyline { height: 80px; }
}
