/* ================================================================
   MANIAC MOODY COLLECTIBLES — home ("The Contact Sheet")
   lit strip · contact-sheet rows · 4x loupe · week's table ·
   intro · ledger. Transform + opacity motion only.
   ================================================================ */

/* ── The lit strip ─────────────────────────────────────────── */
.strip { padding-top: 26px; }
.strip-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.strip-name { font-size: clamp(44px, 6.5vw, 92px); line-height: 0.92; color: var(--card); margin: 0; }
.strip-corner { font-size: 14px; font-weight: 600; color: var(--foil); white-space: nowrap; padding-bottom: 8px; }
.strip-corner:hover { text-decoration: underline; text-underline-offset: 3px; }

.strip-track-wrap { margin-top: 24px; }
/* real photos fill the frame (SVG art already matches the frame ratio) */
.strip-frame .sf-inner > img, .sheet-frame .sf-inner > img, .sc-frame .sf-inner > img { width: 100%; height: 100%; object-fit: cover; }
.strip-track {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity;
    padding-left: max(20px, calc((100vw - var(--container)) / 2));
    scrollbar-width: none;
}
.strip-track::-webkit-scrollbar { display: none; }
.strip-frame {
    position: relative; flex: none; height: clamp(150px, 24vh, 260px);
    background: var(--card);
    aspect-ratio: 300 / 420; border-radius: 8px; overflow: hidden; scroll-snap-align: start;
}
.strip-frame .sf-inner { display: block; width: 100%; height: 100%; }
.strip-frame svg { width: 100%; height: 100%; }

.strip-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding-bottom: 28px; }
.strip-line { font-size: 18px; color: var(--dim); margin: 0; }
.strip-pack {
    background: none; border: 1px solid rgba(91, 200, 232, 0.55); border-radius: 4px;
    color: var(--cyan); font-size: 14px; font-weight: 600; padding: 10px 18px; cursor: pointer;
}
.strip-pack:hover { text-decoration: underline; text-underline-offset: 3px; }

/* deal-in animation (inner only, so center-brightness can own the frame opacity) */
.strip-dealt .sf-inner { transform: translateY(18px); opacity: 0; transition: transform .32s var(--ease-out) var(--deal-d, 0ms), opacity .32s var(--ease-out) var(--deal-d, 0ms); }
.strip-dealt.dealt-in .sf-inner { transform: none; opacity: 1; }

/* ── The contact sheet ─────────────────────────────────────── */
.sheet { padding-top: 10px; }
.sheet-readout { padding-inline: max(20px, calc((100vw - var(--container)) / 2)); font-size: 13.5px; color: var(--dim); min-height: 26px; }

