/* explore.css
   -----------
   Styles for the STANDALONE /explore/ and /explore/<slug>/ pages. These are the
   pages a shared link lands on, and what search engines index.

   Deliberately its own small stylesheet rather than a copy of the landing page's
   inline CSS: this is a different design problem (a quiet reading page, not a
   two-sheet stack), so sharing would mean carrying ~50KB of stack, install-card
   and overlay rules that none of these pages use. Same tokens, same fonts, same
   ground, so it still reads as one site. Follows the /learn + learn.css
   precedent already in this repo.

   Bump the ?v= in the generated <link> whenever this changes: the URL caches hard. */

@font-face {
    font-family: "Geist";
    src: url("/fonts/Geist/Geist-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Geist";
    src: url("/fonts/Geist/Geist-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "Fedro";
    src: url("/fonts/Fedro/fedro-medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

:root {
    /* A step darker than the site's cream. These pages are wall-to-wall cream UI
       screenshots, and on the cream ground the cards had no edge; the same step
       is applied to the landing page's explore sheet. --bg stays the light tone
       for anything that should sit ON the ground, like the bar. */
    --bg: #f3f1ee;
    --paper: #faf9f7;
    --ink: #1e2427;
    --muted: #8a9095;
    --secondary: #5a6166;
    --coral: #fa6c5d;
    --docs: #f0efed;
    --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Geist", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}
i[class^="ph-"] {
    font-style: normal;
    line-height: 1;
    display: inline-block;
}

/* The bar is the /learn bar, class names and all. Values mirror learn.css so the
   caret and orb land in the same place on every subpage. */
.lrn-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 76px;
    z-index: 10;
    background: var(--bg);
}
/* the tile frames keep the light tone, so they read as paper on the ground */
.xp-frame {
    background: var(--paper);
}
.lrn-bar magic-orb {
    position: absolute;
    top: 22px;
    left: calc(50% - 16px);
    width: 32px;
    height: 32px;
    display: block;
}
.lrn-back {
    position: absolute;
    top: 22px;
    left: 80px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.lrn-back i {
    font-size: 18px;
    transition: transform 0.25s var(--spring);
}
.lrn-back .t {
    opacity: 0;
    transform: translateX(-4px);
    margin-left: 2px;
    margin-top: -1px;
    white-space: nowrap;
    transition:
        opacity 0.22s ease,
        transform 0.22s cubic-bezier(0.2, 0.72, 0.24, 1);
}
@media (hover: hover) {
    .lrn-bar:hover .lrn-back {
        color: var(--ink);
    }
    .lrn-bar:hover .lrn-back i {
        transform: translateX(-2px);
    }
    .lrn-bar:hover .lrn-back .t {
        opacity: 1;
        transform: none;
    }
}
.lrn-back:active i {
    transform: translateX(-4px);
}
@media (max-width: 759px) {
    .lrn-bar {
        height: 62px;
    }
    .lrn-bar magic-orb {
        top: 15px;
    }
    .lrn-back {
        top: 15px;
        left: 20px;
    }
}

.xp-wrap {
    width: 100%;
    max-width: 786px;
    margin: 0 auto;
    padding: 108px 30px 40px;
}

.xp-head {
    margin-bottom: 30px;
}
.xp-head h1 {
    font-family: "Fedro", Georgia, serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 1.25;
    letter-spacing: 0;
    margin-bottom: 6px;
}
.xp-head p {
    font-size: 15px;
    color: var(--muted);
}

.xp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 560px) {
    .xp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 760px) {
    .xp-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Same press-in as the landing grid: the card compresses toward the surface
   while the photo pushes the other way inside its frame. */
.xp-card {
    display: block;
    text-decoration: none;
    color: inherit;
    /* A grid item's automatic minimum is its max-content width, so the one-line
       nowrap summary below would push the column wider than its 1fr track and
       the whole grid past the wrap — no clipping, just overflow. This lets the
       card shrink to its track so the ellipsis is what gives. */
    min-width: 0;
    transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
/* 16:9 to match the app canvas, and a structural shadow because these are cream
   UI shots on a cream ground and would otherwise have no edge. */
.xp-frame {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    background: var(--docs);
    box-shadow:
        0 1px 2px rgba(30, 36, 39, 0.07),
        0 8px 20px -10px rgba(30, 36, 39, 0.22);
    transition: box-shadow 0.32s ease;
}
.xp-card:hover .xp-frame {
    box-shadow:
        0 1px 2px rgba(30, 36, 39, 0.09),
        0 12px 26px -10px rgba(30, 36, 39, 0.28);
}
.xp-frame img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition:
        transform 380ms cubic-bezier(0.16, 1, 0.3, 1),
        filter 220ms ease;
}
@media (hover: hover) {
    .xp-card:hover {
        transform: scale(0.972);
    }
    .xp-card:hover .xp-frame img {
        transform: scale(1.05);
        filter: brightness(1.05);
    }
}
.xp-card:active {
    transform: scale(0.94);
    transition: transform 60ms ease;
}
.xp-card h2 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 10px;
}
/* One line, clipped. The card is a glance, not a read: enough of the blurb to
   know what the space is, then the ellipsis hands you off to the page. Held to
   one line on purpose — a wrapping summary would make the cards different
   heights and the grid would stop being a grid. */
.xp-summary {
    font-size: 13px;
    color: var(--secondary);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.xp-credit {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}
.xp-empty {
    font-size: 15px;
    color: var(--muted);
}

/* a single card's own page */
.xp-single {
    max-width: 620px;
}
.xp-hero {
    margin-bottom: 22px;
}
.xp-hero img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.xp-single h1 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.015em;
}
.xp-blurb {
    font-size: 16px;
    line-height: 1.6;
    color: var(--secondary);
    margin-top: 8px;
}
.xp-single .xp-credit {
    margin-top: 10px;
}
.xp-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}
.xp-link {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: var(--coral);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 11px;
    transition:
        filter 0.2s ease,
        transform 150ms var(--spring);
}
.xp-link:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}
.xp-link:active {
    transform: scale(0.97);
}
.xp-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 34px;
    font-size: 14px;
    color: var(--ink);
    text-decoration: none;
}
.xp-more i {
    font-size: 14px;
    transition: transform 0.2s var(--spring);
}
.xp-more:hover i {
    transform: translateX(3px);
}

/* the root's copyright row, same everywhere */
.xp-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 40px 30px 34px;
    font-size: 11px;
    color: var(--muted);
}
.xp-legal .sep {
    color: rgba(138, 144, 149, 0.55);
}
.xp-legal a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.18s ease;
}
.xp-legal a:hover {
    color: var(--ink);
}
