/*
Theme Name: Ronnie Child - Catalunya Oculta
Template: ronnie-wordpress-theme
Author: Marc RL
Description: Child theme de Ronnie per a Catalunya Oculta. Hero gran a la portada i personalitzacions segures davant actualitzacions del theme pare.
Version: 1.16.0
Text Domain: ronnie
*/

/* ============================================================
   TIPOGRAFIA DE MARCA (self-hosted, variable, swap)
   Titulars: Newsreader · Cos/UI: Inter
   Served from /fonts/ (docroot): Hide My WP rewrites theme URLs to /core/views/ in the HTML but not inside
   LiteSpeed's combined CSS, so the same font was downloaded under two or three URLs. /fonts/ is one URL everywhere.
   ============================================================ */
/* Parent's Bootstrap Icons, same story (100 KB twice): redeclared here, later in the cascade, so this URL wins. */
@font-face {
    font-family: "bootstrap-icons";
    src: url('/fonts/bootstrap-icons.woff2?e2f6e48459d8b0f394eea57aba940179') format('woff2');
}
@font-face {
    font-family: 'Newsreader';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/newsreader-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Newsreader';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/newsreader-latinext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('/fonts/inter-latinext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --coc-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --coc-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Cos i UI en Inter */
body { font-family: var(--coc-sans); }

/* Titulars en Newsreader (h5/h6 NO: són meta d'autor → es mantenen en Inter) */
h1, h2, h3, h4,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.coc-hero__title,
.post-card-title,
.post-card .card-title {
    font-family: var(--coc-serif);
    font-optical-sizing: auto;
}
/* Meta headings (h5/h6) in Inter: the parent set them in Julius Sans One, loaded from Google Fonts. */
h5, h6, .h5, .h6 { font-family: var(--coc-sans); }

/* ============================================================
   Hero gran portada
   ============================================================ */
.coc-hero {
    position: relative;
    min-height: clamp(420px, 72vh, 760px);
    display: flex;
    align-items: flex-end;
    overflow: clip;
    background: #0b0b0d;
    isolation: isolate;
}

.coc-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Amb vídeo, el pòster (primer fotograma del clip) porta el MATEIX filtre i escala
   que el vídeo: així la transició pòster→vídeo és imperceptible i el fons no
   "salta" (mateixa imatge, mateix desenfoc i to). També és el fallback coherent
   per a moviment reduït i si l'autoplay falla. */
.coc-hero--video .coc-hero__img {
    filter: blur(4px) brightness(.78) saturate(.9);
    transform: scale(1.04);
}

/* La vora INFERIOR del vídeo/imatge es difumina cap al fons (sense acabar en una
   ratlla dura). Màscara CSS: no toca el vídeo, només com es fon amb la secció. */
.coc-hero__img,
.coc-hero__video {
    -webkit-mask-image: linear-gradient(to bottom, #000 74%, rgba(0, 0, 0, .45) 89%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 74%, rgba(0, 0, 0, .45) 89%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
}

/* Vídeo de fons (MP4 o iframe YouTube/Vimeo) per sobre del pòster.
   Difuminat suau + atenuació: el vídeo fa d'atmosfera, no de protagonista,
   i el text guanya llegibilitat. El scale amaga les vores borroses. */
.coc-hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    z-index: 0;
    pointer-events: none;
    filter: blur(4px) brightness(.78) saturate(.9);
    transform: scale(1.04);
}

/* Els iframes 16:9 s'escalen per cobrir tot el hero */
iframe.coc-hero__video {
    top: 50%;
    left: 50%;
    width: max(100%, 177.78vh);
    height: max(100%, 56.25vw);
    transform: translate(-50%, -50%) scale(1.04);
}

/* El vídeo es mostra també a mòbil (petició explícita). Només s'amaga si
   l'usuari demana menys moviment: llavors queda el pòster (a11y + estalvi). */
@media (prefers-reduced-motion: reduce) {
    .coc-hero__video { display: none; }
}

/* Enfosquiment per llegibilitat — controlable des del Personalitzador (--coc-overlay) */
.coc-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(8, 8, 12, .10) 0%,
        rgba(8, 8, 12, calc(var(--coc-overlay, .45) + .10)) 55%,
        rgba(8, 8, 12, calc(var(--coc-overlay, .45) + .30)) 100%
    );
}

/* Gra tàctil subtil (brutalisme tàctil 2026) */
.coc-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .045;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.coc-hero__inner {
    position: relative;
    z-index: 2;
    padding-block: clamp(2rem, 6vw, 5rem);
    color: #fff;
}

.coc-hero__title {
    color: #fff;
    margin: 0 0 .4em;
    letter-spacing: -.015em;
    line-height: .98;
    text-wrap: balance;
    max-width: 16ch;
}

.coc-hero__subtitle {
    color: rgba(255, 255, 255, .9);
    max-width: 50ch;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.6;
    margin: 0 0 1.7rem;
}

/* Primary hero CTA: solid light pill, the same language as the site's other
   actions on dark (player play button, active language pill). A dark box on a
   dark hero read as a hole, not a button. */
.coc-hero__btn {
    position: relative;
    min-height: 52px;
    padding: 0 1.45rem 0 1.65rem !important;
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    /* Frosted white: lets the hero breathe through, still ≥9:1 text contrast on the darkest frame. */
    background: rgba(255, 255, 255, .8) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
            backdrop-filter: blur(10px) saturate(1.2);
    color: #141414 !important;
    border: 0 !important;
    border-radius: 999px !important;
    font-family: var(--coc-sans);
    font-weight: 600;
    /* !important: the parent's `.ronnie-page-content .btn:not(#id)` forces 12px / 1px tracking. */
    font-size: 1rem !important;
    letter-spacing: -.005em !important;
    text-decoration: none;
    box-shadow: none !important;
    transition: transform .28s cubic-bezier(.2, .7, .2, 1), background-color .28s ease;
}
/* Fletxa (mask + currentColor: s'inverteix sola amb el text en hover) */
.coc-hero__btn::after {
    content: "";
    width: 20px;
    height: 11px;
    flex: none;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='11' viewBox='0 0 20 11' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5.5h17M13 1l5 4.5-5 4.5'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='11' viewBox='0 0 20 11' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 5.5h17M13 1l5 4.5-5 4.5'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform .28s cubic-bezier(.2, .7, .2, 1);
}
@media (hover: hover) {
    .coc-hero__btn:hover { background: rgba(255, 255, 255, .95) !important; }
    .coc-hero__btn:hover::after { transform: translateX(4px); }
}
/* Premuda: retorn tàctil immediat (essencial a mòbil sense hover) */
.coc-hero__btn:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
    .coc-hero__btn, .coc-hero__btn::after { transition: none; }
}

/* Entrada suau — només si l'usuari no demana menys moviment */
@media (prefers-reduced-motion: no-preference) {
    .coc-hero__inner > * {
        animation: cocHeroIn .7s cubic-bezier(.2, .7, .2, 1) both;
    }
    .coc-hero__subtitle { animation-delay: .08s; }
    .coc-hero__btn      { animation-delay: .16s; }
}

@keyframes cocHeroIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}

/* Contrast alt: enfosquim el fons per garantir llegibilitat */
@media (prefers-contrast: more) {
    .coc-hero::after { background: rgba(0, 0, 0, .62); }
}

/* Focus visible brutal i clar sobre el hero */
.coc-hero__btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

/* ============================================================
   CAPÇALERA PREMIUM — fixa, glass, sempre visible (sticky)
   Estil monocrom editorial coherent amb el web (negre #141414 + blanc).
   - Portada: transparent sobre el hero → "glass" fosc en fer scroll.
   - Resta de pàgines: glass fosc des de l'inici.
   ============================================================ */
/* Alçada de referència del menú (fallback robust si el JS no la mesura;
   el JS l'actualitza amb el valor real). Evita que el contingut quedi tapat. */
:root { --coc-nav-h: 78px; }
@media (max-width: 991.98px) { :root { --coc-nav-h: 70px; } }

/* Els salts d'àncora no queden sota el menú fix */
html { scroll-padding-top: calc(var(--coc-nav-h) + 10px); }

/* Cap scroll horitzontal, mai. `clip` no crea contenidor de scroll (a diferència
   de hidden), així que no trenca el menú sticky ni els elements fixos. */
html { overflow-x: clip; }
body { overflow-x: clip; }

/* Marca "Catalunya Oculta" (injectada per JS si no hi ha logo) */
.coc-brand {
    font-family: var(--coc-serif) !important;
    font-size: clamp(1.15rem, 1.5vw, 1.4rem);
    line-height: 1;
    letter-spacing: -.01em;
    color: #fff !important;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .2s ease;
}
.coc-brand:hover { opacity: .8; }

/* La marca ja enllaça a la home → amaguem l'ítem "home" duplicat del menú */
.ronnie-nav .navbar-nav .menu-item-home { display: none; }

/* ---- Selector d'idioma ES · CA · EN (text, accessible) ---- */
.coc-lang {
    display: inline-flex;
    align-items: center;
    gap: .1rem;
    margin-right: .6rem;
}
.coc-lang__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    padding: .2rem .45rem;
    font-family: var(--coc-sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    color: #fff !important;
    opacity: .5;
    text-decoration: none;
    border-radius: 6px;
    transition: opacity .2s ease, background-color .2s ease;
}
.coc-lang__item:hover { opacity: .85; }
.coc-lang__item.is-current {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1.5px;
}
.coc-lang__item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.coc-lang__item + .coc-lang__item { position: relative; }
.coc-lang__item + .coc-lang__item::before {
    content: "·";
    position: absolute;
    left: -.35rem;
    opacity: .35;
    pointer-events: none;
}

/* Variant "mini": idiomes compactes a la barra superior mòbil (visibles sempre,
   perquè el visitant sàpiga que pot canviar d'idioma sense obrir el menú). */
