/*
 * ============================================================
 * LOST SITES 360 — tours.css
 * ============================================================
 * The public tour and tour-point pages.
 *
 * Designed phone-first, because that is where this is used: a
 * visitor standing outdoors in daylight, holding the phone in
 * one hand. That drives three decisions throughout —
 *
 *   - generous tap targets, never smaller than 44px
 *   - high contrast, since the alternative is squinting at a
 *     screen in the sun
 *   - the primary action low on the page, within thumb reach
 *
 * Inherits every colour and type token from main.css.
 * ============================================================
 */


/* ============================================================
 * SHARED
 * ========================================================== */

/*
 * NO UNDERLINES.
 *
 * style.css turns link underlines off globally, but it is worth
 * being explicit on the components here: these links are cards,
 * buttons and navigation, where an underline reads as clutter
 * rather than as an affordance. The hover and focus states carry
 * the meaning instead — colour on text links, a gold border on
 * cards — so nothing is lost for anyone navigating by keyboard.
 */
.ls360-tour-card,
.ls360-point-card,
.ls360-point__nav-link,
.ls360-point__breadcrumb a,
.ls360-home__cta a {
    text-decoration: none;
}

.ls360-prose {
    max-width: 38rem;
    color: var(--color-text);
    line-height: var(--line-height-body);
}

.ls360-prose p {
    margin-bottom: 1rem;
}

.ls360-prose p:last-child {
    margin-bottom: 0;
}

/*
 * Related blocks stack with ONE gap, set by their parent grid.
 * They used to carry 2rem margins of their own as well, which
 * added to the grid gap and left the great empty stretches
 * between "Time periods" and "Narration".
 */
.ls360-meta-block p {
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* A small ghost variant of the shared .btn, for secondary
   actions that should not compete with the gold button. */
.btn--ghost {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}


/* ============================================================
 * HOME
 * ============================================================
 * Follows the app's Home screen: wordmark, promise, image, one
 * line of explanation, one way forward.
 * ========================================================== */

.ls360-home {
    padding-top: clamp(1.5rem, 5vw, 3rem);
    padding-bottom: var(--section-padding);
    text-align: center;
}

.ls360-home__brand {
    color: var(--color-text);
    font-weight: var(--weight-light);
    font-size: clamp(1rem, 4vw, 1.25rem);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.ls360-home__title {
    font-weight: var(--weight-regular);
    font-size: clamp(1.6rem, 7vw, 2.5rem);
    margin-bottom: 1.25rem;
}

.ls360-home__image {
    max-width: 46rem;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: var(--color-surface);
    aspect-ratio: 16 / 9;
}

.ls360-home__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls360-home__intro {
    max-width: 34rem;
    margin: 1.5rem auto 0;
    color: var(--color-text-muted);
}

.ls360-home__cta {
    margin-top: 1.75rem;
}


/* ============================================================
 * CATALOGUE  (/tours/)
 * ========================================================== */

.ls360-catalogue {
    padding-top: clamp(1.5rem, 5vw, 3rem);
    padding-bottom: var(--section-padding);
}

.ls360-catalogue__title {
    font-weight: var(--weight-light);
    font-size: clamp(1.4rem, 5vw, 2rem);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    text-align: center;
    margin-bottom: var(--block-gap);
}

.ls360-catalogue__empty {
    color: var(--color-text-muted);
    text-align: center;
}

.ls360-tour-grid {
    display: grid;
    gap: var(--block-gap);
    grid-template-columns: 1fr;
    max-width: 44rem;
    margin: 0 auto;
}

/* Wider screens get two across; the cards are portrait-ish, so
   more than two makes each one too small to read the facts. */
@media (min-width: 56rem) {
    .ls360-tour-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: var(--max-width);
    }
}

/* The card — a rounded "pill" holding the hero image and the
   tour's facts, as on the app's catalogue. */
.ls360-tour-card {
    display: block;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ls360-tour-card:hover,
.ls360-tour-card:focus-visible {
    border-color: var(--color-gold);
    outline: none;
}

.ls360-tour-card__image {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #111;
}

.ls360-tour-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Name over the image, as the app does. The gradient keeps it
   readable over a bright sky without dulling the photograph. */
.ls360-tour-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 1rem;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.35) 100%);
}

