@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
    --ink: #1c140d;
    --ink-soft: #3a2e22;
    --parchment: #f1e7d6;
    --parchment-deep: #e6d8bf;
    --brass: #b8892b;
    --brass-bright: #d4a03e;
    --bronze: #8c5a3c;
    --felt: #48563e;
    --line: rgba(28, 20, 13, 0.14);
    --shadow: rgba(28, 20, 13, 0.18);
    --radius: 6px;
    --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--parchment);
    color: var(--ink-soft);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    background-image:
        radial-gradient(rgba(140, 90, 60, 0.05) 1px, transparent 1px);
    background-size: 3px 3px;
}

h1, h2, h3, .brand-word {
    font-family: 'Fraunces', serif;
    color: var(--ink);
    margin: 0 0 .4em;
}

a { color: inherit; }

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
    z-index: 1;
}

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

.site-header {
    padding: 26px 0 22px;
    border-bottom: 1px solid var(--line);
}

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

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
}

.brand-word {
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* ---------- section headings ---------- */

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 54px 0 26px;
}

.section-head h2 { font-size: 1.5rem; font-weight: 600; }

.section-head .count {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.78rem;
    color: var(--bronze);
    white-space: nowrap;
}

.plugin-grid-top { margin-top: 40px; }

/* ---------- plugin grid ---------- */

.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    padding-bottom: 60px;
}

.plate {
    background: var(--parchment-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.plate:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px var(--shadow);
    border-color: var(--brass);
}

.plate-image {
    position: relative;
    width: 100%;
    aspect-ratio: 6 / 5;
    background: var(--ink);
    overflow: hidden;
}

.plate-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s ease;
}

.plate:hover .plate-image img { transform: scale(1.04); }

.plate-glyph-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    padding: 5px;
    background: rgba(28, 20, 13, 0.72);
    color: var(--brass-bright);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plate-glyph-badge svg { width: 100%; height: 100%; }

.plate-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.plate-name {
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink);
}

.plate-tagline {
    font-size: 0.92rem;
    color: var(--bronze);
    margin-top: -6px;
}

.plate-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tag {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 3px 9px;
    color: var(--ink-soft);
}

.tag.format { border-color: var(--felt); color: var(--felt); }

/* ---------- plugin detail ---------- */

.detail-head {
    padding: 50px 0 20px;
    border-bottom: 1px solid var(--line);
}

.breadcrumb {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--bronze);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 22px;
}

.detail-top {
    display: flex;
    align-items: flex-start;
    gap: 22px;
}

.detail-glyph {
    width: 64px;
    height: 64px;
    flex: none;
    color: var(--brass);
    background: var(--parchment-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}

.detail-glyph svg { width: 100%; height: 100%; }

.detail-top h1 { font-size: 2.1rem; }

.detail-tagline { color: var(--bronze); font-size: 1.05rem; margin-top: -6px; }

.detail-image-frame {
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 24px;
    max-width: 480px;
}

.detail-image-frame img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.video-frame {
    position: relative;
    max-width: 480px;
    aspect-ratio: 16 / 9;
    margin-top: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--ink);
    border: 1px solid var(--line);
}

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

.ad-wrap {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    overflow-x: auto;
}


.ad-slot { line-height: 0; }

@media (max-width: 380px) {
    .ad-slot, .ad-slot ins { transform: scale(0.9); transform-origin: top center; }
}

.detail-body {
    display: block;
    max-width: 640px;
    padding: 34px 0 60px;
}

.detail-body p { font-size: 1.02rem; }

.spec-box {
    background: var(--parchment-deep);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-top: 30px;
}

.spec-box h3 {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bronze);
    margin-bottom: 14px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
}

.spec-row:first-of-type { border-top: none; }

.spec-row span:first-child { color: var(--bronze); }

.download-btn {
    display: block;
    text-align: center;
    margin-top: 18px;
    background: var(--brass);
    color: var(--parchment);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background .15s ease;
}

.download-btn:hover { background: var(--brass-bright); }

.block-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--bronze);
    margin: 28px 0 12px;
}

.control-list {
    margin: 0;
    padding-left: 20px;
    font-size: 0.96rem;
}

.control-list li { margin-bottom: 6px; }

.download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-decoration: none;
    color: var(--ink-soft);
    padding: 9px 10px;
    margin: 0 -10px;
    border-radius: 4px;
    font-size: 0.86rem;
    transition: background .12s ease;
}

.download-row:hover { background: rgba(184, 137, 43, 0.14); color: var(--ink); }

.download-row-extra {
    border-top: 1px dashed var(--line);
    margin-top: 4px;
    padding-top: 12px;
    font-style: italic;
}

.dl-label { font-weight: 600; }

.dl-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.74rem;
    color: var(--bronze);
    white-space: nowrap;
}

.dl-note {
    margin: 14px 0 0;
    font-size: 0.76rem;
    color: var(--bronze);
    line-height: 1.4;
}

.dl-note code {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--parchment);
    padding: 1px 5px;
    border-radius: 3px;
}

.related {
    padding: 0 0 70px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    padding: 30px 0 40px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.76rem;
    color: var(--bronze);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.ad-section { padding-bottom: 60px; }

@media (max-width: 760px) {
    .plugin-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
}

@media (max-width: 560px) {
    .wrap { padding: 0 18px; }
    .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
    .brand-word { font-size: 1.7rem; }
    .plugin-grid { grid-template-columns: 1fr 1fr; }
    .detail-top { flex-direction: column; align-items: flex-start; gap: 12px; }
    .detail-top h1 { font-size: 1.6rem; }
    .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

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