.coc-lang--mini {
    gap: 2px;
    margin-right: .3rem;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.coc-lang--mini .coc-lang__item {
    min-width: 30px;
    min-height: 34px;
    padding: .25rem .32rem;
    font-size: .7rem;
    letter-spacing: .02em;
    border-radius: 999px;
    opacity: .7;
}
/* L'idioma actual: pastilla plena (clarament "seleccionat", no una etiqueta). */
.coc-lang--mini .coc-lang__item.is-current {
    opacity: 1;
    background: #fff;
    color: #141417 !important;
    text-decoration: none;
}
.coc-lang--mini .coc-lang__item + .coc-lang__item::before { content: none; }
/* Phones: brand, languages, search, light/dark and the burger always share one line (the burger must never drop
   below). Up to 400px everything compacts; on any phone the brand gives way before anything wraps (iPhone Pro
   is 402px, Pro Max 440px: the old ≤400px rule left them out). */
@media (max-width: 575.98px) {
    .ronnie-nav .navbar { flex-wrap: nowrap; }
    .ronnie-nav .navbar-brand { min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .ronnie-nav .navbar > .d-flex, .ronnie-nav .navbar-toggler { flex: none; }
}
@media (max-width: 400px) {
    .coc-brand { font-size: 1.02rem; }
    .coc-lang--mini { margin-right: .15rem; padding: 2px; gap: 1px; }
    .coc-lang--mini .coc-lang__item { min-width: 25px; min-height: 32px; padding: .25rem .22rem; font-size: .66rem; }
}

/* Evita scroll horitzontal a mòbil: les URLs llargues (p. ex. referències dels
   articles) han de partir en lloc de desbordar la pantalla. */
.coc-article__content { overflow-wrap: break-word; }
.coc-article__content a { overflow-wrap: anywhere; word-break: break-word; }

/* Variant overlay mòbil: fila de pastilles grans al peu del menú */
.coc-lang--overlay {
    margin: 1.6rem 0 0;
    gap: .6rem;
}
.coc-lang--overlay .coc-lang__item {
    min-width: 52px;
    min-height: 44px;
    font-size: .85rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    opacity: .75;
}
.coc-lang--overlay .coc-lang__item.is-current {
    opacity: 1;
    background: #fff;
    color: #141417 !important;
    border-color: #fff;
    text-decoration: none;
}
.coc-lang--overlay .coc-lang__item + .coc-lang__item::before { content: none; }

/* Menú més compacte a mòbil (menys espai negre buit) */
@media (max-width: 991.98px) {
    .ronnie-nav.py-3 { padding-top: .55rem !important; padding-bottom: .55rem !important; }
}

.ronnie-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1030;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background .4s ease, -webkit-backdrop-filter .4s ease,
                backdrop-filter .4s ease, padding .35s ease,
                border-color .4s ease, box-shadow .4s ease;
}

/* Portada a dalt (sense scroll): scrim fosc degradat (no transparent pur).
   Així el text blanc del menú és SEMPRE llegible, encara que el hero no
   estigui configurat o el fons sigui clar. Venç el .bg-white del tema. */
.home .ronnie-nav:not(.coc-scrolled) {
    background: linear-gradient(180deg, rgba(8, 8, 12, .6) 0%, rgba(8, 8, 12, .25) 55%, rgba(8, 8, 12, 0) 100%) !important;
}

/* Compensa la barra d'administració de WordPress (usuari connectat) */
body.admin-bar .ronnie-nav { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .ronnie-nav { top: 46px; }
}
/* Up to 600px WordPress lets its bar scroll away (position: absolute) while ours stays fixed 46px down:
   a gap opened above the header for logged-in users (seen on phones and Safari). Keep both fixed. */
@media screen and (max-width: 600px) {
    body.admin-bar #wpadminbar { position: fixed; }
}

/* Portada SENSE hero configurat: no hi ha fons fosc, així que el menú
   transparent quedaria il·legible. El fem glass fosc SÒLID i deixem espai
   al contingut. En configurar el hero, torna a ser transparent sobre la imatge. */
body.home:not(:has(.coc-hero)) .ronnie-nav:not(.coc-scrolled) {
    background: rgba(14, 14, 16, .92) !important;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}
body.home:not(:has(.coc-hero)) .ronnie-page-content { padding-top: calc(var(--coc-nav-h) + 2rem); }

/* El tema amaga la capçalera en baixar (.hidden → translateY(-120px)).
   La volem SEMPRE visible: anul·lem aquest auto-ocultament. */
.ronnie-nav.hidden { transform: none !important; }

/* Mode fosc: el tema fa filter:invert(1) al .navbar, cosa que tornava
   el nostre text blanc a negre (invisible). El color ja el controlem
   nosaltres (blanc sobre vidre fosc), així que anul·lem la inversió. */
body.dark-mode .ronnie-nav .navbar,
body.dark-mode .ronnie-nav {
	-webkit-filter: none !important;
	filter: none !important;
}

/* Portada: el hero puja fins a dalt, sota el menú */
.home .ronnie-page-content,
.home .coc-hero { margin-top: 0; }
/* Pàgines internes: reserva espai sota la capçalera fixa */
body:not(.home) .ronnie-page-content { padding-top: var(--coc-nav-h); }

/* Estat "glass": portada amb scroll + sempre a la resta de pàgines */
.ronnie-nav.coc-scrolled,
body:not(.home) .ronnie-nav {
    background: rgba(14, 14, 16, .72) !important;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border-bottom-color: rgba(255, 255, 255, .10);
    box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .85);
}
/* Light mode: the same glass over white reads as a dull grey; a denser ink keeps it a deliberate dark bar. */
body:not(.dark-mode) .ronnie-nav.coc-scrolled,
body:not(.dark-mode):not(.home) .ronnie-nav { background: rgba(14, 14, 16, .9) !important; }
/* Encongiment subtil en fer scroll */
.ronnie-nav.coc-scrolled { padding-top: .5rem !important; padding-bottom: .5rem !important; }

/* Text i icones sempre en blanc (glass fosc o sobre hero) */
.ronnie-nav .nav-link,
.ronnie-nav .navbar-brand,
.ronnie-nav .dropdown-toggle,
.ronnie-nav .btn,
.ronnie-nav .btn i,
.ronnie-nav i { color: #fff !important; }
.ronnie-nav .navbar-toggler { border-color: rgba(255,255,255,.3); }
.ronnie-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.9)' stroke-width='2' stroke-linecap='round' d='M4 8h22M4 15h22M4 22h22'/%3E%3C/svg%3E");
}

/* Enllaços: subratllat animat des del centre (microdelight) */
.ronnie-nav .navbar-nav .nav-link {
    position: relative;
    font-weight: 500;
    letter-spacing: .015em;
    opacity: .8;
    transition: opacity .25s ease;
}
.ronnie-nav .navbar-nav .nav-link::before {
    content: "";
    position: absolute;
    left: 50%; bottom: .3rem;
    width: 0; height: 1.5px;
    background: #fff;
    transform: translateX(-50%);
    transition: width .3s cubic-bezier(.2, .7, .2, 1);
}
.ronnie-nav .navbar-nav .nav-link:hover,
.ronnie-nav .navbar-nav .nav-link:focus-visible,
.ronnie-nav .navbar-nav .nav-link.active { opacity: 1; }
.ronnie-nav .navbar-nav .nav-link:hover::before,
.ronnie-nav .navbar-nav .nav-link:focus-visible::before,
.ronnie-nav .navbar-nav .nav-link.active::before { width: calc(100% - 1.5rem); }
@media (prefers-reduced-motion: reduce) {
    .ronnie-nav, .ronnie-nav .navbar-nav .nav-link::before { transition: none; }
}

/* Focus visible accessible i clar */
.ronnie-nav .nav-link:focus-visible,
.ronnie-nav .btn:focus-visible,
.gtranslate_wrapper select:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
    border-radius: 3px;
}

/* Dropdown "Agenda oculta" — panell glass fosc */
.ronnie-nav .dropdown-menu {
    background: rgba(18, 18, 20, .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 5px;
    box-shadow: 0 22px 45px -22px rgba(0, 0, 0, .9);
    padding: .4rem;
    margin-top: .55rem;
}
.ronnie-nav .dropdown-item {
    color: rgba(255, 255, 255, .82) !important;
    border-radius: 3px;
    padding: .55rem .85rem;
    transition: background .2s ease, color .2s ease;
}
.ronnie-nav .dropdown-item:hover,
.ronnie-nav .dropdown-item:focus {
    background: rgba(255, 255, 255, .09);
    color: #fff !important;
}

/* Botons d'icona (cerca + mode fosc) — ghost circular tàctil ≥44px */
.ronnie-nav #navSearchBtn,
.ronnie-nav #darkmodetoggle {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .16);
    transition: background .25s ease, border-color .25s ease, transform .2s ease;
}
.ronnie-nav #navSearchBtn:hover,
.ronnie-nav #darkmodetoggle:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .42);
}
.ronnie-nav .ronnie-v-separator { opacity: .25; }
/* The light/dark button shows where a press takes you: the moon in light mode, the sun in dark mode. */
#darkmodetoggle .bi-sun, body.dark-mode #darkmodetoggle .bi-moon { display: none; }
body.dark-mode #darkmodetoggle .bi-sun { display: inline; }
@media (max-width: 991.98px) { .ronnie-nav #darkmodetoggle { margin-left: .35rem; } }
/* Light/dark switch: the new theme opens as a circle from the button; the script animates the clip. */
html.is-theme-vt::view-transition-old(root),
html.is-theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ============================================================
   Selector d'idioma (gTranslate · "dropdown amb banderes")
   Pastilla fosca premium, coherent amb el menú. Toquem només el
   background-COLOR (mai background-image/position) per conservar
   la bandera. El caret és propi, sobreposat al wrapper.
   ============================================================ */
.gtranslate_wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: .25rem;
}

.gtranslate_wrapper select,
.gtranslate_wrapper select.notranslate {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-color: rgba(255, 255, 255, .06) !important; /* manté la bandera (background-image) */
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .22) !important;
    border-radius: 999px !important;
    /* dre: espai pel caret propi · esq: espai per a la bandera */
    padding: .5rem 2.1rem .5rem 2.3rem !important;
    min-height: 42px !important;
    height: auto !important;
    width: auto !important;
    max-width: none !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
    letter-spacing: .02em !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    background-repeat: no-repeat;
    transition: background-color .25s ease, border-color .25s ease !important;
}

.gtranslate_wrapper select:hover {
    background-color: rgba(255, 255, 255, .12) !important;
    border-color: rgba(255, 255, 255, .5) !important;
}

.gtranslate_wrapper select:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Caret propi (chevron blanc), independent de la bandera */
.gtranslate_wrapper::after {
    content: "";
    position: absolute;
    right: .9rem;
    top: 50%;
    width: 10px;
    height: 6px;
    transform: translateY(-50%);
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
    pointer-events: none;
}

/* Opcions del desplegable natiu: fons fosc llegible */
.gtranslate_wrapper select option {
    background-color: #141417 !important;
    color: #fff !important;
}

/* Variant "float switcher" de gTranslate, si algun dia s'activa */
.gtranslate_wrapper .gt_float_switcher {
    background: rgba(14, 14, 16, .72) !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: 999px !important;
    color: #fff !important;
    box-shadow: none !important;
}

