/* ── Card ────────────────────────────────────────────────────
   Figma (home): rooms 1397:12139, experiences 1397:12207,
   spaces 1397:12283, Journal 1397:12333 / 1397:12340.
   The picture's height comes from the section (--card-image-h),
   as each row has its own.
   ─────────────────────────────────────────────────────────── */

.card {
    container: card / inline-size; /* the link's words need room (below) */
    scroll-margin-top: 24px; /* linked to (#its-id): clear of the header, with room above */
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

/* The link's hit area covers the whole card. */
.card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.card__link {
    align-self: flex-start;
}

/* The arrow (or the price and arrow) sits at the foot of the card, so
   cards side by side have their links on one line. */
.card > .card__link:not(.card__link--plain) {
    margin-top: auto;
}

/* View room, Explore package…: on desktop, just the arrow until the card
   is hovered, then the words slide in beside it; tablet and mobile have
   no hover, so the words stay. Never underlined, as no button is. */
.card__link.button--secondary .button__label {
    text-decoration: none;
}

@media (min-width: 1025px) and (hover: hover) {
    .card__link.button--secondary {
        gap: 0;
    }

    .card__link.button--secondary .button__label:not(.screen-reader-text) {
        max-width: 0;
        overflow: hidden;
        white-space: nowrap;
        opacity: 0;
        transition: max-width 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    }

    /* Only where the card is wide enough for them; a narrow card (Four
       weddings, four across on a small laptop) keeps just the arrow. */
    @container card (min-width: 260px) {
        .card:hover .card__link.button--secondary .button__label:not(.screen-reader-text),
        .card__link.button--secondary:focus-visible .button__label:not(.screen-reader-text) {
            max-width: 240px;
            padding-right: 10px;
            opacity: 1;
        }
    }
}

/* A package's price, with the link beside it, at the foot of the card */
.card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

/* The link's words wouldn't fit beside the price (card.js): under it */
.card__foot--stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.card__price {
    font-family: var(--font-heading);
    font-size: 22px;
    font-style: italic;
    line-height: 1.2;
}

/* No arrow (experiences, the Journal): the link is the card itself. */
.card__link--plain {
    position: absolute;
    inset: 0;
    align-self: stretch; /* flex-start would shrink it to nothing */
}

.card__link--plain::after {
    content: none;
}

.card__link--plain:focus-visible {
    outline: 2px solid var(--color-copper);
    outline-offset: 4px;
}

/* "A drive ——" */
.card__kicker {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-style: italic;
    line-height: 1.2;
    color: var(--color-burgundy);
}

.card__kicker::after {
    content: "";
    width: 60px;
    height: 1px;
    background: var(--color-walnut);
}

.card__media {
    height: var(--card-image-h, 350px);
    overflow: hidden;
    background: var(--color-candle-wax);
}

.card__media {
    position: relative;
}

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

/* More than one picture: one shows at a time, arrows over it on hover. */
.card__media[data-card-gallery] .card__image {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition);
}

.card__media[data-card-gallery] .card__image.is-active {
    opacity: 1;
}

.card__gallery-arrows {
    position: absolute;
    top: 50%;
    left: 10px;
    right: 10px;
    z-index: 2; /* above the card's own link */
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity var(--transition);
}

/* Hover, or tabbing to them; a click leaves no focus ring, so they go
   when the mouse leaves. */
.card:hover .card__gallery-arrows,
.card__media:has(:focus-visible) .card__gallery-arrows {
    opacity: 1;
}

/* Title styles: 28px (the Stay page's suites), 22px italic (packages) */
.card--title-small .card__title {
    font-size: 28px;
    letter-spacing: -0.14px;
}

.card--title-italic {
    gap: 16px;
}

.card--title-italic .card__title {
    font-size: 22px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
}

.card__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card__eyebrow {
    color: var(--color-walnut);
}

/* SUNDAY LUNCH          Sundays, 12-2.30pm */
.card__eyebrow-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
}

.card__note {
    font-family: var(--font-heading);
    font-size: 16px;
    font-style: italic;
    color: var(--color-ink-soft);
}

