/*
 * Theme Name: Veridis Dio
 * Template: twentytwentyfour
 */

/* ── Fuentes locales ── */
@font-face {
    font-family: 'BlackGreat';
    src: url('fonts/BlackGreat-Regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'JetBrainsMono';
    src: url('fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}

/* ── Variables ── */
:root {
    --cream:    #FCFAF7;
    --ink:      #1a1a1a;
    --sub:      #5a5a5a;
    --red:      #9A0E13;
    --border:   #c8c0b5;
    --white:    #ffffff;
    --ff-brand: 'BlackGreat','Pirata One',serif;
    --ff-mono:  'JetBrainsMono','JetBrains Mono',monospace;
    --ff-body:  'Playfair Display',Georgia,serif;
    --max-w:    1200px;
    --gutter:   clamp(20px,5vw,64px);
}

/* ── Reset base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ── Body — sin grid estático, lo dibuja el canvas ── */
body {
    background-color: var(--cream);
    background-image: none;
    color: var(--ink);
    font-family: var(--ff-body);
    line-height: 1.75;
    cursor: auto;
}

/* ── Oculta elementos del tema padre Classic ── */
div#page > div#header,
div#page > div#header + hr,
div#page > hr,
div#page > div#footer,
#footer { display: none !important; }

/* ── Canvas grid dinámico ── */
#vd-trail {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    width: 100%;
    height: 100%;
}

/* ── Header ── */
.vd-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: transparent;
    border-bottom: none;
    transition: background .35s ease, border-color .35s ease;
}
.vd-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 18px var(--gutter);
    max-width: var(--max-w);
    margin: 0 auto;
}
.vd-header__lang {
    justify-self: start;
    display: flex;
}
.lang-btn {
    font-family: var(--ff-mono);
    font-size: 12px; font-weight: 700;
    padding: 5px 10px;
    border: 1px solid var(--border);
    background: transparent; color: var(--ink);
    letter-spacing: .06em;
    transition: background .2s, color .2s;
    cursor: pointer;
}
.lang-btn--active { background: var(--ink); color: var(--white); }
.lang-btn:first-child { border-right: none; }
.vd-logo {
    justify-self: center;
    font-family: var(--ff-brand);
    font-size: clamp(22px,2.8vw,34px);
    color: var(--red);
    white-space: nowrap;
}
.vd-nav {
    justify-self: end;
}
.vd-nav__list {
    display: flex; gap: 32px; list-style: none;
}
.vd-nav__list a {
    font-family: var(--ff-body);
    font-size: 15px; color: var(--ink);
    transition: color .2s;
    white-space: nowrap;
}
.vd-nav__list a:hover { color: var(--red); }

