/* =====================================================================
   HOME PAGE — "New on the site" and the "Right now" box   (/home.css)
   ===================================================================== */

.fresh {
    --f-ink: #1b1a17;
    --f-muted: #6b665c;
    --f-faint: #9a948a;
    --f-rule: #e4dfd5;
    --f-wash: #f7f4ee;
    --f-accent: #8a2b1d;
    --f-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;

    margin: 34px 0 10px;
    font-family: var(--f-serif);
}

.fresh-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--f-rule);
}

.fresh h3.fresh-title {
    margin: 0;
    font-size: 0.8rem;
    font-weight: normal;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--f-accent);
}

.fresh-shuffle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border: 1px solid #d9d3c7;
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 0.88rem;
    color: var(--f-ink);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.fresh-shuffle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fresh-shuffle:hover { background: var(--f-ink); border-color: var(--f-ink); color: #fff; }
.fresh-shuffle.is-spinning svg { animation: fresh-spin 0.5s ease; }
.fresh-shuffle:focus-visible { outline: 2px solid var(--f-accent); outline-offset: 2px; }
@keyframes fresh-spin { to { transform: rotate(360deg); } }

/* ---- Tiles ---- */

.fresh-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.fresh-tile,
.fresh-tile:visited {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--f-rule);
    border-radius: 10px;
    background: #fff;
    color: var(--f-ink);
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(40, 30, 10, 0.04), 0 6px 18px rgba(40, 30, 10, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fresh-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 2px 4px rgba(40, 30, 10, 0.05), 0 14px 30px rgba(40, 30, 10, 0.1);
}

.fresh-tile:focus-visible { outline: 2px solid var(--f-accent); outline-offset: 3px; }

.fresh-tile.is-loading .fresh-body { opacity: 0.35; }
.fresh-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 12px 14px 14px;
    transition: opacity 0.4s ease;
}
.fresh-tile.is-ready .fresh-body { animation: fresh-in 0.45s ease both; }
@keyframes fresh-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.fresh-kicker {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--f-accent);
}

.fresh-name {
    margin-top: 4px;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fresh-italic { font-style: italic; }

.fresh-meta {
    margin-top: 3px;
    font-size: 0.8rem;
    color: var(--f-faint);
}

.fresh-text {
    margin-top: 8px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #45413a;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fresh-go {
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.84rem;
    color: var(--f-muted);
    transition: color 0.2s ease;
}
.fresh-tile:hover .fresh-go { color: var(--f-ink); }

[hidden] { display: none !important; }

/* Media */
.fresh-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--f-wash);
}
.fresh-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.2, .7, .2, 1);
}
.fresh-media.is-in img,
.fresh-blog-media img { opacity: 1; }
.fresh-tile:hover .fresh-media img { transform: scale(1.04); }

/* Blog: wide tile across the top */
.fresh-blog {
    grid-column: 1 / -1;
    flex-direction: row;
}
.fresh-blog-media {
    flex: 0 0 38%;
    aspect-ratio: auto;
    min-height: 180px;
}
.fresh-blog .fresh-body { padding: 16px 18px 16px; }
.fresh-blog .fresh-name { font-size: 1.3rem; }

/* Art: matted like Daily Picks, nothing cropped */
.fresh-frame { background: #f3efe7; padding: 12px; }
.fresh-frame img { object-fit: contain; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2); }
.fresh-tile:hover .fresh-frame img { transform: none; }

/* Earth: the whole disk on deep space */
.fresh-globe { background: radial-gradient(ellipse at center, #111a33 0%, #070a14 70%); padding: 8px; }
.fresh-globe img { object-fit: contain; border-radius: 50%; }
.fresh-tile:hover .fresh-globe img { transform: rotate(4deg) scale(1.02); }

/* Photos: a 2 × 2 mosaic */
.fresh-mosaic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    aspect-ratio: 4 / 3;
    background: var(--f-wash);
}
.fresh-photo { display: block; overflow: hidden; min-height: 0; }
.fresh-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(.2, .7, .2, 1);
}
.fresh-photo.is-in img { opacity: 1; }
.fresh-photo:nth-child(2) img { transition-delay: 0.06s; }
.fresh-photo:nth-child(3) img { transition-delay: 0.12s; }
.fresh-photo:nth-child(4) img { transition-delay: 0.18s; }
.fresh-tile:hover .fresh-photo img { transform: scale(1.05); }

/* ---------------------------------------------------------------------
   "Right now" box in the sidebar
   --------------------------------------------------------------------- */

.now-box h3 { margin-bottom: 6px; }

.now-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.98rem;
}

.now-list li {
    display: flex;
    flex-direction: column;
    padding: 7px 0;
    border-bottom: 1px solid #ece7dd;
}
.now-list li:last-child { border-bottom: 0; }

.now-key {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9a948a;
}

.now-val { line-height: 1.4; }

.now-foot {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    margin-top: 6px;
    font-size: 0.85rem;
}
.now-updated { color: #9a948a; font-style: italic; }

/* ---------------------------------------------------------------------
   Small screens
   --------------------------------------------------------------------- */

@media (max-width: 900px) {
    .fresh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .fresh-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .fresh-blog { flex-direction: column; }
    .fresh-blog-media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
    .fresh-earth { grid-column: 1 / -1; }
    .fresh-earth .fresh-globe { aspect-ratio: 16 / 9; }
    .fresh-body { padding: 10px 12px 12px; }
    .fresh-tile:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .fresh-tile, .fresh-media img, .fresh-photo img { transition: none; }
    .fresh-tile.is-ready .fresh-body, .fresh-shuffle.is-spinning svg { animation: none; }
}

/* Keep every picture inside its frame, so tall photos can't stretch a tile */
.fresh-media,
.fresh-photo { position: relative; }
.fresh-media img,
.fresh-photo img {
    position: absolute;
    inset: 0;
}
.fresh-frame img { inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); }
.fresh-globe img { inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
.fresh-mosaic { grid-template-rows: repeat(2, minmax(0, 1fr)); }
.fresh-blog-media { min-height: 200px; }
