/* Shared base site stylesheet for public desktop and non-mobile pages. */
/* Self-hosted fonts */
@font-face {
    font-family: "Oswald";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/oswald-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Source Sans 3";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
}

:root {
    --bg: #f9f9f9;
    --surface: #ffffff;
    --text: #0f0f0f;
    --muted: #606060;
    --border: #e5e5e5;
    --accent: #cc0000;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Source Sans 3", "Trebuchet MS", sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: calc(56px + env(safe-area-inset-bottom));
}

img {
    display: block;
    max-width: 100%;
}

video:fullscreen,
video:-webkit-full-screen,
video::-webkit-full-screen,
video:-moz-full-screen {
    object-fit: contain;
    background: #000;
}

a {
    color: inherit;
    text-decoration: none;
}

a[href^="mailto:"] {
    color: var(--accent);
    font-weight: 600;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
    padding: 16px 0 40px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Oswald", "Source Sans 3", sans-serif;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: auto;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.site-nav {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a {
    color: inherit;
}

.site-nav a.is-active {
    color: var(--accent);
    font-weight: 700;
}

.site-footer {
    border-top: 1px solid var(--border);
    background: #ffffff;
    margin-top: 32px;
}

.site-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0 26px;
    flex-wrap: wrap;
}

.social-links {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--muted);
}

.social-links a {
    color: var(--accent);
    font-weight: 600;
}

.feed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.page-hero {
    padding: 18px 0 10px;
}

.page-hero h1 {
    margin: 0 0 6px;
    font-family: "Oswald", "Source Sans 3", sans-serif;
    font-size: 26px;
    letter-spacing: 0.6px;
}

.page-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-card {
    padding: 18px;
}

.page-card p {
    margin: 0 0 12px;
    line-height: 1.5;
}

.page-card p:last-child {
    margin-bottom: 0;
}

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

.feed-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin: 16px 0 6px;
}

.feed-controls label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.feed-sort-control {
    position: relative;
}

.feed-controls select {
    appearance: none;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 34px 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.feed-sort-control::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.04);
}

.card-media {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #ddd;
}

.card-media video,
.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-content img,
.modal-content video {
    display: block;
    width: 100%;
    height: auto;
}

.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
    .desktop-only {
        display: block;
    }
}

.card-body {
    padding: 12px 14px 16px;
}

.card-title {
    font-family: "Oswald", "Source Sans 3", sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
}

.creator-link {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.2px;
}

.creator-link span {
    color: var(--muted);
    font-weight: 600;
}

.creator-display-name {
    color: var(--muted);
    font-weight: 600;
}

.card-desc {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.card-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.feed-empty .card-body {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hidden {
    display: none;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}

.modal.is-open {
    display: flex;
}

.modal-content {
    background: #000;
    width: min(900px, 92vw);
    max-height: 90vh;
    overflow: auto;
    border-radius: 12px;
    position: relative;
    padding: 12px;
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: #fff;
    border: 0;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
}

.button.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.like-button {
    border-color: #d4d4d4;
}

.like-button.liked {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.meta {
    font-size: 12px;
    color: var(--muted);
    margin-left: auto;
}

.loading-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.feed-load-more {
    display: flex;
    justify-content: center;
    margin: 18px 0 40px;
}

.takedown-note {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #ffffff;
    border-top: 1px solid var(--border);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    z-index: 50;
    transform: translateZ(0);
}

.takedown-note a {
    color: inherit;
    text-decoration: underline;
}

.skeleton {
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 45%, #eee 65%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
}

.skeleton.media {
    aspect-ratio: 1 / 1;
}

.skeleton.text {
    height: 12px;
    margin: 10px 0;
    border-radius: 6px;
}

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .skeleton { animation: none; }
}