.ls360-tour-card__overlay-name {
    color: #fff;
    font-weight: var(--weight-bold);
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.ls360-tour-card__overlay-sub {
    color: var(--color-gold);
    font-size: 0.8rem;
}

.ls360-tour-card__body {
    display: block;
    padding: 1rem 1.25rem 1.25rem;
}

.ls360-tour-card__name {
    display: block;
    color: var(--color-text);
    font-weight: var(--weight-light);
    font-size: 1.05rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.ls360-tour-card__facts {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.ls360-tour-card__flag {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--color-gold);
    font-size: 0.7rem;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}


/* ============================================================
 * TOUR PAGE
 * ========================================================== */

.ls360-tour__head {
    padding-top: clamp(1.25rem, 4vw, 2rem);
    padding-bottom: 1rem;
}

.ls360-tour__title {
    font-weight: var(--weight-light);
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    letter-spacing: var(--tracking-wide);
    margin-bottom: 0.35rem;
}

.ls360-tour__meta {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.ls360-tour__body {
    padding-top: var(--block-gap);
    padding-bottom: var(--section-padding);
}


/* ============================================================
 * ROUTE MAP
 * ========================================================== */

/* The map runs edge to edge — it is the subject of this screen,
   and a full-bleed map reads as a map rather than as a widget. */
.ls360-tour__map-section {
    margin-bottom: var(--block-gap);
}

.ls360-tour__map {
    height: clamp(260px, 45vh, 460px);
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    /* Keeps Leaflet's own stacking context inside this box
       rather than over the site header. */
    z-index: 0;
}

.ls360-tour__map-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.ls360-locate__status {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

/*
 * THE NUMBERED PINS
 *
 * Styled on the element Leaflet sizes itself, with no inner
 * wrapper. The previous version put the circle on a nested
 * <span>, whose width was then set by rules from elsewhere on
 * the page; once width and height disagreed, border-radius: 50%
 * rendered a lens rather than a circle — the "distorted"
 * teardrops.
 *
 * box-sizing is declared here rather than relied upon: without
 * it the 2px border is added OUTSIDE the 30px, and the circle no
 * longer matches the anchor point Leaflet positions it by.
 */
.ls360-map-pin {
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    /* 30px box − 2px border top and bottom = 26px of line. */
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    background: var(--color-gold);
    color: #000;
    font-family: var(--font-primary);
    font-weight: var(--weight-bold);
    font-size: 0.8rem;
    border: 2px solid rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 10px var(--color-gold-glow);
}

/* Leaflet's popups default to a white card with dark text,
   which is jarring inside a black page. */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.leaflet-popup-content a {
    color: var(--color-gold);
}


/* ============================================================
 * POINT LIST
 * ========================================================== */

.ls360-tour__points {
    margin-top: var(--block-gap);
}

.ls360-point-list {
    margin-top: 0.75rem;
    display: grid;
    gap: 0.6rem;
    /* The list is numbered in the markup for meaning; the visible
       number lives in each card, so the marker is redundant. */
    list-style: none;
    padding: 0;
}

.ls360-point-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: border-color 0.2s ease;
}

/* The chevron on the right of each point card, as in the app. */
.ls360-point-card__go {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-muted);
}

.ls360-point-card__go svg {
    width: 16px;
    height: 16px;
}

.ls360-point-card:hover .ls360-point-card__go,
.ls360-point-card:focus-visible .ls360-point-card__go {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.ls360-point-card:hover,
.ls360-point-card:focus-visible {
    border-color: var(--color-gold);
    outline: none;
}

.ls360-point-card__thumb {
    position: relative;
    flex: 0 0 76px;
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
}

.ls360-point-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls360-point-card__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.ls360-point-card__name {
    color: var(--color-text);
    font-size: 1rem;
}

.ls360-point-card__teaser {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.ls360-point-card__distance {
    color: var(--color-gold);
    font-size: 0.7rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}


/* ============================================================
 * POINT PAGE
 * ========================================================== */

.ls360-point__photo {
    position: relative;
    aspect-ratio: 4 / 3;
    max-height: 65vh;
    overflow: hidden;
    background: var(--color-surface);
}

.ls360-point__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* "Stand here" — the single most important instruction on the
   page, so it sits on the photograph rather than beneath it. */
.ls360-point__badge {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid var(--color-gold);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.65);
    color: var(--color-gold);
    font-size: 0.7rem;
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

.ls360-point__body {
    padding-top: clamp(1.25rem, 4vw, 2rem);
    padding-bottom: var(--section-padding);
}

.ls360-point__breadcrumb {
    margin-bottom: 0.5rem;
}

.ls360-point__breadcrumb a {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
}

.ls360-point__breadcrumb a:hover {
    color: var(--color-gold);
}

.ls360-point__title {
    font-weight: var(--weight-light);
    font-size: clamp(1.6rem, 4.5vw, 2.5rem);
    letter-spacing: var(--tracking-wide);
    margin-bottom: 0.75rem;
}

.ls360-point__num {
    color: var(--color-gold);
}

.ls360-point__distance {
    color: var(--color-gold);
    font-size: 0.75rem;
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.ls360-point__tip {
    max-width: 38rem;
    margin: var(--block-gap) 0;
    padding: 0.9rem 1.1rem;
    border-left: 2px solid var(--color-gold);
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.ls360-point__tip strong {
    color: var(--color-gold);
}

.ls360-point__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: var(--block-gap) 0;
}

/* The primary action. Full width on a phone so it cannot be
   missed or mis-tapped with one thumb. */
.ls360-point__launch {
    flex: 1 1 100%;
    text-align: center;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    font-size: 0.95rem;
}

@media (min-width: 40rem) {
    .ls360-point__launch {
        flex: 0 0 auto;
    }
}

.ls360-point__unavailable {
    color: var(--color-text-muted);
    font-style: italic;
}

/*
 * "Time periods" and "Narration" sit side by side where there is
 * room, and stack tightly where there is not. Previously each
 * block carried its own 2rem margins on top of this grid's gap,
 * which compounded into the large empty stretches between them.
 */
.ls360-point__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.9rem var(--block-gap);
    margin: var(--block-gap) 0;
    max-width: 38rem;
}

.ls360-point__nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: var(--block-gap);
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
}

.ls360-point__nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    color: var(--color-text);
    max-width: 45%;
    font-size: 0.95rem;
}

.ls360-point__nav-link--next {
    text-align: right;
    margin-left: auto;
}

.ls360-point__nav-link:hover {
    color: var(--color-gold);
}