/* ---- Menú mòbil: overlay a pantalla completa (premium 2026) ---- */
@media (max-width: 991.98px) {
    /* El botó hamburguesa sempre per damunt de l'overlay */
    .ronnie-nav .navbar-toggler {
        position: relative;
        z-index: 1041;
        border: 0;
        padding: .35rem;
    }
    /* Icona → X quan està obert */
    body.coc-nav-open .ronnie-nav .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,0.95)' stroke-width='2' stroke-linecap='round' d='M6 6l18 18M24 6L6 24'/%3E%3C/svg%3E");
    }

    /* L'overlay: el contenidor del menú a pantalla completa */
    .ronnie-nav .navbar-collapse {
        position: fixed;
        inset: 0;
        z-index: 1035;
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.4rem;
        min-height: 100svh;
        background: rgba(9, 9, 12, .985);
        -webkit-backdrop-filter: blur(22px) saturate(140%);
        backdrop-filter: blur(22px) saturate(140%);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
        transition: opacity .4s ease, transform .4s ease, visibility .4s;
    }
    /* Gra tàctil dins l'overlay */
    .ronnie-nav .navbar-collapse::before {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        opacity: .05;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    }
    body.coc-nav-open .ronnie-nav .navbar-collapse {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    body.coc-nav-open { overflow: hidden; }

    /* Enllaços grans, editorials, amb entrada esglaonada */
    .ronnie-nav .navbar-collapse .navbar-nav,
    .ronnie-nav .navbar-collapse .menu {
        background: transparent !important; /* el tema posa fons blanc → enllaços invisibles */
        flex-direction: column;
        align-items: center;
        gap: .2rem;
        width: auto;
        position: relative;
    }
    .ronnie-nav .navbar-nav .nav-link {
        font-family: var(--coc-serif);
        font-size: clamp(1.7rem, 8vw, 2.4rem);
        line-height: 1.1;
        opacity: .92;
        padding: .35rem 1rem;
        letter-spacing: -.01em;
    }
    .ronnie-nav .navbar-nav .nav-link::before { display: none; }
    .ronnie-nav .navbar-nav .nav-link.active { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
    .ronnie-nav .dropdown-toggle::after { display: none; }
    /* Subnivells del dropdown: visibles i centrats dins l'overlay */
    .ronnie-nav .navbar-collapse .dropdown-menu {
        position: static !important;
        display: block !important;
        transform: none !important;
        background: transparent;
        border: 0;
        box-shadow: none;
        text-align: center;
        margin: 0 0 .3rem;
        padding: 0;
    }
    .ronnie-nav .navbar-collapse .dropdown-item {
        font-size: 1rem;
        color: rgba(255, 255, 255, .6) !important;
        padding: .25rem;
    }
    /* Selector d'idioma dins l'overlay */
    .ronnie-nav .navbar-collapse .gtranslate_wrapper { margin-top: 1.2rem; }

    /* Entrada esglaonada dels enllaços */
    @media (prefers-reduced-motion: no-preference) {
        body.coc-nav-open .ronnie-nav .navbar-nav > * {
            animation: cocMenuIn .5s cubic-bezier(.2, .7, .2, 1) both;
        }
        body.coc-nav-open .ronnie-nav .navbar-nav > *:nth-child(2) { animation-delay: .05s; }
        body.coc-nav-open .ronnie-nav .navbar-nav > *:nth-child(3) { animation-delay: .1s; }
        body.coc-nav-open .ronnie-nav .navbar-nav > *:nth-child(4) { animation-delay: .15s; }
        body.coc-nav-open .ronnie-nav .navbar-nav > *:nth-child(5) { animation-delay: .2s; }
        body.coc-nav-open .ronnie-nav .navbar-nav > *:nth-child(6) { animation-delay: .25s; }
    }
    @keyframes cocMenuIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
}

/* ---- Hero a smartphone: alçada continguda, ritme i scroll cue ---- */
@media (max-width: 767.98px) {
    /* Alçada equilibrada: la secció següent espïa per convidar a baixar */
    .coc-hero {
        min-height: min(64svh, 560px);
        align-items: end;
    }
    /* Marge inferior ampli: deixa una franja fosca per al cue, sense amuntegar */
    .coc-hero__inner { padding-block: 2rem 5rem; }
    .coc-hero__title {
        /* Tracking gairebé neutre: a 10-11vw el negatiu heretat feia que les
           lletres es toquessin ("Oculta"). */
        font-size: clamp(2.2rem, 10.5vw, 3.1rem) !important;
        letter-spacing: -.002em;
        line-height: 1.02;
        max-width: 14ch;
        margin-bottom: .5rem;
    }
    .coc-hero__subtitle { font-size: 1rem; line-height: 1.55; max-width: 42ch; margin-bottom: 1.3rem; }
    /* A mòbil deixa d'ocupar tota l'amplada: botó auto, alineat amb el títol
       (més editorial i menys "barra"). Segueix sent un objectiu tàctil ampli. */
    .coc-hero__btn { width: auto; align-self: flex-start; }

    /* El cover deixa de simular una segona portada: targeta d'alçada continguda
       i cantonades marcades, clarament diferent del hero full-bleed de sobre. */
    .coc-cover {
        min-height: min(52svh, 460px);
        border-radius: 16px;
    }
    .coc-cover__title { letter-spacing: -.01em; line-height: 1.02; }

    /* Gradient més net a mòbil: enfosquiment sobretot a baix (no la "banda" central) */
    .home .coc-hero::after {
        background: linear-gradient(
            180deg,
            rgba(8, 8, 12, .5) 0%,
            rgba(8, 8, 12, .15) 26%,
            rgba(8, 8, 12, .35) 60%,
            rgba(8, 8, 12, .85) 100%
        );
    }

    /* Indicador de scroll (cue) al peu del hero — reaprofita ::before (a mòbil
       el gra no es nota; el convertim en una fletxa que convida a baixar) */
    .coc-hero::before {
        inset: auto auto 20px 50%;
        transform: translateX(-50%);
        z-index: 3;
        width: 24px;
        height: 24px;
        opacity: .8;
        background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none'%3E%3Cpath d='M5 9l7 7 7-7' stroke='rgba(255,255,255,.9)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
        animation: cocCue 1.8s ease-in-out infinite;
    }
    @media (prefers-reduced-motion: reduce) {
        .coc-hero::before { animation: none; }
    }
}
@keyframes cocCue {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: .9; }
    50% { transform: translateX(-50%) translateY(5px); opacity: .5; }
}

/* Reforç de llegibilitat: degradat fosc a la franja superior del hero */
.home .coc-hero::after {
    background: linear-gradient(
        180deg,
        rgba(8, 8, 12, calc(var(--coc-overlay, .45) + .15)) 0%,
        rgba(8, 8, 12, .12) 30%,
        rgba(8, 8, 12, calc(var(--coc-overlay, .45) + .08)) 62%,
        rgba(8, 8, 12, calc(var(--coc-overlay, .45) + .32)) 100%
    );
}

/* ============================================================
   HOME — polish premium (manté l'estil editorial b/n)
   ============================================================ */

/* 1) Reveal ROBUST: el contingut SEMPRE és visible (mai amagat per
   JS diferit). L'animació d'entrada és CSS scroll-driven natiu —
   no depèn del main.js que LiteSpeed retarda. */
.fade-in-up,
.fade-in-up__item { opacity: 1 !important; transform: none !important; }

@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .fade-in-up {
            animation: cocReveal .8s cubic-bezier(.2, .7, .2, 1) both;
            animation-timeline: view();
            animation-range: entry 0% entry 32%;
        }
    }
}
@keyframes cocReveal {
    from { opacity: 0; transform: translateY(28px); filter: blur(7px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Revelat cinematogràfic de CADA secció en entrar (tot el web, no només el hero).
   Subtil (sense blur en blocs grans) perquè no lluiti amb els reveals interns. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .home .ronnie-section,
        .home .coc-news,
        .coc-footer__inner > * {
            animation: cocSectionIn .95s cubic-bezier(.2, .7, .2, 1) both;
            animation-timeline: view();
            animation-range: entry 0% entry 24%;
        }
    }
}
@keyframes cocSectionIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: none; }
}

/* 2) Targetes: imatge amb zoom suau en hover + cantonada premium */
.post-card a:has(> img) {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}
.post-card img.card-img,
.post-card img.card-img-top {
    display: block;
    width: 100%;
    /* To apagat i evocador (atmosfera "oculta") → reviu a color en hover */
    filter: grayscale(.4) contrast(1.05) brightness(.95);
    transition: transform .8s cubic-bezier(.2, .7, .2, 1), filter .6s ease;
}
.post-card a:has(> img):hover img.card-img,
.post-card a:has(> img):hover img.card-img-top {
    transform: scale(1.06);
    filter: grayscale(0) contrast(1) brightness(1);
}
@media (prefers-reduced-motion: reduce) {
    .post-card img.card-img,
    .post-card img.card-img-top { filter: none; transition: none; }
}

/* Graella uniforme: ràtios d'imatge consistents (look editorial net) */
.post-card.sm img.card-img-top,
.post-card.lg img.card-img-top { aspect-ratio: 3 / 2; object-fit: cover; }
.post-card.xl img.card-img    { aspect-ratio: 16 / 11; object-fit: cover; }

/* 3) Títols de targeta: subratllat fi creixent en hover */
.post-card .card-title,
.post-card .post-card-title {
    transition: opacity .25s ease;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    padding-bottom: 2px;
    transition: background-size .35s cubic-bezier(.2, .7, .2, 1);
}
.post-card a:hover .card-title,
.post-card a:hover .post-card-title { background-size: 100% 1px; }

/* 4) Eyebrows de secció ("No te lo pierdas", "Latest articles") */
.ronnie-section .mb-2 .text-uppercase:not(.d-none) {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .22em;
    opacity: .7;
}
.ronnie-section .mb-2 .text-uppercase:not(.d-none)::before {
    content: "";
    width: 30px;
    height: 1px;
    background: currentColor;
    opacity: .7;
}

/* 5) Tags de categoria com a pastilla editorial */
.tag-link {
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: 999px;
    padding: .22rem .7rem;
    font-size: .7rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    line-height: 1.4;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
/* Parent forces a white hover background with !important, so invert: dark text on white. */
.tag-link:hover,
.tag-link:focus-visible {
    background: #fff !important;
    color: #141414 !important;
    border-color: #141414;
}
/* Secció fosca "No te lo pierdas": tags i línies en clar */
#homepage_highlight .tag-link {
    border-color: rgba(255, 255, 255, .35);
    color: #fff !important;
}
#homepage_highlight .tag-link:hover {
    background: #fff;
    color: #141414 !important;
    border-color: #fff;
}

/* Mode fosc: cantonada de targeta i tags adaptats */
body.dark-mode .post-card a:has(> img) { background: #1c1c1f; }
body.dark-mode .tag-link { border-color: rgba(255, 255, 255, .28); }

/* ============================================================
   ATMOSFERA "OCULTA" — gra de paper + vinyeta cinematogràfica
   Textura "feta a mà" (tendència folklore/gòtic 2026), molt subtil.
   ============================================================ */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    opacity: .06;
    mix-blend-mode: multiply;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 220px 220px;
}
body.dark-mode::after { mix-blend-mode: screen; opacity: .08; }

/* Vinyeta cinematogràfica: NOMÉS a la portada fosca (.coc-cinema.dark-mode). Als articles
   i a la portada clara no hi és: sobre blanc només embrutaria les cantonades. Fixa, sota la UI i el gra. */
body.coc-cinema.dark-mode::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9997;
    pointer-events: none;
    background: radial-gradient(135% 115% at 50% 42%, transparent 50%, rgba(0, 0, 0, .55) 100%);
    mix-blend-mode: multiply;
}
@media (prefers-contrast: more) {
    body.coc-cinema.dark-mode::before { display: none; }
}

/* ============================================================
   HOME CINEMATOGRÀFICA (.coc-cinema) — light or dark is the reader's choice.
   Dark: the whole home at night, like the hero (the parent's dark-mode plus depth
   and contrast). Light: an editorial page on white and warm paper, ink type,
   amber details; the photography (hero, cover) keeps its dark scrims in both.
   Light rules read the palette tokens below; the dark rules keep their own values.
   ============================================================ */