/* Title, with the meta ("Up to 140") on the right. */
.card__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.card__title {
    font-size: 38px;
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: -0.38px;
    color: var(--color-beamwood);
}

.card__meta {
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 22px;
    font-style: italic;
    line-height: 1.2;
    color: var(--color-beamwood);
}

.card__text {
    font-size: 16px;
    line-height: 1.65;
    letter-spacing: 0.08px;
    color: var(--color-ink-soft);
    /* Ellipsis after a set number of lines — off for now; tick them on in
       DevTools to try it, then change the 3. */
    /* display: -webkit-box; */
    /* -webkit-box-orient: vertical; */
    /* -webkit-line-clamp: 3; */
    /* line-clamp: 3; */
    /* overflow: hidden; */
}

.card__subtext {
    font-size: 14px;
    line-height: 1.15;
    letter-spacing: 0.28px;
    color: var(--color-ink-soft);
}

/* ✦ Historic Suite  ✦ Roll-top Bath  ✦ Sleeps 2 */
.card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-style: italic;
    line-height: 1.2;
    color: var(--color-ink-soft);
}

.card__features li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card__features li::before {
    content: "✦";
    font-size: 22px;
    color: var(--color-burgundy);
}


/* Journal — the big story and the two beside it */
.card--feature .card__title,
.card--small .card__title {
    transition: color var(--transition);
}

/* Hovered: the title in copper, as What's on's events */
.card--feature:hover .card__title,
.card--small:hover .card__title {
    color: var(--color-copper-text);
}

.card--feature .card__title {
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -0.4px;
}

.card--small .card__title {
    font-size: 28px;
    letter-spacing: -0.14px;
}

.card--feature .card__text {
    line-height: 1.7;
    color: rgba(20, 13, 12, 0.78);
}

.card--feature .card__eyebrow,
.card--small .card__eyebrow {
    color: rgba(65, 51, 38, 0.7);
}

/* The two smaller stories show no text on desktop. */
@media (min-width: 1025px) {
    .card--small .card__text {
        display: none;
    }
}


/* Tablet and mobile — 1024px and below (Figma mobile frames) */
@media (max-width: 1024px) {
    .card,
    .card__body {
        gap: 9px;
    }

    /* The meta ("Up to 140") goes above the title */
    .card__heading {
        flex-direction: column-reverse;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 9px;
    }

    .card__title,
    .card--feature .card__title,
    .card--small .card__title {
        font-size: 28px;
        line-height: 1.1;
        letter-spacing: -0.21px;
    }

    .card__meta {
        font-size: 16px;
    }

    /* Stacked, one under another */
    .card__features {
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
    }

    .card__features li {
        gap: 7px;
    }

    .card__features li::before {
        font-size: 16px;
    }

    .card--feature .card__text,
    .card--small .card__text {
        font-size: 14px;
        line-height: 1.55;
        letter-spacing: 0.07px;
        color: rgba(20, 13, 12, 0.78);
    }
}

/* Tablet and mobile: no photo arrows (the row itself swipes) */
@media (max-width: 1024px) {
    .card__gallery-arrows {
        display: none;
    }

    .card--title-italic .card__title {
        font-size: 22px;
        line-height: 1.2;
    }
}


/* ── Space — Meetings & Events and Spaces pages ──────────────
   Figma: 1366:85271, 1366:76930. A light italic name, a short
   line, three features down the card (✦), the walnut arrow.
   ─────────────────────────────────────────────────────────── */
.card--space .card__title {
    font-size: 34px;
    font-style: italic;
    line-height: 1.15;
    letter-spacing: -0.34px;
}

.card--space .card__text {
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: 0.07px;
}

.card--space .card__features {
    flex-direction: column;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-style: normal;
    line-height: 1.55;
    letter-spacing: 0.07px;
    color: var(--color-beamwood);
}

.card--space .card__features li {
    gap: 12px;
}

.card--space .card__features li::before {
    font-size: 11px;
}

.card--space .card__link {
    color: var(--color-walnut);
}

@media (max-width: 1024px) {
    .card--space .card__title {
        font-size: 26px;
    }
}
