/* freakshit.org site layout – builds on style.css (colors, fonts, scrollbar) */

:root {
    --muted: #8a8a8a;
    --line: #262626;
    --panel: #0d0d0d;
    --panel-2: #161616;
    --max: 1180px;
    --gutter: clamp(1rem, 4vw, 2.5rem);
    --radius: 2px;
    --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.55;
    font-family: var(--font);
}

.background {
    position: fixed;
    inset: 0;
    height: auto;
}

/* style.css makes .viewport a full-height flex column; here it is the content area */
.viewport {
    display: block;
    height: auto;
    flex: 1;
    width: 100%;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter) 4rem;
    box-sizing: border-box;
}

*, *::before, *::after { box-sizing: border-box; }

h1, h2, h3 {
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 0.6rem;
}

h1 { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 900; }
h3 { font-size: 1.1rem; font-weight: 800; }

p { font-size: 1rem; margin: 0 0 1rem; }
img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
    outline: 2px solid var(--tertiary);
    outline-offset: 2px;
}

.muted { color: var(--muted); }
.loading { color: var(--muted); padding: 4rem 0; text-align: center; }

.kicker {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--tertiary);
    margin-bottom: 0.4rem;
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--tertiary);
    color: var(--secondary);
    padding: 0.15rem 0.45rem;
    vertical-align: middle;
}

.badge-soon { background: var(--primary); }

.btn, a.btn, a.btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--tertiary);
    color: var(--secondary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    padding: 0.75rem 1.2rem;
    border: 2px solid var(--tertiary);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    background: transparent;
    color: var(--tertiary);
    text-decoration: none;
}

.btn-small, a.btn-small { padding: 0.4rem 0.75rem; font-size: 0.75rem; }

.icon { width: 1.2em; height: 1.2em; }

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem var(--gutter);
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.brand, .brand:visited {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--primary);
    text-decoration: none;
}

.brand:hover { text-decoration: none; color: var(--tertiary); }

.brand-logo svg { width: 2.6rem; height: 2.6rem; margin: 0; fill: currentColor; }
.brand:hover .brand-logo svg { fill: var(--tertiary); }

.brand-name {
    font-weight: 900;
    letter-spacing: 0.2em;
    font-size: 1.05rem;
}

.main-nav { display: flex; align-items: center; gap: 0.25rem; }

.main-nav a, .main-nav a:visited {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    padding: 0.5rem 0.75rem;
}

.main-nav a:hover, .main-nav a.active { color: var(--tertiary); text-decoration: none; }

.main-nav a.nav-tiktok, .main-nav a.nav-tiktok:visited {
    background: var(--tertiary);
    color: var(--secondary);
    margin-left: 0.5rem;
}

.main-nav a.nav-tiktok:hover, .main-nav a.nav-tiktok.active { background: var(--primary); color: var(--secondary); }

.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.nav-toggle:hover { background: none; }
.nav-toggle span { display: block; height: 2px; background: var(--primary); transition: transform 0.2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--secondary);
        border-bottom: 1px solid var(--line);
        padding: 0.5rem var(--gutter) 1rem;
    }
    .nav-open .main-nav { display: flex; }
    .main-nav a { padding: 0.8rem 0; font-size: 1rem; }
    .main-nav a.nav-tiktok { margin: 0.5rem 0 0; text-align: center; }
}

/* ---------- home ---------- */

.hero {
    text-align: center;
    padding: clamp(2rem, 7vw, 4.5rem) 0 2rem;
}

.hero .logo svg {
    width: clamp(10rem, 30vw, 16rem);
    height: clamp(10rem, 30vw, 16rem);
    display: block;
    margin: 0 auto;
}

.hero-claim {
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 1rem;
}

.featured {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: start;
    padding: 2rem 0;
    border-top: 1px solid var(--line);
}

.featured h2 { font-size: clamp(1.8rem, 5vw, 3.2rem); margin-top: 0.3rem; }
.featured h2 a, .featured h2 a:visited { color: var(--primary); }
.featured h2 a:hover { color: var(--tertiary); text-decoration: none; }

.featured-artist {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.section { padding: 2.5rem 0; border-top: 1px solid var(--line); }

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.section-head h2 { margin: 0; }
.section-head a { font-weight: 700; white-space: nowrap; }

.shop-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.shop-teaser p { margin: 0; color: var(--muted); }

/* ---------- covers & release grid ---------- */

.cover {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--panel-2);
    overflow: hidden;
}

.cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.cover.broken img { display: none; }

.cover-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(45deg, #111 0 12px, #0a0a0a 12px 24px);
}

.cover-fallback span {
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--tertiary);
}

.cover.big { box-shadow: 0 20px 60px rgba(255, 0, 0, 0.12); }

.release-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: 1.5rem;
}

.release-card, .release-card:visited {
    position: relative;
    display: block;
    color: var(--primary);
}

.release-card:hover { text-decoration: none; }
.release-card:hover img { transform: scale(1.05); filter: saturate(1.2); }
.release-card:hover .release-title { color: var(--tertiary); }