body.coc-cinema {
    --coc-home-bg: #fff;
    --coc-home-ink: #141417;
    --coc-home-text: rgba(20, 20, 23, .86);
    --coc-home-muted: rgba(20, 20, 23, .62);
    --coc-home-line: rgba(20, 20, 23, .12);
    --coc-home-paper: #f6f4ef;              /* raised/quiet surfaces: warm paper */
    --coc-home-amber: #d08a1e;              /* decorative only (rules, glows) */
    --coc-home-amber-text: #8f5410;         /* amber as text: 6:1 on white */
}
body.coc-cinema.dark-mode {
    background: #08080b;   /* sòlid: el peu del hero pot fondre's exactament amb aquest to */
    color: #e9e9ee;
}
body.coc-cinema:not(.dark-mode) {
    background: var(--coc-home-bg);
    color: var(--coc-home-text);
}
body.coc-cinema .ronnie-section { background: transparent; }
/* Xarxa de seguretat: aquests textos (que tenien color fosc explícit) segueixen llegibles sobre el fons fosc. */
body.coc-cinema.dark-mode { --bs-body-color: #e9e9ee; --bs-body-bg: #08080b; --bs-light: #141414; }
body.coc-cinema.dark-mode .coc-sec-head__eyebrow { color: #fff !important; opacity: .55; }
body.coc-cinema.dark-mode .coc-sec-head__title,
body.coc-cinema.dark-mode .post-card .card-title,
body.coc-cinema.dark-mode .post-card-title { color: #f2f2f4 !important; }
/* Placeholder de miniatura fosc (no gris clar mentre carrega). */
body.coc-cinema.dark-mode .post-card a:has(> img) { background: #131317; }
/* Línia divisòria fina i lluminosa entre meta i títol. */
body.coc-cinema.dark-mode .post-card hr { background-color: rgba(255, 255, 255, .16) !important; }
/* Botó "Ver más crónicas" i similars: contorn clar sobre fons fosc. */
body.coc-cinema.dark-mode #btn404 {
    background: transparent !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .4) !important;
}
body.coc-cinema.dark-mode #btn404:hover { background: #fff !important; color: #141414 !important; }
/* Separadors subtils entre seccions per marcar el ritme cinematogràfic. */
body.coc-cinema.dark-mode .ronnie-section + .ronnie-section { border-top: 1px solid rgba(255, 255, 255, .05); }

/* Light: section heads as an editorial overline (amber ink + amber rule) over an ink serif title. */
body.coc-cinema:not(.dark-mode) .coc-sec-head__eyebrow { color: var(--coc-home-amber-text) !important; opacity: 1; }
body.coc-cinema:not(.dark-mode) .coc-sec-head__eyebrow::before { background: var(--coc-home-amber); }
body.coc-cinema:not(.dark-mode) .coc-sec-head__title,
body.coc-cinema:not(.dark-mode) .post-card .card-title,
body.coc-cinema:not(.dark-mode) .post-card-title { color: var(--coc-home-ink) !important; }
/* Light cards: paper placeholder, ink hairline, ink meta (the parent painted the links #141414 and the tags as solid pills). */
body.coc-cinema:not(.dark-mode) .post-card a:has(> img) { background: #ebe7de; }
body.coc-cinema:not(.dark-mode) .post-card hr { background-color: var(--coc-home-line) !important; opacity: 1; }
body.coc-cinema:not(.dark-mode) .post-card a { color: var(--coc-home-ink); }
body.coc-cinema:not(.dark-mode) .post-card .author-box p { color: var(--coc-home-muted); }
body.coc-cinema:not(.dark-mode) .post-card .author-img { border-color: rgba(20, 20, 23, .08); }
body.coc-cinema:not(.dark-mode) .post-card .tag-link {
    background: transparent;
    color: var(--coc-home-ink) !important;
    border-color: rgba(20, 20, 23, .3);
}
body.coc-cinema:not(.dark-mode) .post-card .tag-link:hover,
body.coc-cinema:not(.dark-mode) .post-card .tag-link:focus-visible {
    background: var(--coc-home-ink) !important;
    color: #fff !important;
    border-color: var(--coc-home-ink);
}
/* Light "Ver más crónicas": ink outline (≥3:1 on paper), fills with ink on hover. */
body.coc-cinema:not(.dark-mode) #btn404 {
    background: transparent !important;
    color: var(--coc-home-ink) !important;
    border: 1px solid rgba(20, 20, 23, .5) !important;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
body.coc-cinema:not(.dark-mode) #btn404:hover { background: var(--coc-home-ink) !important; color: #fff !important; border-color: var(--coc-home-ink) !important; }
/* Light focus: an ink ring (the white rings of the dark home vanish on paper). */
body.coc-cinema:not(.dark-mode) :is(.post-card a, #btn404, .coc-sec-head a):focus-visible {
    outline: 2px solid var(--coc-home-ink);
    outline-offset: 3px;
    box-shadow: none;
}
/* Dark: the button had no ring at all (.shadow-none kills Bootstrap's focus shadow). Focus state only. */
body.coc-cinema.dark-mode #btn404:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Tags (25px) and "Ver más crónicas" (32px) keep their size; an invisible hit area takes the tap to 44px in both modes. */
.coc-cinema .post-card .tag-link,
.coc-cinema #btn404 { position: relative; }
.coc-cinema .post-card .tag-link::after,
.coc-cinema #btn404::after { content: ""; position: absolute; inset: -10px -4px; }
.coc-cinema #btn404::after { inset: -6px 0; }
@media (prefers-contrast: more) {
    body.coc-cinema:not(.dark-mode) { --coc-home-muted: rgba(20, 20, 23, .82); --coc-home-line: rgba(20, 20, 23, .3); }
}

/* Audio strip under the featured story (coc-audio.css paints it for a dark home): a paper pill with an ink play button. */
body.coc-cinema:not(.dark-mode) .coc-song--strip {
    color: var(--coc-home-ink);
    border-color: var(--coc-home-line);
    background: var(--coc-home-paper);
}
body.coc-cinema:not(.dark-mode) .coc-song--strip .coc-song__kicker,
body.coc-cinema:not(.dark-mode) .coc-song--strip .coc-song__time { opacity: .78; }
body.coc-cinema:not(.dark-mode) .coc-song--strip .coc-song__play { background: var(--coc-home-ink); color: #fff; }
body.coc-cinema:not(.dark-mode) .coc-song--strip .coc-song__play:hover { box-shadow: 0 10px 24px -12px rgba(20, 20, 23, .55); }

/* Atmosfera: capa de partícules fixa darrere el contingut (només portada; el JS la crea si hi ha .coc-cinema). */
.coc-atmos {
    position: fixed;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: .7;
    mix-blend-mode: screen;
}
/* Light: screen is invisible on white, so the same cream motes are turned into amber dust
   (filter chain ≈ #d08a1e from the canvas' rgb(255,244,222)), multiplied into the paper. */
body:not(.dark-mode) .coc-atmos {
    mix-blend-mode: multiply;
    opacity: .85;
    filter: invert(1) sepia(1) saturate(4) brightness(10.5);
}
@media (prefers-reduced-motion: reduce) { .coc-atmos { display: none; } }

/* Posts de la home centrats (coherència amb la resta del web). */
.coc-cinema .post-card .card-body { text-align: center; }
.coc-cinema .post-card .card-body .d-flex.justify-content-between {
    justify-content: center !important;
    gap: 1.1rem;
    flex-wrap: wrap;
}
.coc-cinema .post-card .author-box { justify-content: center; }

/* El tema pare té #newsletterCta input{background:transparent!important;width:70%;
   text-transform:uppercase} amb força d'ID, que anul·lava els camps del butlletí.
   El vencem amb la mateixa especificitat (ID + classe). */
/* IMPORTANT: el tema pare fa body.dark-mode #newsletterCta form input{filter:invert(1)}
   que invertia els nostres camps i botó (blanc → negre). L'anul·lem amb filter:none. */
#newsletterCta input.tnp-name,
#newsletterCta input.tnp-email,
#newsletterCta .tnp-field input[type="text"],
#newsletterCta .tnp-field input[type="email"] {
    width: 100% !important;
    background: rgba(255, 255, 255, .06) !important;
    border: 1.5px solid rgba(255, 255, 255, .45) !important;
    color: #fff !important;
    text-transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}
#newsletterCta input.tnp-submit {
    width: 100% !important;
    background: #fff !important;
    color: #141417 !important;
    border: 1px solid #fff !important;
    text-transform: uppercase !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* Vinyeta a les seccions fosques (profunditat cinematogràfica) */
#homepage_highlight { position: relative; }
#homepage_highlight::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 180px rgba(0, 0, 0, .55);
}
#homepage_highlight > .container { position: relative; z-index: 1; }

/* ============================================================
   KICKER editorial (categoria sobre el títol destacat)
   ============================================================ */
.coc-kicker {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .24em;
    text-transform: uppercase;
    opacity: .65;
    margin-bottom: .7rem;
}
.coc-kicker::before {
    content: "";
    width: 26px;
    height: 1px;
    background: currentColor;
    opacity: .7;
}

/* Afinat tipogràfic dels títols serif (més expressius) */
.post-card-title { letter-spacing: -.02em; }
.post-card .card-title { letter-spacing: -.01em; line-height: 1.16; }

/* ============================================================
   Capçalera de secció editorial (overline + títol serif + regla)
   Dona ritme i separa blocs; evita que dos fons foscos seguits
   (hero → cover) es llegeixin com un de sol.
   ============================================================ */
.coc-sec-head {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: clamp(1.1rem, 3vw, 1.8rem);
}
/* Aire entre el hero i la primera secció: el tema pare no en posa cap per sota
   de 992px (el .mt-lg-5 només actua a desktop), i quedava enganxat. */
@media (max-width: 991.98px) {
    .home .coc-sec-head { margin-top: clamp(2.5rem, 8vw, 3.5rem); }
}
.coc-sec-head__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--coc-sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--coc-ink, #141414);
    opacity: .6;
}
.coc-sec-head__eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}
.coc-sec-head__title {
    font-family: var(--coc-serif);
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
    line-height: 1.08;
    letter-spacing: -.02em;
    margin: 0;
}
body.dark-mode .coc-sec-head__eyebrow { color: #fff; opacity: .55; }
body.dark-mode .coc-sec-head__title { color: #fff; }

/* "La resta" (Más crónicas) com a SUPERFÍCIE ELEVADA: una franja una mica més
   clara que separa clarament l'arxiu de la notícia destacada (patró dark premium:
   elevació de superfície en lloc d'un gris que cantaria). */
.coc-rest-section {
    margin-top: clamp(1.5rem, 5vw, 3rem);
    padding-top: clamp(2.4rem, 6vw, 4rem) !important;
    padding-bottom: clamp(2.4rem, 6vw, 4rem);
}
.coc-cinema.dark-mode .coc-rest-section {
    background: #101017 !important;   /* elevat sobre el fons #08080b */
    border-top: 1px solid rgba(255, 255, 255, .07);
}
/* Light: the same elevation as a band of warm paper between two hairlines.
   Same weight as the dark separator rule (body … + .ronnie-section), so it wins on order. */
body.coc-cinema:not(.dark-mode) .ronnie-section.coc-rest-section {
    background: var(--coc-home-paper) !important;
    border-top: 1px solid var(--coc-home-line);
    border-bottom: 1px solid var(--coc-home-line);
}
.coc-sec-head--rest { margin-top: 0; padding-top: 0; border-top: 0; }

/* ============================================================
   COVER — article destacat tipus portada de revista
   ============================================================ */
.coc-cover {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(400px, 64vh, 660px);
    border-radius: 12px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    text-decoration: none;
    background: #0b0b0d;
}
.coc-cover__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: grayscale(.4) contrast(1.05) brightness(.85);
    transition: transform 1.1s cubic-bezier(.2, .7, .2, 1), filter .8s ease;
}
.coc-cover:hover .coc-cover__img,
.coc-cover:focus-visible .coc-cover__img {
    transform: scale(1.05);
    filter: grayscale(0) contrast(1) brightness(1);
}
.coc-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        0deg,
        rgba(8, 8, 10, .92) 0%,
        rgba(8, 8, 10, .55) 38%,
        rgba(8, 8, 10, .12) 72%,
        rgba(8, 8, 10, .25) 100%
    );
}
.coc-cover__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: clamp(1.6rem, 4vw, 3.2rem);
}
.coc-cover .coc-kicker { color: #fff; opacity: .9; }
.coc-cover__title {
    color: #fff;
    margin: .2rem 0 .7rem;
    letter-spacing: -.025em;
    line-height: .98;
    text-wrap: balance;
    max-width: 20ch;
}
.coc-cover__excerpt {
    color: rgba(255, 255, 255, .85);
    max-width: 56ch;
    font-size: clamp(1rem, 1.3vw, 1.18rem);
    line-height: 1.55;
    margin: 0 0 1.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.coc-cover__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .7rem;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .8);
}
.coc-cover__sep { opacity: .5; }
.coc-cover__read {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid transparent;
    transition: gap .25s ease, border-color .25s ease;
}
.coc-cover:hover .coc-cover__read { gap: .7rem; border-color: rgba(255, 255, 255, .7); }
.coc-cover:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* The cover stays a dark photograph in light mode; only its focus ring turns ink, or it would vanish on white. */
body:not(.dark-mode) .coc-cover:focus-visible { outline-color: #141417; }

@media (max-width: 575.98px) {
    .coc-cover__read { margin-left: 0; width: 100%; margin-top: .3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .coc-cover__img { filter: none; transition: none; }
}

/* ============================================================
   VIEW TRANSITIONS entre pàgines (natiu, cross-document)
   Cross-fade suau; la capçalera persisteix. Graceful fallback
   en navegadors sense suport. Respecta reduced-motion.
   ============================================================ */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: cocVtOut .32s ease both; }
::view-transition-new(root) { animation: cocVtIn .42s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes cocVtOut { to   { opacity: 0; } }
@keyframes cocVtIn  { from { opacity: 0; transform: translateY(10px); } }

/* La capçalera fixa es transiciona a part → estable entre pàgines */
.ronnie-nav { view-transition-name: coc-header; }

@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

/* ============================================================
   NEWSLETTER — bloc premium (plugin Newsletter / TNP)
   ============================================================ */
.coc-news .coc-news__box {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 12% 0%, rgba(255, 255, 255, .06), transparent 55%),
        #141417;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 18px;
    padding: clamp(1.8rem, 4vw, 3.6rem);
    color: #fff;
    box-shadow: 0 40px 80px -50px rgba(0, 0, 0, .9);
}
/* Filet d'accent superior */
.coc-news .coc-news__box::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5), transparent);
}

