/* ==========================================================================
   Media Junkbox — Link in Bio (2026 redesign)

   HOW TO CUSTOMIZE
   ----------------
   All colors, fonts and key sizes live in the :root block right below.
   Change a token there and the whole page follows. Everything else is
   organized top-to-bottom in page order:

     1. Design tokens          5. App block
     2. Reset & base           6. Link list
     3. Header (hero)          7. Feed sections (reviews)
     4. Website CTAs           8. Footer, modal, back-to-top
   ========================================================================== */

/* ==========================================================================
   1. Design tokens — EDIT HERE
   ========================================================================== */
:root {
    /* Brand */
    --yellow: #ffc50a;          /* MJB brand gold: bars, chips, chevrons, buttons */
    --yellow-ink: #9c7a00;      /* darkened gold for small TEXT on white (keeps it readable);
                                   raise to var(--yellow) if you prefer the pure brand color */

    /* Surfaces */
    --bg-page: #161616;         /* behind the card on wide screens */
    --bg-dark: #111111;         /* header + footer */
    --bg-dark-2: #1e1e1e;       /* logo badge circle */
    --bg-main: #f2f1ee;         /* light body of the page */
    --bg-card: #ffffff;         /* white cards */
    --border-card: #e5e3dd;

    /* Text */
    --text-dark: #141414;       /* headings / titles on light background */
    --text-body: #4b4b4b;
    --text-muted: #767676;
    --text-on-dark: #ffffff;
    --text-dim-on-dark: #969696;

    /* Type */
    --font-display: 'Archivo Black', 'Arial Black', system-ui, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Shape */
    --skew: -8deg;              /* slant of the two website CTA banners */
    --radius: 10px;
    --shadow-card: 0 1px 2px rgba(20, 20, 20, 0.04), 0 4px 14px rgba(20, 20, 20, 0.06);

    /* Layout */
    --container-w: 600px;
    --pad-x: 1.25rem;           /* horizontal padding of the main column */
}

/* ==========================================================================
   2. Reset and base
   ========================================================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-page);
    min-height: 100vh;
}

/* Anything with the `hidden` attribute or .hidden class stays hidden
   (used for the app block toggle and expired announcements) */
[hidden],
.hidden {
    display: none !important;
}