.release-card .badge { position: absolute; top: 0.5rem; left: 0.5rem; z-index: 2; }

.release-meta { display: flex; flex-direction: column; padding-top: 0.6rem; }
.release-meta .catalog { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--muted); }
.release-title { font-size: 1rem; line-height: 1.25; text-transform: uppercase; }
.release-artist { color: var(--muted); font-size: 0.9rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.8rem; }

.chip, .chip:visited {
    border: 1px solid var(--line);
    color: var(--primary);
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.chip:hover { border-color: var(--tertiary); text-decoration: none; }
.chip.active { background: var(--tertiary); border-color: var(--tertiary); color: var(--secondary); }

/* ---------- release page ---------- */

.page { padding-top: 2.5rem; }
.page.narrow { max-width: 760px; margin: 0 auto; }

.back { display: inline-block; margin-bottom: 1.5rem; font-weight: 700; }

.release-top {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: 2rem;
}

.release-info { container-type: inline-size; }
/* Shrink long titles so the longest word fits on one line (--longest is set in app.js). */
.release-info h1 {
    margin-top: 0.2rem;
    font-size: min(clamp(2rem, 6vw, 3.6rem), calc(100cqi / (var(--longest, 1) * 0.8)));
    overflow-wrap: anywhere;
}

.facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.35rem 1.2rem;
    margin: 1.2rem 0 1.5rem;
    font-size: 0.95rem;
}

.facts dt { color: var(--muted); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.1em; padding-top: 0.15rem; }
.facts dd { margin: 0; }

.platforms { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }

.platform, .platform:visited {
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.platform:hover { background: var(--primary); color: var(--secondary); text-decoration: none; }
.platform-beatport { border-color: var(--tertiary); color: var(--tertiary); }
.platform-beatport:visited { color: var(--tertiary); }
.platform-beatport:hover { background: var(--tertiary); }

.player { margin: 1.5rem 0; max-width: 600px; }
.player iframe { display: block; width: 100%; border: 0; }

.video {
    position: relative;
    aspect-ratio: 16 / 9;
    margin: 2rem 0;
    max-width: 800px;
}

.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    font-weight: 700;
}

/* ---------- markdown content ---------- */

.md { max-width: 760px; }
.md h1 { margin-bottom: 1.5rem; }
.md h2, .md h3 { margin-top: 2rem; }
.md ul, .md ol { padding-left: 1.3rem; margin: 0 0 1rem; }
.md li { margin-bottom: 0.35rem; }
.md li::marker { color: var(--tertiary); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.md blockquote { border-left: 3px solid var(--tertiary); margin: 1.5rem 0; padding: 0.2rem 0 0.2rem 1rem; color: var(--muted); }
.md img { margin: 1rem 0; }
.md code, code { background: var(--panel-2); padding: 0.1rem 0.35rem; font-size: 0.9em; overflow-wrap: anywhere; }
.md pre { background: var(--panel-2); padding: 1rem; overflow-x: auto; }

/* ---------- blog ---------- */

.post-list { display: grid; gap: 1rem; }

.post-card, .post-card:visited {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.2rem;
    align-items: start;
    padding: 1.2rem;
    background: var(--panel);
    border: 1px solid var(--line);
    color: var(--primary);
}

.post-card img { width: 110px; height: 110px; object-fit: cover; }
.post-card h3 { margin: 0.3rem 0 0.4rem; }
.post-card p { margin: 0; color: var(--muted); }
.post-card:hover { border-color: var(--tertiary); text-decoration: none; }
.post-card:hover h3 { color: var(--tertiary); }
.post-card > div:only-child { grid-column: 1 / -1; }

.post h1 { margin-top: 0.4rem; }
.post-image { margin: 1.5rem 0; max-height: 420px; width: 100%; object-fit: cover; }

/* ---------- TikTok ---------- */

.tiktok-spot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    margin: 1rem 0 2.5rem;
    padding: clamp(1.5rem, 4vw, 3rem);
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 0, 0, 0.28), transparent 55%),
        radial-gradient(circle at 90% 90%, rgba(37, 244, 238, 0.12), transparent 50%),
        var(--panel);
    border: 1px solid var(--tertiary);
    position: relative;
    overflow: hidden;
}

.tiktok-spot::before {
    content: 'TIKTOK';
    position: absolute;
    right: -0.5rem;
    top: -1.5rem;
    font-size: clamp(5rem, 16vw, 11rem);
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    letter-spacing: -0.03em;
}

.tiktok-intro .md h1 { font-size: clamp(1.8rem, 5vw, 3rem); }
.tiktok-intro .md p { color: var(--primary); font-size: 1.05rem; }