.coc-news__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1.6rem, 3vw, 3rem);
    align-items: center;
}
@media (min-width: 992px) {
    .coc-news__grid { grid-template-columns: 1.05fr 1fr; }
}

.coc-news .coc-kicker { color: #fff; opacity: .65; margin-bottom: .9rem; }
.coc-news__title {
    font-family: var(--coc-serif);
    color: #fff;
    margin: 0 0 .7rem;
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
    line-height: 1.02;
    letter-spacing: -.02em;
    text-wrap: balance;
}
.coc-news__lead {
    color: rgba(255, 255, 255, .72);
    font-size: 1.02rem;
    line-height: 1.6;
    max-width: 42ch;
    margin: 0;
}

/* --- Formulari del plugin (TNP) --- */
.coc-news .tnp-subscription { max-width: 460px; }
.coc-news .tnp-field { margin: 0 0 1.1rem; }
.coc-news .tnp-field label {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
    margin-bottom: .45rem;
}
.coc-news input.tnp-name,
.coc-news input.tnp-email,
.coc-news .tnp-field input[type="text"],
.coc-news .tnp-field input[type="email"] {
    width: 100%;
    min-height: 50px;
    padding: .75rem 1.05rem;
    background: rgba(255, 255, 255, .06) !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, .45) !important;
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    font-size: 1rem;
    font-family: var(--coc-sans);
    transition: border-color .2s ease, background-color .2s ease, box-shadow .25s ease;
}
.coc-news input.tnp-name::placeholder,
.coc-news input.tnp-email::placeholder,
.coc-news .tnp-field input::placeholder { color: rgba(255, 255, 255, .45) !important; }
.coc-news .tnp-field label { color: rgba(255, 255, 255, .6) !important; }
.coc-news input.tnp-name:focus,
.coc-news input.tnp-email:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255, 255, 255, .09);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .14);
}

/* Checkbox privadesa — bulletproof (venç la regla general de label i el CSS del plugin) */
.coc-news .tnp-privacy-field { margin-top: .3rem; }
.coc-news .tnp-privacy-field label {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: .55rem !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
    font-size: .84rem !important;
    line-height: 1.45 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    color: rgba(255, 255, 255, .75) !important;
    font-weight: 400 !important;
    margin: 0 !important;
    cursor: pointer;
}
.coc-news .tnp-privacy-field input.tnp-privacy,
.coc-news .tnp-privacy-field input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    margin: 2px 0 0 0 !important;
    flex: 0 0 auto !important;
    accent-color: #fff;
    cursor: pointer;
}
.coc-news .tnp-privacy-field label > span { flex: 1 1 auto; }
.coc-news .tnp-privacy-field a,
.coc-news__legal a {
    color: #fff !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.coc-news__legal {
    margin: 1rem 0 0;
    font-size: .8rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, .62);
}

/* Botó */
.coc-news input.tnp-submit {
    width: 100%;
    min-height: 52px;
    margin-top: .3rem;
    background: #fff !important;
    color: #141417 !important;
    border: 1px solid #fff !important;
    border-radius: 999px;
    font-family: var(--coc-sans);
    font-weight: 600;
    font-size: .86rem;
    letter-spacing: .09em !important;
    text-transform: uppercase !important;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .3s ease, background-color .2s ease, color .2s ease;
}
.coc-news input.tnp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px -14px rgba(255, 255, 255, .45);
}
.coc-news input.tnp-submit:active { transform: translateY(0); }
.coc-news input.tnp-submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Missatges del plugin (errors/ok) llegibles sobre fons fosc */
.coc-news .tnp-error,
.coc-news .tnp-success { color: #fff; }

/* ============================================================
   "CRÓNICAS" — índex editorial d'articles
   ============================================================ */
.coc-cron .post-card.sm { height: 100%; }
.coc-cron .coc-cron__media {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f0f0f0;
}
.coc-cron .card-body .coc-kicker {
    margin: .9rem 0 .3rem;
    opacity: .55;
    font-size: .68rem;
}
.coc-cron .card-title {
    font-family: var(--coc-serif);
    font-size: clamp(1.15rem, 1.7vw, 1.45rem);
    line-height: 1.15;
    letter-spacing: -.01em;
    margin: 0 0 .5rem;
    transition: opacity .2s ease;
}
.coc-cron .text-decoration-none:hover .card-title { opacity: .62; }
.coc-cron__meta {
    font-size: .76rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .5;
    margin: 0;
}
.coc-cron__noimg {
    display: block;
    aspect-ratio: 3 / 2;
    background:
        radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.06), transparent 60%),
        #141417;
}

/* Paginació premium */
.coc-cron__pagination .pagination { gap: .4rem; align-items: center; }
.coc-cron__pagination .page-link {
    border: 1px solid rgba(20, 20, 23, .18);
    border-radius: 8px;
    color: inherit;
    background: transparent;
    padding: .5rem .85rem;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.coc-cron__pagination .page-link:hover:not(.no-click):not(.disabled) {
    background: #141417;
    color: #fff;
    border-color: #141417;
}
.coc-cron__pagination .page-link.no-click { border-color: transparent; pointer-events: none; }
.coc-cron__pagination .page-link.disabled { opacity: .35; pointer-events: none; }
body.dark-mode .coc-cron__pagination .page-link { border-color: rgba(255, 255, 255, .2); }

/* ============================================================
   ARTICLE INDIVIDUAL (single) — experiència de lectura premium
   ============================================================ */

/* Barra de progrés de lectura */
.coc-reading-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 1040;
    background: transparent;
    pointer-events: none;
}
.coc-reading-progress > span {
    display: block;
    height: 100%;
    background: #fff;
    transform: scaleX(0);
    transform-origin: 0 50%;
    transition: transform .1s linear;
    box-shadow: 0 0 8px rgba(255, 255, 255, .5);
}
@media (prefers-reduced-motion: reduce) { .coc-reading-progress > span { transition: none; } }

/* Hero de l'article */
.coc-article-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(420px, 70vh, 720px);
    overflow: hidden;
    isolation: isolate;
    color: #fff;
    background: #0b0b0d;
    margin-bottom: clamp(2rem, 5vw, 4.5rem);
}
.coc-article-hero--plain {
    min-height: auto;
    background: transparent;
    color: inherit;
    padding-top: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.coc-article-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: grayscale(.3) contrast(1.05) brightness(.78);
}
.coc-article-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(0deg, rgba(8, 8, 10, .94) 0%, rgba(8, 8, 10, .55) 42%, rgba(8, 8, 10, .12) 78%, rgba(8, 8, 10, .35) 100%);
}
.coc-article-hero--plain::after { display: none; }
.coc-article-hero__inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-block: clamp(1.8rem, 4vw, 3.2rem);
    max-width: 1000px;
}
.coc-article-hero .coc-kicker {
    color: #fff;
    opacity: .9;
    text-decoration: none;
}
.coc-article-hero--plain .coc-kicker { color: inherit; opacity: .6; }
.coc-article-hero__title {
    font-family: var(--coc-serif);
    color: #fff;
    margin: .35rem 0 1rem;
    font-size: clamp(2.1rem, 5.2vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -.025em;
    text-wrap: balance;
    max-width: 22ch;
}
.coc-article-hero--plain .coc-article-hero__title { color: inherit; }
.coc-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
    font-size: .9rem;
    letter-spacing: .02em;
    color: rgba(255, 255, 255, .85);
}
.coc-article-hero--plain .coc-article-meta { color: rgba(20, 20, 23, .7); }
.coc-article-meta__avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: .4rem;
    border: 1px solid rgba(255, 255, 255, .4);
}
.coc-article-meta__author { font-weight: 600; color: inherit; text-decoration: none; }
.coc-article-meta__author:hover { text-decoration: underline; text-underline-offset: 3px; }
.coc-article-meta__sep { opacity: .45; }
.coc-article-meta time { color: inherit; }

/* Breadcrumbs (Yoast) — subtils, editorials */
.coc-breadcrumb {
    max-width: 70ch;
    margin: 0 auto 1.8rem;
    font-size: .8rem;
    letter-spacing: .02em;
    color: rgba(20, 20, 23, .55);
}
body.dark-mode .coc-breadcrumb { color: rgba(255, 255, 255, .55); }
.coc-breadcrumb a { color: inherit; text-decoration: none; }
.coc-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 2px; }
.coc-breadcrumb .breadcrumb_last { opacity: .9; font-weight: 500; }

/* Columna de lectura editorial */
.coc-article__content {
    max-width: 70ch;
    margin: 0 auto;
    font-size: clamp(1.08rem, 1.45vw, 1.24rem);
    line-height: 1.85;
    color: rgba(20, 20, 23, .9);
}
body.dark-mode .coc-article__content { color: rgba(255, 255, 255, .85); }
.coc-article__content > p { margin: 0 0 1.5rem; }
.coc-article__content > p:first-of-type::first-letter {
    float: left;
    font-family: var(--coc-serif);
    font-weight: 600;
    font-size: 3.9em;
    line-height: .72;
    padding: .05em .12em 0 0;
    color: #141417;
}
body.dark-mode .coc-article__content > p:first-of-type::first-letter { color: #fff; }
.coc-article__content h2,
.coc-article__content h3,
.coc-article__content h4 {
    font-family: var(--coc-serif);
    letter-spacing: -.015em;
    line-height: 1.18;
    margin: 2.4rem 0 .9rem;
}
.coc-article__content h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.coc-article__content h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
/* Subtítols interns (convertits de <p><strong> pel filtre de the_content): mateix to
   sobri en negreta, però amb aire a sobre i enganxats al seu paràgraf (proximitat). */
.coc-article__content > h2.coc-subhead {
    font-family: var(--coc-sans);
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.4;
    margin: 3rem 0 .6rem;
    color: inherit;
}
@media (max-width: 575.98px) {
    .coc-article__content > h2.coc-subhead { margin-top: 2.5rem; }
}
.coc-article__content a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.coc-article__content a:hover { opacity: .65; }
.coc-article__content img,
.coc-article__content figure { max-width: 100%; height: auto; border-radius: 8px; }
.coc-article__content figure { margin: 2.2rem 0; }
.coc-article__content figcaption { font-size: .85rem; opacity: .6; text-align: center; margin-top: .6rem; }
.coc-article__content ul,
.coc-article__content ol { margin: 0 0 1.5rem; padding-left: 1.3rem; }
.coc-article__content li { margin-bottom: .5rem; }
.coc-article__content blockquote {
    margin: 2.2rem 0;
    padding: .4rem 0 .4rem 1.6rem;
    border-left: 2px solid currentColor;
    font-family: var(--coc-serif);
    font-style: italic;
    font-size: 1.3em;
    line-height: 1.45;
}
.coc-article__content hr { border: 0; height: 1px; background: rgba(20,20,23,.15); margin: 2.6rem 0; }
body.dark-mode .coc-article__content hr { background: rgba(255,255,255,.15); }

/* Tags, share, eyebrow de secció — amplada de la columna de lectura */
.coc-article__tags,
.coc-close,
.coc-author,
.coc-article__pagelinks { max-width: 70ch; margin-left: auto; margin-right: auto; }
.coc-section-eyebrow {
    font-size: .72rem; font-weight: 600; letter-spacing: .22em;
    text-transform: uppercase; opacity: .55;
    display: flex; align-items: center; gap: .65rem; margin: 0 0 1.6rem;
}
.coc-section-eyebrow::before { content: ""; width: 30px; height: 1px; background: currentColor; opacity: .7; }

.coc-article__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2.5rem; }