img {
    max-width: 100%;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    background: var(--yellow);
    color: #000;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    z-index: 1000;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* The whole page is one centered column */
.page {
    max-width: var(--container-w);
    margin: 0 auto;
    background: var(--bg-main);
    min-height: 100vh;
    animation: fadeInUp 0.6s ease-out;
}

@media (min-width: 640px) {
    body {
        padding: 2rem 1rem;
    }

    .page {
        min-height: 0;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   3. Header (hero)
   ========================================================================== */
.hero {
    position: relative;
    background: var(--bg-dark);
    text-align: center;
    padding: 2.25rem var(--pad-x) 1.75rem;
    border-bottom: 6px solid var(--yellow);
}

.hero-badge {
    width: 92px;
    height: 92px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--bg-dark-2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-wordmark {
    margin: 0 0 1.1rem;
    line-height: 0; /* image-only heading: kill line-height gap */
}

.hero-wordmark img {
    width: min(240px, 70%);
    height: auto;
}

.hero-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
}

.hero-socials a {
    color: var(--text-on-dark);
    opacity: 0.85;
    display: inline-flex;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.hero-socials a:hover,
.hero-socials a:focus {
    color: var(--yellow);
    opacity: 1;
    transform: translateY(-2px);
}

.hero-socials a:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Share button — top right of the header */
.share-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: var(--text-on-dark);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.share-button:hover,
.share-button:focus {
    background: var(--yellow);
    border-color: var(--yellow);
    color: #000;
    transform: translateY(-2px);
}

.share-button:focus-visible {
    outline: 2px solid var(--yellow);
    outline-offset: 3px;
}

/* ==========================================================================
   4. Website CTAs — skewed banner buttons
   ========================================================================== */
.main {
    padding: 1.75rem var(--pad-x) 2rem;
}

.cta-stack {
    display: grid;
    gap: 0.9rem;
    /* small inset so the skewed corners never poke outside the column */
    padding: 0 0.5rem;
    margin-bottom: 1.5rem;
}

.cta {
    display: block;
    padding: 1rem 1.25rem;
    text-align: center;
    text-decoration: none;
    transform: skewX(var(--skew));
    border-radius: 3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

/* counter-skew the label so the text stays upright */
.cta > span {
    display: block;
    transform: skewX(calc(-1 * var(--skew)));
    font-family: var(--font-display);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.3;
}

.cta--yellow {
    background: var(--yellow);
    color: #000;
    box-shadow: 0 6px 16px rgba(255, 197, 10, 0.35);
}

.cta--black {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.cta:hover,
.cta:focus {
    transform: skewX(var(--skew)) translateY(-2px);
    filter: brightness(1.05);
}

.cta:focus-visible {
    outline: 3px solid var(--text-dark);
    outline-offset: 2px;
}

.cta:active {
    transform: skewX(var(--skew)) translateY(0);
}

/* ==========================================================================
   5. App block  (hide it by adding `hidden` to the <section> in index.html)
   ========================================================================== */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1.15rem 1.25rem 1.25rem;
    margin-bottom: 1.5rem;
}

.app-card-heading {
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dark);
}

.app-card-new {
    color: var(--yellow-ink);
    margin-right: 0.35rem;
}

.app-card-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0.9rem;
}

.app-card-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

@media (max-width: 400px) {
    .app-card-badges {
        grid-template-columns: 1fr;
    }
}

.store-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    text-decoration: none;
    min-height: 52px;
}

.store-badge-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    text-align: left;
}

.store-badge-text small {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.store-badge-text strong {
    font-size: 0.95rem;
    font-weight: 800;
}

.store-badge--apple {
    background: var(--bg-dark);
    color: var(--text-on-dark);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.store-badge--apple:hover,
.store-badge--apple:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.store-badge--apple:focus-visible {
    outline: 3px solid var(--text-dark);
    outline-offset: 2px;
}

/* Greyed-out "coming soon" state */
.store-badge--soon {
    background: #efede8;
    border: 1px solid var(--border-card);
    color: #a3a09a;
}

.soon-chip {
    position: absolute;
    top: -8px;
    right: -6px;
    background: var(--yellow);
    color: #000;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

/* ==========================================================================
   6. Link list
   ========================================================================== */
.link-list {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 2rem;
}

.link-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: var(--text-dark);
    min-height: 56px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.link-card:hover,
.link-card:focus {
    transform: translateY(-2px);
    border-color: var(--yellow);
    box-shadow: 0 6px 18px rgba(20, 20, 20, 0.1);
}

.link-card:focus-visible {
    outline: 3px solid var(--text-dark);
    outline-offset: 2px;
}

.link-card:active {
    transform: translateY(0);
}

.link-card-icon {
    flex-shrink: 0;
    width: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 1.25rem; /* in case an emoji is used instead of an svg */
}

.link-card-icon--youtube {
    color: #ff0000;
}

.link-title {
    flex: 1;
    font-weight: 800;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.link-card-chevron {
    flex-shrink: 0;
    display: inline-flex;
    color: var(--yellow);
    transition: transform 0.2s ease;
}

.link-card:hover .link-card-chevron {
    transform: translateX(4px);
}

/* "Open call" variant — dashed border + yellow badge instead of chevron */
.link-card--open-call {
    border: 2px dashed #ccc9c1;
}

.link-card--open-call:hover,
.link-card--open-call:focus {
    border-color: var(--yellow);
}

.open-call-chip {
    flex-shrink: 0;
    background: var(--yellow);
    color: #000;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
}

/* ==========================================================================
   7. Feed sections (Live Reviews / Album Reviews / Interviews)
   ========================================================================== */
.feed-section {
    margin-bottom: 2rem;
    /* Skip rendering work for sections below the fold */
    content-visibility: auto;
    contain-intrinsic-size: auto 300px;
}

.feed-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.feed-title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    line-height: 1.1;
    text-transform: uppercase;
    color: var(--text-dark);
    border-left: 7px solid var(--yellow);
    padding-left: 0.65rem;
}

.feed-viewall {
    flex-shrink: 0;
    color: var(--yellow-ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 0.2rem;
}

.feed-viewall:hover,
.feed-viewall:focus {
    text-decoration: underline;
}

.feed-posts {
    display: grid;
    gap: 0.7rem;
}

/* Post card: square image left, text right */
.post-card {
    display: flex;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.post-card:hover {
    transform: translateY(-2px);
    border-color: var(--yellow);
    box-shadow: 0 6px 18px rgba(20, 20, 20, 0.1);
}

.post-card-thumb {
    flex-shrink: 0;
    width: 96px;
    background: #e8e6e0;
}

.post-card-thumb img {
    display: block;
    width: 96px;
    height: 100%;
    min-height: 96px;
    object-fit: cover;
}

.post-card-body {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
}

.post-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.post-card-title a {
    color: var(--text-dark);
    text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus {
    text-decoration: underline;
}

.post-card-read {
    color: var(--yellow-ink);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.post-card-read:hover,
.post-card-read:focus {
    text-decoration: underline;
}

/* Loading / error / skeleton states */
.loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

.error {
    text-align: center;
    color: #b3261e;
    padding: 1rem;
    background: #fdf1f0;
    border: 1px solid #f3c9c5;
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.error a {
    color: inherit;
}

.skeleton {
    background: linear-gradient(90deg, #e9e7e1 25%, #f4f2ec 50%, #e9e7e1 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-post {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    overflow: hidden;
}

.skeleton-thumb {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 0;
}

.skeleton-lines {
    flex: 1;
    padding: 0.9rem 1rem;
}

.skeleton-title {
    height: 0.9rem;
    margin-bottom: 0.6rem;
    width: 85%;
}

.skeleton-title:last-child {
    width: 40%;
    margin-bottom: 0;
}

/* Reveal-on-scroll animation (class toggled by JS via IntersectionObserver) */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
.footer {
    background: var(--bg-dark);
    text-align: center;
    padding: 1.4rem var(--pad-x);
    color: var(--text-dim-on-dark);
    font-size: 0.78rem;
}

.footer a {
    color: #cfcfcf;
    text-decoration: none;
}

.footer a:hover,
.footer a:focus {
    color: var(--yellow);
    text-decoration: underline;
}

/* ==========================================================================
   Share modal
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.modal[aria-hidden="false"] {
    display: block;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    width: min(92vw, 420px);
    margin: 10vh auto 0;
    padding: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
    color: var(--text-dark);
}

.modal-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    color: var(--text-dark);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.share-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

.share-link,
.share-copy {
    display: inline-block;
    text-align: center;
    padding: 0.625rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    background: var(--bg-main);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.share-link:hover,
.share-copy:hover,
.share-link:focus,
.share-copy:focus {
    border-color: var(--yellow);
    background: #fff;
}

/* ==========================================================================
   Back to top button
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--yellow);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.back-to-top:active {
    transform: translateY(0);
}

/* ==========================================================================
   Mobile tweaks
   ========================================================================== */
@media (max-width: 480px) {
    :root {
        --pad-x: 1rem;
    }

    .hero {
        padding: 2rem var(--pad-x) 1.5rem;
    }

    .hero-badge {
        width: 80px;
        height: 80px;
    }

    .cta > span {
        font-size: 0.95rem;
    }

    .feed-title {
        font-size: 1.25rem;
    }

    .post-card-thumb,
    .post-card-thumb img,
    .skeleton-thumb {
        width: 84px;
    }
}

/* ==========================================================================
   Accessibility preferences
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .link-card,
    .post-card {
        border-width: 2px;
        border-color: var(--text-dark);
    }

    .link-card:focus,
    .cta:focus {
        outline-width: 3px;
    }
}