.sheet-rows { display: flex; flex-direction: column; width: min(100%, var(--container)); margin-inline: auto; padding-inline: 20px; }
.sheet-row { display: grid; grid-template-columns: minmax(170px, 220px) 1fr auto; gap: 14px; align-items: center; padding-block: 14px; transition: opacity .24s var(--ease-out); }
.sheet-row-end { font-size: 13px; font-weight: 600; color: var(--cyan); white-space: nowrap; }
.sheet-row-end:hover { text-decoration: underline; text-underline-offset: 3px; }
.sheet-title { font-size: 14px; font-weight: 600; color: var(--card); display: block; }
.sheet-title:hover { color: var(--cyan); }
.sheet-count { color: var(--dim); font-weight: 400; margin-left: 8px; font-variant-numeric: tabular-nums; }
.sheet-frames { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-frame { position: relative; height: 112px; aspect-ratio: 300 / 420; border-radius: 6px; overflow: hidden; background: var(--card); transition: transform .2s var(--ease-out); }
.sheet-frame .sf-inner { display: block; width: 100%; height: 100%; }
.sheet-frame svg { width: 100%; height: 100%; }

@media (hover: hover) and (pointer: fine) {
    .sheet-rows:hover > .sheet-row:not(:hover) { opacity: 0.35; }
    .sheet-frame:hover { transform: translateY(-2px); }
    .sc-frame:hover { transform: translateY(-3px); }
}

/* ── The loupe: fixed 4x frame ─────────────────────────────── */
.loupe {
    position: fixed; right: 28px; top: 50%; z-index: 40; pointer-events: none;
    width: min(320px, 26vw); aspect-ratio: 300 / 420; border-radius: 10px; overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(-50%) scale(0.96); transition: opacity .24s var(--ease-out), transform .24s var(--ease-out), visibility .24s;
}
.loupe-inner { position: absolute; inset: 0; }
.loupe-inner svg { width: 100%; height: 100%; }
.loupe.on { opacity: 1; visibility: visible; transform: translateY(-50%) scale(1); }

@media (max-width: 1023px), (pointer: coarse) {
    .loupe { display: none; }
}

/* ── The week's table ──────────────────────────────────────── */
.showcase { padding-top: 44px; }
.showcase-grid { display: grid; grid-template-columns: minmax(260px, 4fr) 8fr; gap: 48px; align-items: end; }
.showcase-copy h2 { font-size: clamp(28px, 3vw, 46px); color: var(--card); }
.showcase-copy p { color: var(--dim); font-size: 16px; line-height: 1.55; margin: 12px 0 16px; max-width: 42ch; }
.showcase-link { color: var(--cyan); font-weight: 600; font-size: 14.5px; }
.showcase-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.showcase-frames { display: flex; align-items: flex-end; gap: 12px; }
.sc-frame { position: relative; height: clamp(140px, 18vh, 220px); aspect-ratio: 300 / 420; border-radius: 6px; overflow: hidden; background: var(--card); transition: transform .2s var(--ease-out); }
.sc-frame.lifted { height: calc(clamp(140px, 18vh, 220px) * 2.2); }
.sc-frame .sf-inner { display: block; width: 100%; height: 100%; }
.sc-frame svg { width: 100%; height: 100%; }

/* ── Intro ─────────────────────────────────────────────────── */
.intro { padding-top: 88px; }
.intro-lead { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.3; color: var(--card); margin: 0; max-width: 75ch; }
.intro-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 72px; font-size: 16px; line-height: 1.55; color: var(--dim); }
.intro-cols b { color: var(--card); font-weight: 600; }

/* ── The ledger ────────────────────────────────────────────── */
.ledger { padding-top: 24px; padding-bottom: 28px; }
.ledger-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 40px; align-items: center; }
.ledger-head { font-size: clamp(32px, 3.2vw, 52px); line-height: 1.02; color: var(--card); }
.ledger-head span:first-child { color: var(--dim); }
.ledger-rows { display: grid; grid-template-columns: repeat(4, auto); gap: 28px; justify-content: space-between; }
section.ledger { padding-top: 96px; }
.ledger-row { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.l-num { display: flex; align-items: baseline; }
.l-int { font-family: var(--font-display); font-size: clamp(56px, 6vw, 96px); line-height: 0.9; text-align: right; color: var(--card); }
.l-dec { font-family: var(--font-display); font-size: clamp(56px, 6vw, 96px); line-height: 0.9; text-align: left; color: var(--card); }
.l-cap { font-size: 16px; color: var(--dim); margin-top: 10px; }

/* ── Home responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
    .showcase-grid { grid-template-columns: 1fr; gap: 24px; align-items: start; }
    .showcase-frames { overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x proximity; }
    .sc-frame { flex: 0 0 auto; width: 120px; height: auto; scroll-snap-align: start; }
    .sc-frame.lifted { height: calc(120px * (420 / 300) * 1.55); }
    .showcase-frames::-webkit-scrollbar { display: none; }
    .intro-cols { grid-template-columns: 1fr 1fr; margin-top: 40px; }
    .ledger-grid { grid-template-columns: 1fr; gap: 28px; }
    .ledger-rows { grid-template-columns: repeat(2, auto); gap: 24px; }
}
@media (max-width: 640px) {
    .ledger-rows { grid-template-columns: 1fr; gap: 20px; }
    .ledger-row { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 16px; }
}
@media (max-width: 640px) {
    .strip-bottom { flex-wrap: wrap; }
    .intro-cols { grid-template-columns: 1fr; gap: 18px; margin-top: 32px; }
}
@media (max-width: 480px) {
    /* phone: each run scrolls sideways, frames stay fixed height */
    .sheet-row { grid-template-columns: 1fr; row-gap: 8px; }
    .sheet-row-end { display: none; }
    .sheet-frames { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
    .sheet-frames::-webkit-scrollbar { display: none; }
    .sheet-frame { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
    .strip-dealt .sf-inner { transition: none; transform: none; opacity: 1; }
    .loupe { transition: none; }
}