/* Cierre de crónica: "light a candle" reaction + sharing (inc/reactions.php, coc-react.js). */
.coc-close {
    margin-top: 2.4rem;
    padding: clamp(1.6rem, 4vw, 2.2rem) 0 .4rem;
    border-top: 1px solid rgba(20, 20, 23, .12);
}
.coc-close__prompt {
    max-width: 30ch;
    margin: 0 0 1.3rem;
    font-family: var(--coc-serif);
    font-size: clamp(1.3rem, 2.4vw, 1.6rem);
    line-height: 1.25;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.coc-close__row { display: flex; flex-direction: column; align-items: flex-start; gap: 1.4rem; }
.coc-close__react { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.coc-close__count { min-height: 1.4em; font-size: .92rem; color: rgba(20, 20, 23, .68); font-variant-numeric: tabular-nums; }

.coc-candle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 50px;
    padding: 0 1.3rem 0 .65rem;
    border: 1px solid rgba(20, 20, 23, .24);
    border-radius: 999px;
    background: transparent;
    color: #141417;
    font: 600 .98rem/1 var(--coc-sans);
    cursor: pointer;
    transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .5s ease, transform .2s ease;
}
.coc-candle:hover { border-color: #141417; }
.coc-candle:active { transform: scale(.97); }
.coc-candle:focus-visible { outline: 2px solid #141417; outline-offset: 3px; }
.coc-candle[aria-pressed="true"] {
    background: #141417;
    border-color: #141417;
    color: #fff;
    box-shadow: 0 12px 32px -14px rgba(246, 166, 35, .7);
}
.coc-candle__icon { display: grid; place-items: center; width: 32px; height: 40px; }
.coc-candle__svg { width: 32px; height: 40px; overflow: visible; }
.coc-candle__body, .coc-candle__drip { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; transition: fill .4s ease, stroke .4s ease; }
.coc-candle__ghost { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 2 2; opacity: .45; transition: opacity .3s ease; }
.is-lit .coc-candle__ghost { opacity: 0; }
.coc-candle__wick { fill: none; stroke: currentColor; stroke-width: 1.4; }
.coc-candle__flame {
    fill: #f6a623;
    opacity: 0;
    transform: scale(0);
    transform-box: fill-box;
    transform-origin: 50% 100%;
    transition: transform .5s cubic-bezier(.3, 1.6, .4, 1), opacity .25s ease;
}
.coc-candle__core { fill: #ffe7a3; }
.coc-candle__glow { fill: rgba(246, 166, 35, .32); opacity: 0; filter: blur(3px); transition: opacity .6s ease; }
.coc-candle__sparks circle { fill: #ffd27a; opacity: 0; transform-box: fill-box; transform-origin: center; }
.coc-candle__sparks circle:nth-child(1) { --sx: -6px; --sy: -8px; }
.coc-candle__sparks circle:nth-child(2) { --sx: 6px; --sy: -9px; animation-delay: .06s; }
.coc-candle__sparks circle:nth-child(3) { --sx: -1px; --sy: -13px; animation-delay: .12s; }
.coc-candle__sparks circle:nth-child(4) { --sx: 7px; --sy: -3px; animation-delay: .03s; }

.is-lit .coc-candle__flame { opacity: 1; transform: scale(1); animation: cocFlicker 3s ease-in-out .55s infinite; }
.is-lit .coc-candle__glow { opacity: 1; }
.is-lit .coc-candle__body { fill: #f3ede1; stroke: #f3ede1; }
.is-lit .coc-candle__drip { stroke: #d9cfbd; }
.is-lit .coc-candle__wick { stroke: #3a3530; }
.is-igniting .coc-candle__sparks circle { animation: cocSpark .8s ease-out forwards; }
@keyframes cocFlicker {
    0%, 100% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.05, .96) rotate(-2.5deg); }
    50% { transform: scale(.96, 1.04) rotate(1.8deg); }
    75% { transform: scale(1.03, .98) rotate(-1deg); }
}
@keyframes cocSpark {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--sx), var(--sy)) scale(.3); }
}

.coc-close__share { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.coc-close__label { margin-right: .25rem; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(20, 20, 23, .62); }
.coc-close__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(20, 20, 23, .2);
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.coc-close__btn[hidden] { display: none; }
.coc-close__x { width: 16px; height: 16px; display: block; }
.coc-close__btn:hover { background: #141417; color: #fff; border-color: #141417; transform: translateY(-2px); }
.coc-close__btn:focus-visible { outline: 2px solid #141417; outline-offset: 2px; }
.coc-close__toast {
    position: absolute;
    right: 0;
    top: calc(100% + .55rem);
    padding: .4rem .8rem;
    border-radius: 999px;
    background: #141417;
    color: #fff;
    font-size: .82rem;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.coc-close__toast.is-on { opacity: 1; transform: none; }

body.dark-mode .coc-close { border-color: rgba(255, 255, 255, .12); }
body.dark-mode .coc-close__count, body.dark-mode .coc-close__label { color: rgba(255, 255, 255, .7); }
body.dark-mode .coc-candle, body.dark-mode .coc-close__btn { border-color: rgba(255, 255, 255, .26); color: #fff; }
body.dark-mode .coc-candle[aria-pressed="true"] { background: #fff; color: #141417; }
body.dark-mode .coc-close__btn:hover { background: #fff; color: #141417; border-color: #fff; }

@media (max-width: 575.98px) {
    .coc-close__row { flex-direction: column; align-items: flex-start; }
    .coc-close__toast { left: 0; right: auto; }
    .coc-close__share { gap: .45rem; }
    .coc-close__label { width: 100%; margin: 0 0 .1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .coc-candle, .coc-candle__flame, .coc-candle__glow, .coc-candle__body, .coc-close__btn, .coc-close__toast { transition: none; }
    .is-lit .coc-candle__flame, .is-igniting .coc-candle__sparks circle { animation: none; }
}

/* Bio de l'autor */
.coc-author {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
    margin-top: 2.6rem;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid rgba(20, 20, 23, .12);
    border-radius: 14px;
    background: rgba(20, 20, 23, .02);
}
body.dark-mode .coc-author { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.coc-author__avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.coc-author .coc-kicker { opacity: .5; margin-bottom: .3rem; }
.coc-author__name { font-family: var(--coc-serif); font-size: 1.3rem; margin: 0 0 .4rem; }
.coc-author__bio { margin: 0; opacity: .75; line-height: 1.6; font-size: .98rem; }

/* Relacionats: reaprofita .coc-cron; només eyebrow centrat al gruix de pàgina */
.coc-related .coc-section-eyebrow { max-width: none; }

/* Comentaris */
.coc-comments__inner { max-width: 70ch; margin: 0 auto; }
.coc-comments__list { list-style: none; padding: 0; margin: 0 0 2.5rem; }
.coc-comments__inner .comment-body { padding: 1.2rem 0; border-bottom: 1px solid rgba(20,20,23,.1); }
.coc-comments__inner .comment-author { font-weight: 600; }
.coc-comments__inner .comment-author .says { display: none; }
.coc-comments__inner input[type="text"],
.coc-comments__inner input[type="email"],
.coc-comments__inner input[type="url"],
.coc-comments__inner textarea {
    width: 100%;
    padding: .7rem 1rem;
    margin-top: .3rem;
    background: rgba(20, 20, 23, .03);
    border: 1px solid rgba(20, 20, 23, .2);
    border-radius: 10px;
    font-family: var(--coc-sans);
    font-size: 1rem;
}
body.dark-mode .coc-comments__inner input,
body.dark-mode .coc-comments__inner textarea { background: rgba(255,255,255,.05); color: #fff; border-color: rgba(255,255,255,.2); }
.coc-comments__inner input:focus,
.coc-comments__inner textarea:focus { outline: none; border-color: #141417; box-shadow: 0 0 0 3px rgba(20,20,23,.08); }
.coc-comments__inner .comment-form-comment label,
.coc-comments__inner .comment-form-author label,
.coc-comments__inner .comment-form-email label,
.coc-comments__inner .comment-form-url label {
    font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; opacity: .6;
}
.coc-comments__inner .form-submit input,
.coc-comments__inner .coc-comments__submit {
    min-height: 50px; padding: 0 2rem;
    background: #141417; color: #fff;
    border: 1px solid #141417; border-radius: 999px;
    font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .84rem;
    cursor: pointer; transition: transform .2s ease, opacity .2s ease;
}
.coc-comments__inner .form-submit input:hover { transform: translateY(-2px); }
body.dark-mode .coc-comments__inner .form-submit input { background: #fff; color: #141417; border-color: #fff; }

@media (max-width: 575.98px) {
    .coc-author { flex-direction: column; }
}

/* ============================================================
   FOOTER EDITORIAL (override footer.php del child)
   Fosc, atmosfèric, Newsreader al wordmark. Coherent amb el web.
   ============================================================ */
.coc-footer {
    position: relative;
    background: #0c0c0e;
    color: rgba(255, 255, 255, .72);
    isolation: isolate;
    overflow: clip;
}
/* gra de paper subtil, com a body::after */
.coc-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .04;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.coc-footer__inner {
    max-width: 1180px;
    margin-inline: auto;
    padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 5vw, 3.5rem) clamp(2rem, 4vw, 3rem);
    display: grid;
    gap: clamp(2rem, 5vw, 4rem);
    grid-template-columns: 1.6fr 1fr 1fr;
}
@media (max-width: 767.98px) {
    .coc-footer__inner { grid-template-columns: 1fr 1fr; }
    .coc-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 419.98px) {
    .coc-footer__inner { grid-template-columns: 1fr; }
}

/* Marca */
.coc-footer__logo {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    color: #fff;
}
.coc-footer__mark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(1) contrast(1.05);
    transition: filter .4s ease;
}
/* Stronger than the theme's a:hover, which turned the wordmark black on the dark footer. */
.coc-footer .coc-footer__logo:hover, .coc-footer .coc-footer__logo:focus-visible { color: #fff; }
.coc-footer__logo:hover .coc-footer__mark { filter: grayscale(0); }
.coc-footer__wordmark {
    font-family: var(--coc-serif);
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 500;
    letter-spacing: -.01em;
    line-height: 1;
}
.coc-footer__tagline {
    margin: 1.1rem 0 1.5rem;
    max-width: 38ch;
    font-size: .92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .55);
}

/* Social */
.coc-footer__social {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.coc-footer__social a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 44px;
    padding: 0 1rem 0 .85rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    font-size: .82rem;
    letter-spacing: .02em;
    transition: border-color .25s ease, background .25s ease, color .25s ease, transform .2s ease;
}
.coc-footer__social a:hover {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .42);
    color: #fff;
    transform: translateY(-2px);
}

/* Columnes de navegació */
.coc-footer__heading {
    font-family: var(--coc-sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
    margin: 0 0 1.1rem;
}
.coc-footer__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.coc-footer__nav a {
    display: inline-block;
    padding: .4rem 0;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
    font-size: .95rem;
    line-height: 1.4;
    width: fit-content;
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0% 1px;
    transition: color .25s ease, background-size .35s ease;
}
.coc-footer__nav a:hover {
    color: #fff;
    background-size: 100% 1px;
}

/* Barra inferior */
.coc-footer__bar {
    max-width: 1180px;
    margin-inline: auto;
    padding: 1.5rem clamp(1.25rem, 5vw, 3.5rem);
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    font-size: .82rem;
    color: rgba(255, 255, 255, .45);
}
.coc-footer__bar a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .3);
    transition: color .2s ease, border-color .2s ease;
}
.coc-footer__bar a:hover {
    color: #fff;
    border-color: #fff;
}

.coc-footer a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .8);
    outline-offset: 3px;
    border-radius: 2px;
}

/* ============================================================
   CINEMATIC 2026 (nivell 1 + 2) — atmosfera "misteri"
   Tot darrere de prefers-reduced-motion; degradació neta si el
   navegador no suporta scroll-driven animations o Web Audio.
   ============================================================ */

/* Capa d'efectes del hero: vinyeta cinematogràfica + contenidor de
   les partícules (canvas de pols/boira injectat per JS). z-index 1:
   sobre la imatge/vídeo (z0), sota el contingut (z2). */
.coc-hero__fx {
    position: absolute;
    inset: 0;
    z-index: 2; /* sobre el degradat de llegibilitat (::after, z1); el text (__inner) queda per sobre per ordre del DOM */
    pointer-events: none;
    /* 1a capa: fos continu del peu cap al color EXACTE de la secció (#08080b) → sense ratlla.
       2a capa: vinyeta cinematogràfica. */
    background:
        linear-gradient(to bottom, transparent 66%, rgba(8, 8, 11, .55) 84%, rgba(8, 8, 11, .92) 96%, #08080b 100%),
        radial-gradient(125% 92% at 50% 36%, transparent 50%, rgba(4, 4, 8, .55) 100%);
}
.coc-hero__fx canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    opacity: .72;
    mix-blend-mode: screen;
}
/* Light: the hero is a photograph set on a white page, not a night that pours into it. No fade to black
   at the foot (it read as a grey smear above white): the picture runs to a clean edge under its own scrim,
   and only the vignette stays. */
body:not(.dark-mode) .coc-hero__fx {
    background: radial-gradient(125% 92% at 50% 36%, transparent 50%, rgba(4, 4, 8, .55) 100%);
}
body:not(.dark-mode) .coc-hero__img,
body:not(.dark-mode) .coc-hero__video {
    -webkit-mask-image: none;
            mask-image: none;
}

/* Entrada del hero: enfocament cinematogràfic (focus-in amb desenfoc). */
@keyframes cocHeroIn {
    from { opacity: 0; transform: translateY(16px); filter: blur(9px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}

/* Parallax d'sortida: el contingut del hero s'enfonsa i s'esvaeix suaument
   en fer scroll (profunditat cinematogràfica). Natiu, sense JS. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: scroll()) {
        .home .coc-hero__inner {
            animation: cocHeroPar linear both;
            animation-timeline: scroll(root);
            animation-range: 0 90vh;
        }
    }
}
@keyframes cocHeroPar { to { transform: translateY(46px); opacity: .82; } }

/* Revelat "cortina" (wipe-up) per als titulars destacats — molt cine. */
@media (prefers-reduced-motion: no-preference) {
    @supports (animation-timeline: view()) {
        .coc-sec-head__title,
        .coc-cover__title {
            animation: cocWipe .9s cubic-bezier(.2, .7, .2, 1) both;
            animation-timeline: view();
            animation-range: entry 4% entry 42%;
        }
    }
}
@keyframes cocWipe {
    from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(12px); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
}

/* Efecte "llanterna": un focus de llum càlida segueix el cursor sobre
   l'article destacat (només ratolí fi; res a mòbil/tàctil). */
@media (hover: hover) and (pointer: fine) {
    .coc-cover::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        pointer-events: none;
        opacity: 0;
        transition: opacity .45s ease;
        background: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 50%),
            rgba(255, 236, 200, .18), rgba(255, 236, 200, .05) 42%, transparent 68%);
        mix-blend-mode: screen;
    }
    .coc-cover:hover::before { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .coc-hero__fx canvas { display: none; }
    .coc-cover::before { display: none; }
}

/* ============================================================
   MailPoet subscription pages (single-mailpoet_page.php):
   one quiet panel, the site's type and pill buttons.
   ============================================================ */
.coc-sub {
    min-height: 100svh;
    padding: clamp(7.5rem, 16vh, 10rem) 16px clamp(4rem, 10vh, 6rem);
    background: #f4f4f5;
    color: #141417;
}
.coc-sub__panel {
    max-width: 34rem;
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem);
    background: #fff;
    border: 1px solid rgba(20, 20, 23, .12);
    border-radius: 20px;
}
.coc-sub__mark { display: inline-block; border-radius: 50%; }
.coc-sub__mark img { display: block; width: 56px; height: 56px; }
.coc-sub__eyebrow {
    display: flex; align-items: center; gap: .65rem;
    margin: 1.6rem 0 .6rem;
    font: 600 .72rem/1 var(--coc-sans); letter-spacing: .2em; text-transform: uppercase;
    color: #5f5f66;
}
.coc-sub__eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.coc-sub__title {
    margin: 0 0 1.6rem;
    font-family: var(--coc-serif);
    font-size: clamp(2rem, 5vw, 2.6rem);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -.015em;
    color: inherit;
    text-wrap: balance;
}
.coc-sub__body { font-size: 1.02rem; line-height: 1.65; }
.coc-sub__body p { margin: 0 0 1rem; }
.coc-sub__body a { color: inherit; text-underline-offset: 3px; }
.coc-sub__back { margin: 2rem 0 0; padding-top: 1.4rem; border-top: 1px solid rgba(20, 20, 23, .1); font-size: .92rem; }
.coc-sub__back a { color: #5f5f66; text-decoration: none; }
.coc-sub__back a::before { content: "← "; }
.coc-sub__back a:hover { color: #141417; }

/* Form */
.coc-sub .mailpoet_paragraph { margin: 0 0 1.3rem; }
.coc-sub .mailpoet-manage-subscription > p:first-of-type label,
.coc-sub .mailpoet_text_label,
.coc-sub .mailpoet_select_label {
    display: block;
    margin: 0 0 .5rem;
    font: 600 .72rem/1.2 var(--coc-sans); letter-spacing: .16em; text-transform: uppercase;
    color: #5f5f66;
}
.coc-sub .mailpoet-manage-subscription > p:first-of-type label strong {
    display: block; margin-top: .45rem;
    font: 500 1.15rem/1.3 var(--coc-sans); letter-spacing: 0; text-transform: none;
    color: #141417; overflow-wrap: anywhere;
}
.coc-sub .mailpoet-manage-subscription > p:first-of-type > br { display: none; }
.coc-sub .mailpoet-change-email-info { display: block; margin-top: .4rem; font-size: .88rem; color: #5f5f66; }
.coc-sub .mailpoet_required { color: inherit; }
.coc-sub .mailpoet_text,
.coc-sub .mailpoet_select {
    width: 100% !important;
    min-height: 50px;
    padding: 0 1rem !important;
    border: 1px solid rgba(20, 20, 23, .2) !important;
    border-radius: 12px !important;
    background-color: #fff !important;
    color: #141417 !important;
    font: 400 1rem var(--coc-sans) !important;
    box-shadow: none !important;
    transition: border-color .2s ease;
}
.coc-sub .mailpoet_text[disabled] { background-color: #f4f4f5 !important; color: #5f5f66 !important; }
.coc-sub .mailpoet_select {
    -webkit-appearance: none; appearance: none;
    padding-right: 2.6rem !important;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23141417' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 1rem center !important;
}
.coc-sub .mailpoet_text:focus-visible,
.coc-sub .mailpoet_select:focus-visible { outline: 2px solid #141417; outline-offset: 2px; border-color: #141417 !important; }
.coc-sub .mailpoet_submit {
    min-height: 52px;
    margin-top: .4rem;
    padding: 0 1.9rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #141417 !important;
    color: #fff !important;
    font: 600 1rem var(--coc-sans) !important;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}
.coc-sub .mailpoet_submit:hover { background: #2e2e33 !important; }
.coc-sub .mailpoet_submit:active { transform: scale(.98); }
.coc-sub .mailpoet_submit:focus-visible { outline: 2px solid #141417; outline-offset: 3px; }
.coc-sub .mailpoet_form_loading { margin-left: .8rem; }
@media (prefers-reduced-motion: reduce) {
    .coc-sub .mailpoet_submit, .coc-sub .mailpoet_text, .coc-sub .mailpoet_select { transition: none; }
}
body.dark-mode .coc-sub { background: #121110; color: #ece5d8; }
body.dark-mode .coc-sub__panel { background: #191714; border-color: rgba(236, 229, 216, .12); }
/* Some mobile form rules upsize labels; keep the eyebrow scale. */
.coc-sub .mailpoet_text_label,
.coc-sub .mailpoet_select_label { font-size: .72rem !important; font-weight: 600 !important; line-height: 1.2 !important; }
/* Utility page: the floating soundtrack player would cover the form. */
.single-mailpoet_page .coc-dock { display: none !important; }
/* No "Like" widget on utility pages; the unsubscribe confirmation link is the page's one action, so it reads as a button. */
.coc-sub .likebtn_container { display: none !important; }
.coc-sub .mailpoet_confirm_unsubscribe > br { display: none; }
.coc-sub .mailpoet_confirm_unsubscribe a {
    /* Own line under the sentence: inline it stretched the paragraph's line boxes. */
    display: flex; align-items: center; width: fit-content;
    min-height: 52px; margin-top: 1.4rem; padding: 0 1.9rem;
    border-radius: 999px; background: #141417; color: #fff;
    font: 600 1rem var(--coc-sans); text-decoration: none;
    transition: background-color .2s ease;
}
.coc-sub .mailpoet_confirm_unsubscribe a:hover { background: #2e2e33; color: #fff; }
.coc-sub .mailpoet_confirm_unsubscribe a:focus-visible { outline: 2px solid #141417; outline-offset: 3px; }

/* Legal pages: cookie tables. Phones get one labelled card per cookie (labels from data-label), not a sideways scroll. */
.coc-cookie-table td code { overflow-wrap: anywhere; }
@media (max-width: 640px) {
    .coc-cookie-table { overflow: visible; }
    .coc-cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .coc-cookie-table table, .coc-cookie-table tbody, .coc-cookie-table tr, .coc-cookie-table td { display: block; width: 100%; }
    .coc-cookie-table tr { padding: 1rem 0; border-bottom: 1px solid rgba(20, 20, 23, .14); }
    .coc-cookie-table tr:first-child { border-top: 1px solid rgba(20, 20, 23, .14); }
    .coc-cookie-table td { padding: .1rem 0; border: 0; line-height: 1.5; }
    .coc-cookie-table td::before {
        content: attr(data-label);
        display: block;
        margin-top: .55rem;
        font: 600 .7rem/1.4 var(--coc-sans);
        letter-spacing: .12em;
        text-transform: uppercase;
        color: rgba(20, 20, 23, .62);
    }
    .coc-cookie-table td:first-child::before { display: none; }
    body.dark-mode .coc-cookie-table tr { border-color: rgba(255, 255, 255, .14); }
    body.dark-mode .coc-cookie-table td::before { color: rgba(255, 255, 255, .66); }
}

/* Contact form: first-layer privacy note. */
.coc-form__legal { margin: .4rem 0 1rem; font-size: .82rem; line-height: 1.5; opacity: .78; }
.coc-form__legal a { color: inherit !important; text-decoration: underline; text-underline-offset: 2px; }

/*
 * Cookie consent (inc/privacy.php, replaces CookieYes): a card at the bottom left, over nothing important,
 * full width on phones (above the audio dock until the visitor answers). «Aceptar» and «Rechazar» alike.
 */
.coc-consent {
    position: fixed;
    z-index: 70;
    left: clamp(15px, 3vw, 2rem);
    bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    width: min(30rem, calc(100vw - 30px));
    padding: 1.2rem 1.35rem 1.35rem;
    border: 1px solid rgba(20, 20, 23, .12);
    border-radius: 22px;
    background: #fff;
    color: #141417;
    box-shadow: 0 26px 60px -24px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .06);
    font-family: var(--coc-sans);
}
.coc-consent[hidden] { display: none; }
.coc-consent__text { margin: 0 0 1rem; font-size: .92rem; line-height: 1.55; }
.coc-consent__text a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.coc-consent__btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.coc-consent__btns button {
    min-height: 48px;
    padding: 0 1rem;
    border: 1px solid #141417;
    border-radius: 999px;
    background: transparent;
    color: #141417;
    font: 600 .92rem/1.2 var(--coc-sans);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}
.coc-consent__btns button:hover { background: #141417; color: #fff; }
.coc-consent :is(a, button):focus-visible { outline: 2px solid #141417; outline-offset: 3px; }
body.dark-mode .coc-consent { background: #18181c; color: #f4f4f5; border-color: rgba(255, 255, 255, .14); }
body.dark-mode .coc-consent__btns button { border-color: rgba(255, 255, 255, .75); color: #fff; }
body.dark-mode .coc-consent__btns button:hover { background: #fff; color: #141417; }
body.dark-mode .coc-consent :is(a, button):focus-visible { outline-color: #fff; }

/* The cookie, bottom left on every page: back to the choice at any time (AEPD: as easy to withdraw as to give).
   48px, a hairline; on hover or focus it opens into a pill with its word. Hidden while the card is open. */
.coc-galeta {
    position: fixed;
    z-index: 55;
    left: 15px;
    bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    display: inline-flex;
    align-items: center;
    gap: 0;
    height: 48px;
    max-width: 48px;
    padding: 0 12px;
    overflow: hidden;
    border: 1px solid rgba(20, 20, 23, .14);
    border-radius: 999px;
    background: #fff;
    color: #141417;
    box-shadow: 0 10px 26px -12px rgba(0, 0, 0, .45), 0 1px 3px rgba(0, 0, 0, .08);
    font: 600 .88rem/1 var(--coc-sans);
    white-space: nowrap;
    cursor: pointer;
}
.coc-galeta svg { flex: none; width: 22px; height: 22px; }
.coc-galeta__txt { opacity: 0; }
.coc-galeta:is(:hover, :focus-visible) { gap: .5rem; max-width: 12rem; padding-right: 1.05rem; }
.coc-galeta:is(:hover, :focus-visible) .coc-galeta__txt { opacity: 1; }
.coc-galeta:focus-visible { outline: 2px solid #141417; outline-offset: 3px; }
body.dark-mode .coc-galeta { background: rgba(14, 14, 18, .9); color: #fff; border-color: rgba(255, 255, 255, .18); }
body.dark-mode .coc-galeta:focus-visible { outline-color: #fff; }
html:has(.coc-consent:not([hidden])) .coc-galeta { display: none; }
/* «Cambiar mi elección» inside the cookie policy. */
button[data-coc-consent-open]:not(.coc-galeta) {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: .4rem;
    padding: 0 1.1rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: 600 .92rem/1.2 var(--coc-sans);
    cursor: pointer;
}
button[data-coc-consent-open]:not(.coc-galeta):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (max-width: 575.98px) {
    .coc-consent { left: 12px; right: 12px; width: auto; }
    .coc-galeta { left: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
    .coc-consent:not([hidden]) { animation: cocConsentIn .35s cubic-bezier(.2, .7, .2, 1) both; }
    @keyframes cocConsentIn { from { opacity: 0; translate: 0 .75rem; } }
    .coc-galeta { transition: max-width .35s cubic-bezier(.2, .7, .2, 1), gap .35s ease, padding .35s ease; }
    .coc-galeta__txt { transition: opacity .25s ease .05s; }
}
@media print { .coc-galeta, .coc-consent { display: none !important; } }

/* Article: where it happened + nearby stories (inc/atlas.php, coc_atlas_article_block). */
.coc-place { margin: 2.4rem 0 0; padding: 1.4rem 0 0; border-top: 1px solid rgba(20, 20, 23, .12); }
.coc-place__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.2rem; }
.coc-place__where { display: flex; align-items: center; gap: .5rem; margin: 0; font-family: var(--coc-serif); font-size: 1.2rem; }
.coc-place__where svg { width: 22px; height: 22px; flex: none; }
.coc-place__map { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; padding: 0 1.1rem; border: 1px solid #141417; border-radius: 999px; color: #141417; font: 600 .88rem/1 var(--coc-sans); text-decoration: none; transition: background-color .2s ease, color .2s ease; }
.coc-place__map:hover { background: #141417; color: #fff; }
.coc-place__near-t { margin: 1.4rem 0 .5rem; font-family: var(--coc-sans); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .62; }
.coc-place__near { margin: 0; padding: 0; list-style: none; }
.coc-place__near li { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid rgba(20, 20, 23, .08); }
.coc-place__near a { color: inherit; text-underline-offset: .18em; }
.coc-place__near span { flex: none; font-size: .85rem; opacity: .62; font-variant-numeric: tabular-nums; }
body.dark-mode .coc-place, body.dark-mode .coc-place__near li { border-color: rgba(255, 255, 255, .12); }
body.dark-mode .coc-place__map { border-color: #fff; color: #fff; }
body.dark-mode .coc-place__map:hover { background: #fff; color: #141417; }

/*
 * Home: the Atlas banner (coc_atlas_promo). Catalonia drawn by comarques, every mapped story a light that
 * breathes; the map tilts back a little, like a table seen from a chair. Same voice as the home: dark, serif, hairlines.
 */
.coc-atlas-promo { padding: clamp(2.6rem, 6vw, 5rem) 0 0; }
.coc-atlas-promo__card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: clamp(1.6rem, 4vw, 3.4rem);
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 28px;
    background:
        radial-gradient(70% 110% at 82% 50%, rgba(242, 180, 90, .11), transparent 62%),
        linear-gradient(180deg, #131317, #0c0c0f);
    color: #fff;
    transition: border-color .3s ease;
}
.coc-atlas-promo__card:hover { border-color: rgba(255, 255, 255, .24); }
.coc-atlas-promo__kicker {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin: 0 0 1rem;
    font: 600 .74rem/1 var(--coc-sans);
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}
.coc-atlas-promo__new { padding: .38rem .6rem; border-radius: 999px; background: #f2b45a; color: #141417; letter-spacing: .12em; }
.coc-atlas-promo__title {
    margin: 0 0 1rem;
    font-family: var(--coc-serif);
    font-size: clamp(2.1rem, 4.4vw, 3.5rem);
    font-weight: 500;
    line-height: 1.02;
    letter-spacing: -.02em;
    color: #fff;
    text-wrap: balance;
}
.coc-atlas-promo__lead { max-width: 40ch; margin: 0 0 1.8rem; color: rgba(255, 255, 255, .72); font-size: 1.05rem; line-height: 1.6; text-wrap: pretty; }
.coc-atlas-promo__cta {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-height: 52px;
    padding: 0 1.4rem 0 1.6rem;
    border-radius: 999px;
    background: #fff;
    color: #141417 !important;
    font: 600 .98rem/1 var(--coc-sans);
    text-decoration: none !important;
    transition: box-shadow .25s ease;
}
.coc-atlas-promo__cta svg { width: 20px; height: 20px; transition: transform .25s ease; }
.coc-atlas-promo__cta:hover { box-shadow: 0 14px 34px -14px rgba(242, 180, 90, .6); }
.coc-atlas-promo__cta:hover svg { transform: translateX(3px); }
.coc-atlas-promo__cta:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
/* The whole card answers a click; the CTA stays the one focusable link (never transform it: its ::after is the hit area). */
.coc-atlas-promo__cta::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

.coc-atlas-promo__map {
    position: relative;
    justify-self: center;
    width: min(100%, 440px);
    aspect-ratio: 493 / 500;
    transform: perspective(1100px) rotateX(16deg) rotateZ(-3deg);
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.coc-atlas-promo__card:hover .coc-atlas-promo__map { transform: perspective(1100px) rotateX(6deg) rotateZ(0) scale(1.02); }
.coc-atlas-promo__map img, .coc-atlas-promo__pts { position: absolute; inset: 0; width: 100%; height: 100%; }
.coc-atlas-promo__map img { filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .55)); }
.coc-atlas-promo__glow circle { fill: #f2b45a; opacity: .45; }
.coc-atlas-promo__core circle { fill: #fff6e2; stroke: #f2b45a; stroke-width: 1; }
@keyframes cocBreathe { 0%, 100% { opacity: .28; } 50% { opacity: .85; } }

@media (max-width: 767.98px) {
    .coc-atlas-promo__card { grid-template-columns: minmax(0, 1fr); padding: 1.4rem 1.3rem 1.6rem; border-radius: 22px; }
    .coc-atlas-promo__map { order: -1; width: min(100%, 300px); margin-bottom: -.4rem; }
    .coc-atlas-promo__lead { font-size: 1rem; }
}
@media (prefers-reduced-motion: no-preference) {
    .coc-atlas-promo__glow circle { animation: cocBreathe 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
}
@media (prefers-reduced-motion: reduce) {
    .coc-atlas-promo__map, .coc-atlas-promo__cta, .coc-atlas-promo__cta svg { transition: none; }
}
/* Light: the same banner as a sheet of warm paper with the map engraved in ink (the white SVG inverted)
   and every story an amber point that still breathes. Ink CTA, ink focus ring. */
body:not(.dark-mode) .coc-atlas-promo__card {
    border-color: var(--coc-home-line);
    background:
        radial-gradient(70% 110% at 82% 50%, rgba(208, 138, 30, .13), transparent 62%),
        linear-gradient(180deg, #f8f6f1, #f2efe7);
    color: var(--coc-home-ink);
}
body:not(.dark-mode) .coc-atlas-promo__card:hover { border-color: rgba(20, 20, 23, .26); }
body:not(.dark-mode) .coc-atlas-promo__kicker { color: var(--coc-home-muted); }
body:not(.dark-mode) .coc-atlas-promo__title { color: var(--coc-home-ink); }
body:not(.dark-mode) .coc-atlas-promo__lead { color: var(--coc-home-text); }
body:not(.dark-mode) .coc-atlas-promo__cta { background: var(--coc-home-ink); color: #fff !important; }
body:not(.dark-mode) .coc-atlas-promo__cta:hover { box-shadow: 0 14px 30px -14px rgba(143, 84, 16, .55); }
body:not(.dark-mode) .coc-atlas-promo__cta:focus-visible { outline-color: var(--coc-home-ink); }
body:not(.dark-mode) .coc-atlas-promo__map img {
    /* A 0-blur warm shadow doubles the inverted hairlines into sepia ink; the soft one lifts the sheet off the paper. */
    filter: invert(1) drop-shadow(0 0 0 rgba(74, 50, 20, .85)) drop-shadow(0 26px 30px rgba(70, 45, 10, .16));
}
body:not(.dark-mode) .coc-atlas-promo__glow circle { fill: #d08a1e; }
body:not(.dark-mode) .coc-atlas-promo__core circle { fill: #b8741a; stroke: #fff8ea; }

/* ============================================================
   PAGE HEADER shared by every section page (coc_page_head): same title size and the same distance from the
   menu everywhere (Marc, 18-10-2026). Change it here, never per page.
   ============================================================ */
:root {
    --coc-ph-top: clamp(2.6rem, 6vw, 5rem);
    --coc-ph-bottom: clamp(1.6rem, 4vw, 2.6rem);
}
.coc-ph { padding-top: var(--coc-ph-top); padding-bottom: var(--coc-ph-bottom); }
.coc-ph__kicker { margin-bottom: .9rem; }
.coc-ph__title {
    margin: 0 0 1rem;
    max-width: 16ch;
    font-family: var(--coc-serif);
    font-size: clamp(2.9rem, 7.6vw, 6.6rem);
    font-weight: 500;
    line-height: .96;
    letter-spacing: -.035em;
    color: inherit;
    text-wrap: balance;
}
.coc-ph__lead { max-width: 46ch; margin: 0; font-size: clamp(1rem, 1.4vw, 1.15rem); line-height: 1.6; opacity: .72; text-wrap: pretty; }
body.dark-mode .coc-ph, body.dark-mode .coc-ph__title { color: #fff; }
body.dark-mode .coc-ph .coc-kicker { color: #fff; }
@media (prefers-reduced-motion: no-preference) {
    /* Transform only: the words are readable from the first frame. */
    .coc-ph__kicker, .coc-ph__title, .coc-ph__lead { animation: cocPhRise .45s cubic-bezier(.2, .7, .2, 1) both; }
    .coc-ph__lead { animation-delay: .06s; }
    @keyframes cocPhRise { from { transform: translateY(14px); } }
}

/* Default pages (page.php): a reading column under the shared header, a hairline between them. */
.coc-page { padding-top: clamp(1.6rem, 3vw, 2.4rem); border-top: 1px solid rgba(20, 20, 23, .1); }
body.dark-mode .coc-page { border-top-color: rgba(255, 255, 255, .1); }
.coc-page__body { max-width: 72ch; }