/* Header al hacer scroll */
.vd-header.scrolled {
    background: rgba(26,26,26,0.97);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.vd-header.scrolled .vd-nav__list a { color: #f0f0f0; }
.vd-header.scrolled .vd-logo { color: var(--red); }
.vd-header.scrolled .lang-btn { color: #f0f0f0; border-color: rgba(255,255,255,0.25); }
.vd-header.scrolled .lang-btn--active { background: #f0f0f0; color: var(--ink); }

/* ── Bio ── */
.vd-bio {
    margin-top: 80px;
    padding: clamp(48px,6vw,96px) var(--gutter);
    max-width: var(--max-w);
    margin-left: auto; margin-right: auto;
}
.vd-bio__inner {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 40px;
    align-items: start;
    border-left: 3px solid var(--red);
    padding-left: 32px;
}
.vd-bio__photo-wrap {
    position: relative; width: 180px; height: 200px;
    border: 1px solid var(--border); overflow: hidden;
}
.vd-bio__photo {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center top;
}
.vd-bio__crosshair {
    position: absolute; bottom: 10px; left: 10px;
    font-family: var(--ff-mono); font-size: 20px;
    color: var(--white);
}
.vd-bio__tag {
    font-family: var(--ff-mono);
    color: var(--red); font-size: 13px;
    letter-spacing: .04em; margin-bottom: 16px;
    min-height: 1.5em; line-height: 1.5;
}
#vd-bio-typewriter::after {
    content: '_'; color: var(--red);
    animation: blink .8s step-end infinite;
}
.vd-bio__text p {
    font-family: var(--ff-mono);
    font-size: clamp(13px,1.3vw,15px);
    color: var(--ink); margin-bottom: 14px;
    line-height: 1.7; max-width: 620px;
}

/* ── Grid section ── */
.vd-grid-section {
    max-width: var(--max-w); margin: 0 auto;
    padding: 0 var(--gutter) clamp(60px,8vw,120px);
    position: relative; z-index: 1;
}
.vd-grid-heading {
    text-align: center;
    padding: clamp(40px,5vw,72px) 0 clamp(24px,3vw,40px);
    border-top: 1px solid var(--border);
}

/* ── Filtros ── */
.vd-filters {
    display: flex; flex-wrap: wrap; align-items: center;
    border: 1px solid var(--border);
    margin-bottom: clamp(32px,4vw,56px);
}
.vd-filters__label {
    font-family: var(--ff-mono); font-size: 11px;
    font-weight: 700; letter-spacing: .1em;
    padding: 12px 20px;
    border-right: 1px solid var(--border);
    background: var(--ink); color: var(--white);
    white-space: nowrap;
}
.vd-filter-btn {
    font-family: var(--ff-body); font-size: 13px;
    padding: 12px 20px;
    background: transparent; color: var(--sub);
    border: none; border-right: 1px solid var(--border);
    transition: color .2s; cursor: pointer;
}
.vd-filter-btn:hover { color: var(--red); }
.vd-filter-btn--active {
    border: 1px solid var(--ink); color: var(--ink);
    font-weight: 700; margin: 6px 8px; padding: 6px 16px;
}

/* ── Posts grid ── */
.vd-posts-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: clamp(24px,3vw,48px);
}
.vd-card {
    display: flex; flex-direction: column;
    border: 1px solid var(--border);
    background: var(--cream); overflow: hidden;
    transition: box-shadow .3s;
}
.vd-card:hover { box-shadow: 4px 4px 0 var(--ink); }
.vd-card__img-link {
    position: relative; display: block;
    aspect-ratio: 16/11; overflow: hidden;
}
.vd-card__img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: grayscale(20%) contrast(1.04);
    transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.vd-card:hover .vd-card__img { transform: scale(1.03); }
.vd-card__img--placeholder { width: 100%; height: 100%; background: #ccc; }
.vd-card__grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.vd-card__body {
    padding: 24px 28px 28px;
    display: flex; flex-direction: column; gap: 8px; flex: 1;
}
.vd-card__cat {
    font-family: var(--ff-mono); font-size: 10px;
    letter-spacing: .12em; text-transform: uppercase; color: var(--sub);
}
.vd-card__title {
    font-family: var(--ff-body); font-size: clamp(18px,2vw,26px);
    font-weight: 900; line-height: 1.2;
    display: flex; align-items: flex-start; gap: 8px;
}
.vd-card__title a { color: var(--ink); transition: color .2s; }
.vd-card__title a:hover { color: var(--red); }
.vd-card__quote {
    font-size: 28px; color: var(--red);
    line-height: 1; flex-shrink: 0; margin-top: -4px;
}
.vd-card__subtitle {
    font-family: var(--ff-body); font-style: italic;
    font-size: clamp(12px,1.1vw,14px); color: var(--sub); line-height: 1.5;
}
.vd-card__footer {
    display: flex; align-items: center; gap: 16px;
    margin-top: auto; padding-top: 16px;
}
.vd-btn-read {
    font-family: var(--ff-mono); font-size: 11px;
    font-weight: 700; letter-spacing: .1em;
    padding: 11px 20px;
    background: var(--red); color: var(--white);
    border: none; transition: background .2s;
    white-space: nowrap; text-decoration: none;
    cursor: pointer;
}
.vd-btn-read:hover { background: #7a0a0f; }
.vd-card__time {
    font-family: var(--ff-body); font-style: italic;
    font-size: 12px; color: var(--sub);
}
.vd-no-posts {
    font-family: var(--ff-mono); color: var(--sub);
    grid-column: 1/-1; text-align: center; padding: 48px 0;
}

/* ── Newsletter ── */
.vd-newsletter {
    border-top: 1px solid var(--border);
    padding: clamp(48px,6vw,96px) var(--gutter);
    display: flex; align-items: center;
    gap: clamp(24px,4vw,64px); flex-wrap: wrap;
    max-width: var(--max-w); margin: 0 auto;
    position: relative; z-index: 1;
}
.vd-newsletter__title {
    font-family: var(--ff-body); font-weight: 900;
    font-size: clamp(36px,4vw,56px); line-height: 1; margin-bottom: 8px;
}
.vd-newsletter__text p {
    font-family: var(--ff-mono); font-size: clamp(12px,1.2vw,14px);
    color: var(--sub); line-height: 1.5; max-width: 300px;
}
.vd-newsletter__form {
    display: flex; flex: 1; min-width: 280px;
    border: 1px solid var(--border);
}
.vd-newsletter__input {
    flex: 1; padding: 18px 20px;
    font-family: var(--ff-body); font-size: 15px;
    background: var(--white); border: none; outline: none; color: var(--ink);
}
.vd-newsletter__btn {
    font-family: var(--ff-mono); font-weight: 700;
    font-size: 13px; letter-spacing: .1em;
    padding: 18px 28px;
    background: var(--red); color: var(--white);
    border: none; transition: background .2s;
    white-space: nowrap; cursor: pointer;
}
.vd-newsletter__btn:hover { background: #7a0a0f; }

/* ── Single post ── */
.single .vd-header__inner {
    grid-template-columns: auto 1fr auto;
}
.single .vd-logo { justify-self: start; }
.single .vd-header__lang { justify-self: center; }
.single .vd-nav { justify-self: end; }

.vd-single-hero {
    position: relative; width: 100%;
    height: clamp(280px,40vw,500px);
    margin-top: 70px; overflow: hidden; background: #b0aba3;
}
.vd-single-hero__img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 30%;
    display: block;
}
.vd-single-hero__grid-overlay {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px);
    background-size: 48px 48px; pointer-events: none;
}
.vd-single-wrap {
    max-width: 860px; margin: 0 auto;
    padding: clamp(40px,6vw,80px) clamp(20px,4vw,48px) clamp(60px,8vw,120px);
}
.vd-single-titlebox {
    border: 1px solid var(--border);
    padding: clamp(24px,3vw,44px) clamp(24px,4vw,52px);
    margin-bottom: 40px; text-align: center;
}
.vd-single-quote {
    display: block; font-size: 52px; line-height: 1;
    color: var(--red); margin-bottom: 10px;
}
.vd-single-title {
    font-family: var(--ff-body); font-weight: 900;
    font-size: clamp(24px,4vw,40px); line-height: 1.2;
    color: var(--ink); margin-bottom: 14px; text-align: center;
}
.vd-single-subtitle {
    font-family: var(--ff-body); font-style: italic;
    font-size: clamp(14px,1.6vw,18px); color: var(--sub); line-height: 1.5;
}
.vd-single-date {
    font-family: var(--ff-mono); font-size: 12px;
    letter-spacing: .08em; color: var(--sub);
    text-align: center; margin-bottom: 48px;
}
.vd-spotify { max-width: 680px; margin: 0 auto 48px; }
.vd-post-body {
    max-width: 680px; margin: 0 auto;
    font-family: var(--ff-body); font-size: clamp(15px,1.5vw,17px);
    line-height: 1.85; color: var(--ink);
}
.vd-post-body p { margin-bottom: 1.6em; font-style: normal; }
.vd-post-body blockquote {
    font-style: italic; font-weight: 700;
    font-size: clamp(16px,1.8vw,20px);
    border-left: 3px solid var(--red);
    padding: 8px 0 8px 24px; margin: 2.4em 0;
}
.vd-single-tags {
    max-width: 680px; margin: 48px auto 0;
    display: flex; flex-wrap: wrap; gap: 10px;
}
.vd-tag { font-family: var(--ff-mono); font-size: 12px; color: var(--sub); }
.vd-tag:hover { color: var(--red); }
.vd-author-bar {
    max-width: 860px; margin: 56px auto 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 20px;
}
.vd-author-bar__photo-wrap {
    position: relative; width: 72px; height: 72px;
    border: 1px solid var(--border); border-radius: 50%;
    overflow: hidden; flex-shrink: 0;
}
.vd-author-bar__photo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.vd-author-bar__info { flex: 1; }
.vd-author-bar__handle {
    font-family: var(--ff-mono); font-size: 13px;
    color: var(--red); font-weight: 700; margin-bottom: 4px;
}
.vd-author-bar__bio { font-family: var(--ff-mono); font-size: 12px; color: var(--sub); }
.vd-btn-next {
    display: inline-flex; align-items: center; gap: 12px;
    font-family: var(--ff-mono); font-weight: 700;
    font-size: 12px; letter-spacing: .1em;
    padding: 14px 22px; background: var(--red); color: var(--white);
    margin-left: auto; transition: background .2s; white-space: nowrap;
    text-decoration: none;
}
.vd-btn-next:hover { background: #7a0a0f; }
.vd-btn-next svg { width: 20px; height: 12px; stroke: var(--white); fill: none; stroke-width: 2; }
.vd-comments-wrap { max-width: 680px; margin: 64px auto 0; }
.vd-comments-title {
    font-family: var(--ff-body); font-weight: 900;
    font-size: clamp(20px,2.2vw,28px); margin-bottom: 32px;
}
.vd-comment {
    display: flex; gap: 16px;
    padding-bottom: 28px; margin-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.vd-comment__avatar { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; }
.vd-comment__author { font-family: var(--ff-body); font-weight: 700; font-size: 15px; color: var(--red); margin-bottom: 2px; }
.vd-comment__meta { font-family: var(--ff-mono); font-size: 11px; color: var(--sub); margin-bottom: 10px; }
.vd-comment__text { font-family: var(--ff-body); font-size: 15px; line-height: 1.7; }
.vd-comment-form-wrap { margin-top: 48px; border-top: 1px solid var(--border); padding-top: 40px; }
.vd-cf-row { margin-bottom: 16px; }
.vd-cf-input, .vd-cf-textarea {
    width: 100%; font-family: var(--ff-body); font-size: 15px;
    padding: 14px 16px; background: var(--white);
    border: 1px solid var(--border); color: var(--ink); outline: none;
}
.vd-cf-textarea { resize: vertical; min-height: 120px; }
.vd-btn-comment {
    font-family: var(--ff-mono); font-weight: 700; font-size: 12px;
    letter-spacing: .1em; padding: 14px 28px;
    background: var(--ink); color: var(--white); border: none; cursor: pointer;
}
.vd-btn-comment:hover { background: var(--red); }

/* ── Animaciones ── */
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── Responsive ── */
@media (max-width: 900px) {
    .vd-posts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .vd-header__inner {
        grid-template-columns: auto 1fr auto;
        padding: 14px 20px;
    }
    .vd-logo { font-size: 22px; }
    .vd-nav__list { gap: 14px; }
    .vd-nav__list a { font-size: 13px; }
    .vd-bio { margin-top: 70px; }
    .vd-bio__inner { grid-template-columns: 1fr; padding-left: 16px; }
    .vd-bio__photo-wrap { width: 120px; height: 140px; }
    .vd-newsletter { flex-direction: column; }
    .vd-newsletter__form { width: 100%; }
    .vd-filters { overflow-x: auto; }
    .vd-author-bar { flex-wrap: wrap; }
    .vd-btn-next { margin-left: 0; width: 100%; justify-content: center; }
}