.btn-tiktok, a.btn-tiktok, a.btn-tiktok:visited {
    font-size: 1rem;
    padding: 0.9rem 1.4rem;
    box-shadow: -4px -4px 0 #25f4ee, 4px 4px 0 var(--tertiary);
    background: var(--secondary);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-tiktok:hover { color: var(--tertiary); background: var(--secondary); }

.tiktok-embeds { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.tiktok-embeds blockquote { margin: 0; }

.tiktok-float, .tiktok-float:visited {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--tertiary);
    color: var(--secondary);
    padding: 0.6rem 1rem 0.6rem 0.75rem;
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 999px;
    box-shadow: 0 6px 24px rgba(255, 0, 0, 0.45);
    transition: transform 0.2s;
}

.tiktok-float svg { width: 1.4rem; height: 1.4rem; }
.tiktok-float:hover { transform: translateY(-3px); text-decoration: none; color: var(--secondary); }

@media (max-width: 560px) {
    .tiktok-float span { display: none; }
    .tiktok-float { padding: 0.75rem; }
}

/* ---------- shop ---------- */

.shop-intro { margin-bottom: 2rem; }

.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
    padding: 2rem 0;
    border-top: 1px solid var(--line);
}

.product-image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.price { font-size: 1.5rem; font-weight: 800; }
.price .muted { font-size: 0.9rem; font-weight: 400; }

.options { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1rem 0; }
.options label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }

.options select, .options input {
    background: var(--panel-2);
    color: var(--primary);
    border: 1px solid var(--line);
    padding: 0.55rem 0.75rem;
    font-size: 1rem;
    font-family: inherit;
    min-width: 6rem;
}

.total { font-size: 1.1rem; }

.pay-tabs { display: flex; gap: 0; margin-top: 1.2rem; }

.pay-tab {
    flex: 1;
    background: var(--panel-2);
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.pay-tab:hover { background: var(--panel); color: var(--primary); border: 1px solid var(--line); }
.pay-tab.active { background: var(--tertiary); color: var(--secondary); border-color: var(--tertiary); }

.pay-panel { border: 1px solid var(--line); border-top: 0; padding: 1.2rem; background: var(--panel); }
.pay-panel[hidden] { display: none; }

.btn-paypal { width: 100%; justify-content: center; }

.notice { color: var(--muted); font-size: 0.9rem; margin: 0; }

.xlm-steps { padding-left: 1.2rem; margin: 0; }
.xlm-steps li { margin-bottom: 1.2rem; }
.xlm-steps li::marker { color: var(--tertiary); font-weight: 800; }

.copy-row {
    display: grid;
    grid-template-columns: 4.5rem 1fr auto;
    gap: 0.5rem;
    align-items: center;
    margin: 0.5rem 0;
    font-size: 0.8rem;
}

.copy-row span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.copy-row code { word-break: break-all; font-size: 0.8rem; }
.copy { font-size: 0.7rem; padding: 0.3rem 0.6rem; }
.small-note { font-size: 0.8rem; margin: 0.5rem 0 0; }
.xlm-wallet { margin-top: 0.5rem; }
.xlm-status { margin: 0.5rem 0 0; font-size: 0.9rem; }
.xlm-status.ok { color: #3ddc84; }

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.5rem 1rem 2rem;
    margin-top: auto;
}

.footer-nav { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 0.8rem; }

.footer-nav a, .footer-nav a:visited {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    font-weight: 700;
}

.footer-nav a:hover, .footer-nav a.active { color: var(--tertiary); }
.site-footer p { margin: 0.2rem 0; }

/* ---------- easter egg: FREAKLAB ---------- */

.freaklab-page .back { display: block; margin-bottom: 1.2rem; }
.freaklab-intro { max-width: 62ch; }

.freaklab-frame {
    margin-top: 1.5rem;
    border: 1px solid var(--line);
    background: #000;
    padding: clamp(0.5rem, 2vw, 1rem);
    box-shadow: 0 0 60px rgba(255, 0, 0, 0.08);
}

.freaklab-frame iframe {
    display: block;
    width: 100%;
    height: 1600px;
    border: 0;
    background: transparent;
}

/* full view: the lab covers the whole window */
.freaklab-frame.full { position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 0; border: 0; box-shadow: none; background: #000; }
.freaklab-frame.full iframe { height: 100% !important; }
html.lab-full, html.lab-full body { overflow: hidden; }

/* tiny pad-grid in the footer that leads to FREAKLAB */
.egg, .egg:visited {
    display: inline-grid;
    grid-template-columns: repeat(2, 4px);
    gap: 2px;
    margin-left: 0.4rem;
    padding: 3px;
    vertical-align: middle;
    opacity: 0.35;
    transition: opacity 0.2s;
}

.egg i { width: 4px; height: 4px; background: var(--muted); }
.egg:hover, .egg:focus-visible { opacity: 1; text-decoration: none; }
.egg:hover i:nth-child(1), .egg:focus-visible i:nth-child(1) { background: var(--tertiary); }
.egg:hover i:nth-child(4), .egg:focus-visible i:nth-child(4) { background: var(--tertiary); }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
    .featured, .release-top, .product, .tiktok-spot { grid-template-columns: 1fr; }
    .post-card img { width: 72px; height: 72px; }
    .tiktok-embeds { justify-content: flex-start; }
}
